Deletes a prefix list and all entries in the prefix list.

Description

If a prefix list is associated with resources, you cannot delete the prefix list. You must first disassociate the prefix list from the resources and then delete the prefix list. You can call the DescribePrefixListAssociations operation to query resources that are associated with a specific prefix list.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DeletePrefixList

The operation that you want to perform. Set the value to DeletePrefixList.

RegionId String Yes cn-chengdu

The region ID.

PrefixListId String Yes pl-x1j1k5ykzqlixdcy****

The ID of the prefix list.

Response parameters

Parameter Type Example Description
RequestId String 38793DB8-A4B2-4AEC-BFD3-111234E9188D

The ID of the request.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DeletePrefixList
&RegionId=cn-chengdu
&PrefixListId=pl-x1j1k5ykzqlixdcy****
&<Common request parameters>

Sample success responses

XML format

<DeletePrefixListResponse>
      <RequestId>38793DB8-A4B2-4AEC-BFD3-111234E9188D</RequestId>
</DeletePrefixListResponse>

JSON format

{
    "RequestId": "38793DB8-A4B2-4AEC-BFD3-111234E9188D"
}

Error codes

HTTP status code Error code Error message Description
404 InvalidPrefixListId.NotFound The specified prefix list was not found. The error message returned because the prefix list does not exist.
400 NotAllowed.AssociationExist The specified prefix list has associated resources. The error message returned because the prefix list is associated with resources.
404 NotSupported.GrayFunction The prefix list is a gray-scale function, not currently supported. The error message returned because this operation is not supported. The prefix list feature is in invitational preview.

For a list of error codes, visit the API Error Center.