You need to enable JavaScript to run this app.
导航
DescribeKeyrings - 列出密钥环
最近更新时间:2025.02.05 11:26:23首次发布时间:2024.08.29 17:30:55

列出密钥环

调试

请求参数

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

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

DescribeKeyrings

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

Version
String

2021-02-18

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

Filters
String

[{"Key":"KeyringName","Values":["hello","world"]}]

查询符合指定条件的密钥环,由 Key-Values 键值对组成。
Key
描述:需要查询的属性。
类型:String。
取值:
KeyringName:密钥环名称。
KeyringType:密钥环类型。
Description:密钥环描述。
CreationDateRange:密钥环创建的时间范围。
UpdateDateRange:密钥环更新的时间范围。
Values
描述:属性的具体取值。
类型:String 列表。
容量:1~10。
取值说明:
Key 取值为 KeyringName 时:支持模糊搜索,不区分大小写,示例:["hello","world"]。
Key 取值为 KeyringType 时:取值为 CustomKeyring、ManagedKeyring、ServiceKeyring,区分大小写,示例:["CustomKeyring","ManagedKeyring"]。
Key 取值为 Description 时:支持模糊搜索,不区分大小写,示例:["hello","world"]。
Key 取值为 CreationDateRange 时:必须填入开始时间和结束时间,示例:["2024-08-13 10:00:00","2024-08-14 10:00:00"]。
Key 取值为 UpdateDateRange 时:必须填入开始时间和结束时间,示例:["2024-08-13 10:00:00","2024-08-14 10:00:00"]。
Filters 同一个 Key 中的多个 Value 之间的逻辑关系为 OR,不同 Key 之间的逻辑关系为 AND。
例如:输入[{"Key":"KeyringName", "Values":["hello","world"]},{"Key":"KeyringType", "Values":["CustomKeyring"]}]时,语义为:(KeyringName=hello OR KeyringName=world) AND (KeyringType=CustomKeyring)。

CurrentPage
Integer

1

分页查找的页码,取值 >= 1

PageSize
Integer

20

分页查找的页面大小,取值:[1, 100]

ProjectName
String

default

项目名称

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构

参数
类型
示例值
描述
Keyrings
Array of Object

Keyring 结构的数据

密钥环信息

PageInfo
Object

PageInfo 结构的数据

分页信息

请求示例

GET /?Action=DescribeKeyrings&Version=2021-02-18&CurrentPage=1&PageSize=5&ProjectName=demo HTTP/1.1
Host: kms.volcengineapi.com
X-Date: 20240707T071800Z
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240707/cn-beijing/kms/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f


返回示例

{
  "ResponseMetadata": {
    "RequestId": "20240707151839135245227171238D54",
    "Action": "DescribeKeyrings",
    "Version": "2021-02-18",
    "Service": "kms",
    "Region": "cn-beijing"
  },
  "Result": {
    "PageInfo": {
      "TotalCount": 2,
      "PageSize": 5,
      "CurrentPage": 1,
      "Count": 2
    },
    "Keyrings": [
      {
        "ID": "758cb40e-3bf2-4cff-88d5-f898e1d9cf27",
        "CreationDate": 1626748349,
        "UpdateDate": 1626748349045,
        "KeyringName": "demo",
        "KeyringType": "CustomKeyring",
        "Description": "demo keyring for test",
        "UID": "2100000282",
        "TRN": "trn:kms:cn-beijing:2100000282:keyrings/demo"
      },
      {
        "ID": "6859f1b4-9fe0-4237-84a4-e11c6ff4d85a",
        "CreationDate": 1626604238,
        "UpdateDate": 1626604238868,
        "KeyringName": "demo_keyringaaa",
        "KeyringType": "CustomKeyring",
        "Description": "demo keyring for test",
        "UID": "2100000282",
        "TRN": "trn:kms:cn-beijing:2100000282:keyrings/demo_keyringaaa"
      }
    ]
  }
}

错误码

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

状态码
错误码
错误信息
说明
400
InvalidParameter
The request parameter %s is invalid.
403
Reject.Throttling.Action
The request of Action: %s upper limit is exceeded.
403
AccessDenied
User is not authorized to do this action
403
KMS_ServiceNotOpen
KMS service not open yet, please open the service and try again later.
403
Reject.Service.Overdue
Your account is overdue, please charge your account and try again later.
404
Not Found
Not found %s [%s].
500
UndefinedError
Undefined Internal Error. Pls Contact With Admin.