获取凭证提供方
更新时间:2026-07-14
获取凭证提供方
- 获取指定凭证提供方的详细信息。响应中 credential 字段的敏感值(如 apiKey、clientSecret)为 KMS Secret ID,非明文。
OpenAPI Explorer
去调试
您可以在 OpenAPI Explorer 中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer 可以自动生成 SDK 代码示例。
请求结构
Plain Text
1POST /v{version}/agent-identity/credential-provider/get HTTP/1.1
2Host: identity.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其他特殊头域
请求参数
| 参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
|---|---|---|---|---|
| version | String | 是 | URL参数 | API版本号 |
| credentialProviderId | String | 是 | RequestBody参数 | 凭证提供方 ID |
返回状态码
成功返回200,失败返回见错误码
返回头域
除公共头域外,无其他特殊头域
返回参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| id | String | 凭证提供方 ID |
| bceDomainId | String | BCE 账户 ID |
| bceUserId | String | BCE 用户 ID |
| name | String | 名称 |
| type | String | 凭证类型:API_KEY / OAUTH2 / STS |
| desc | String | 描述 |
| credential | CredentialConfig | 凭证配置内容(随 type 不同,见 CredentialConfig;敏感值为 KMS Secret ID,非明文) |
| createdAt | DateTime | 创建时间 |
| updatedAt | DateTime | 更新时间 |
请求示例
Plain Text
1{
2 "credentialProviderId": "cp-xxxxxxxxxx"
3}
返回示例
Plain Text
1{
2 "id": "string",
3 "bceDomainId": "string",
4 "bceUserId": "string",
5 "name": "string",
6 "type": "string",
7 "desc": "string",
8 "credential": {},
9 "createdAt": "string",
10 "updatedAt": "string"
11}
评价此篇文章
