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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateInstanceVpcEndpointLinkedVpc

The operation that you want to perform. Set the value to CreateInstanceVpcEndpointLinkedVpc.

InstanceId String Yes cri-xkx6vujuhay0tpgo

The ID of the instance.

RegionId String Yes cn-shanghai

The ID of the region.

VpcId String Yes vpc-uf6pa68zxnnlc48dd3iaa

The ID of the VPC.

VswitchId String Yes vsw-uf6u0kn8x2gbzxfn2jvad

The ID of the vSwitch.

ModuleName String No Registry

The name of the module in the instance. Valid values: Registry and Chart.

Response parameters

Parameter Type Example Description
IsSuccess Boolean true

Indicates whether the operation is successful.

Code String success

The return value.

RequestId String D4978DCC-ECBD-40B0-A714-EE6959B22C77

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=CreateInstanceVpcEndpointLinkedVpc
&InstanceId=cri-xkx6vujuhay0tpgo
&RegionId=cn-shanghai
&VpcId=vpc-uf6pa68zxnnlc48dd3iaa
&VswitchId=vsw-uf6u0kn8x2gbzxfn2jvad
&<Common request parameters>

Sample success responses

XML format

<IsSuccess>true</IsSuccess>
<RequestId>D4978DCC-ECBD-40B0-A714-EE6959B22C77</RequestId>
<Code>success</Code>

JSON format

{
    "IsSuccess":true,
    "RequestId":"D4978DCC-ECBD-40B0-A714-EE6959B22C77",
    "Code":"success"
}

Error codes

For a list of error codes, visit the API Error Center.