Class: AwsVpcs

Inherits:
Object
  • Object
show all
Includes:
AwsPluralResourceMixin
Defined in:
lib/resources/aws/aws_vpcs.rb

Defined Under Namespace

Classes: Backend

Instance Attribute Summary

Attributes included from AwsPluralResourceMixin

#table

Instance Method Summary collapse

Methods included from AwsPluralResourceMixin

included

Methods included from AwsResourceMixin

#catch_aws_errors, #check_resource_param_names, #initialize, #inspec_runner

Instance Method Details

#fetch_from_apiObject



31
32
33
# File 'lib/resources/aws/aws_vpcs.rb', line 31

def fetch_from_api
  @table = BackendFactory.create(inspec_runner).describe_vpcs.to_h[:vpcs]
end

#to_sObject



27
28
29
# File 'lib/resources/aws/aws_vpcs.rb', line 27

def to_s
  'VPCs'
end

#validate_params(raw_params) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/resources/aws/aws_vpcs.rb', line 19

def validate_params(raw_params)
  # No params yet
  unless raw_params.empty?
    raise ArgumentError, 'aws_vpcs does not accept resource parameters'
  end
  raw_params
end