replace_route_table_association
async
¶
replace_route_table_association(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
association_id: Optional[RouteTableAssociationId] = None,
route_table_id: Optional[RouteTableId] = None,
) -> ReplaceRouteTableAssociationResult
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 VPC 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.
Parameters:
-
dry_run(Optional[Boolean], default:None) –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 isUnauthorizedOperation. -
association_id(Optional[RouteTableAssociationId], default:None) –The association ID.
-
route_table_id(Optional[RouteTableId], default:None) –The ID of the new route table to associate with the subnet.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To replace the route table associated with a subnet This example associates the specified route table with the subnet for the specified route table association.
>>> await client.replace_route_table_association(association_id='rtbassoc-781d0d1a', route_table_id='rtb-22574640')
Source code in docs_src/capo_ec2/_services/async_ec2.py
58068 58069 58070 58071 58072 58073 58074 58075 58076 58077 58078 58079 58080 58081 58082 58083 58084 58085 58086 58087 58088 58089 58090 58091 58092 58093 58094 58095 58096 58097 58098 58099 58100 58101 58102 58103 58104 58105 58106 58107 58108 58109 58110 58111 58112 58113 58114 58115 58116 58117 58118 58119 58120 58121 58122 58123 58124 58125 58126 58127 | |