Class: AWS::EC2::InternetGatewayCollection
- Inherits:
-
Collection
- Object
- Collection
- AWS::EC2::InternetGatewayCollection
- Includes:
- Core::Collection::Simple, TaggedCollection
- Defined in:
- lib/aws/ec2/internet_gateway_collection.rb
Instance Method Summary collapse
- #[](internet_gateway_id) ⇒ InternetGateway
-
#create ⇒ InternetGateway
Creates a new Internet gateway in your AWS account.
Methods included from Core::Collection
#each, #each_batch, #enum, #first, #in_groups_of, #page
Methods included from TaggedCollection
Methods included from FilteredCollection
Instance Method Details
#[](internet_gateway_id) ⇒ InternetGateway
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 |
#create ⇒ InternetGateway
Creates a new Internet gateway in your AWS account. After creating the gateway you can attach it to a VPC.
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 |