Updates a policy in a specific Container Service for Kubernetes (ACK) cluster. You can modify the action of the policy such as alerting or denying and namespaces to which the policy applies.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:ModifyPolicyInstance |
update |
*Cluster
|
None | None |
Request syntax
PUT /clusters/{cluster_id}/policies/{policy_name} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| cluster_id |
string |
Yes |
The cluster ID. |
c8155823d057948c69a**** |
| policy_name |
string |
Yes |
The name of the policy. |
ACKAllowedRepos |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| action |
string |
No |
The action of the policy. Valid values:
|
deny |
| instance_name |
string |
No |
The ID of the policy instance. |
allowed-repos-cbhhb |
| namespaces |
array |
No |
The namespaces to which the policy is applied. The policy is applied to all namespaces if this parameter is left empty. |
|
|
string |
No |
The applicable scope of the policy instance. A value of "" indicates all namespaces in the cluster. This is the default value. |
["test3","test4"] |
|
| parameters |
object |
No |
The parameters of the policy instance. For more information, see Predefined security policies of ACK. |
"restrictedNamespaces": [ "test" ] |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| instances |
array |
The list of policy instances that are updated. |
|
|
string |
The policy instance that is updated. |
[ "allowed-repos-kqxnc" ] |
Examples
Success response
JSON format
{
"instances": [
"[ \"allowed-repos-kqxnc\" ]"
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.