Class: AwsConfigurationRecorder
- Inherits:
-
Object
- Object
- AwsConfigurationRecorder
- Includes:
- AwsSingularResourceMixin
- Defined in:
- lib/resources/aws/aws_config_recorder.rb
Defined Under Namespace
Classes: Backend
Instance Attribute Summary collapse
-
#recorder_name ⇒ Object
readonly
Returns the value of attribute recorder_name.
-
#resource_types ⇒ Object
readonly
Returns the value of attribute resource_types.
-
#role_arn ⇒ Object
readonly
Returns the value of attribute role_arn.
Instance Method Summary collapse
- #recording? ⇒ Boolean
- #recording_all_global_types? ⇒ Boolean
- #recording_all_resource_types? ⇒ Boolean
- #status ⇒ Object
- #to_s ⇒ Object
Methods included from AwsSingularResourceMixin
Methods included from AwsResourceMixin
#catch_aws_errors, #check_resource_param_names, #initialize, #inspec_runner
Instance Attribute Details
#recorder_name ⇒ Object (readonly)
Returns the value of attribute recorder_name.
15 16 17 |
# File 'lib/resources/aws/aws_config_recorder.rb', line 15 def recorder_name @recorder_name end |
#resource_types ⇒ Object (readonly)
Returns the value of attribute resource_types.
15 16 17 |
# File 'lib/resources/aws/aws_config_recorder.rb', line 15 def resource_types @resource_types end |
#role_arn ⇒ Object (readonly)
Returns the value of attribute role_arn.
15 16 17 |
# File 'lib/resources/aws/aws_config_recorder.rb', line 15 def role_arn @role_arn end |
Instance Method Details
#recording? ⇒ Boolean
38 39 40 41 |
# File 'lib/resources/aws/aws_config_recorder.rb', line 38 def recording? return unless @exists status[:recording] end |
#recording_all_global_types? ⇒ Boolean
25 26 27 |
# File 'lib/resources/aws/aws_config_recorder.rb', line 25 def recording_all_global_types? @recording_all_global_types end |
#recording_all_resource_types? ⇒ Boolean
21 22 23 |
# File 'lib/resources/aws/aws_config_recorder.rb', line 21 def recording_all_resource_types? @recording_all_resource_types end |
#status ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/resources/aws/aws_config_recorder.rb', line 29 def status return {} unless @exists backend = BackendFactory.create(inspec_runner) catch_aws_errors do response = backend.describe_configuration_recorder_status(configuration_recorder_names: [@recorder_name]) @status = response.configuration_recorders_status.first.to_h end end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/resources/aws/aws_config_recorder.rb', line 17 def to_s "Configuration_Recorder: #{@recorder_name}" end |