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

Class: Aws::EC2::RouteTableAssociation

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)

#mainBoolean (readonly)

Indicates whether this is the main route table.

Returns:

  • (Boolean)

    Indicates whether this is the main route table.

#route_table_association_idString (readonly)

The ID of the association between a route table and a subnet.

Returns:

  • (String)

    The ID of the association between a route table and a subnet.

#route_table_idString (readonly)

The ID of the route table.

Returns:

  • (String)

    The ID of the route table.

#subnet_idString (readonly)

The ID of the subnet. A subnet ID is not returned for an implicit association.

Returns:

  • (String)

    The ID of the subnet.

Instance Method Details

#delete(options = {}) ⇒ Struct

Disassociates a subnet from a route table.

After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC's main route table. For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide.

Examples:

Request syntax example with placeholder values


routetableassociation.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:

#replace_subnet(options = {}) ⇒ RouteTableAssociation

Examples:

Request syntax example with placeholder values


routetableassociation.replace_subnet({
  dry_run: false,
  route_table_id: "String", # required
})

Basic usage

routetableassociation = routetableassociation.replace_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.

  • :route_table_id (required, String)

    The ID of the new route table to associate with the subnet.

Returns:

See Also:

#route_tableRouteTable?

Returns:

#subnetSubnet?

Returns: