Updated on 2022-02-22 GMT+08:00

API Overview

You can use all the functions of Key Management Service (KMS) 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 multiple of 8 that is 8 bits to 8192 bits long.

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.

Encrypting Data

Uses a specified CMK to encrypt data.

Decrypting Data

Decrypts data.

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.

Querying CMK Instances

Uses the tag filtering function to query the detailed information of a CMK.

Querying CMK Tags

Queries tags of a CMK.

Querying Project Tags

Queries all tag sets of a project.

Adding or Deleting CMK Tags in Batches

Adds or deletes CMK tags in a batch.

Adding a CMK Tag

Adds a tag to a CMK.