All Products
Search
Document Center

Virtual Private Cloud:DeleteVSwitchCidrReservation

Last Updated:Aug 29, 2024

Deletes a reserved CIDR block of a vSwitch.

Operation description

Description

  • Before you call this operation, make sure that the IP address allocated to an elastic network interface (ENI) from the reserved CIDR block is deleted. If the IP address of the ENI is not deleted, call UnassignPrivateIpAddresses or UnassignIpv6Addresses to delete the IPv4 or IPv6 address.

  • DeleteVSwitchCidrReservation is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call ListVSwitchCidrReservations to query the status of the task:

    • If the reserved CIDR block is in the Releasing state, it is being released.
    • If the reserved CIDR block is in the Released state, it is released.

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:DeleteVSwitchCidrReservationdelete
  • VSwitchCidrReservation
    acs:vpc:{#regionId}:{#accountId}:vswitchcidrreservation/{#VSwitchCidrReservationId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
VSwitchCidrReservationIdstringYes

The ID of the reserved CIDR block.

vcr-bp1m12saqteraw3rp****
RegionIdstringYes

The ID of the region where the vSwitch is deployed.

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

Examples

Sample success responses

JSONformat

{
  "RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45"
}

Error codes

HTTP status codeError codeError messageDescription
400DependencyViolation.IpPrefixDependencyViolation.IpPrefixThe error message returned because a prefix list is assigned to the resource. Delete the prefix list and try again.
400IncorrectStatus.CidrReservationThe status of the CIDR reservation is incorrect.The status of the reserved CIDR block does not support this operation. Try again later.
400ResourceNotFound.CidrReservationreserve segment not exist.The network segment does not exist.
404ResourceNotFound.CidrReservationResourceNotFound.CidrReservationThe error message returned because VSwitchCidrReservation is set to an invalid value.

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

Change history

Change timeSummary of changesOperation
2024-07-24The Error code has changed. The request parameters of the API has changedView Change Details
2024-06-24The Error code has changedView Change Details
2024-04-11The Error code has changedView Change Details