volcengine.direct_connect.Connection
Explore with Pulumi AI
Provides a resource to manage direct connect connection
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Direct_connect.Connection("foo", new()
{
Bandwidth = 1000,
CustomerContactEmail = "email@aaa.com",
CustomerContactPhone = "12345678911",
CustomerName = "tf-a",
Description = "tf-test",
DirectConnectAccessPointId = "ap-cn-beijing-a",
DirectConnectConnectionName = "tf-test-connection",
LineOperator = "ChinaOther",
PeerLocation = "XX路XX号XX楼XX机房",
PortSpec = "10G",
PortType = "10GBase",
Tags = new[]
{
new Volcengine.Direct_connect.Inputs.ConnectionTagArgs
{
Key = "k1",
Value = "v1",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/direct_connect"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := direct_connect.NewConnection(ctx, "foo", &direct_connect.ConnectionArgs{
Bandwidth: pulumi.Int(1000),
CustomerContactEmail: pulumi.String("email@aaa.com"),
CustomerContactPhone: pulumi.String("12345678911"),
CustomerName: pulumi.String("tf-a"),
Description: pulumi.String("tf-test"),
DirectConnectAccessPointId: pulumi.String("ap-cn-beijing-a"),
DirectConnectConnectionName: pulumi.String("tf-test-connection"),
LineOperator: pulumi.String("ChinaOther"),
PeerLocation: pulumi.String("XX路XX号XX楼XX机房"),
PortSpec: pulumi.String("10G"),
PortType: pulumi.String("10GBase"),
Tags: direct_connect.ConnectionTagArray{
&direct_connect.ConnectionTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
})
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.volcengine.direct_connect.Connection;
import com.pulumi.volcengine.direct_connect.ConnectionArgs;
import com.pulumi.volcengine.direct_connect.inputs.ConnectionTagArgs;
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) {
var foo = new Connection("foo", ConnectionArgs.builder()
.bandwidth(1000)
.customerContactEmail("email@aaa.com")
.customerContactPhone("12345678911")
.customerName("tf-a")
.description("tf-test")
.directConnectAccessPointId("ap-cn-beijing-a")
.directConnectConnectionName("tf-test-connection")
.lineOperator("ChinaOther")
.peerLocation("XX路XX号XX楼XX机房")
.portSpec("10G")
.portType("10GBase")
.tags(ConnectionTagArgs.builder()
.key("k1")
.value("v1")
.build())
.build());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.direct_connect.Connection("foo",
bandwidth=1000,
customer_contact_email="email@aaa.com",
customer_contact_phone="12345678911",
customer_name="tf-a",
description="tf-test",
direct_connect_access_point_id="ap-cn-beijing-a",
direct_connect_connection_name="tf-test-connection",
line_operator="ChinaOther",
peer_location="XX路XX号XX楼XX机房",
port_spec="10G",
port_type="10GBase",
tags=[volcengine.direct_connect.ConnectionTagArgs(
key="k1",
value="v1",
)])
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.direct_connect.Connection("foo", {
bandwidth: 1000,
customerContactEmail: "email@aaa.com",
customerContactPhone: "12345678911",
customerName: "tf-a",
description: "tf-test",
directConnectAccessPointId: "ap-cn-beijing-a",
directConnectConnectionName: "tf-test-connection",
lineOperator: "ChinaOther",
peerLocation: "XX路XX号XX楼XX机房",
portSpec: "10G",
portType: "10GBase",
tags: [{
key: "k1",
value: "v1",
}],
});
resources:
foo:
type: volcengine:direct_connect:Connection
properties:
bandwidth: 1000
customerContactEmail: email@aaa.com
customerContactPhone: '12345678911'
customerName: tf-a
description: tf-test
directConnectAccessPointId: ap-cn-beijing-a
directConnectConnectionName: tf-test-connection
lineOperator: ChinaOther
peerLocation: XX路XX号XX楼XX机房
portSpec: 10G
portType: 10GBase
tags:
- key: k1
value: v1
Create Connection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Connection(name: string, args: ConnectionArgs, opts?: CustomResourceOptions);
@overload
def Connection(resource_name: str,
args: ConnectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Connection(resource_name: str,
opts: Optional[ResourceOptions] = None,
bandwidth: Optional[int] = None,
customer_contact_email: Optional[str] = None,
customer_contact_phone: Optional[str] = None,
customer_name: Optional[str] = None,
direct_connect_access_point_id: Optional[str] = None,
line_operator: Optional[str] = None,
peer_location: Optional[str] = None,
port_spec: Optional[str] = None,
port_type: Optional[str] = None,
description: Optional[str] = None,
direct_connect_connection_name: Optional[str] = None,
tags: Optional[Sequence[ConnectionTagArgs]] = None)
func NewConnection(ctx *Context, name string, args ConnectionArgs, opts ...ResourceOption) (*Connection, error)
public Connection(string name, ConnectionArgs args, CustomResourceOptions? opts = null)
public Connection(String name, ConnectionArgs args)
public Connection(String name, ConnectionArgs args, CustomResourceOptions options)
type: volcengine:direct_connect:Connection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ConnectionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ConnectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ConnectionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var connectionResource = new Volcengine.Direct_connect.Connection("connectionResource", new()
{
Bandwidth = 0,
CustomerContactEmail = "string",
CustomerContactPhone = "string",
CustomerName = "string",
DirectConnectAccessPointId = "string",
LineOperator = "string",
PeerLocation = "string",
PortSpec = "string",
PortType = "string",
Description = "string",
DirectConnectConnectionName = "string",
Tags = new[]
{
new Volcengine.Direct_connect.Inputs.ConnectionTagArgs
{
Key = "string",
Value = "string",
},
},
});
example, err := direct_connect.NewConnection(ctx, "connectionResource", &direct_connect.ConnectionArgs{
Bandwidth: pulumi.Int(0),
CustomerContactEmail: pulumi.String("string"),
CustomerContactPhone: pulumi.String("string"),
CustomerName: pulumi.String("string"),
DirectConnectAccessPointId: pulumi.String("string"),
LineOperator: pulumi.String("string"),
PeerLocation: pulumi.String("string"),
PortSpec: pulumi.String("string"),
PortType: pulumi.String("string"),
Description: pulumi.String("string"),
DirectConnectConnectionName: pulumi.String("string"),
Tags: direct_connect.ConnectionTagArray{
&direct_connect.ConnectionTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
})
var connectionResource = new Connection("connectionResource", ConnectionArgs.builder()
.bandwidth(0)
.customerContactEmail("string")
.customerContactPhone("string")
.customerName("string")
.directConnectAccessPointId("string")
.lineOperator("string")
.peerLocation("string")
.portSpec("string")
.portType("string")
.description("string")
.directConnectConnectionName("string")
.tags(ConnectionTagArgs.builder()
.key("string")
.value("string")
.build())
.build());
connection_resource = volcengine.direct_connect.Connection("connectionResource",
bandwidth=0,
customer_contact_email="string",
customer_contact_phone="string",
customer_name="string",
direct_connect_access_point_id="string",
line_operator="string",
peer_location="string",
port_spec="string",
port_type="string",
description="string",
direct_connect_connection_name="string",
tags=[{
"key": "string",
"value": "string",
}])
const connectionResource = new volcengine.direct_connect.Connection("connectionResource", {
bandwidth: 0,
customerContactEmail: "string",
customerContactPhone: "string",
customerName: "string",
directConnectAccessPointId: "string",
lineOperator: "string",
peerLocation: "string",
portSpec: "string",
portType: "string",
description: "string",
directConnectConnectionName: "string",
tags: [{
key: "string",
value: "string",
}],
});
type: volcengine:direct_connect:Connection
properties:
bandwidth: 0
customerContactEmail: string
customerContactPhone: string
customerName: string
description: string
directConnectAccessPointId: string
directConnectConnectionName: string
lineOperator: string
peerLocation: string
portSpec: string
portType: string
tags:
- key: string
value: string
Connection Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Connection resource accepts the following input properties:
- Bandwidth int
- The line band width,unit:Mbps.
- Customer
Contact stringEmail - The dedicated line contact email.
- Customer
Contact stringPhone - The dedicated line contact phone.
- Customer
Name string - The dedicated line contact name.
- Direct
Connect stringAccess Point Id - The direct connect access point id.
- Line
Operator string - The physical leased line operator.valid value contains
ChinaTelecom
,ChinaMobile
,ChinaUnicom
,ChinaOther
. - Peer
Location string - The local IDC address.
- Port
Spec string - The physical leased line port spec.valid value contains
1G
,10G
. - Port
Type string - The physical leased line port type and spec.valid value contains
1000Base-T
,10GBase-T
,1000Base
,10GBase
,40GBase
,100GBase
. - Description string
- The description of direct connect.
- Direct
Connect stringConnection Name - The name of direct connect.
- List<Connection
Tag> - The physical leased line tags.
- Bandwidth int
- The line band width,unit:Mbps.
- Customer
Contact stringEmail - The dedicated line contact email.
- Customer
Contact stringPhone - The dedicated line contact phone.
- Customer
Name string - The dedicated line contact name.
- Direct
Connect stringAccess Point Id - The direct connect access point id.
- Line
Operator string - The physical leased line operator.valid value contains
ChinaTelecom
,ChinaMobile
,ChinaUnicom
,ChinaOther
. - Peer
Location string - The local IDC address.
- Port
Spec string - The physical leased line port spec.valid value contains
1G
,10G
. - Port
Type string - The physical leased line port type and spec.valid value contains
1000Base-T
,10GBase-T
,1000Base
,10GBase
,40GBase
,100GBase
. - Description string
- The description of direct connect.
- Direct
Connect stringConnection Name - The name of direct connect.
- []Connection
Tag Args - The physical leased line tags.
- bandwidth Integer
- The line band width,unit:Mbps.
- customer
Contact StringEmail - The dedicated line contact email.
- customer
Contact StringPhone - The dedicated line contact phone.
- customer
Name String - The dedicated line contact name.
- direct
Connect StringAccess Point Id - The direct connect access point id.
- line
Operator String - The physical leased line operator.valid value contains
ChinaTelecom
,ChinaMobile
,ChinaUnicom
,ChinaOther
. - peer
Location String - The local IDC address.
- port
Spec String - The physical leased line port spec.valid value contains
1G
,10G
. - port
Type String - The physical leased line port type and spec.valid value contains
1000Base-T
,10GBase-T
,1000Base
,10GBase
,40GBase
,100GBase
. - description String
- The description of direct connect.
- direct
Connect StringConnection Name - The name of direct connect.
- List<Connection
Tag> - The physical leased line tags.
- bandwidth number
- The line band width,unit:Mbps.
- customer
Contact stringEmail - The dedicated line contact email.
- customer
Contact stringPhone - The dedicated line contact phone.
- customer
Name string - The dedicated line contact name.
- direct
Connect stringAccess Point Id - The direct connect access point id.
- line
Operator string - The physical leased line operator.valid value contains
ChinaTelecom
,ChinaMobile
,ChinaUnicom
,ChinaOther
. - peer
Location string - The local IDC address.
- port
Spec string - The physical leased line port spec.valid value contains
1G
,10G
. - port
Type string - The physical leased line port type and spec.valid value contains
1000Base-T
,10GBase-T
,1000Base
,10GBase
,40GBase
,100GBase
. - description string
- The description of direct connect.
- direct
Connect stringConnection Name - The name of direct connect.
- Connection
Tag[] - The physical leased line tags.
- bandwidth int
- The line band width,unit:Mbps.
- customer_
contact_ stremail - The dedicated line contact email.
- customer_
contact_ strphone - The dedicated line contact phone.
- customer_
name str - The dedicated line contact name.
- direct_
connect_ straccess_ point_ id - The direct connect access point id.
- line_
operator str - The physical leased line operator.valid value contains
ChinaTelecom
,ChinaMobile
,ChinaUnicom
,ChinaOther
. - peer_
location str - The local IDC address.
- port_
spec str - The physical leased line port spec.valid value contains
1G
,10G
. - port_
type str - The physical leased line port type and spec.valid value contains
1000Base-T
,10GBase-T
,1000Base
,10GBase
,40GBase
,100GBase
. - description str
- The description of direct connect.
- direct_
connect_ strconnection_ name - The name of direct connect.
- Sequence[Connection
Tag Args] - The physical leased line tags.
- bandwidth Number
- The line band width,unit:Mbps.
- customer
Contact StringEmail - The dedicated line contact email.
- customer
Contact StringPhone - The dedicated line contact phone.
- customer
Name String - The dedicated line contact name.
- direct
Connect StringAccess Point Id - The direct connect access point id.
- line
Operator String - The physical leased line operator.valid value contains
ChinaTelecom
,ChinaMobile
,ChinaUnicom
,ChinaOther
. - peer
Location String - The local IDC address.
- port
Spec String - The physical leased line port spec.valid value contains
1G
,10G
. - port
Type String - The physical leased line port type and spec.valid value contains
1000Base-T
,10GBase-T
,1000Base
,10GBase
,40GBase
,100GBase
. - description String
- The description of direct connect.
- direct
Connect StringConnection Name - The name of direct connect.
- List<Property Map>
- The physical leased line tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the Connection resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Connection Resource
Get an existing Connection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ConnectionState, opts?: CustomResourceOptions): Connection
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bandwidth: Optional[int] = None,
customer_contact_email: Optional[str] = None,
customer_contact_phone: Optional[str] = None,
customer_name: Optional[str] = None,
description: Optional[str] = None,
direct_connect_access_point_id: Optional[str] = None,
direct_connect_connection_name: Optional[str] = None,
line_operator: Optional[str] = None,
peer_location: Optional[str] = None,
port_spec: Optional[str] = None,
port_type: Optional[str] = None,
tags: Optional[Sequence[ConnectionTagArgs]] = None) -> Connection
func GetConnection(ctx *Context, name string, id IDInput, state *ConnectionState, opts ...ResourceOption) (*Connection, error)
public static Connection Get(string name, Input<string> id, ConnectionState? state, CustomResourceOptions? opts = null)
public static Connection get(String name, Output<String> id, ConnectionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Bandwidth int
- The line band width,unit:Mbps.
- Customer
Contact stringEmail - The dedicated line contact email.
- Customer
Contact stringPhone - The dedicated line contact phone.
- Customer
Name string - The dedicated line contact name.
- Description string
- The description of direct connect.
- Direct
Connect stringAccess Point Id - The direct connect access point id.
- Direct
Connect stringConnection Name - The name of direct connect.
- Line
Operator string - The physical leased line operator.valid value contains
ChinaTelecom
,ChinaMobile
,ChinaUnicom
,ChinaOther
. - Peer
Location string - The local IDC address.
- Port
Spec string - The physical leased line port spec.valid value contains
1G
,10G
. - Port
Type string - The physical leased line port type and spec.valid value contains
1000Base-T
,10GBase-T
,1000Base
,10GBase
,40GBase
,100GBase
. - List<Connection
Tag> - The physical leased line tags.
- Bandwidth int
- The line band width,unit:Mbps.
- Customer
Contact stringEmail - The dedicated line contact email.
- Customer
Contact stringPhone - The dedicated line contact phone.
- Customer
Name string - The dedicated line contact name.
- Description string
- The description of direct connect.
- Direct
Connect stringAccess Point Id - The direct connect access point id.
- Direct
Connect stringConnection Name - The name of direct connect.
- Line
Operator string - The physical leased line operator.valid value contains
ChinaTelecom
,ChinaMobile
,ChinaUnicom
,ChinaOther
. - Peer
Location string - The local IDC address.
- Port
Spec string - The physical leased line port spec.valid value contains
1G
,10G
. - Port
Type string - The physical leased line port type and spec.valid value contains
1000Base-T
,10GBase-T
,1000Base
,10GBase
,40GBase
,100GBase
. - []Connection
Tag Args - The physical leased line tags.
- bandwidth Integer
- The line band width,unit:Mbps.
- customer
Contact StringEmail - The dedicated line contact email.
- customer
Contact StringPhone - The dedicated line contact phone.
- customer
Name String - The dedicated line contact name.
- description String
- The description of direct connect.
- direct
Connect StringAccess Point Id - The direct connect access point id.
- direct
Connect StringConnection Name - The name of direct connect.
- line
Operator String - The physical leased line operator.valid value contains
ChinaTelecom
,ChinaMobile
,ChinaUnicom
,ChinaOther
. - peer
Location String - The local IDC address.
- port
Spec String - The physical leased line port spec.valid value contains
1G
,10G
. - port
Type String - The physical leased line port type and spec.valid value contains
1000Base-T
,10GBase-T
,1000Base
,10GBase
,40GBase
,100GBase
. - List<Connection
Tag> - The physical leased line tags.
- bandwidth number
- The line band width,unit:Mbps.
- customer
Contact stringEmail - The dedicated line contact email.
- customer
Contact stringPhone - The dedicated line contact phone.
- customer
Name string - The dedicated line contact name.
- description string
- The description of direct connect.
- direct
Connect stringAccess Point Id - The direct connect access point id.
- direct
Connect stringConnection Name - The name of direct connect.
- line
Operator string - The physical leased line operator.valid value contains
ChinaTelecom
,ChinaMobile
,ChinaUnicom
,ChinaOther
. - peer
Location string - The local IDC address.
- port
Spec string - The physical leased line port spec.valid value contains
1G
,10G
. - port
Type string - The physical leased line port type and spec.valid value contains
1000Base-T
,10GBase-T
,1000Base
,10GBase
,40GBase
,100GBase
. - Connection
Tag[] - The physical leased line tags.
- bandwidth int
- The line band width,unit:Mbps.
- customer_
contact_ stremail - The dedicated line contact email.
- customer_
contact_ strphone - The dedicated line contact phone.
- customer_
name str - The dedicated line contact name.
- description str
- The description of direct connect.
- direct_
connect_ straccess_ point_ id - The direct connect access point id.
- direct_
connect_ strconnection_ name - The name of direct connect.
- line_
operator str - The physical leased line operator.valid value contains
ChinaTelecom
,ChinaMobile
,ChinaUnicom
,ChinaOther
. - peer_
location str - The local IDC address.
- port_
spec str - The physical leased line port spec.valid value contains
1G
,10G
. - port_
type str - The physical leased line port type and spec.valid value contains
1000Base-T
,10GBase-T
,1000Base
,10GBase
,40GBase
,100GBase
. - Sequence[Connection
Tag Args] - The physical leased line tags.
- bandwidth Number
- The line band width,unit:Mbps.
- customer
Contact StringEmail - The dedicated line contact email.
- customer
Contact StringPhone - The dedicated line contact phone.
- customer
Name String - The dedicated line contact name.
- description String
- The description of direct connect.
- direct
Connect StringAccess Point Id - The direct connect access point id.
- direct
Connect StringConnection Name - The name of direct connect.
- line
Operator String - The physical leased line operator.valid value contains
ChinaTelecom
,ChinaMobile
,ChinaUnicom
,ChinaOther
. - peer
Location String - The local IDC address.
- port
Spec String - The physical leased line port spec.valid value contains
1G
,10G
. - port
Type String - The physical leased line port type and spec.valid value contains
1000Base-T
,10GBase-T
,1000Base
,10GBase
,40GBase
,100GBase
. - List<Property Map>
- The physical leased line tags.
Supporting Types
ConnectionTag, ConnectionTagArgs
Import
DirectConnectConnection can be imported using the id, e.g.
$ pulumi import volcengine:direct_connect/connection:Connection default dcc-7qthudw0ll6jmc****
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.