You need to enable JavaScript to run this app.
文档中心
密钥管理系统

密钥管理系统

复制全文
下载 pdf
凭据管理
UpdateSecretRotationPolicy - 更新凭据轮转策略
复制全文
下载 pdf
UpdateSecretRotationPolicy - 更新凭据轮转策略

调用本接口更新指定凭据的自动轮转策略,包括开启或关闭自动轮转以及设置轮转周期。

调试

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。

参数
类型
是否必填
示例值
描述
Action
String
是

UpdateSecretRotationPolicy

要执行的操作,取值:UpdateSecretRotationPolicy。

Version
String
是

2021-02-18

API的版本,取值:2021-02-18。

SecretName
String
是

secret-9527

凭据名称,长度为 2 ~ 128 个字符。合法字符:[a-zA-Z0-9/_+=.@-]。可通过 CreateSecret 创建凭据时指定,或通过 DescribeSecrets 查询获取。

AutomaticRotation
Boolean
是

true

是否开启自动轮转,仅适用于 IAM、RDS、Redis、ECS 类型的凭据。true:开启自动轮转;false:关闭自动轮转。默认值:false。

RotationInterval
String
否

7d

自动轮转周期,取值范围:1 ~ 365 天。格式为 integer[unit],unit 取值 d(天),例如 7d 表示 7 天。当 AutomaticRotation 为 true 时生效;不传时保持原有轮转周期不变。

返回参数

本接口无特有的返回参数。更多信息请见返回结构。

请求示例

GET /?Action=UpdateSecretRotationPolicy&Version=2021-02-18&SecretName=secret-9527&AutomaticRotation=true&RotationInterval=7d HTTP/1.1
Host: kms.cn-beijing.volcengineapi.com
X-Date: 20240810T101600Z
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240810/cn-beijing/kms/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f


返回示例

{
  "ResponseMetadata": {
    "RequestId": "2024081018161620010206223496683E",
    "Action": "UpdateSecretRotationPolicy",
    "Version": "2021-02-18",
    "Service": "kms",
    "Region": "cn-beijing"
  },
  "Result": {}
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
400
InvalidParameter

The request parameter %s is invalid.

请求参数格式、类型或取值不合法,请根据参数说明检查并修正请求。

400
InvalidSecretType

The secret type [%s] does not allow to perform this action.

当前凭据类型不支持该操作,请确认 SecretType 是否符合接口要求。

400
InvalidSecretStatus

The secret status [%s] does not allow to perform this action.

当前凭据状态不支持执行该操作,请检查凭据状态后重试。

403
AccessDenied

User is not authorized to do this action

当前账号或子账号缺少执行该操作所需权限,请检查 IAM 授权策略。

403
Reject.Throttling.Action

The request of Action: %s upper limit is exceeded.

接口级请求频率超过限制,请降低请求速率后重试。

404
Not Found

Not found %s [%s].

指定资源不存在或当前账号无权访问,请检查资源 ID、名称和地域是否正确。

500
UndefinedError

Undefined Internal Error. Pls Contact With Admin.

服务内部错误,请稍后重试;如持续出现,请联系技术支持。

最近更新时间:2026.09.03 18:02:14
这个页面对您有帮助吗?
有用
有用
无用
无用