Obtaining CMK Import Parameters

Function

This API enables you to obtain necessary parameters to import a CMK, including a CMK import token and a CMK encryption public key.

The returned public key type is RSA_2048 by default.

URI

Requests

Table 2 Request parameters

Parameter

Mandatory

Type

Description

key_id

Yes

String

36-byte ID of a CMK that matches the regular expression ^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$

Example: 0d0466b0-e727-4d9c-b35d-f84bb474a37f

wrapping_algorithm

Yes

String

Encryption algorithm for CMK material. The following values are enumerated:
  • RSAES_PKCS1_V1_5
  • RSAES_OAEP_SHA_1
  • RSAES_OAEP_SHA_256

sequence

No

String

36-byte serial number of a request message

Example: 919c82d4-8046-4722-9094-35c3c6524cff

Responses

Table 3 Response parameters

Parameter

Mandatory

Type

Description

key_id

Yes

String

ID of a CMK in Base64 format

import_token

Yes

String

CMK import token

expiration_time

Yes

String

Expiration time of the import parameter. The value is a timestamp expressed in the number of seconds since 00:00:00 UTC on January 1, 1970.

public_key

Yes

String

Public key (in Base64 format) used to encrypt CMK material

Examples

The following example describes how to obtain the imported parameter of a CMK (ID: bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e; encryption algorithm: RSAES_OAEP_SHA_1).

Status Codes

Table 4 lists the normal status code returned by the response.
Table 4 Status codes

Status Code

Status

Description

200

OK

Request processed successfully.

Exception status code. For details, see Status Codes.