Enable Key Version

Prev Next

Available in Classic and VPC

Enable the version of a key. However, you can't enable the version of a key that is in the Disabled status.

Request

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

Method URI
POST /keys/{keyTag}/versions/{version}/enable

Request headers

For information about the headers common to all Key Management Service APIs, see the account authentication method in Key Management Service request headers.

Request path parameters

You can use the following path parameters with your request:

Field Type Required Description
keyTag String Required Key tag
  • Unique identifier for the key derived from the key name
  • Check through Get key list
  • Use to request encryption or decryption with REST APIs
  • Key tags are not treated as confidential information
version Integer Required Key version
  • 1-100

Request example

The request example is as follows:

curl --location --request POST 'https://ocapi.ncloud.com/kms/v1/keys/*******/versions/*******/enable' \
--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 - Success or Failure
data Object - Response result
data.version Integer - Enabled key version
data.status String - Key version status
  • ENABLE: enabled
data.statusDate Long - Date and time when the key version was enabled (millisecond)
  • Unix timestamp format

Response status codes

For response status codes common to all Key Management Service APIs, see Key Management Service response status codes.

Response example

The response example is as follows:

{
    "code": "SUCCESS",
    "data": {
        "version": 1,
        "status": "ENABLE",
        "statusDate": 1733460541703
    }
}