class AWS::EC2::VPCCollection

def [] vpc_id

def [] vpc_id
  VPC.new(vpc_id, :config => config)
end

def _each_item options = {}, &block

def _each_item options = {}, &block
  response = filtered_request(:describe_vpcs, options, &block)
  response.vpc_set.each do |v|
    yield(VPC.new_from(:describe_vpcs, v, v.vpc_id, :config => config))
  end
end

def create cidr_block, options = {}

Returns:
  • (VPC) -

Options Hash: (**options)
  • :instance_tenancy (Boolean) --

Parameters:
  • options (Hash) --
  • cidr_block (String) -- The CIDR block you want the VPC to
def create cidr_block, options = {}
  tenancy = options.key?(:instance_tenancy) ?
    options[:instance_tenancy].to_s : 'default'
  client_opts = {}
  client_opts[:cidr_block] = cidr_block
  client_opts[:instance_tenancy] = tenancy
  resp = client.create_vpc(client_opts)
  VPC.new_from(:create_vpc, resp.vpc, resp.vpc.vpc_id, :config => config)
end