Update the configuration of the Secret-at-rest encryption feature for a specified cluster by cluster ID.
Operation description
开启或关闭落盘加密功能的过程中以及成功开启该功能后,请勿使用 KMS 控制台或 OpenAPI 禁用或删除该功能所使用的 KMS 密钥,否则会导致集群 API Server 不可用,继而无法正常获取 Secret 和 ServiceAccount 等对象,影响业务应用的正常运行。更多信息,请参见使用阿里云 KMS 进行 Secret 的落盘加密。
调用该 API 的用户或角色需要额外被授予所需的集群 RBAC 权限(需要被授予运维人员或管理员权限),否则将返回“ForbiddenUpdateKMSState”错误码。
成功调用该 API 后,集群状态将被变更为“更新中”,待变更完成后集群状态将恢复为“运行中”。针对同一个集群的变更完成后,需要间隔 5 分钟以上才能再次调用该 API,否则将返回“409”状态码。
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:UpdateKMSEncryption |
none |
*Cluster
|
None | None |
Request syntax
PUT /clusters/{ClusterId}/kms HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The cluster ID. |
c4fe1e3a721544*** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
Request body parameters. |
|
| kms_key_id |
string |
No |
The KMS key ID used by the Secret-at-rest encryption feature. Important 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_encryption |
boolean |
No |
Specifies whether to disable the Secret-at-rest encryption feature.
|
false |
Response elements
|
Element |
Type |
Description |
Example |
None defined.
Examples
Success response
JSON format
{}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.