Virtual Physical Connection
Provides a Express Connect Virtual Physical Connection resource. For information about Express Connect Virtual Physical Connection and how to use it, see What is Virtual Physical Connection.
NOTE: Available since v1.196.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const example = alicloud.expressconnect.getPhysicalConnections({
nameRegex: "^preserved-NODELETING",
});
const vlanId = new random.index.Integer("vlan_id", {
max: 2999,
min: 1,
});
const _default = alicloud.getAccount({});
const exampleVirtualPhysicalConnection = new alicloud.expressconnect.VirtualPhysicalConnection("example", {
virtualPhysicalConnectionName: name,
description: name,
orderMode: "PayByPhysicalConnectionOwner",
parentPhysicalConnectionId: example.then(example => example.ids?.[0]),
spec: "50M",
vlanId: vlanId.id,
vpconnAliUid: _default.then(_default => _default.id),
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
example = alicloud.expressconnect.get_physical_connections(name_regex="^preserved-NODELETING")
vlan_id = random.index.Integer("vlan_id",
max=2999,
min=1)
default = alicloud.get_account()
example_virtual_physical_connection = alicloud.expressconnect.VirtualPhysicalConnection("example",
virtual_physical_connection_name=name,
description=name,
order_mode="PayByPhysicalConnectionOwner",
parent_physical_connection_id=example.ids[0],
spec="50M",
vlan_id=vlan_id["id"],
vpconn_ali_uid=default.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var example = AliCloud.ExpressConnect.GetPhysicalConnections.Invoke(new()
{
NameRegex = "^preserved-NODELETING",
});
var vlanId = new Random.Index.Integer("vlan_id", new()
{
Max = 2999,
Min = 1,
});
var @default = AliCloud.GetAccount.Invoke();
var exampleVirtualPhysicalConnection = new AliCloud.ExpressConnect.VirtualPhysicalConnection("example", new()
{
VirtualPhysicalConnectionName = name,
Description = name,
OrderMode = "PayByPhysicalConnectionOwner",
ParentPhysicalConnectionId = example.Apply(getPhysicalConnectionsResult => getPhysicalConnectionsResult.Ids[0]),
Spec = "50M",
VlanId = vlanId.Id,
VpconnAliUid = @default.Apply(@default => @default.Apply(getAccountResult => getAccountResult.Id)),
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/expressconnect"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
example, err := expressconnect.GetPhysicalConnections(ctx, &expressconnect.GetPhysicalConnectionsArgs{
NameRegex: pulumi.StringRef("^preserved-NODELETING"),
}, nil)
if err != nil {
return err
}
vlanId, err := random.NewInteger(ctx, "vlan_id", &random.IntegerArgs{
Max: 2999,
Min: 1,
})
if err != nil {
return err
}
_default, err := alicloud.GetAccount(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
_, err = expressconnect.NewVirtualPhysicalConnection(ctx, "example", &expressconnect.VirtualPhysicalConnectionArgs{
VirtualPhysicalConnectionName: pulumi.String(name),
Description: pulumi.String(name),
OrderMode: pulumi.String("PayByPhysicalConnectionOwner"),
ParentPhysicalConnectionId: pulumi.String(example.Ids[0]),
Spec: pulumi.String("50M"),
VlanId: vlanId.Id,
VpconnAliUid: pulumi.String(_default.Id),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.expressconnect.ExpressconnectFunctions;
import com.pulumi.alicloud.expressconnect.inputs.GetPhysicalConnectionsArgs;
import com.pulumi.random.integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.expressconnect.VirtualPhysicalConnection;
import com.pulumi.alicloud.expressconnect.VirtualPhysicalConnectionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf-example");
final var example = ExpressconnectFunctions.getPhysicalConnections(GetPhysicalConnectionsArgs.builder()
.nameRegex("^preserved-NODELETING")
.build());
var vlanId = new Integer("vlanId", IntegerArgs.builder()
.max(2999)
.min(1)
.build());
final var default = AlicloudFunctions.getAccount();
var exampleVirtualPhysicalConnection = new VirtualPhysicalConnection("exampleVirtualPhysicalConnection", VirtualPhysicalConnectionArgs.builder()
.virtualPhysicalConnectionName(name)
.description(name)
.orderMode("PayByPhysicalConnectionOwner")
.parentPhysicalConnectionId(example.applyValue(getPhysicalConnectionsResult -> getPhysicalConnectionsResult.ids()[0]))
.spec("50M")
.vlanId(vlanId.id())
.vpconnAliUid(default_.id())
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
vlanId:
type: random:integer
name: vlan_id
properties:
max: 2999
min: 1
exampleVirtualPhysicalConnection:
type: alicloud:expressconnect:VirtualPhysicalConnection
name: example
properties:
virtualPhysicalConnectionName: ${name}
description: ${name}
orderMode: PayByPhysicalConnectionOwner
parentPhysicalConnectionId: ${example.ids[0]}
spec: 50M
vlanId: ${vlanId.id}
vpconnAliUid: ${default.id}
variables:
example:
fn::invoke:
function: alicloud:expressconnect:getPhysicalConnections
arguments:
nameRegex: ^preserved-NODELETING
default:
fn::invoke:
function: alicloud:getAccount
arguments: {}
Import
Express Connect Virtual Physical Connection can be imported using the id, e.g.
$ pulumi import alicloud:expressconnect/virtualPhysicalConnection:VirtualPhysicalConnection example <id>
Properties
The ID of the access point of the physical connection.
The physical location where the physical connection access device is located.
The commercial status of the physical line. Value:-Normal: activated.-Financialized: Arrears locked.-SecurityLocked: locked for security reasons.
The circuit code provided by the operator for the physical connection.
The creation time of the resource
The description of the physical connection.
The opening time of the physical connection.
The estimated bandwidth value of the shared line. 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. Unit: M indicates Mbps, G indicates Gbps.
Operators that provide access to physical lines. Value:-CT: China Telecom.-CU: China Unicom.-CM: China Mobile.-CO: China Other.-Equinix:Equinix.-Other: Other abroad.
The state of LOA. Value:-Applying:LOA application.-Accept:LOA application passed.-Available:LOA is Available.-Rejected:LOA application Rejected.-Completing: The dedicated line is under construction.-Complete: The construction of the dedicated line is completed.-Deleted:LOA has been Deleted.
The ID of the Alibaba Cloud account (primary account) to which the physical connection belongs.
The ID of the instance of the physical connection.
The geographic location of the local data center.
The port number of the physical connection device.
Physical connection port type. Value:-100Base-T: 100 megabytes port.-1000Base-T: Gigabit port.-1000Base-LX: Gigabit single mode optical port (10km).-10GBase-T: 10 Gigabit port.-10GBase-LR: 10 Gigabit single mode optical port (10km).-40GBase-LR: 40 megabytes single-mode optical port.-100GBase-LR: 100,000 megabytes single-mode optical port.
The ID of the redundant physical connection.
The resource group id.
The bandwidth value of the shared line. 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. Unit: M indicates Mbps, G indicates Gbps.
The name of the physical connection.
The business status of the shared line. Value:-Confirmed: The shared line has been Confirmed to receive.-UnConfirmed: The shared line has not been confirmed to be received.-Deleted: The shared line has been Deleted.
The ID of the Alibaba Cloud account (primary account) of the owner of the shared line.