Queries reserved CIDR blocks of vSwitches.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vpc:ListVSwitchCidrReservations | list | *VSwitchCidrReservation acs:vpc:{#regionId}:{#accountId}:vswitchcidrreservation/* |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Tags | array<object> | No | The tags. | |
object | No | |||
Key | string | No | The tag key. You can specify at most 20 tag keys. The tag key cannot be an empty string. A tag key can be up to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://. | FinanceDept |
Value | string | No | The tag value. You can specify at most 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length, and cannot start with acs: or aliyun. It cannot contain http:// or https://. | FinanceJoshua |
VSwitchId | string | No | The ID of the vSwitch for which you want to query reserved CIDR blocks. | vsw-25navfgbue4g**** |
VSwitchCidrReservationIds | array | No | The ID of the reserved CIDR block. You can specify at most 10 IDs. | |
string | No | The ID of the reserved CIDR block. You can specify at most 10 IDs. | vcr-bp1m12saqteraw3rp**** | |
VSwitchCidrReservationType | string | No | The type of the reserved CIDR block. Set the value to prefix. Note
When you allocate CIDR blocks, or enable the service to automatically allocate CIDR blocks to elastic network interfaces (ENIs), the CIDR blocks to allocate must fall into the reserved CIDR block. If the reserved CIDR is exhausted, an error message is returned.
| prefix |
IpVersion | string | No | The IP version of the reserved CIDR block. Valid values:
| IPv4 |
NextToken | string | No | The pagination token that is used in the next request to retrieve a new page of results. Valid values:
| FFmyTO70tTpLG6I3FmYAXGKPd**** |
MaxResults | long | No | The number of entries to return on each page. Valid values: 1 to 100. Default value: 10. | 10 |
RegionId | string | Yes | The region ID of the vSwitch. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
Response parameters
Examples
Sample success responses
JSON
format
{
"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",
"Tags": [
{
"Key": "FinanceDept",
"Value": "FinanceJoshua"
}
]
}
]
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | IllegalParam.NextToken | The specified NextToken is invalid. | The specified NextToken is invalid. |
For a list of error codes, visit the Service error codes.