You can call ECS API operations by sending HTTP or HTTPS GET requests based on URLs. Each URL must contain request parameters. This topic describes the syntax of HTTP or HTTPS GET requests and provides the endpoints of Elastic Compute Service (ECS) API.
Sample request
The following example shows an unencoded URL request to call the CreateSnapshot operation:
https://ecs.aliyuncs.com/?Action=CreateSnapshot
&DiskId=d-28m5zbu****
&<Common request parameters>
https
specifies the protocol that is used to transmit the request.ecs.aliyuncs.com
specifies the endpoint of ECS.Action=CreateSnapshot
specifies the API operation to call.DiskId=d-28m5zbu****
is a request parameter for CreateSnapshot.<Common request parameters>
are common parameters defined in the system.
Protocols
You can send requests over HTTP or HTTPS. For security purposes, we recommend that you send requests over HTTPS.
If requests contain sensitive data such as passwords and SSH key pairs, we recommend
that you use HTTPS. For example, if you want to specify the Password
parameter when you call the CreateInstance operation, you can send a request over HTTPS to ensure data security.
Endpoints
The following table describes the endpoints of ECS API. To minimize the network latency, we recommend that you specify the endpoint based on the region where you make API requests.
- IPv4 endpoints
Region Endpoint China (Hangzhou) (Central region) ecs.aliyuncs.com Note Global acceleration is enabled forecs.aliyuncs.com
. This can reduce the network latency caused by traffic forwarding across countries or regions. You can use this endpoint when you want to make API requests from countries or regions outside the Chinese mainland.China (Zhangjiakou) ecs.cn-zhangjiakou.aliyuncs.com China (Hohhot) ecs.cn-huhehaote.aliyuncs.com China (Ulanqab) ecs.cn-wulanchabu.aliyuncs.com China (Heyuan) ecs.cn-heyuan.aliyuncs.com China (Guangzhou) ecs.cn-guangzhou.aliyuncs.com Japan (Tokyo) ecs.ap-northeast-1.aliyuncs.com Australia (Sydney) ecs.ap-southeast-2.aliyuncs.com Malaysia (Kuala Lumpur) ecs.ap-southeast-3.aliyuncs.com Indonesia (Jakarta) ecs.ap-southeast-5.aliyuncs.com India (Mumbai) ecs.ap-south-1.aliyuncs.com UAE (Dubai) ecs.me-east-1.aliyuncs.com Germany (Frankfurt) ecs.eu-central-1.aliyuncs.com UK (London) ecs.eu-west-1.aliyuncs.com - IPv4/IPv6 dual-stack endpoints
Region Endpoint China (Hangzhou) (Central region) ecs-dualstack.aliyuncs.com China (Shanghai) ecs-dualstack.cn-shanghai.aliyuncs.com China (Qingdao) ecs-dualstack.cn-qingdao.aliyuncs.com China (Beijing) ecs-dualstack.cn-beijing.aliyuncs.com China (Zhangjiakou) ecs-dualstack.cn-zhangjiakou.aliyuncs.com China (Hohhot) ecs-dualstack.cn-huhehaote.aliyuncs.com China (Ulanqab) ecs-dualstack.cn-wulanchabu.aliyuncs.com China (Shenzhen) ecs-dualstack.cn-shenzhen.aliyuncs.com China (Heyuan) ecs-dualstack.cn-heyuan.aliyuncs.com China (Guangzhou) ecs-dualstack.cn-guangzhou.aliyuncs.com China (Chengdu) ecs-dualstack.cn-chengdu.aliyuncs.com China (Hong Kong) ecs-dualstack.cn-hongkong.aliyuncs.com
Request parameters
You must use the Action
parameter to specify the API operation that you want to call. For example, set Action
to StartInstance to call the StartInstance operation. You must also specify other operation-specific
request parameters and common request parameters. For more information, see Common parameters.
Encoding
All requests and responses are encoded in UTF-8
.