You can call the DeletePolicyInstance operation to delete policy instances from a specified Container Service for Kubernetes (ACK) cluster.
Debugging
Request syntax
DELETE /clusters/cluster_id/policies/policy_name?instance_name=String HTTP/1.1
Content-Type:application/jsonRequest 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. |
| 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
| 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/c8155823d057948c69a****/policies/ACKAllowedRepos?instance_name=allowed-repos-mqdsf HTTP/1.1
Host:cs.aliyuncs.com
Content-Type:application/jsonSample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DeletePolicyInstanceResponse>
<instances>[ "allowed-repos-kqxnc" ]</instances>
</DeletePolicyInstanceResponse>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"instances" : [ "[ \"allowed-repos-kqxnc\" ]" ]
}Error codes
For a list of error codes, visit the API Error Center.