All Products
Search
Document Center

Virtual Private Cloud:GetVSwitchCidrReservationUsage

Last Updated:Mar 22, 2024

Queries the usage of a prefix list.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:GetVSwitchCidrReservationUsageRead
  • VSwitchCidrReservation
    acs:vpc:{#regionId}:{#accountId}:vswitchcidrreservation/{#VSwitchCidrReservationId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
VSwitchCidrReservationIdstringYes

The ID of the reserved CIDR block.

vcr-bp1m12saqteraw3rp****
NextTokenstringNo

The pagination token that is used in the next request to retrieve a new page of results. Valid values:

  • You do not need to specify this parameter for the first request.
  • If a value is returned for NextToken, specify the value in the next request to retrieve a new page of results.
FFmyTO70tTpLG6I3FmYAXGKPd****
MaxResultslongNo

The number of entries to return on each page. Valid values: 1 to 100. Default value: 10.

10
RegionIdstringYes

The region ID of the vSwitch.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

The request ID.

RequestIdstring

The request ID.

54B48E3D-DF70-471B-AA93-08E683A1B45
NextTokenstring

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:

  • If NextToken is empty, no next page exists.
  • If a value is returned for NextToken, the value is the token that determines the start point of the next query.
FFmyTO70tTpLG6I3FmYAXGKPd****
TotalCountlong

The total number of entries returned.

10
MaxResultslong

The number of entries to return per page.

10
CidrReservationUsagesobject []

A list of reserved CIDR blocks that are in use.

VSwitchCidrReservationIdstring

The ID of the reserved CIDR block.

vcr-bp1m12saqteraw3rp****
VSwitchIdstring

The ID of the vSwitch to which the reserved CIDR block belongs.

vsw-25navfgbue4g****
ResourceIdstring

The ID of the elastic network interface (ENI) whose CIDR block is allocated from the reserved CIDR block.

eni-bp14v2sdd3v8htln****
ResourceTypestring

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.

NetworkInterface
IpPrefixIdstring

The ID of the reserved CIDR block.

vcr-bp1m12saqteraw3rp****
IpPrefixCidrstring

The CIDR block allocated to the ENI from the reserved CIDR block.

192.168.1.64/28

Examples

Sample success responses

JSONformat

{
  "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

HTTP status codeError codeError messageDescription
400IllegalParam.NextTokenThe specified NextToken is invalid.The specified NextToken is invalid.
404ResourceNotFound.CidrReservationThe specified resource of VSwitchCidrReservation is not found.The error message returned because VSwitchCidrReservation is set to an invalid value.

For a list of error codes, visit the Service error codes.