跳转到主要内容
身份与访问控制相关接口/凭证
PUTCredential起始版本 1.0同步需要认证

更新凭证

更新已存在凭证S元数据轮换已存储。

调试可用性

在线调试

使用当前认证信息和示例参数提交 Mock 请求。

路径参数

请求参数

路径参数

  • uuidString必填

    资源的UUID,唯一标识该资源。

请求体字段

  • nameString必填

    资源名称。

    示例: my-resource

  • descriptionString必填

    资源的详细描述。

    示例: A brief description

  • valueString必填

    字段值。

    示例: new-s3cr3t-v@lue

  • expiresAtString必填

    过期时间。

    示例: 2026-01-15T08:00:00Z

  • operatorString必填

    比较运算符。

    示例: ops@example.com

响应状态

200 OK

该 API 成功时返回以下响应结构。

  • uuidString

    资源的UUID,唯一标识该资源。

    示例: cred-a1b2c3d4-e5f6-7890-abcd-ef1234567890

  • nameString

    资源名称。

    示例: prod-db-password

  • descriptionString

    资源的详细描述。

    示例: Primary database password for production environment

  • typeString

    类型。

    示例: CREDENTIAL_TYPE_UNSPECIFIED

  • healthStatusString

    健康度状态。

    示例: CREDENTIAL_HEALTH_STATUS_UNSPECIFIED

  • expiresAtString

    过期时间。

    示例: 2026-01-15T08:00:00Z

  • createdByString

    创建该记录的用户UUID。

    示例: admin@example.com

  • createDateString

    创建时间。

    示例: 2026-01-15T08:00:00Z

  • lastOpDateString

    最近一次操作时间。

    示例: 2026-01-15T08:00:00Z

请求地址

PUT/api/v1/credentials/{uuid}

/api/v1/credentials/{uuid}

操作 ID

UpdateCredential

永久链接

请求示例

curl -X PUT '{host}/api/v1/credentials/{uuid}' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"key": "value"}'

响应示例

200
{
  "uuid": "cred-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "prod-db-password",
  "description": "Primary database password for production environment",
  "type": {},
  "healthStatus": {},
  "expiresAt": "example",
  "createdBy": "admin@example.com",
  "createDate": "example"
}

变更历史

此 API 暂无变更历史记录。

查看全部变更历史