Changes the virtual local area network (VLAN) ID of a hosted connection.

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 UpdateVirtualPhysicalConnection

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

VlanId Long Yes 1

The VLAN ID of the hosted connection. Valid values: 0 to 2999.

  • If the VLAN ID is set to 0, it indicates that the switch port of the virtual border router (VBR) is a Layer 3 router interface instead of a VLAN interface. When a Layer 3 router interface is used, each Express Connect circuit corresponds to a VBR.
  • If the VLAN ID is set to a value from 1 to 2999, the switch port of the VBR is a Layer 3 VLAN subinterface. When a Layer 3 VLAN subinterface is used, each VLAN ID corresponds to one VBR. In this case, the Express Connect circuit with which the VBR is associated can be used to connect to VPCs that belong to different Alibaba Cloud accounts. VBRs in different VLANs are isolated from each other at Layer 2.
InstanceId String Yes pc-bp1mrgfbtmc9brre7****

The ID of the shared Express Connect circuit.

Token String No CBCE910E-D396-4944-8****

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must make sure that it is unique among all requests. The token can contain only ASCII characters.

Note If you do not specify this parameter, the system automatically uses RequestId as ClientToken. The value of RequestId in each API request may be different.
DryRun Boolean No false

Specifies whether to check the request without performing the operation. Valid values:

  • true: checks the request without performing the operation. The VLAN ID of the hosted connection is not changed. The system checks the required parameters, request syntax, and instance status. If the check fails, the corresponding error message is returned. If the request passes the check, the system returns the ID of the request.
  • false (default): sends the request. If the request passes the check, the VLAN ID of the hosted connection is changed.
ExpectSpec String No 50M

The estimated bandwidth value of the hosted connection. The estimated bandwidth value takes effect after the payment is completed.

Valid values: 50M, 100M, 200M, 300M, 400M, 500M, 1G, 2G, 5G, 8G, and 10G.

Note By default, the values of 2G, 5G, 8G, and 10G are unavailable. If you want to specify these values, contact your customer manager.

M indicates Mbit/s and G indicates Gbit/s.

RegionId String Yes cn-hangzhou

The region ID of the hosted connection.

You can call the DescribeRegions operation to query the most recent region list.

Response parameters

Parameter Type Example Description
RequestId String 7035627E-1C1D-5BC7-A830-F897A35912D1

The ID of the request.

Success String true

Indicates whether the VLAN ID of the hosted connection is changed. Valid values:

  • true: The VLAN ID of the hosted connection is changed.
  • false: The VLAN ID of the hosted connection is not changed.

Examples

Sample requests

http(s)://[Endpoint]/?Action=UpdateVirtualPhysicalConnection
&VlanId=1
&InstanceId=pc-bp1mrgfbtmc9brre7****
&Token=CBCE910E-D396-4944-8****
&DryRun=false
&ExpectSpec=50M
&RegionId=cn-hangzhou
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<UpdateVirtualPhysicalConnectionResponse>
    <RequestId>7035627E-1C1D-5BC7-A830-F897A35912D1</RequestId>
    <Success>true</Success>
</UpdateVirtualPhysicalConnectionResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "7035627E-1C1D-5BC7-A830-F897A35912D1",
  "Success" : "true"
}

Error codes

HttpCode Error code Error message Description
400 IllegalParam.VlanId The param of VlanId is illegal. The error message returned because the VlanId parameter is set to an invalid value.
400 ResourceNotFound.PhysicalConnectionId The specified PhysicalConnectionId [%s] is not found. The error message returned because the ID of the hosted connection is not found.
400 ResourceNotEnough.Bandwidth The specified resource of Bandwidth is not enough. The error message returned because bandwidth resources are insufficient.
400 IllegalParam.Bandwidth The param of bandwidth is illegal. The error message returned because the Bandwidth parameter is set to an invalid value.
400 OperationDenied.CreateVpconn You are not allowed to create virtual physical connection. Please contact you CBM. The error message returned because you do not have the permissions to create a hosted connection. Contact your account manager.
400 Forbidden.PhysicalConnection Only parent physical connection account is allowed to modify the virtual physical connection. The error message returned because you can modify only the physical port to which the shared port belongs.

For a list of error codes, see VPC error codes.