You need to enable JavaScript to run this app.
Key Management System

Key Management System

Copy page
Download PDF
Key management
DescribeKeys - List user master keys
Copy page
Download PDF
DescribeKeys - List user master keys

List user master keys

Debug

Request parameters

The following table lists only the interface-specific request parameters and some common parameters. For more information, see Common Parameters.

const columns = [ 
  { 
    width: '20%', 
title: 'Parameter', 
    dataIndex: 'Name', 
    className: 'openapi-doc-parameter-table-name' 
  }, 
  { 
    width: 130, 
title: 'Type', 
    dataIndex: 'DataType', 
    className: 'openapi-doc-parameter-table-type' 
  }, 
  { 
    width: 90, 
title: 'Is Required', 
    dataIndex: 'IsRequired', 
    className: 'openapi-doc-parameter-table-required' 
  }, 
  { 
    width: '20%', 
title: 'Example Value', 
    dataIndex: 'Example', 
    className: 'openapi-doc-parameter-table-example' 
  }, 
  { 
title: 'Description', 
    dataIndex: 'Description', 
    className: 'openapi-doc-parameter-table-description' 
  }, 
]; 

const data = [ 
  { 
    rowKey: '->Action', 
    Name: 'Action', 
    DataType: 'String', 
IsRequired: 'yes', 
    Example: <RenderMd content={"DescribeKeys"} />, 
Description: <RenderMd content={"The operation to perform, value: DescribeKeys."} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->Version', 
    Name: 'Version', 
    DataType: 'String', 
IsRequired: 'Yes', 
    Example: <RenderMd content={"2021-02-18"} />, 
Description: <RenderMd content={"API version, value: 2021-02-18."} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->KeyringName', 
    Name: 'KeyringName', 
    DataType: 'String', 
IsRequired: 'No', 
    Example: <RenderMd content={"keyringName"} />, 
Description: <RenderMd content={"Keyring name, length 2 - 31 characters. Valid characters: [a-zA-Z0-9-_]"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->KeyringID', 
    Name: 'KeyringID', 
    DataType: 'String', 
IsRequired: 'No', 
    Example: <RenderMd content={"0324d9b3-c5d9-4b6f-94e7-884010a16fee"} />, 
Description: <RenderMd content={"Keyring ID, select either: KeyringName or KeyringID"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->Filters', 
    Name: 'Filters', 
    DataType: 'String', 
IsRequired: 'No', 
    Example: <RenderMd content={"[{"Key":"KeyName","Values":["hello","world"]}]"} />, 
Description: <RenderMd content={"Query keys matching specified conditions, composed of Key-Values pairs."} />, \nKey\n    Description: attribute to query. \n    Type: String. \n    Values: \n        KeyName: key name. Description: key description. KeyState: key status. KeyUsage: key purpose. ProtectionLevel: key protection level. RotateState: key rotation status. Origin: key origin. CreationDateRange: key creation date range. UpdateDateRange: key update date range. Values description: specific values of the attribute. Type: list of strings. Capacity: 1~10. Value explanation: When Key is set to KeyName: supports fuzzy search, case-insensitive, example: ["hello","world"]. When Key is set to KeySpec: values include SYMMETRIC_256, SYMMETRIC_128, RSA_2048, RSA_3072, RSA_4096, EC_P256K, EC_P256, EC_P384, EC_P521, EC_SM2, case-sensitive, example: ["SYMMETRIC_256","SYMMETRIC_128"]. When Key is set to Description: supports fuzzy search, case-insensitive, example: ["hello","world"]. When Key is set to KeyState: values include Enable, Disable, PendingDelete, Archived, PendingImport, case-sensitive, example: ["Enable","PendingDelete"]. When Key is set to KeyUsage: values include ENCRYPT_DECRYPT, SIGN_VERIFY, case-sensitive, example: ["ENCRYPT_DECRYPT","SIGN_VERIFY"]. When Key is set to ProtectionLevel: values include SOFTWARE, HSM, case-sensitive, example: ["SOFTWARE","HSM"]. When Key is set to RotateState: values include Enable, Disable, case-sensitive, example: ["Enable","Disable"]. When Key is set to Origin: values include CloudKMS, External, case-sensitive, example: ["CloudKMS","External"]. When Key is set to CreationDateRange: start time and end time must be provided, example: ["2024-08-13 10:00:00","2024-08-14 10:00:00"]. When Key is set to UpdateDateRange: you must enter both start and end times, for example: ["2024-08-13 10:00:00","2024-08-14 10:00:00"]. The logical relationship between multiple Values under the same Key in Filters is OR; the logical relationship between different Keys is AND. For example: inputting [{"Key":"KeyName", "Values":["hello","world"]},{"Key":"KeySpec", "Values":["EC_SM2"]}] means: (KeyName=hello OR KeyName=world) AND (KeySpec=EC_SM2). "} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->TagFilters', 
    Name: 'TagFilters', 
    DataType: 'Array of Object', 
IsRequired: 'No', 
    Example: <RenderMd content={"{"Key":"region","Values":["cn-shanghai"]}"} />, 
Description: <RenderMd content={"Query keys with specified tags"} />, 
    children: [ 
        { 
          rowKey: '->TagFilters->Key', 
          Name: 'Key', 
          DataType: 'String', 
IsRequired: 'Yes', 
          Example: <RenderMd content={""} />, 
          Description: <RenderMd content={"tag key"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: '->TagFilters->Values', 
          Name: 'Values', 
          DataType: 'Array of String', 
IsRequired: 'yes', 
          Example: <RenderMd content={""} />, 
          Description: <RenderMd content={"tag values"} />, 
          children: [ 
          ] 
        }, 
    ] 
  }, 
  { 
    rowKey: '->CurrentPage', 
    Name: 'CurrentPage', 
    DataType: 'Integer', 
IsRequired: 'No', 
    Example: <RenderMd content={"1"} />, 
Description: <RenderMd content={"Page number for pagination, value >= 1"} />, 
    children: [ 
    ] 
  }, 
  { 
    rowKey: '->PageSize', 
    Name: 'PageSize', 
    DataType: 'Integer', 
IsRequired: 'No', 
    Example: <RenderMd content={"1"} />, 
Description: <RenderMd content={"Page size for paged queries, value range: [1, 100]"} />, 
    children: [ 
    ] 
  }, 

]; 

return (<Table 
  rowKey="rowKey" 
  className="openapi-doc-parameter-table" 
  columns={columns} 
  data={data} 
  border={ { cell: true, wrapper: true } } 
  scroll={ { x: "auto" } } 
  pagination={false} 
/>);

Response Parameters

The following table lists only the response parameters specific to this API. For more information, see Response Structure.

const columns = [ 
  { 
    width: '25%', 
title: 'Parameter', 
    dataIndex: 'Name', 
    className: 'openapi-doc-parameter-table-name', 
  }, 
  { 
    width: 130, 
title: 'Type', 
    dataIndex: 'DataType', 
    className: 'openapi-doc-parameter-table-type' 
  }, 
  { 
    width: '25%', 
title: 'Example Value', 
    dataIndex: 'Example', 
    className: 'openapi-doc-parameter-table-example' 
  }, 
  { 
title: 'Description', 
    dataIndex: 'Description', 
    className: 'openapi-doc-parameter-table-description' 
  }, 
]; 

const data = [ 
  { 
    rowKey: "->PageInfo", 
    Name: "PageInfo", 
    DataType: "Object", 
    Example: <RenderMd content={"    "PageInfo": {\n      "TotalCount": 1,\n      "PageSize": 5,\n      "CurrentPage": 1,\n      "Count": 1\n    }"} />, 
Description: <RenderMd content={"paging information"} />, 
    children: [ 
        { 
          rowKey: "->PageInfo->TotalCount", 
          Name: "TotalCount", 
          DataType: "Integer", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"total count of paged search items"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->PageInfo->PageSize", 
          Name: "PageSize", 
          DataType: "Integer", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Page size for pagination"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->PageInfo->CurrentPage", 
          Name: "CurrentPage", 
          DataType: "Integer", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Find the current page number for pagination, starting at 1"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->PageInfo->Count", 
          Name: "Count", 
          DataType: "Integer", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Number of items on the current page in pagination"} />, 
          children: [ 
          ] 
        }, 
    ] 
  }, 
  { 
    rowKey: "->Keys", 
    Name: "Keys", 
    DataType: "Array of Object", 
    Example: <RenderMd content={"    "Keys": [\n      {\n        "ID": "d24a9f14-1a8b-4393-b66e-b77b766b5735",\n        "CreationDate": 1625818017,\n        "UpdateDate": 1625818017591,\n        "KeyName": "demo",\n        "KeySpec": "SYMMETRIC_256",\n        "Description": "demo",\n        "KeyState": "Enable",\n        "KeyUsage": "ENCRYPT_DECRYPT",\n        "ProtectionLevel": "SOFTWARE",\n        "MultiRegion": false\n      }\n    ]"} />, 
Description: <RenderMd content={"Primary key list information"} />, 
    children: [ 
        { 
          rowKey: "->Keys->ID", 
          Name: "ID", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"A unique key identifier in UUID format"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->CreationDate", 
          Name: "CreationDate", 
          DataType: "Long", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Key creation time"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->UpdateDate", 
          Name: "UpdateDate", 
          DataType: "Long", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Key update time"} /> 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->KeyName", 
          Name: "KeyName", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"key name, length 2 to 31 characters"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->KeySpec", 
          Name: "KeySpec", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"key algorithm, values: Symmetric keys: SYMMETRIC_256 SYMMETRIC_128 Asymmetric keys: RSA_2048 RSA_3072 RSA_4096 EC_P256 EC_P256K EC_P384 EC_P521 EC_SM2"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->Description", 
          Name: "Description", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"key description, length 0 - 8192 characters"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->KeyState", 
          Name: "KeyState", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Key state: Enable Disable PendingDelete Archived PendingImport"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->KeyUsage", 
          Name: "KeyUsage", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Key usage"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->ProtectionLevel", 
          Name: "ProtectionLevel", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"key protection level: SOFTWARE HSM"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->ScheduleDeleteTime", 
          Name: "ScheduleDeleteTime", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Key deletion time"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->RotationState", 
          Name: "RotationState", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Key rotation configuration"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->LastRotationTime", 
          Name: "LastRotationTime", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"key last rotation time"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->ScheduleRotationTime", 
          Name: "ScheduleRotationTime", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Key rotation time"} /> 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->Trn", 
          Name: "Trn", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Resource name, format should be trn:${Service}:${Region}:${AccountID}:${ResourcePath}"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->Origin", 
          Name: "Origin", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Key source: CloudKMS External"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->KeyMaterialExpireTime", 
          Name: "KeyMaterialExpireTime", 
          DataType: "String", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"The key material expiration time. If the value is empty, it means it does not expire"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->Tags", 
          Name: "Tags", 
          DataType: "Array of Object", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Secret key tags"} />, 
          children: [ 
            { 
              rowKey: "->Keys->Tags->Key", 
              Name: "Key", 
              DataType: 'String', 
              Example: <RenderMd content={""} />, 
              Description: <RenderMd content={"Key"} />, 
              children: [ 
              ] 
            }, 
            { 
              rowKey: "->Keys->Tags->Value", 
              Name: "Value", 
              DataType: 'String', 
              Example: <RenderMd content={""} />, 
              Description: <RenderMd content={"Value"} />, 
              children: [ 
              ] 
            }, 
          ] 
        }, 
        { 
          rowKey: "->Keys->MultiRegion", 
          Name: "MultiRegion", 
          DataType: "Boolean", 
          Example: <RenderMd content={"false"} />, 
Description: <RenderMd content={"Whether it is a Multi-region type key"} />, 
          children: [ 
          ] 
        }, 
        { 
          rowKey: "->Keys->MultiRegionConfiguration", 
          Name: "MultiRegionConfiguration", 
          DataType: "Object", 
          Example: <RenderMd content={""} />, 
Description: <RenderMd content={"Multi-region key configuration information"} />, 
          children: [ 
            { 
              rowKey: "->Keys->MultiRegionConfiguration->MultiRegionKeyType", 
              Name: "MultiRegionKeyType", 
              DataType: 'String', 
              Example: <RenderMd content={"PRIMARY"} />, 
              Description: <RenderMd content={"the type of the multi-region key"} />, 
              children: [ 
              ] 
            }, 
            { 
              rowKey: "->Keys->MultiRegionConfiguration->PrimaryKey", 
              Name: "PrimaryKey", 
              DataType: 'Object', 
              Example: <RenderMd content={"{\n    "Trn": "trn:kms:cn-beijing:2100042018:keyrings/test/keys/mrk-test",\n    "Region": "cn-beijing"\n}"} />, 
              Description: <RenderMd content={"trn and region id of the primary multi-region key"} />, 
              children: [ 
                { 
                  rowKey: "->Keys->MultiRegionConfiguration->PrimaryKey->Trn", 
                  Name: "Trn", 
                  DataType: "String", 
                  Example: <RenderMd content={""} />, 
                  Description: <RenderMd content={"the trn of multi-region key"} />, 
                  children: [ 
                  ] 
                }, 
                { 
                  rowKey: "->Keys->MultiRegionConfiguration->PrimaryKey->Region", 
                  Name: "Region", 
                  DataType: "String", 
                  Example: <RenderMd content={""} />, 
                  Description: <RenderMd content={"the region id of multi-region key"} />, 
                  children: [ 
                  ] 
                }, 
              ] 
            }, 
            { 
              rowKey: "->Keys->MultiRegionConfiguration->ReplicaKeys", 
              Name: "ReplicaKeys", 
              DataType: 'Array of Object', 
              Example: <RenderMd content={"[\n    { \n        "Trn": "trn:kms:cn-shanghai:2100042018:keyrings/test/keys/mrk-test", \n        "Region": "cn-shanghai"\n    }\n]"} />, 
              Description: <RenderMd content={"trn and region id of replica multi-region keys"} />, 
              children: [ 
                { 
                  rowKey: "->Keys->MultiRegionConfiguration->ReplicaKeys->Trn", 
                  Name: "Trn", 
                  DataType: "String", 
                  Example: <RenderMd content={""} />, 
                  Description: <RenderMd content={"the trn of multi-region key"} />, 
                  children: [ 
                  ] 
                }, 
                { 
                  rowKey: "->Keys->MultiRegionConfiguration->ReplicaKeys->Region", 
                  Name: "Region", 
                  DataType: "String", 
                  Example: <RenderMd content={""} />, 
                  Description: <RenderMd content={"the region id of multi-region key"} />, 
                  children: [ 
                  ] 
                }, 
              ] 
            }, 
          ] 
        }, 
    ] 
  }, 
]; 

return (<Table 
  rowKey="rowKey" 
  className="openapi-doc-parameter-table" 
  columns={columns} 
  data={data} 
  border={ { cell: true, wrapper: true } } 
  scroll={ { x: "auto" } } 
  pagination={false} 
/>);

Request example

POST /?Action=DescribeKeys&Version=2021-02-18 HTTP/1.1 
Host: kms.cn-beijing.volcengineapi.com 
Content-Type: application/json; charset=UTF-8 
X-Date: 20240923T150827Z 
X-Content-Sha256: 287e874e******d653b44d21e 
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240923/cn-beijing/kms/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f 

{ 
  "Filters": "[{"Key":"KeyName","Values":["hello","world"]}]", 
  "KeyringName": "demo", 
  "CurrentPage": 1, 
  "PageSize": 20 
}

Return example

{ 
  "ResponseMetadata": { 
    "RequestId": "202407072338460550250711642E5896", 
    "Action": "DescribeKeys", 
    "Version": "2021-02-18", 
    "Service": "kms", 
    "Region": "cn-beijing" 
  }, 
  "Result": { 
    "PageInfo": { 
      "TotalCount": 1, 
      "PageSize": 5, 
      "CurrentPage": 1, 
      "Count": 1 
    }, 
    "Keys": [ 
      { 
        "ID": "d24a9f14-1a8b-4393-b66e-b77b766b5735", 
        "CreationDate": 1625818017, 
        "UpdateDate": 1625818017591, 
        "KeyName": "demo", 
        "KeySpec": "SYMMETRIC_256", 
        "Description": "demo", 
        "KeyState": "Enable", 
        "KeyUsage": "ENCRYPT_DECRYPT", 
        "ProtectionLevel": "SOFTWARE", 
        "MultiRegion": false 
      } 
    ] 
  } 
}

Error codes

The following table lists error codes related to this interface and business logic. For common error codes, refer to the Common Error Codes documentation.

Status Code
Error Code
Error Message
Description
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

404
Not Found

Not found %s [%s].

500
UndefinedError

Undefined Internal Error. Pls Contact With Admin.

Last updated: 2025.06.27 15:24:16