Skip to main content

CreateVpc

Description

call the CreateVpc interface to create a proprietary network VPC(Virtual Private Cloud).

Request Method

POST

Request Path

/apsara/route/Vpc/CreateVpc

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
DescriptionBODYstringNoThis is my first Vpc.VPC description information. is 2 to 256 characters in length and must start with letters or Chinese, but cannot be http:// or https://.
ResourceGroupIdBODYstringNorg-acfmxazb4ph6aiy****resource group ID.
DryRunBODYbooleanNofalsewhether to precheck only this request, value: true: send a check request and will not create a VPC. Check items include whether required parameters, request format, and business restrictions have been filled in. If the check fails, the corresponding error is returned. If the check passes, the error code DryRunOperation is returned. false(default): send a normal request, return a 2xx HTTP status code after checking, and directly create a VPC.
CidrBlockBODYstringNo172.16.0.0/16VPC network segment. You can use the following CIDR blocks or a subset of them as the CIDR blocks of the VPC: 172.16.0.0/16. 192.168.0.0/16(default).
versionBODYstringNo2016-01-01version of api
EnableIpv6BODYbooleanNofalsewhether to enable IPv6 network segment, value: false(default): not on. true: on.
UserCidrBODYstringNo189.XX.XX.0/12user network segments. if you need to define multiple network segments, use commas (,) to separate up to 3 network segments.
regionIdBODYstringYesNo sample value for this parameter.region id
VpcNameBODYstringNoabcVPC name. /p> is 2-128 characters in length and must start with a letter or Chinese, and can contain numbers, half-width periods (.), underscores (_) and dashes (-), but you cannot use http:// or https:// start.
RegionIdBODYstringYescn-qingdao-env17-d01the region ID where the VPC is located. You can obtain the region ID by calling the DescribeRegions interface.
Ipv6CidrBlockBODYstringNo1007:XXXX:0:40::/56IPv6 network segment of VPC.
ClientTokenBODYstringNo123e4567-e89b-12d3-a456-426655440000Ensure request idempotence. Generate a parameter value from your client to ensure that the parameter value is unique between different requests. ClientToken only supports ASCII characters and cannot exceed 64 characters.

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}