Class: AwsBillingReports
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/resources/aws/aws_billing_reports.rb', line 44
def fetch_from_api
@table = []
= {}
backend = BackendFactory.create(inspec_runner)
loop do
api_result = backend.describe_report_definitions()
api_result.report_definitions.each do |raw_report|
report = raw_report.to_h
i(time_unit compression).each { |field| report[field].downcase! }
@table << report
end
= { next_token: api_result.next_token }
break unless api_result.next_token
end
end
|
#to_s ⇒ Object
40
41
42
|
# File 'lib/resources/aws/aws_billing_reports.rb', line 40
def to_s
'AWS Billing Reports'
end
|
#validate_params(resource_params) ⇒ Object
33
34
35
36
37
38
|
# File 'lib/resources/aws/aws_billing_reports.rb', line 33
def validate_params(resource_params)
unless resource_params.empty?
raise ArgumentError, 'aws_billing_reports does not accept resource parameters.'
end
resource_params
end
|