Queries reserved CIDR blocks that are in use for a vSwitch.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GetVSwitchCidrReservationUsage | The operation that you want to perform. Set the value to GetVSwitchCidrReservationUsage. |
VSwitchCidrReservationId | String | Yes | vcr-bp1m12saqteraw3rp**** | The ID of the reserved CIDR block. |
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 returned value of NextToken is a pagination token, which can be used in the next request to retrieve a new page of results. Valid values:
|
TotalCount | Long | 10 | The total number of entries returned. |
MaxResults | Long | 10 | The number of entries returned per page. |
CidrReservationUsages | Array of VSwitchCidrReservationUsage | The list of reserved CIDR blocks that are in use. |
|
VSwitchCidrReservationId | String | vcr-bp1m12saqteraw3rp**** | The ID of the reserved CIDR block. |
VSwitchId | String | vsw-25navfgbue4g**** | The ID of the vSwitch to which the reserved CIDR block belongs. |
ResourceId | String | eni-bp14v2sdd3v8htln**** | The ID of the elastic network interface (ENI) whose CIDR block is allocated from the reserved CIDR block. |
ResourceType | String | NetworkInterface | The type of the resource to which a CIDR block is allocated from the reserved CIDR block. Only NetworkInterface may be returned, which indicates an ENI. |
IpPrefixId | String | vcr-bp1m12saqteraw3rp**** | The ID of the reserved CIDR block. |
IpPrefixCidr | String | 192.168.1.64/28 | The CIDR block allocated to the ENI from the reserved CIDR block. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=GetVSwitchCidrReservationUsage
&VSwitchCidrReservationId=vcr-bp1m12saqteraw3rp****
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&MaxResults=10
&RegionId=cn-hangzhou
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<GetVSwitchCidrReservationUsageResponse>
<RequestId>54B48E3D-DF70-471B-AA93-08E683A1B45</RequestId>
<NextToken>FFmyTO70tTpLG6I3FmYAXGKPd****</NextToken>
<TotalCount>10</TotalCount>
<MaxResults>10</MaxResults>
<CidrReservationUsages>
<VSwitchCidrReservationId>vcr-bp1m12saqteraw3rp****</VSwitchCidrReservationId>
<VSwitchId>vsw-25navfgbue4g****</VSwitchId>
<ResourceId>eni-bp14v2sdd3v8htln****</ResourceId>
<ResourceType>NetworkInterface</ResourceType>
<IpPrefixId>vcr-bp1m12saqteraw3rp****</IpPrefixId>
<IpPrefixCidr>192.168.1.64/28</IpPrefixCidr>
</CidrReservationUsages>
</GetVSwitchCidrReservationUsageResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "54B48E3D-DF70-471B-AA93-08E683A1B45",
"NextToken" : "FFmyTO70tTpLG6I3FmYAXGKPd****",
"TotalCount" : 10,
"MaxResults" : 10,
"CidrReservationUsages" : [ {
"VSwitchCidrReservationId" : "vcr-bp1m12saqteraw3rp****",
"VSwitchId" : "vsw-25navfgbue4g****",
"ResourceId" : "eni-bp14v2sdd3v8htln****",
"ResourceType" : "NetworkInterface",
"IpPrefixId" : "vcr-bp1m12saqteraw3rp****",
"IpPrefixCidr" : "192.168.1.64/28"
} ]
}
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.