You are viewing documentation for version 1 of the AWS SDK for Ruby. Version 2 documentation can be found here.
Class: AWS::EC2::RouteTableCollection
- Inherits:
-
Collection
- Object
- Collection
- AWS::EC2::RouteTableCollection
- Includes:
- Core::Collection::Simple, TaggedCollection
- Defined in:
- lib/aws/ec2/route_table_collection.rb
Instance Method Summary collapse
-
#[](route_table_id) ⇒ RouteTable
-
#create(options = {}) ⇒ RouteTable
Creates a route table.
-
#main_route_table ⇒ RouteTable
Returns the main (default) route table.
Methods included from Core::Collection
#each, #each_batch, #enum, #first, #in_groups_of, #page
Methods included from TaggedCollection
#tagged, #tagged_values, #with_tag
Methods included from FilteredCollection
Instance Method Details
#[](route_table_id) ⇒ RouteTable
45 46 47 |
# File 'lib/aws/ec2/route_table_collection.rb', line 45 def [] route_table_id RouteTable.new(route_table_id, :config => config) end |
#create(options = {}) ⇒ RouteTable
Creates a route table.
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/aws/ec2/route_table_collection.rb', line 31 def create = {} client_opts = {} client_opts[:vpc_id] = vpc_id_option() resp = client.create_route_table(client_opts) RouteTable.new_from(:create_route_table, resp.route_table, resp.route_table.route_table_id, :config => config) end |
#main_route_table ⇒ RouteTable
Returns the main (default) route table. This route table is automatically assigned to new subnets and can not be deleted.
52 53 54 55 |
# File 'lib/aws/ec2/route_table_collection.rb', line 52 def main_route_table @main = AWS.memoize { self.find {|rt| rt.main? } } if @main.nil? @main end |