Get the public key of the specified asymmetric key
The table below lists only the unique request parameters of this interface and some common parameters. For more information, see common parameters.
Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
Action | String | yes | GetPublicKey | the action to perform, value: GetPublicKey. |
Version | String | yes | 2021-02-18 | API version, value: 2021-02-18. |
KeyringName | String | No | keyring-test | Keyring name, length 2 - 31 characters. Valid characters: [a-zA-Z0-9-_] |
KeyName | String | No | key-test | Primary key name, length 2 - 31 characters. Valid characters: [a-zA-Z0-9-_] |
KeyID | String | No | 39a0e7c6-b7dd-4c83-b400-3449bb95403a | Primary key ID, choose one of two options: |
The following table lists only the response parameters unique to this interface. 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: "->KeyID", Name: "KeyID", DataType: "String", Example: <RenderMd content={"39a0e7c6-b7dd-4c83-b400-3449bb95403a"} />, Description: <RenderMd content={"Unique identifier of the main key, in UUID format"} /> children: [ ] }, { rowKey: "->PublicKey", Name: "PublicKey", DataType: "String", Example: <RenderMd content={"MFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEy1ywbEU17uqak8PNqv54BDdtE7+n CGXuj8nKmhPNl3AmN8z2roAowQYORs4JTTfmmLq0jvIU0hBCsSS3aY=="} />, Description: <RenderMd content={"Public key in PEM format.\n-----BEGIN PUBLIC KEY----- MFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEy1ywbEU17uqak8PNqv54BDdtE7+n CGXuj8nKmhPNl3AmN8z2roAowQYORs4JTTfmmLq0jvIU0hBCsSS3aY****== -----END PUBLIC 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} />);
GET /?Action=GetPublicKey&Version=2021-02-18&KeyringName=demo&KeyName=demo HTTP/1.1 Host: kms.cn-beijing.volcengineapi.com X-Date: 20240709T013058Z Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240709/cn-beijing/kms/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f
{ "ResponseMetadata": { "RequestId": "20240709093134130030112119297E09", "Action": "GetPublicKey", "Version": "2021-02-18", "Service": "kms", "Region": "cn-beijing" }, "Result": { "KeyID": "39a0e7c6-b7dd-4c83-b400-3449bb95403a", "PublicKey": "MFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEy1ywbEU17uqak8PNqv54BDdtE7+n CGXuj8nKmhPNl3AmN8z2roAowQYORs4JTTfmmLq0jvIU0hBCsSS3aY==", } }
The following table lists error codes related to this interface and business logic. For common error codes, see the Common Error Codes document.
Status Code | Error Code | Description |
|---|---|---|
400 | MissingParameter | |
400 | InvalidParameter | |
403 | AccessDenied | |
403 | Reject.Throttling.CMK | |
404 | Not Found | |
500 | UndefinedError |