Class: AWS::EC2::InternetGatewayCollection

Inherits:
Collection
  • Object
show all
Includes:
Core::Collection::Simple, TaggedCollection
Defined in:
lib/aws/ec2/internet_gateway_collection.rb

Instance Attribute Summary

Attributes included from Core::Model

#config

Instance Method Summary collapse

Methods included from Core::Collection::Simple

#each_batch

Methods included from Core::Collection

#each, #each_batch, #enum, #first, #in_groups_of, #page

Methods included from Core::Model

#client, #config_prefix, #initialize, #inspect

Methods included from TaggedCollection

#tagged, #tagged_values

Methods included from FilteredCollection

#filter, #filtered_request, #initialize

Instance Method Details

#[](internet_gateway_id) ⇒ InternetGateway

Parameters:

  • internet_gateway_id (String)

Returns:


34
35
36
# File 'lib/aws/ec2/internet_gateway_collection.rb', line 34

def [] internet_gateway_id
  InternetGateway.new(internet_gateway_id, :config => config)
end

#createInternetGateway

Creates a new Internet gateway in your AWS account. After creating the gateway you can attach it to a VPC.

Returns:


27
28
29
30
# File 'lib/aws/ec2/internet_gateway_collection.rb', line 27

def create
  response = client.create_internet_gateway
  self[response.internet_gateway.internet_gateway_id] 
end