Queries the CIDR blocks of a transit router.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListTransitRouterCidr

The operation that you want to perform. Set the value to ListTransitRouterCidr.

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 a value, but you must make sure that the value is unique among all requests. The token can contain only ASCII characters.

Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The value of RequestId may be different for each API request.
TransitRouterId String Yes tr-p0w3x8c9em72a40nw****

The ID of the transit router.

TransitRouterCidrId String No cidr-0zv0q9crqpntzz****

The ID of the 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.

DryRun Boolean No false

Specifies whether to check the request without performing the operation. Valid values:

  • true: checks the request without performing the operation. The system checks the required parameters, the request format, and the service limits. If the request fails the check, an error message is returned. If the request passes the check, the DryRunOperation error code is returned.
  • false (default): sends the request. After the request passes the check, the operation is performed.

Response parameters

Parameter Type Example Description
RequestId String 0876E54E-3E36-5C31-89F0-9EE8A9266F9A

The request ID.

CidrLists Array of CidrLists

The information about the CIDR blocks.

TransitRouterCidrId String cidr-0zv0q9crqpntzz****

The ID of the CIDR block.

Family String IPv4

The type of the CIDR block.

The value is set to IPv4, which indicates that the CIDR block is of the IPv4 type.

Name String nametest

The name of the CIDR block.

Description String desctest

The description of the CIDR block.

Cidr String 192.168.10.0/24

The CIDR block.

PublishCidrRoute Boolean true

Indicates whether the system automatically adds a route to the route table of the transit router.

  • true: yes.

    A value of true indicates that after you create a private VPN connection and enable route learning for the connection, the system automatically adds a blackhole route to the route table of the transit router to which the VPN connection is attached.

    The destination CIDR block of the blackhole route is the CIDR block of the transit router. The CIDR block of the transit router refers to the CIDR block from which gateway IP addresses are allocated to IPsec-VPN connections.

    The blackhole route is advertised only to the route table of the virtual border router (VBR) that is connected to the transit router.

  • false: no.
TransitRouterId String tr-p0w3x8c9em72a40nw****

The ID of the transit router.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListTransitRouterCidr
&ClientToken=123e4567-e89b-12d3-a456-426****
&TransitRouterId=tr-p0w3x8c9em72a40nw****
&TransitRouterCidrId=cidr-0zv0q9crqpntzz****
&RegionId=ap-southeast-2
&DryRun=false
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListTransitRouterCidrResponse>
    <RequestId>0876E54E-3E36-5C31-89F0-9EE8A9266F9A</RequestId>
    <CidrLists>
        <TransitRouterCidrId>cidr-0zv0q9crqpntzz****</TransitRouterCidrId>
        <Family>IPv4</Family>
        <Name>nametest</Name>
        <Description>desctest</Description>
        <Cidr>192.168.10.0/24</Cidr>
        <PublishCidrRoute>true</PublishCidrRoute>
        <TransitRouterId>tr-p0w3x8c9em72a40nw****</TransitRouterId>
    </CidrLists>
</ListTransitRouterCidrResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "0876E54E-3E36-5C31-89F0-9EE8A9266F9A",
  "CidrLists" : [ {
    "TransitRouterCidrId" : "cidr-0zv0q9crqpntzz****",
    "Family" : "IPv4",
    "Name" : "nametest",
    "Description" : "desctest",
    "Cidr" : "192.168.10.0/24",
    "PublishCidrRoute" : true,
    "TransitRouterId" : "tr-p0w3x8c9em72a40nw****"
  } ]
}

Error codes

For a list of error codes, see Service error codes.