Connection

class Connection : KotlinCustomResource

Provides a Connection of Direct Connect.

Example Usage

Create a connection

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const hoge = new aws.directconnect.Connection("hoge", {
name: "tf-dx-connection",
bandwidth: "1Gbps",
location: "EqDC2",
});
import pulumi
import pulumi_aws as aws
hoge = aws.directconnect.Connection("hoge",
name="tf-dx-connection",
bandwidth="1Gbps",
location="EqDC2")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var hoge = new Aws.DirectConnect.Connection("hoge", new()
{
Name = "tf-dx-connection",
Bandwidth = "1Gbps",
Location = "EqDC2",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := directconnect.NewConnection(ctx, "hoge", &directconnect.ConnectionArgs{
Name: pulumi.String("tf-dx-connection"),
Bandwidth: pulumi.String("1Gbps"),
Location: pulumi.String("EqDC2"),
})
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.aws.directconnect.Connection;
import com.pulumi.aws.directconnect.ConnectionArgs;
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 hoge = new Connection("hoge", ConnectionArgs.builder()
.name("tf-dx-connection")
.bandwidth("1Gbps")
.location("EqDC2")
.build());
}
}
resources:
hoge:
type: aws:directconnect:Connection
properties:
name: tf-dx-connection
bandwidth: 1Gbps
location: EqDC2

Request a MACsec-capable connection

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.directconnect.Connection("example", {
name: "tf-dx-connection",
bandwidth: "10Gbps",
location: "EqDA2",
requestMacsec: true,
});
import pulumi
import pulumi_aws as aws
example = aws.directconnect.Connection("example",
name="tf-dx-connection",
bandwidth="10Gbps",
location="EqDA2",
request_macsec=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.DirectConnect.Connection("example", new()
{
Name = "tf-dx-connection",
Bandwidth = "10Gbps",
Location = "EqDA2",
RequestMacsec = true,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := directconnect.NewConnection(ctx, "example", &directconnect.ConnectionArgs{
Name: pulumi.String("tf-dx-connection"),
Bandwidth: pulumi.String("10Gbps"),
Location: pulumi.String("EqDA2"),
RequestMacsec: pulumi.Bool(true),
})
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.aws.directconnect.Connection;
import com.pulumi.aws.directconnect.ConnectionArgs;
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 example = new Connection("example", ConnectionArgs.builder()
.name("tf-dx-connection")
.bandwidth("10Gbps")
.location("EqDA2")
.requestMacsec(true)
.build());
}
}
resources:
example:
type: aws:directconnect:Connection
properties:
name: tf-dx-connection
bandwidth: 10Gbps
location: EqDA2
requestMacsec: true

Configure encryption mode for MACsec-capable connections

NOTE: You can only specify the encryption_mode argument once the connection is in an Available state.

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.directconnect.Connection("example", {
name: "tf-dx-connection",
bandwidth: "10Gbps",
location: "EqDC2",
requestMacsec: true,
encryptionMode: "must_encrypt",
});
import pulumi
import pulumi_aws as aws
example = aws.directconnect.Connection("example",
name="tf-dx-connection",
bandwidth="10Gbps",
location="EqDC2",
request_macsec=True,
encryption_mode="must_encrypt")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.DirectConnect.Connection("example", new()
{
Name = "tf-dx-connection",
Bandwidth = "10Gbps",
Location = "EqDC2",
RequestMacsec = true,
EncryptionMode = "must_encrypt",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := directconnect.NewConnection(ctx, "example", &directconnect.ConnectionArgs{
Name: pulumi.String("tf-dx-connection"),
Bandwidth: pulumi.String("10Gbps"),
Location: pulumi.String("EqDC2"),
RequestMacsec: pulumi.Bool(true),
EncryptionMode: pulumi.String("must_encrypt"),
})
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.aws.directconnect.Connection;
import com.pulumi.aws.directconnect.ConnectionArgs;
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 example = new Connection("example", ConnectionArgs.builder()
.name("tf-dx-connection")
.bandwidth("10Gbps")
.location("EqDC2")
.requestMacsec(true)
.encryptionMode("must_encrypt")
.build());
}
}
resources:
example:
type: aws:directconnect:Connection
properties:
name: tf-dx-connection
bandwidth: 10Gbps
location: EqDC2
requestMacsec: true
encryptionMode: must_encrypt

Import

Using pulumi import, import Direct Connect connections using the connection id. For example:

$ pulumi import aws:directconnect/connection:Connection test_connection dxcon-ffre0ec3

Properties

Link copied to clipboard
val arn: Output<String>

The ARN of the connection.

Link copied to clipboard
val awsDevice: Output<String>

The Direct Connect endpoint on which the physical connection terminates.

Link copied to clipboard
val bandwidth: Output<String>

The bandwidth of the connection. Valid values for dedicated connections: 1Gbps, 10Gbps, 100Gbps, and 400Gbps. Valid values for hosted connections: 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps, 10Gbps, and 25Gbps. Case sensitive. Refer to the AWS Direct Connection supported bandwidths for Dedicated Connections and Hosted Connections.

Link copied to clipboard
val encryptionMode: Output<String>

The connection MAC Security (MACsec) encryption mode. MAC Security (MACsec) is only available on dedicated connections. Valid values are no_encrypt, should_encrypt, and must_encrypt.

Link copied to clipboard

Indicates whether the connection supports a secondary BGP peer in the same address family (IPv4/IPv6).

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

Boolean value representing if jumbo frames have been enabled for this connection.

Link copied to clipboard
val location: Output<String>

The AWS Direct Connect location where the connection is located. See DescribeLocations for the list of AWS Direct Connect locations. Use locationCode.

Link copied to clipboard
val macsecCapable: Output<Boolean>

Boolean value indicating whether the connection supports MAC Security (MACsec).

Link copied to clipboard
val name: Output<String>

The name of the connection.

Link copied to clipboard
val ownerAccountId: Output<String>

The ID of the AWS account that owns the connection.

Link copied to clipboard
val partnerName: Output<String>

The name of the AWS Direct Connect service provider associated with the connection.

Link copied to clipboard

The MAC Security (MACsec) port link status of the connection.

Link copied to clipboard
val providerName: Output<String>

The name of the service provider associated with the connection.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val requestMacsec: Output<Boolean>?

Boolean value indicating whether you want the connection to support MAC Security (MACsec). MAC Security (MACsec) is only available on dedicated connections. See MACsec prerequisites for more information about MAC Security (MACsec) prerequisites. Default value: false.

Link copied to clipboard
val skipDestroy: Output<Boolean>?

Set to true if you do not wish the connection to be deleted at destroy time, and instead just removed from the state.

Link copied to clipboard
val tags: Output<Map<String, String>>?

A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val vlanId: Output<Int>

The VLAN ID.