To send a Virtual Private Cloud (VPC) API request, you must send an HTTP GET request to the VPC endpoint. You must add the request parameters that correspond to the API operation being called. After you call the API, the system returns a response. The request and response are encoded in UTF-8.

Request example

VPC API operations use the RPC protocol. You can call VPC API operations by sending HTTP GET requests.

This topic uses the CreateVpc operation as an example to describe an unencoded URL request:

https://vpc.aliyuncs.com/?Action=CreateVpc
&RegionId=cn-hangzhou
&<Common Request Parameters>
where:
  • https specifies the protocol for transmitting the request.

    VPC API operations support communication over the HTTP or HTTPS protocol. For security purposes, we recommend that you send requests over HTTPS.

  • vpc.aliyuncs.com specifies the endpoint of VPC.
    To minimize network latency, we recommend that you specify the endpoint based on the region where you call API operations. The following table lists the endpoints of the VPC API.
    Note For regions that are not listed in the following table, use vpc.aliyuncs.com.
    Region Endpoint
    Default vpc.aliyuncs.com
    China (Zhangjiakou-Beijing Winter Olympic) vpc.cn-zhangjiakou.aliyuncs.com
    China (Hohhot) vpc.cn-huhehaote.aliyuncs.com
    China (Ulanqab) vpc.cn-wulanchabu.aliyuncs.com
    China (Chengdu) vpc.cn-chengdu.aliyuncs.com
    China (Heyuan) vpc.cn-heyuan.aliyuncs.com
    China (Guangzhou) vpc.cn-guangzhou.aliyuncs.com
    Japan (Tokyo) vpc.ap-northeast-1.aliyuncs.com
    Germany (Frankfurt) vpc.eu-central-1.aliyuncs.com
    UAE (Dubai) vpc.me-east-1.aliyuncs.com
    Australia (Sydney) vpc.ap-southeast-2.aliyuncs.com
    Malaysia (Kuala Lumpur) vpc.ap-southeast-3.aliyuncs.com
    India (Mumbai) vpc.ap-south-1.aliyuncs.com
    Indonesia (Jakarta) vpc.ap-southeast-5.aliyuncs.com
    UK (London) vpc.eu-west-1.aliyuncs.com
    Note VPC endpoints use public service addresses. If the Elastic Compute Service (ECS) instance in your VPC cannot access the Internet, you cannot call API operations by using Alibaba Cloud CLI or SDKs. To call API operations over VPCs, see Call API operations over a VPC.
  • Action=CreateVpc specifies the operation that is being called. RegionId=cn-hangzhou is a required parameter of the CreateVpc operation.
  • <Common request parameters> are common parameters defined in the system.

    For more information, see Common parameters.