replace_subnet

EC2.RouteTableAssociation.replace_subnet(**kwargs)

Changes the route table associated with a given subnet, internet gateway, or virtual private gateway in a VPC. After the operation completes, the subnet or gateway uses the routes in the new route table. For more information about route tables, see Route tables in the Amazon Virtual Private Cloud User Guide .

You can also use this operation to change which table is the main route table in the VPC. Specify the main route table's association ID and the route table ID of the new main route table.

See also: AWS API Documentation

Request Syntax

route_table_association = route_table_association.replace_subnet(
    DryRun=True|False,
    RouteTableId='string'
)
Parameters
  • DryRun (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 .
  • RouteTableId (string) --

    [REQUIRED]

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

Return type

ec2.RouteTableAssociation

Returns

RouteTableAssociation resource