All Products
Search
Document Center

Key Management Service:DeletePolicy

更新時間:Jan 08, 2024

Deletes a permission policy.

Before you delete a permission policy, make sure that the permission policy is not bound to application access points (AAPs). Otherwise, related applications cannot access Key Management Service (KMS).

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 DeletePolicy

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

Name String Yes policy_test

The name of the permission policy that you want to delete.

Response parameters

Parameter

Type

Example

Description

RequestId String 00a26a33-d992-42f3-9012-5fd12764430f

The ID of the request, which is used to locate and troubleshoot issues.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DeletePolicy
&Name=policy_test
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DeletePolicyResponse>
    <RequestId>00a26a33-d992-42f3-9012-5fd12764430f</RequestId>
</DeletePolicyResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "00a26a33-d992-42f3-9012-5fd12764430f"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter The specified parameter is not valid. The specified parameter is invalid.

For a list of error codes, see Service error codes.