Calls the AssociateRouteTableWithGateway operation to associate a gateway route table with an IPv4 gateway or IPv6 gateway instance in the same VPC.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:AssociateRouteTableWithGateway |
create |
*Ipv4Gateway
*RouteTable
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the gateway route table and IPv4 gateway instance to associate. You can call the DescribeRegions operation to query the region ID. |
ap-southeast-6 |
| RouteTableId |
string |
Yes |
The ID of the gateway route table to associate. |
vtb-5ts0ohchwkp3dydt2**** |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. The client generates the value. The value must be unique among different requests and cannot exceed 64 ASCII characters in length. Note
If you do not specify this parameter, the system uses the RequestId of the API request as the ClientToken. The RequestId may differ for each API request. |
123e4567-e89b-12d3-a456-426655440000 |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
false |
| GatewayId |
string |
Yes |
The instance ID of the IPv4 gateway to associate. The IPv4 gateway instance to associate must be in the Activated state. |
ipv4gw-5tsnc6s4ogsedtp3k**** |
| GatewayType |
string |
No |
The type of the gateway instance to associate. |
Ipv4Gateway |
| RegionId |
string |
Yes |
The region ID of the IPv4 gateway with which you want to associate the gateway route table. You can call the DescribeRegions operation to query the most recent region list. |
ap-southeast-6 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
F89C2176-8F10-55EF-90CF-CF99D1E3F816 |
Examples
Success response
JSON format
{
"RequestId": "F89C2176-8F10-55EF-90CF-CF99D1E3F816"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ResourceNotFound.Ipv4Gateway | The specified resource ipv4Gateway is not found. | The IPv4 gateway is not found and cannot be deleted. |
| 400 | IncorrectStatus.Ipv4Gateway | The status of %s [%s] is incorrect. | The IPv4 gateway is in an invalid state. Try again later. |
| 400 | ResourceAlreadyAssociated.Ipv4Gateway | The specified resource %s is already associated. | The IPv4 gateway is already associated. |
| 400 | ResourceNotFound.GatewayRouteTable | The specified resource GatewayRouteTable is not found. | The gateway route table cannot be found. |
| 400 | IncorrectStatus.GatewayRouteTable | The status of %s [%s] is incorrect. | The gateway route table is in an invalid state. Try again later. |
| 400 | ResourceAlreadyAssociated.GatewayRouteTable | The specified resource %s is already associated. | The gateway route table is already associated with a gateway of the same type. |
| 400 | OperationDenied.Ipv4GatewayNotActive | The operation is not allowed because of ipv4Gateway [%s] is not active. | The operation is not allowed because the IPv4 gateway is not activated. |
| 400 | OperationDenied.RouteTableTypeIncorrect | The operation is not allowed because of routeTableType is incorrect. | The operation is not allowed because the type of route table is not supported. |
| 400 | ResourceNotFound.RouteTable | The specified resource gatewayRouteTable is not found. | The gateway route table does not exist. |
| 400 | OperationDenied.GatewayAndTableNotInOneVpc | The operation is not allowed because of GatewayAndTableNotInOneVpc. | The gateway route table and gateway do not belong to the same VPC. |
| 400 | IncorrectStatus.RouteTable | The status of the specified route table is incorrect. | |
| 400 | IllegalParam.GatewayType | The param of %s is illegal. | Invalid GatewayType value. |
| 400 | UnsupportedFeature.Ipv6GatewayRouteTable | The feature of %s is not supported. | The border gateway route table cannot be associated with the gateway. |
| 400 | OperationDenied.IngressRoutingNotSupportAnycast | The operation is not allowed because ingress routing not support anycast. | The operation is not allowed because ingress routing not support anycast. |
| 400 | OperationDenied.ExistPublicIpv6IpInVpc | Operation denied because IPV6 public ip exists in VPC. | The operation failed because the ipv6 public IP exists in the VPC. |
| 400 | ResourceNotFound.Ipv6Gateway | The specified resource of IPv6 Gateway is not found. | The incoming IPv6 gateway instance does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.