Class: AwsSubnets
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
23
24
25
26
|
# File 'lib/resources/aws/aws_subnets.rb', line 23
def fetch_from_api
backend = BackendFactory.create(inspec_runner)
@table = backend.describe_subnets.subnets.map(&:to_h)
end
|
#to_s ⇒ Object
37
38
39
|
# File 'lib/resources/aws/aws_subnets.rb', line 37
def to_s
'EC2 VPC Subnets'
end
|
#validate_params(resource_params) ⇒ Object
16
17
18
19
20
21
|
# File 'lib/resources/aws/aws_subnets.rb', line 16
def validate_params(resource_params)
unless resource_params.empty?
raise ArgumentError, 'aws_vpc_subnets does not accept resource parameters.'
end
resource_params
end
|