Creates a hosted connection.

Usage notes

Before you call this API operation, familiarize yourself with the workflow for creating a hosted connection and the environment requirements. For more information, see Overview of hosted connections and Operations performed by Express Connect partners.

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 CreateVirtualPhysicalConnection

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

OrderMode String Yes PayByVirtualPhysicalConnectionOwner

The paying party of the hosted connection. Valid values:

  • PayByPhysicalConnectionOwner: the Express Connect partner
  • PayByVirtualPhysicalConnectionOwner: the tenant
VlanId Long Yes 4

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 a VBR. In this case, the Express Connect circuit with which the VBR is associated can be used to connect to virtual private clouds (VPCs) that belong to different Alibaba Cloud accounts. VBRs in different VLANs are isolated from each other at Layer 2.
Spec String Yes 50M

The bandwidth limit of the hosted connection.

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

Note However, if you want to set the value to 2G, 5G, 8G, or 10G, you must first submit a ticket.

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

VpconnAliUid Long Yes 253460731706911258

The Alibaba Cloud account ID of the tenant.

PhysicalConnectionId String Yes pc-bp1ciz7ekd2grn1as****

The ID of the Express Connect circuit over which the hosted connection is created.

Name String No nametest

The name of the hosted connection.

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 a token, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

DryRun Boolean No false

Specifies whether to precheck the request only. Valid values:

  • true: only prechecks the request but does not create the specified hosted connection. The system prechecks the request syntax, instance status, and whether the required parameters are specified. An error message is returned if the request fails to pass the precheck. If the request passes the precheck, DRYRUN.SUCCESS is returned.
  • false (default): sends the request. If the request passes the precheck, the hosted connection is created.
Description String No desctest

The description of the hosted connection.

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 CD14EA74-E9C3-59A9-942A-DFEC7E12818D

The ID of the request.

VirtualPhysicalConnection String pc-bp1mrgfbtmc9brre7****

The ID of the hosted connection.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateVirtualPhysicalConnection
&OrderMode=PayByVirtualPhysicalConnectionOwner
&VlanId=4
&Spec=50M
&VpconnAliUid=253460731706911258
&PhysicalConnectionId=pc-bp1ciz7ekd2grn1as****
&Name=nametest
&DryRun=false
&Description=desctest
&RegionId=cn-hangzhou
&<Common request parameters>

Sample responses

XML format

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

<CreateVirtualPhysicalConnectionResponse>
    <RequestId>CD14EA74-E9C3-59A9-942A-DFEC7E12818D</RequestId>
    <VirtualPhysicalConnection>pc-bp1mrgfbtmc9brre7****</VirtualPhysicalConnection>
</CreateVirtualPhysicalConnectionResponse>

JSON format

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

{
  "RequestId" : "CD14EA74-E9C3-59A9-942A-DFEC7E12818D",
  "VirtualPhysicalConnection" : "pc-bp1mrgfbtmc9brre7****"
}

Error codes

HttpCode Error code Error message Description
400 IllegalParam.Bandwidth The param of Bandwidth [%s] is illegal. The error message returned because the specified bandwidth limit is invalid.
400 ResourceNotFound.PhysicalConnectionId The specified PhysicalConnectionId [%s] is not found. The error message returned because the specified Express Connect circuit ID (PhysicalConnectionId) does not exist.
400 InvalidPhysicalConnectionId.NotFound The specified PhysicalConnectionId is not found. The error message returned because the specified Express Connect circuit ID does not exist.
400 MissingParameter The input parameter 'PhysicalConnectionId' that is mandatory for processing this request is not supplied. The error message returned because the PhysicalConnectionId parameter is not specified.
400 InvalidPhysicalConnectionId.NotEnabled The specified PhysicalConnectionId is not in Enabled state. The error message returned because the Express Connect circuit is in an invalid state. Check the Express Connect circuit and try again.
400 InvalidVlanId.Malformed The specified VlanId is not valid. The error message returned because the value of VlanId is invalid.

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