Class: AwsKmsKeys
Defined Under Namespace
Classes: Backend
Instance Attribute Summary
#table
Instance Method Summary
collapse
included
#catch_aws_errors, #check_resource_param_names, #initialize, #inspec_runner
Instance Method Details
#fetch_from_api ⇒ Object
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/resources/aws/aws_kms_keys.rb', line 35
def fetch_from_api
backend = BackendFactory.create(inspec_runner)
@table = []
= { limit: 1000 }
loop do
api_result = backend.list_keys()
@table += api_result.keys.map(&:to_h)
break unless api_result.truncated
= { marker: api_result.next_marker }
end
end
|
#to_s ⇒ Object
31
32
33
|
# File 'lib/resources/aws/aws_kms_keys.rb', line 31
def to_s
"KMS Keys"
end
|
#validate_params(resource_params) ⇒ Object
16
17
18
19
20
21
22
|
# File 'lib/resources/aws/aws_kms_keys.rb', line 16
def validate_params(resource_params)
unless resource_params.empty?
raise ArgumentError, "aws_kms_keys does not accept resource parameters."
end
resource_params
end
|