Get Protection Key List

Prev Next

Available in VPC

Get the list of KMS keys that can be specified as secret protection keys.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET /api/v1/keys

Request headers

For information about the headers common to all Secret Manager APIs, see Secret Manager request headers.

Request example

The request example is as follows:

curl --location --request GET 'https://secretmanager.apigw.ntruss.com/api/v1/keys' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
code String - Response code
data Object - Response result
data.keyList Array - KMS key list

keyList

The following describes keyList.

Field Type Required Description
keyId String - Key identifier
keyTag String - Key tag
keyName String - Key name
keyStatus String - Key status
  • ENABLE | DISABLE
    • ENABLE: Available
    • DISABLE: Disabled
keyType String - Key type
  • AES256 | RSA2048
    • AES256: 256-bit key with symmetric-key AES cipher (AES 256-GCM96)
    • RSA2048: 2048-bit key using asymmetric-key RSA cipher (RSA 2048)

Response status codes

For information about the HTTP status codes common to all Secret Manager APIs, see Secret Manager response status codes.

Response example

The response example is as follows:

{
    "code": "SUCCESS",
    "data": {
        "keyList": [
            {
                "keyId": 0,
                "keyTag": "",
                "keyName": "Secret Manager Default Key",
                "keyStatus": "",
                "keyType": ""
            },
            {
                "keyId": 12345,
                "keyTag": "*****a8e99ef1ba49b9c190a0cb4f6fb20cff86dd3a3017fd6ee05aea8b*****",
                "keyName": "test-***",
                "keyStatus": "ENABLE",
                "keyType": "AES256"
            }
        ]
    }
}