Class: AwsIamGroups
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
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/resources/aws/aws_iam_groups.rb', line 34
def fetch_from_api
backend = BackendFactory.create(inspec_runner)
@table = []
= {}
loop do
api_result = backend.list_groups()
@table += api_result.groups.map(&:to_h)
= { marker: api_result.marker }
break unless api_result.is_truncated
end
end
|
#to_s ⇒ Object
30
31
32
|
# File 'lib/resources/aws/aws_iam_groups.rb', line 30
def to_s
"IAM Groups"
end
|
#validate_params(resource_params) ⇒ Object
17
18
19
20
21
22
23
|
# File 'lib/resources/aws/aws_iam_groups.rb', line 17
def validate_params(resource_params)
unless resource_params.empty?
raise ArgumentError, "aws_iam_groups does not accept resource parameters."
end
resource_params
end
|