All Products
Search
Document Center

Key Management Service:Integration overview

Last Updated:Mar 31, 2026

Key Management Service (KMS) supports multiple integration methods: Alibaba Cloud SDK for programmatic access, OpenAPI Explorer for browser-based debugging, Alibaba Cloud CLI for scripting, Terraform for infrastructure as code, and custom API encapsulation for native HTTP calls. Use the SDK for most application integrations—it handles request signing, retries, and response parsing automatically.

Integration methods

MethodSupportedBest for
Alibaba Cloud SDKYes (recommended)Application integration in Java, Python, Go, and other languages
OpenAPI ExplorerYesExploring the API and testing calls in a browser
Alibaba Cloud CLIYesShell scripting and ad hoc management tasks
TerraformPartialInfrastructure as code and resource provisioning
Custom API encapsulationYesNative HTTP integrations with full control over request construction
Resource Orchestration Service (ROS)No

Alibaba Cloud SDK

The SDK is the recommended integration path. It handles data signing, timeouts, and retries, and returns structured response objects.

SDKs are available in Java, C#, Go, Python, Node.js, TypeScript, PHP, and C++. For the list of supported languages, dependency installation instructions, and per-language code examples, see KMS SDK and Alibaba Cloud SDK.

Alibaba Cloud CLI

Run aliyun commands to call KMS API operations from the shell. See What is Alibaba Cloud CLI? and the CLI user guide.

Terraform

Terraform provisions and manages KMS resources by interpreting templates. See Use Terraform to manage KMS resources for supported resources and examples.

Custom API encapsulation

To make native HTTP calls, construct requests manually and sign them using the V3 signature method. See List of operations by function and Request syntax and signature method V3.

OpenAPI Explorer

OpenAPI Explorer lets you browse KMS API operations, read documentation, run live calls, generate SDK sample code, diagnose errors, perform intelligent search, and view call statistics—all from the browser.

API version

KMS uses a single API version: 2016-01-20. This is a version identifier, not a date.

VersionStatus
2016-01-20Current (recommended)

Online debugging

The API debugging page is at https://next.api.alibabacloud.com/api/Kms/2016-01-20.

Before calling an operation, review the version, endpoint, and required parameters for that operation.

image

Endpoints

Select the endpoint in the same region as the resource you want to access. Each region has a public endpoint (accessible globally) and a virtual private cloud (VPC) endpoint (accessible only from within a VPC in that region).

VPC endpoints offer lower latency, higher throughput, no exposure to the public internet, and lower cost compared to public endpoints.

Regions in China

RegionRegion IDPublic endpointVPC endpoint
China (Hangzhou)cn-hangzhoukms.cn-hangzhou.aliyuncs.comkms-vpc.cn-hangzhou.aliyuncs.com
China (Shanghai)cn-shanghaikms.cn-shanghai.aliyuncs.comkms-vpc.cn-shanghai.aliyuncs.com
China (Shenzhen)cn-shenzhenkms.cn-shenzhen.aliyuncs.comkms-vpc.cn-shenzhen.aliyuncs.com
China (Heyuan)cn-heyuankms.cn-heyuan.aliyuncs.comkms-vpc.cn-heyuan.aliyuncs.com
China (Guangzhou)cn-guangzhoukms.cn-guangzhou.aliyuncs.comkms-vpc.cn-guangzhou.aliyuncs.com
China (Qingdao)cn-qingdaokms.cn-qingdao.aliyuncs.comkms-vpc.cn-qingdao.aliyuncs.com
China (Beijing)cn-beijingkms.cn-beijing.aliyuncs.comkms-vpc.cn-beijing.aliyuncs.com
China (Zhangjiakou)cn-zhangjiakoukms.cn-zhangjiakou.aliyuncs.comkms-vpc.cn-zhangjiakou.aliyuncs.com
China (Hohhot)cn-huhehaotekms.cn-huhehaote.aliyuncs.comkms-vpc.cn-huhehaote.aliyuncs.com
China (Ulanqab)cn-wulanchabukms.cn-wulanchabu.aliyuncs.comkms-vpc.cn-wulanchabu.aliyuncs.com
China (Chengdu)cn-chengdukms.cn-chengdu.aliyuncs.comkms-vpc.cn-chengdu.aliyuncs.com
China (Hong Kong)cn-hongkongkms.cn-hongkong.aliyuncs.comkms-vpc.cn-hongkong.aliyuncs.com

Regions outside China

RegionRegion IDPublic endpointVPC endpoint
Singaporeap-southeast-1kms.ap-southeast-1.aliyuncs.comkms-vpc.ap-southeast-1.aliyuncs.com
Malaysia (Kuala Lumpur)ap-southeast-3kms.ap-southeast-3.aliyuncs.comkms-vpc.ap-southeast-3.aliyuncs.com
Indonesia (Jakarta)ap-southeast-5kms.ap-southeast-5.aliyuncs.comkms-vpc.ap-southeast-5.aliyuncs.com
Philippines (Manila)ap-southeast-6kms.ap-southeast-6.aliyuncs.comkms-vpc.ap-southeast-6.aliyuncs.com
Thailand (Bangkok)ap-southeast-7kms.ap-southeast-7.aliyuncs.comkms-vpc.ap-southeast-7.aliyuncs.com
Japan (Tokyo)ap-northeast-1kms.ap-northeast-1.aliyuncs.comkms-vpc.ap-northeast-1.aliyuncs.com
Germany (Frankfurt)eu-central-1kms.eu-central-1.aliyuncs.comkms-vpc.eu-central-1.aliyuncs.com
UK (London)eu-west-1kms.eu-west-1.aliyuncs.comkms-vpc.eu-west-1.aliyuncs.com
US (Silicon Valley)us-west-1kms.us-west-1.aliyuncs.comkms-vpc.us-west-1.aliyuncs.com
US (Virginia)us-east-1kms.us-east-1.aliyuncs.comkms-vpc.us-east-1.aliyuncs.com
UAE (Dubai)me-east-1kms.me-east-1.aliyuncs.comkms-vpc.me-east-1.aliyuncs.com
Important

Philippines (Manila) and Thailand (Bangkok) have only one zone and do not guarantee a service level agreement (SLA).

Authentication

After logging in to OpenAPI Explorer, calls run under your Alibaba Cloud account by default. An Alibaba Cloud account has unrestricted access to all API operations, which creates security risk. Use a Resource Access Management (RAM) user or RAM role with only the permissions your application needs.

IdentitySupported
Alibaba Cloud accountYes
RAM user (recommended)Yes
RAM role (recommended)Yes

For permission setup, see Use RAM to implement access control.

For details on credentials and authorization, see Identity, credential, and authorization and Throttling and quota management.

Usage notes

Rate limits

The queries per second (QPS) limit varies by operation. Check the QPS limit in the API reference for each operation.

All RAM users under the same Alibaba Cloud account share that account's QPS quota.

Error handling

If a call returns an error, check the error code against the input parameters and values you sent. See Common error codes.

For self-service diagnostics using a request ID or SDK error message, use Alibaba Cloud OpenAPI Diagnostics.