You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::EC2::RouteTable

Inherits:
Resources::Resource show all
Defined in:
(unknown)

Instance Attribute Summary collapse

Attributes inherited from Resources::Resource

#client, #identifiers

Instance Method Summary collapse

Methods inherited from Resources::Resource

add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until

Methods included from Resources::OperationMethods

#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations

Constructor Details

#initialize(id, options = {}) ⇒ Object #initialize(options = {}) ⇒ Object

Overloads:

  • #initialize(id, options = {}) ⇒ Object

    Parameters:

    • id (String)

    Options Hash (options):

    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

  • #initialize(options = {}) ⇒ Object

    Options Hash (options):

    • :id (required, String)
    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

Instance Attribute Details

#idString (readonly)

Returns:

  • (String)

#propagating_vgwsArray<Types::PropagatingVgw> (readonly)

Any virtual private gateway (VGW) propagating routes.

Returns:

#route_table_idString (readonly)

The ID of the route table.

Returns:

  • (String)

    The ID of the route table.

#tagsArray<Types::Tag> (readonly)

Any tags assigned to the route table.

Returns:

  • (Array<Types::Tag>)

    Any tags assigned to the route table.

#vpc_idString (readonly)

The ID of the VPC.

Returns:

  • (String)

    The ID of the VPC.

Instance Method Details

#associate_with_subnet(options = {}) ⇒ RouteTableAssociation

Examples:

Request syntax example with placeholder values


routetable.associate_with_subnet({
  dry_run: false,
  subnet_id: "String", # required
})

Basic usage

routetableassociation = routetable.associate_with_subnet(options)
routetableassociation.id
#=> "routetableassociation-id"

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • :subnet_id (required, String)

    The ID of the subnet.

Returns:

See Also:

#associationsArray<RouteTableAssociation>?

Returns:

See Also:

#create_route(options = {}) ⇒ Route

Examples:

Request syntax example with placeholder values


routetable.create_route({
  destination_cidr_block: "String",
  destination_ipv_6_cidr_block: "String",
  dry_run: false,
  egress_only_internet_gateway_id: "String",
  gateway_id: "String",
  instance_id: "String",
  nat_gateway_id: "String",
  network_interface_id: "String",
  vpc_peering_connection_id: "String",
})

Basic usage

route = routetable.create_route(options)
route.destination_cidr_block
#=> "route-destination-cidr-block"

Options Hash (options):

  • :destination_cidr_block (String)

    The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match.

  • :destination_ipv_6_cidr_block (String)

    The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • :egress_only_internet_gateway_id (String)

    [IPv6 traffic only] The ID of an egress-only Internet gateway.

  • :gateway_id (String)

    The ID of an Internet gateway or virtual private gateway attached to your VPC.

  • :instance_id (String)

    The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.

  • :nat_gateway_id (String)

    [IPv4 traffic only] The ID of a NAT gateway.

  • :network_interface_id (String)

    The ID of a network interface.

  • :vpc_peering_connection_id (String)

    The ID of a VPC peering connection.

Returns:

See Also:

#create_tags(options = {}) ⇒ Array<Tag>

Examples:

Request syntax example with placeholder values


routetable.create_tags({
  dry_run: false,
  tags: [ # required
    {
      key: "String",
      value: "String",
    },
  ],
})

Basic usage

tags = routetable.create_tags(options)
tags.map(&:value)
#=> ["tag-value", ...]

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • :tags (required, Array<Types::Tag>)

    One or more tags. The value parameter is required, but if you don\'t want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

Returns:

See Also:

#delete(options = {}) ⇒ Struct

Deletes the specified route table. You must disassociate the route table from any subnets before you can delete it. You can't delete the main route table.

Examples:

Request syntax example with placeholder values


routetable.delete({
  dry_run: false,
})

Options Hash (options):

  • :dry_run (Boolean)

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#routesArray<Route>?

Returns:

See Also:

#vpcVpc?

Returns: