GetSecretInfo
更新时间:2023-03-07
GetSecretInfo
- 接口描述
获取凭据描述。
- 请求URI
Plain Text
1POST /ssm?action=GetSecretInfo
请求体参数
- 请求体字段数据结构说明
参数 | 类型 | 是否必需 | 描述 | 示例值 |
---|---|---|---|---|
SecretId | String | 是 | 凭据id | 041e5c01-090d-955c-dd7b-776fd49ba8f5 |
响应体参数
- 响应体字段数据结构说明
参数 | 类型 | 描述 | 示例值 |
---|---|---|---|
SecretId | String | 凭据id | 041e5c01-090d-955c-dd7b-776fd49ba8f5 |
SecretName | String | 凭据名称 | /kms/general/test |
SecretType | String | 凭据类型,Generic、RDS、BCC | Generic |
SecretStatus | String | 凭据状态,Enabled\Disabled\PendingDeletion | Enabled |
KmsKeyId | String | 密钥ID,如果为空字符串,则为系统托管密钥 | |
Description | String | 描述 | |
CreateTime | String | 创建时间 | 2023-01-04T17:31:14+08:00 |
UpdateTime | String | 上一次更新时间 | 2023-01-04T17:31:14+08:00 |
PrevRotateTime | String | 最近一次轮转时间 | - |
BccInstanceId | String | 绑定BCC实例id,当为BCC类型时存在 | |
RdsInstanceId | String | 绑定RDS实例id,当为RDS类型时存在 | |
AccountMode | Integer | 账号模式,0不区分,1为单账号,2为双账号 | 0 |
GenericSecretList | []GenericSecretInfo | 通用凭据列表 | |
BccSecretList | []String | BCC凭据列表 | |
RdsSecretList | []String | RDS凭据列表 |
- GenericSecretInfo字段数据结构说明
参数名称 | 参数类型 | 描述 | 示例值 |
---|---|---|---|
version | String | 通用凭据版本 | v1 |
status | String | 通用凭据版本状态,当前版本Current,上一个版本Previous,其他版本状态为- | Current |
createTime | String | 创建时间,UTC时间 | 023-01-04T17:31:14+08:00 |
请求示例
Plain Text
1POST /ssm?action=GetSecretInfo
2<公共请求头>
3
4{
5"SecretId":"041e5c01-090d-955c-dd7b-776fd49ba8f5"
6}
响应示例
Plain Text
1HTTP/1.1 200 OK
2<公共响应头>
3
4{
5 "SecretId": "041e5c01-090d-955c-dd7b-776fd49ba8f5",
6 "SecretName": "/kms/general/test",
7 "SecretType": "Generic",
8 "SecretStatus": "Enabled",
9 "KmsKeyId": "",
10 "Description": "",
11 "CreateTime": "2022-12-30T12:31:12+08:00",
12 "UpdateTime": "2023-01-04T17:31:14+08:00",
13 "PrevRotateTime": "-",
14 "RotateEnabled": false,
15 "RotateInterval": 0,
16 "AccountMode": 0,
17 "GenericSecretList": [
18 {
19 "version": "ccccc-cfe178ed",
20 "status": "Current",
21 "createTime": "2023-01-04T17:31:14+08:00"
22 },
23 {
24 "version": "V1",
25 "status": "Previous",
26 "createTime": "2022-12-30T12:31:12+08:00"
27 },
28 {
29 "version": "sss-fffff-ccccc-cfe178ed",
30 "status": "-",
31 "createTime": "2023-01-04T17:31:02+08:00"
32 }
33 ]
34}