All Products
Search
Document Center

:API overview

Last Updated:Jan 24, 2025

This topic lists all OpenAPI operations for Key Management Service (KMS).

Service management

API

Description

DescribeRegions

Queries a list of available regions for the current Alibaba Cloud account.

OpenKmsService

Enable KMS for the current Alibaba Cloud account.

DescribeAccountKmsStatus

Queries the status of KMS for the current Alibaba Cloud account.

Instance management

API

Description

ConnectKmsInstance

Enables a KMS instance.

GetKmsInstance

Queries the details of a KMS instance.

ListKmsInstances

Queries a list of KMS instances.

UpdateKmsInstanceBindVpc

Updates the virtual private cloud (VPC) associated with a KMS instance.

Key management

Manage keys by calling the following API operations, such as creating and deleting keys and aliases.

API

Description

CreateKey

Creates a key. You can use key material that is generated by KMS or import your own key material. Importing your own key material is known as Bring Your Own Key (BYOK).

GetParametersForImport

Queries the parameters that are used to import key material to a key.

ImportKeyMaterial

Imports key material to a key.

EnableKey

Changes the status of a key to Enabled.

DisableKey

Changes the status of a key to Disabled.

DescribeKey

Queries the information about a key.

ListKeys

Queries all keys within an Alibaba Cloud account in a region.

UpdateKeyDescription

Updates the description of a key.

CreateAlias

Creates an alias and binds it to a key.

UpdateAlias

Updates the ID of a key that is bound to an alias.

DeleteAlias

Deletes an alias.

ListAliases

Queries all aliases within an Alibaba Cloud account in a region.

ListAliasesByKeyId

Queries aliases that are bound to a key.

SetDeletionProtection

Enables or disables deletion protection.

ScheduleKeyDeletion

Schedules deletion of a key. After you call this operation, the key enters the Pending Deletion state. The key is automatically deleted after the specified waiting period elapses.

CancelKeyDeletion

Cancels the scheduled deletion of a key. You can cancel the scheduled deletion of a key before the specified waiting period elapses. After the scheduled deletion is canceled, the key re-enters the Enabled state.

DeleteKeyMaterial

Deletes key material.

Important

You can only delete external key material of the customer master key (CMK) that is used as a default key.

CreateKeyVersion

Creates a version. Symmetric keys in KMS instances of the software key management type support this operation. Asymmetric keys outside KMS support this operation.

DescribeKeyVersion

Queries the information about a key version.

ListKeyVersions

Queries all versions of a key.

UpdateRotationPolicy

Updates the rotation policy of a key. If automatic rotation is enabled for a key, KMS automatically generates a key version on a regular basis.

Cryptographic operations

Perform cryptographic operations on data using KMS keys, such as encrypting data, generating data keys, decrypting data, and calculating signatures.

API

Description

Encrypt

Encrypts plaintext into ciphertext by using a symmetric key.

GenerateDataKey

Generates a random data key that is used to encrypt on-premises data.

GenerateDataKeyWithoutPlaintext

Generates a random data key, which can be used to encrypt on-premises data.

ExportDataKey

Encrypts a data key by using a specified public key and exports the data key.

GenerateAndExportDataKey

Generates a random data key. The data key is encrypted by using the KMS key and public key that you specify. This operation returns the ciphertext of the data key encrypted by both the KMS key and the public key.

Decrypt

Decrypts ciphertext.

ReEncrypt

Re-encrypts ciphertext. When you call this operation, KMS decrypts the ciphertext, uses a different key to re-encrypt the generated plaintext or data key, and then returns the new ciphertext.

AsymmetricSign

Generates a signature by using an asymmetric key.

AsymmetricVerify

Verifies a signature by using an asymmetric key.

AsymmetricDecrypt

Decrypts data by using an asymmetric key.

AsymmetricEncrypt

Encrypts data by using an asymmetric key.

GetPublicKey

Queries the public key of an asymmetric key pair. You can use the public key to encrypt local data and verify signatures.

Secret management

Manage, protect, distribute, and rotate secrets by calling API operations.

API

Description

CreateSecret

Creates a secret and stores the secret value in the initial version.

ListSecrets

Queries all secrets within an Alibaba Cloud account in a region.

DescribeSecret

Queries the metadata of a secret.

UpdateSecret

Updates the metadata of a secret.

PutSecretValue

Stores the secret value of a new version in a secret.

Note

Only generic secrets support this operation.

UpdateSecretVersionStage

Updates the stage label that marks a secret version.

Note

Only generic secrets support this operation.

DeleteSecret

Deletes or schedules deletion of a secret.

RestoreSecret

Restores a secret that is scheduled to be deleted.

ListSecretVersionIds

Queries all versions of a secret.

GetRandomPassword

Queries a random password string.

RotateSecret

Manually rotates a secret.

UpdateSecretRotationPolicy

Updates the rotation policy of a secret.

Retrieve secret value

GetSecretValue: Retrieves a secret value.

Tag management

Add multiple tags to a key or secret, with each tag comprising a tag key and a tag value.

Note

TagResource, UntagResource, and ListResourceTags allow operations on a single resource. TagResources, UntagResources, and ListTagResources enable batch operations on multiple resources.

API

Description

TagResource

Adds a tag to a key or secret.

UntagResource

Removes a tag from a key or secret.

ListResourceTags

Queries all tags of a key.

TagResources

Adds tags to multiple keys or secrets.

UntagResources

Removes tags from multiple keys or secrets at a time.

ListTagResources

Queries all tags or specific tags of multiple keys or secrets at a time.

Application management

API

Description

CreateNetworkRule

Creates an access control rule to configure the private IP addresses or CIDR blocks that are allowed to access a KMS instance.

DeleteNetworkRule

Deletes a network access rule.

DescribeNetworkRule

Queries the details of a network access rule.

ListNetworkRules

Queries a list of network access rules.

UpdateNetworkRule

Updates a network access rule.

CreatePolicy

Creates a permission policy to configure the keys and secrets that are accessible to an application.

DeletePolicy

Deletes a permission policy.

DescribePolicy

Queries the details of a permission policy.

UpdatePolicy

Updates a permission policy.

ListPolicies

Queries permission policies.

CreateApplicationAccessPoint

Creates an application access point (AAP).

DeleteApplicationAccessPoint

Deletes an AAP.

DescribeApplicationAccessPoint

Queries the details of an AAP.

ListApplicationAccessPoints

Queries a list of AAPs.

UpdateApplicationAccessPoint

Updates the information about an AAP.

CreateClientKey

Creates a client key.

DeleteClientKey

Deletes a client key.

ListClientKeys

Queries a list of client keys

GetClientKey

Queries the information about a client key.