Associates a virtual private cloud (VPC) with an instance.
You can associate up to three VPCs with an instance. If you want to associate more VPCs with an instance, submit a ticket.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateInstanceVpcEndpointLinkedVpc |
The operation that you want to perform. Set the value to CreateInstanceVpcEndpointLinkedVpc. |
RegionId | String | Yes | cn-shanghai |
The region ID of the instance. |
InstanceId | String | Yes | cri-xkx6vujuhay0**** |
The ID of the instance. |
VpcId | String | Yes | vpc-uf6pa68zxnnlc48dd**** |
The ID of the virtual private cloud (VPC). |
VswitchId | String | Yes | vsw-uf6u0kn8x2gbzxfn2**** |
The ID of the vSwitch. |
ModuleName | String | No | Registry |
Specifies the module that you want to access. Valid values:
|
EnableCreateDNSRecordInPvzt | Boolean | No | false |
Specifies whether to automatically create an Alibaba Cloud DNS PrivateZone record. Valid values: Note If you enable automatic creation of PrivateZone records, a PrivateZone record is automatically
created when you associate a VPC with the instance.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | success |
The return value. |
IsSuccess | Boolean | true |
Indicates whether the request is successful.
|
RequestId | String | D4978DCC-ECBD-40B0-A714-EE6959B22C77 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateInstanceVpcEndpointLinkedVpc
&InstanceId=cri-xkx6vujuhay0****
&RegionId=cn-shanghai
&VpcId=vpc-uf6pa68zxnnlc48dd****
&VswitchId=vsw-uf6u0kn8x2gbzxfn2****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<IsSuccess>true</IsSuccess>
<RequestId>D4978DCC-ECBD-40B0-A714-EE6959B22C77</RequestId>
<Code>success</Code>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"IsSuccess" : true,
"RequestId" : "D4978DCC-ECBD-40B0-A714-EE6959B22C77",
"Code" : "success"
}
Error codes
For a list of error codes, visit the API Error Center.