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.


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.

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:

  • Registry: the image repository.
  • Chart: a Helm chart.
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.
  • true: automatically creates a PrivateZone record.
  • false: does not automatically create a PrivateZone record.

Response parameters

Parameter Type Example Description
Code String success

The return value.

IsSuccess Boolean true

Indicates whether the request is successful.

  • true: The request is successful.
  • false: The request fails.
RequestId String D4978DCC-ECBD-40B0-A714-EE6959B22C77

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

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

Error codes

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