Updated on 2022-12-06 GMT+08:00

API Overview

You can use all the functions of by calling its APIs.

Key Management APIs

API

Description

Creating a CMK

Creates a CMK.

Enabling a CMK

Enables a CMK. Only an enabled CMK can be used.

Disabling a CMK

Disables a CMK. A disabled CMK cannot be used.

Scheduling the Deletion of a CMK

Schedules the deletion of a specific key. The deletion can be scheduled 7 to 1096 days in advance. After a key is deleted, the data encrypted using the key cannot be decrypted.

Canceling the Scheduled Deletion of a CMK

Cancels a scheduled deletion of a key. Once the deletion is cancelled, the key can be used.

Querying the List of CMKs

Queries the list of all CMKs.

Querying the Information About a CMK

Queries details of a specified key.

Creating a Random Number

Generates a 512-bit random number.

Creating a DEK

Creates a DEK. A returned result includes the plaintext and the ciphertext of a DEK.

Creating a Plaintext-Free DEK

Creates a plaintext-free DEK, that is, the returned result of this API includes only the ciphertext of the DEK.

Encrypting a DEK

Uses a specified CMK to encrypt a DEK.

Decrypting a DEK

Uses a specified CMK to decrypt a DEK.

Querying the Number of Instances

Obtains the number of created CMKs, excluding the default master keys.

Querying the Quota of a User

Queries the total quota of CMKs available and the usage information, excluding the default master keys.

Changing the Alias of a CMK

Changes the alias of a CMK.

Changing the Description of a CMK

Changes the description of a CMK.

Obtaining CMK Import Parameters

Obtains necessary parameters to import a key, including an import token and an encryption public key.

Importing CMK Material

Imports the key material of a specified key.

Deleting CMK Material

Deletes the key material of a specified key.

Enabling Rotation for a CMK

Enables the rotation of a CMK. Default master keys and imported keys do not support the rotation function.

Changing the Rotation Interval for a CMK

Changes the rotation interval for a CMK.

Disabling Rotation for a CMK

Disables the rotation of a CMK.

Querying the Rotation Status of a CMK

Queries the rotation status of a CMK.