You can call the DeletePolicyInstance operation to delete policy instances from a specified Container Service for Kubernetes (ACK) cluster.

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 syntax

DELETE /clusters/cluster_id/policies/policy_name?instance_name=String HTTP/1.1
Content-Type:application/json

Request parameters

Table 1. Request path parameters
Parameter Type Required Example Description
cluster_id String Yes c8155823d057948c69a****

The ID of the cluster that you want to manage.

policy_name String Yes ACKAllowedRepos

The name of the policy.

Table 2. Request query parameters
Parameter Type Required Example Description
instance_name String No allowed-repos-mqdsf

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

Response syntax

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

{
  "instances" : [ "String" ]
}

Response parameters

Table 3. Response body parameters
Parameter Type Example Description
instances Array of String [ "allowed-repos-kqxnc" ]

The policy instances that are deleted.

Sample requests

Submit the following sample request to delete policy instances from an ACK cluster:

DELETE /clusters/c1231xxxxx/policies/ACKAllowedRepos  Common request header

Sample success responses

XML format

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

<DeletePolicyInstanceResponse>
    <instances>allowed-repos-cz4s2</instances>
    <instances>allowed-repos-mqdsf</instances>
</DeletePolicyInstanceResponse>

JSON format

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

{
  "instances" : [ "allowed-repos-cz4s2", "allowed-repos-mqdsf" ]
}

Error codes

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