Associates a VPC with an instance to allow access from the VPC to the instance.

You can associate up to three VPCs with an instance by default. 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 where the instance resides.

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 code returned for the request.

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

JSON format

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

XML format

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

Error codes

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