All Products
Search
Document Center

Container Service for Kubernetes:DescribePolicyInstances

Last Updated:Sep 16, 2025

Queries policy instances that are deployed in the clusters associated with a master instance.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
adcp:DescribePolicyInstanceslist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PolicyNamestringYes

The name of the policy.

ACKNoEnvVarSecrets
ClusterIdstringYes

The ID of the master instance.

c102fe5f1ee5d4c87a68121a77d8b****

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

5BE4C329-DCC2-5B61-8F66-112B7D7FC712
Policiesarray<object>

A list of policy instances.

Policyobject

The policy instance.

PolicyNamestring

The name of the policy.

ACKPSPCapabilities
InstanceNamestring

The name of the policy instance.

no-env-var-secrets-****
PolicyCategorystring

The type of the policy.

k8s-general
PolicyDescriptionstring

The description of the policy.

Restricts secrets used in pod envs
PolicySeveritystring

The severity level of the policy.

low
PolicyScopestring

The applicable scope of the policy instance.

A value of * indicates all namespaces. This is the default value.

Multiple namespaces are separated by commas (,).

*
PolicyActionstring

The action of the policy. Valid values:

  • deny: blocks deployments that match the policy.
  • warn: generates alerts for deployments that match the policy.
warn
TotalViolationslong

The total number of deployments that match the policy in the associated cluster, including the deployments that are blocked and the deployments that have triggered alerting.

2
ClusterIdstring

The ID of the associated cluster.

cd0e6882394f7496589837cac3585****
PolicyParametersobject

The parameters of the policy instance.

string

The parameters of the policy instance.

"restrictedNamespaces": [ "test" ]

Examples

Sample success responses

JSONformat

{
  "RequestId": "5BE4C329-DCC2-5B61-8F66-112B7D7FC712",
  "Policies": [
    {
      "PolicyName": "ACKPSPCapabilities",
      "InstanceName": "no-env-var-secrets-****\n",
      "PolicyCategory": "k8s-general\n",
      "PolicyDescription": "Restricts secrets used in pod envs\n",
      "PolicySeverity": "low",
      "PolicyScope": "*",
      "PolicyAction": "warn",
      "TotalViolations": 2,
      "ClusterId": "cd0e6882394f7496589837cac3585****",
      "PolicyParameters": {
        "key": "\"restrictedNamespaces\": [ \"test\" ]\n"
      }
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history