Queries how IP addresses within the CIDR block of a transit router are allocated.

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 ListTransitRouterCidrAllocation

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

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-p0w3x8c9em72a40nw****

The ID of the transit router.

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.

TransitRouterCidrId String No cidr-0zv0q9crqpntzz****

The ID of the CIDR block.

You can call ListTransitRouterCidr to query the ID of a CIDR block.

CidrBlock String No 192.168.10.0/28

The CIDR block that has been allocated to network instances.

Cidr String No 192.168.10.0/24

The CIDR block of the transit router.

DedicatedOwnerId String No VPN

The CIDR block that is for exclusive use.

Set the value to VPN, which specifies the CIDR block that is reserved for VPN connections.

AttachmentId String No tr-attach-2nalp6yksc805w****

The ID of the network instance connection.

AttachmentName String No nametest

The name of the network instance connection.

DryRun Boolean No false

Specifies whether only to precheck the request. Valid values:

  • true: prechecks the request but does not query how IP addresses within the CIDR block of a transit router are allocated. The system checks the required parameters, the request format, and the service limits. If the request fails to pass the precheck, an error message is returned. If the request passes the precheck, the DryRunOperation error code is returned.
  • false (default): sends the request. After the request passes the precheck, allocated IP addresses are queried.
MaxResults Integer No 20

The number of entries returned on each page.

  • If you do not set MaxResults, it indicates that you do not need to query results in batches. The value of MaxResults indicates the total number of entries.
  • If a value is specified for MaxResults, it indicates that you need to query results in batches. Valid values: 1 to 100. We recommend that you set MaxResults to 20.

    The value of MaxResults in the response indicates the number of entries in the current batch.

NextToken String No FFmyTO70tTpLG6I3FmYAXGKPd****

The token that determines the start point of the query. Valid values:

  • If this is your first query or no subsequent query is to be sent, ignore this parameter.
  • If a subsequent query is to be sent, set the value to the value of NextToken that was returned from the last call.

Response parameters

Parameter Type Example Description
NextToken String FFmyTO70tTpLG6I3FmYAXGKPd****

The token that determines the start point of the query. Valid values:

  • If NextToken was not returned, it indicates that no additional results exist.
  • If NextToken was returned in the previous query, specify the value to obtain the next set of results.
RequestId String 0876E54E-3E36-5C31-89F0-9EE8A9266F9A

The ID of the request.

TotalCount Integer 1

The total number of entries returned.

MaxResults Integer 1

The number of entries returned on each page.

  • If no value is specified for MaxResults, query results are returned in one batch. The value of MaxResults indicates the total number of entries.
  • If a value is specified for MaxResults, query results are returned in batches. The value of MaxResults in the response indicates the number of entries in the current batch.
TransitRouterCidrAllocations Array of TransitRouterCidrAllocation

The information about the allocated CIDR blocks.

TransitRouterCidrId String cidr-0zv0q9crqpntzz****

The ID of the transit router CIDR block.

AllocatedCidrBlock String 192.168.10.0/28

The CIDR blocks that have been allocated to network instances.

AttachmentId String tr-attach-2nalp6yksc805w****

The ID of the network instance connection.

Cidr String 192.168.10.0/24

The ID of the transit router CIDR block.

AttachmentName String nametest

The name of the network instance connection.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListTransitRouterCidrAllocation
&ClientToken=123e4567-e89b-12d3-a456-426****
&TransitRouterId=tr-p0w3x8c9em72a40nw****
&RegionId=ap-southeast-2
&TransitRouterCidrId=cidr-0zv0q9crqpntzz****
&CidrBlock=192.168.10.0/28
&Cidr=192.168.10.0/24
&AttachmentId=tr-attach-2nalp6yksc805w****
&AttachmentName=nametest
&DryRun=false
&MaxResults=20
&<Common request parameters>

Sample success responses

XML format

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

<ListTransitRouterCidrAllocationResponse>
    <NextToken>FFmyTO70tTpLG6I3FmYAXGKPd****</NextToken>
    <RequestId>0876E54E-3E36-5C31-89F0-9EE8A9266F9A</RequestId>
    <TotalCount>1</TotalCount>
    <MaxResults>1</MaxResults>
    <TransitRouterCidrAllocations>
        <TransitRouterCidrId>cidr-0zv0q9crqpntzz****</TransitRouterCidrId>
        <AllocatedCidrBlock>192.168.10.0/28</AllocatedCidrBlock>
        <AttachmentId>tr-attach-2nalp6yksc805w****</AttachmentId>
        <Cidr>192.168.10.0/24</Cidr>
        <AttachmentName>nametest</AttachmentName>
    </TransitRouterCidrAllocations>
</ListTransitRouterCidrAllocationResponse>

JSON format

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

{
  "RequestId" : "0876E54E-3E36-5C31-89F0-9EE8A9266F9A",
  "TotalCount" : 1,
  "MaxResults" : 1,
  "TransitRouterCidrAllocations" : [ {
    "TransitRouterCidrId" : "cidr-0zv0q9crqpntzz****",
    "AllocatedCidrBlock" : "192.168.10.0/28",
    "AttachmentId" : "tr-attach-2nalp6yksc805w****",
    "Cidr" : "192.168.10.0/24",
    "AttachmentName" : "nametest"
  } ]
}

Error codes

For a list of error codes, visit the API Error Center.