class AWS::EC2::VPCCollection

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