All Products
Search
Document Center

Container Service for Kubernetes:UpdateKMSEncryption

Last Updated:Mar 30, 2026

Update the configuration of the Secret-at-rest encryption feature for a specified cluster by cluster ID.

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
cs:UpdateKMSEncryptionnone
*Cluster
acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId}
    none
none

Request syntax

PUT /clusters/{ClusterId}/kms HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The cluster ID.

c4fe1e3a721544***
bodyobjectNo

Request body parameters.

kms_key_idstringNo

The KMS key ID used by the Secret-at-rest encryption feature.

Notice You cannot use a service key. You must use either a master key or a customer master key. The key type must be Aliyun_AES_256, and the key usage must be ENCRYPT/DECRYPT.

Warning During the process of enabling or disabling the at-rest encryption feature and after the feature is successfully enabled, do not disable or delete the KMS key via the KMS console or OpenAPI. Otherwise, the cluster API Server will become unavailable, preventing normal retrieval of objects such as Secrets and ServiceAccounts, which impacts the normal operation of business applications.

key-abc***
disable_encryptionbooleanNo

Specifies whether to disable the Secret-at-rest encryption feature.

  • true: Disables the at-rest encryption feature.
  • false: Enables the at-rest encryption feature.
false

Response parameters

ParameterTypeDescriptionExample
The current API has no return parameters

Examples

Sample success responses

JSONformat

{}

Error codes

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

Change history

Change timeSummary of changesOperation
2026-02-26Add OperationView Change Details