Queries reserved CIDR blocks for a vSwitch.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListVSwitchCidrReservations | The operation that you want to perform. Set the value to ListVSwitchCidrReservations. |
VSwitchId | String | Yes | vsw-25navfgbue4g**** | The ID of the vSwitch for which you want to query reserved CIDR blocks. |
VSwitchCidrReservationIds.N | String | No | vcr-bp1m12saqteraw3rp**** | The ID of the reserved CIDR block. You can specify at most 10 IDs. |
VSwitchCidrReservationType | String | No | prefix | The type of the reserved CIDR block. Set the value to prefix. Note When you allocate or the system allocates a CIDR block for an elastic network interface (ENI), it must be allocated from the reserved CIDR block. If the reserved CIDR block is exhausted, the system returns an error. |
IpVersion | String | No | IPv4 | The IP version of the reserved CIDR block. Valid values:
|
NextToken | String | No | FFmyTO70tTpLG6I3FmYAXGKPd**** | The pagination token that is used in the next request to retrieve a new page of results. Valid values:
|
MaxResults | Long | No | 10 | The number of entries to return on each page. Valid values: 1 to 100. Default value: 10. |
RegionId | String | Yes | cn-hangzhou | The ID of the region where the vSwitch is deployed. You can call the DescribeRegions operation to query the most recent region list. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 54B48E3D-DF70-471B-AA93-08E683A1B45 | The request ID. |
NextToken | String | FFmyTO70tTpLG6I3FmYAXGKPd**** | The token that is used for the next query. Valid values:
|
TotalCount | Long | 10 | The total number of entries returned. |
MaxResults | Long | 10 | The number of entries returned per page. |
VSwitchCidrReservations | Array of VSwitchCidrReservation | The list of reserved CIDR blocks. |
|
VpcId | String | vpc-bp1wdz2pdhgurz1od**** | The virtual private cloud (VPC) to which the reserved CIDR block belongs. |
VSwitchId | String | vsw-25navfgbue4g**** | The ID of the vSwitch to which the reserved CIDR block belongs. |
VSwitchCidrReservationId | String | vcr-bp1m12saqteraw3rp**** | The ID of the reserved CIDR block. |
VSwitchCidrReservationCidr | String | 192.168.1.64/28 | The reserved CIDR block. |
VSwitchCidrReservationName | String | ReservationName | The name of the reserved CIDR block. |
VSwitchCidrReservationDescription | String | ReservationDescription | The description of the reserved CIDR block. |
IpVersion | String | IPv4 | The IP version of the reserved CIDR block. Valid values:
|
CreationTime | String | 2023-03-14T10:02:37Z | The time when the reserved CIDR block was created. |
Type | String | prefix | The type of the reserved CIDR block. Only prefix (default) may be returned. |
AvailableCidrCount | Integer | 10 | The number of available prefixes in the reserved CIDR block. |
AssignedCidrCount | Integer | 6 | The number of used prefixes in the reserved CIDR block. |
Status | String | Assigned | The status of the reserved CIDR block. Valid values:
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListVSwitchCidrReservations
&VSwitchId=vsw-25navfgbue4g****
&VSwitchCidrReservationIds=["vcr-bp1m12saqteraw3rp****"]
&VSwitchCidrReservationType=prefix
&IpVersion=IPv4
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&MaxResults=10
&RegionId=cn-hangzhou
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListVSwitchCidrReservationsResponse>
<RequestId>54B48E3D-DF70-471B-AA93-08E683A1B45</RequestId>
<NextToken>FFmyTO70tTpLG6I3FmYAXGKPd****</NextToken>
<TotalCount>10</TotalCount>
<MaxResults>10</MaxResults>
<VSwitchCidrReservations>
<VpcId>vpc-bp1wdz2pdhgurz1od****</VpcId>
<VSwitchId>vsw-25navfgbue4g****</VSwitchId>
<VSwitchCidrReservationId>vcr-bp1m12saqteraw3rp****</VSwitchCidrReservationId>
<VSwitchCidrReservationCidr>192.168.1.64/28</VSwitchCidrReservationCidr>
<VSwitchCidrReservationName>ReservationName</VSwitchCidrReservationName>
<VSwitchCidrReservationDescription>ReservationDescription</VSwitchCidrReservationDescription>
<IpVersion>IPv4</IpVersion>
<CreationTime>2023-03-14T10:02:37Z</CreationTime>
<Type>prefix</Type>
<AvailableCidrCount>10</AvailableCidrCount>
<AssignedCidrCount>6</AssignedCidrCount>
<Status>Assigned</Status>
</VSwitchCidrReservations>
</ListVSwitchCidrReservationsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "54B48E3D-DF70-471B-AA93-08E683A1B45",
"NextToken" : "FFmyTO70tTpLG6I3FmYAXGKPd****",
"TotalCount" : 10,
"MaxResults" : 10,
"VSwitchCidrReservations" : [ {
"VpcId" : "vpc-bp1wdz2pdhgurz1od****",
"VSwitchId" : "vsw-25navfgbue4g****",
"VSwitchCidrReservationId" : "vcr-bp1m12saqteraw3rp****",
"VSwitchCidrReservationCidr" : "192.168.1.64/28",
"VSwitchCidrReservationName" : "ReservationName",
"VSwitchCidrReservationDescription" : "ReservationDescription",
"IpVersion" : "IPv4",
"CreationTime" : "2023-03-14T10:02:37Z",
"Type" : "prefix",
"AvailableCidrCount" : 10,
"AssignedCidrCount" : 6,
"Status" : "Assigned"
} ]
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | IllegalParam.NextToken | The specified NextToken is invalid. | NextToken is set to an invalid value. |
For a list of error codes, see Service error codes.