Class: IisAppPool

Inherits:
Object
  • Object
show all
Defined in:
lib/resources/iis_app_pool.rb

Overview

check for web applications in IIS Note: this is only supported in windows 2012 and later

Instance Method Summary collapse

Constructor Details

#initialize(pool_name) ⇒ IisAppPool

Returns a new instance of IisAppPool.



19
20
21
22
23
24
25
26
# File 'lib/resources/iis_app_pool.rb', line 19

def initialize(pool_name)
  @pool_name = pool_name
  @pool_path = "IIS:\\AppPools\\#{@pool_name}"
  @cache = nil

  # verify that this resource is only supported on Windows
  return skip_resource 'The `iis_app_pool` resource is not supported on your OS.' unless inspec.os.windows?
end

Instance Method Details

#enable32bitObject



36
37
38
# File 'lib/resources/iis_app_pool.rb', line 36

def enable32bit
  iis_app_pool[:e32b]
end

#exists?Boolean

Returns:

  • (Boolean)


76
77
78
# File 'lib/resources/iis_app_pool.rb', line 76

def exists?
  !iis_app_pool[:pool_name].empty?
end

#max_processesObject



44
45
46
# File 'lib/resources/iis_app_pool.rb', line 44

def max_processes
  iis_app_pool[:processes]
end

#pipeline_modeObject



40
41
42
# File 'lib/resources/iis_app_pool.rb', line 40

def pipeline_mode
  iis_app_pool[:mode]
end

#pool_nameObject



28
29
30
# File 'lib/resources/iis_app_pool.rb', line 28

def pool_name
  iis_app_pool[:pool_name]
end

#runtime_versionObject



32
33
34
# File 'lib/resources/iis_app_pool.rb', line 32

def runtime_version
  iis_app_pool[:version]
end

#timeoutObject



48
49
50
# File 'lib/resources/iis_app_pool.rb', line 48

def timeout
  iis_app_pool[:timeout]
end

#timeout_daysObject



52
53
54
# File 'lib/resources/iis_app_pool.rb', line 52

def timeout_days
  iis_app_pool[:timeout_days]
end

#timeout_hoursObject



56
57
58
# File 'lib/resources/iis_app_pool.rb', line 56

def timeout_hours
  iis_app_pool[:timeout_hours]
end

#timeout_minutesObject



60
61
62
# File 'lib/resources/iis_app_pool.rb', line 60

def timeout_minutes
  iis_app_pool[:timeout_minutes]
end

#timeout_secondsObject



64
65
66
# File 'lib/resources/iis_app_pool.rb', line 64

def timeout_seconds
  iis_app_pool[:timeout_seconds]
end

#to_sObject



80
81
82
# File 'lib/resources/iis_app_pool.rb', line 80

def to_s
  "IIS App Pool '#{@pool_name}'"
end

#user_identity_typeObject



68
69
70
# File 'lib/resources/iis_app_pool.rb', line 68

def user_identity_type
  iis_app_pool[:user_identity_type]
end

#usernameObject



72
73
74
# File 'lib/resources/iis_app_pool.rb', line 72

def username
  iis_app_pool[:username]
end