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
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
Description | BODY | string | No | This 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://. |
ResourceGroupId | BODY | string | No | rg-acfmxazb4ph6aiy**** | resource group ID. |
DryRun | BODY | boolean | No | false | whether 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. |
CidrBlock | BODY | string | No | 172.16.0.0/16 | VPC 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). |
version | BODY | string | No | 2016-01-01 | version of api |
EnableIpv6 | BODY | boolean | No | false | whether to enable IPv6 network segment, value: false(default): not on. true: on. |
UserCidr | BODY | string | No | 189.XX.XX.0/12 | user network segments. if you need to define multiple network segments, use commas (,) to separate up to 3 network segments. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
VpcName | BODY | string | No | abc | VPC 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. |
RegionId | BODY | string | Yes | cn-qingdao-env17-d01 | the region ID where the VPC is located. You can obtain the region ID by calling the DescribeRegions interface. |
Ipv6CidrBlock | BODY | string | No | 1007:XXXX:0:40::/56 | IPv6 network segment of VPC. |
ClientToken | BODY | string | No | 123e4567-e89b-12d3-a456-426655440000 | Ensure 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
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}