Modifies the CIDR block of a transit router.
Usage notes
- Before you modify the CIDR block of a transit router, we recommend that you read the limits on transit router CIDR blocks.
- If IP addresses within the CIDR block have been allocated to network instances, you cannot modify the CIDR block.
- When you call ModifyTransitRouterCidr, if no parameter of the PublishCidrRoute operation is modified, ModifyTransitRouterCidr is a synchronous operation. After you call the operation, the new settings are immediately applied.
- If a parameter of the PublishCidrRoute operation is modified, ModifyTransitRouterCidr is an asynchronous operation. After you call the operation, the request ID (RequestId) is returned but the operation is still being performed in the system background.
You can call ListTransitRouterCidr to query the status of the CIDR block of the transit router.
- If the CIDR block of the transit router remains unchanged, the CIDR block is still being modified.
- If the CIDR block of the transit router is changed to the one that you specify in the request, the CIDR block has been modified.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | ModifyTransitRouterCidr |
The operation that you want to perform. Set the value to ModifyTransitRouterCidr. |
| ClientToken | String | No | 123e4567-e89b-12d3-a456-426**** |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. ClientToken can contain only ASCII characters. Note If you do not set this parameter, ClientToken is set to the value of RequestId. The
value of RequestId for each API request may be different.
|
| TransitRouterId | String | Yes | tr-gw8ergozrv77rtbjd**** |
The ID of the transit router. |
| TransitRouterCidrId | String | Yes | cidr-0zv0q9crqpntzz**** |
The ID of the transit router CIDR block. You can call ListTransitRouterCidr to query the ID of a transit route CIDR block. |
| RegionId | String | Yes | ap-southeast-2 |
The ID of the region where the transit router is deployed. You can call the DescribeChildInstanceRegions operation to query the most recent region list. |
| Name | String | No | nametest |
The new name of the transit router CIDR block. The name must be 1 to 128 characters in length. |
| Description | String | No | desctest |
The new description of the transit router CIDR block. The description must be 1 to 256 characters in length. |
| Cidr | String | No | 192.168.10.0/24 |
The new CIDR block of the transit router. |
| DryRun | Boolean | No | false |
Specifies whether only to precheck the request. Valid values:
|
| PublishCidrRoute | Boolean | No | true |
Specifies whether to allow the system to automatically add routes that point to the CIDR block to the route table of the transit router.
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 0876E54E-3E36-5C31-89F0-9EE8A9266F9A |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ModifyTransitRouterCidr
&ClientToken=123e4567-e89b-12d3-a456-426****
&TransitRouterId=tr-gw8ergozrv77rtbjd****
&TransitRouterCidrId=cidr-0zv0q9crqpntzz****
&RegionId=ap-southeast-2
&Name=nametest
&Description=desctest
&Cidr=192.168.10.0/24
&DryRun=false
&PublishCidrRoute=true
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyTransitRouterCidrResponse>
<RequestId>0876E54E-3E36-5C31-89F0-9EE8A9266F9A</RequestId>
</ModifyTransitRouterCidrResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "0876E54E-3E36-5C31-89F0-9EE8A9266F9A"
}
Error codes
For a list of error codes, visit the API Error Center.