1. Packages
  2. AWS
  3. API Docs
  4. networkmanager
  5. Connection
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.networkmanager.Connection

Explore with Pulumi AI

Creates a connection between two devices. The devices can be a physical or virtual appliance that connects to a third-party appliance in a VPC, or a physical appliance that connects to another physical appliance in an on-premises network.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.networkmanager.Connection("example", {
    globalNetworkId: exampleAwsNetworkmanagerGlobalNetwork.id,
    deviceId: example1.id,
    connectedDeviceId: example2.id,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.networkmanager.Connection("example",
    global_network_id=example_aws_networkmanager_global_network["id"],
    device_id=example1["id"],
    connected_device_id=example2["id"])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := networkmanager.NewConnection(ctx, "example", &networkmanager.ConnectionArgs{
			GlobalNetworkId:   pulumi.Any(exampleAwsNetworkmanagerGlobalNetwork.Id),
			DeviceId:          pulumi.Any(example1.Id),
			ConnectedDeviceId: pulumi.Any(example2.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.NetworkManager.Connection("example", new()
    {
        GlobalNetworkId = exampleAwsNetworkmanagerGlobalNetwork.Id,
        DeviceId = example1.Id,
        ConnectedDeviceId = example2.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkmanager.Connection;
import com.pulumi.aws.networkmanager.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()
            .globalNetworkId(exampleAwsNetworkmanagerGlobalNetwork.id())
            .deviceId(example1.id())
            .connectedDeviceId(example2.id())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:networkmanager:Connection
    properties:
      globalNetworkId: ${exampleAwsNetworkmanagerGlobalNetwork.id}
      deviceId: ${example1.id}
      connectedDeviceId: ${example2.id}
Copy

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,
               connected_device_id: Optional[str] = None,
               device_id: Optional[str] = None,
               global_network_id: Optional[str] = None,
               connected_link_id: Optional[str] = None,
               description: Optional[str] = None,
               link_id: Optional[str] = None,
               tags: Optional[Mapping[str, str]] = 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: aws:networkmanager:Connection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. ConnectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 exampleconnectionResourceResourceFromNetworkmanagerconnection = new Aws.NetworkManager.Connection("exampleconnectionResourceResourceFromNetworkmanagerconnection", new()
{
    ConnectedDeviceId = "string",
    DeviceId = "string",
    GlobalNetworkId = "string",
    ConnectedLinkId = "string",
    Description = "string",
    LinkId = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := networkmanager.NewConnection(ctx, "exampleconnectionResourceResourceFromNetworkmanagerconnection", &networkmanager.ConnectionArgs{
	ConnectedDeviceId: pulumi.String("string"),
	DeviceId:          pulumi.String("string"),
	GlobalNetworkId:   pulumi.String("string"),
	ConnectedLinkId:   pulumi.String("string"),
	Description:       pulumi.String("string"),
	LinkId:            pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var exampleconnectionResourceResourceFromNetworkmanagerconnection = new Connection("exampleconnectionResourceResourceFromNetworkmanagerconnection", ConnectionArgs.builder()
    .connectedDeviceId("string")
    .deviceId("string")
    .globalNetworkId("string")
    .connectedLinkId("string")
    .description("string")
    .linkId("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
exampleconnection_resource_resource_from_networkmanagerconnection = aws.networkmanager.Connection("exampleconnectionResourceResourceFromNetworkmanagerconnection",
    connected_device_id="string",
    device_id="string",
    global_network_id="string",
    connected_link_id="string",
    description="string",
    link_id="string",
    tags={
        "string": "string",
    })
Copy
const exampleconnectionResourceResourceFromNetworkmanagerconnection = new aws.networkmanager.Connection("exampleconnectionResourceResourceFromNetworkmanagerconnection", {
    connectedDeviceId: "string",
    deviceId: "string",
    globalNetworkId: "string",
    connectedLinkId: "string",
    description: "string",
    linkId: "string",
    tags: {
        string: "string",
    },
});
Copy
type: aws:networkmanager:Connection
properties:
    connectedDeviceId: string
    connectedLinkId: string
    description: string
    deviceId: string
    globalNetworkId: string
    linkId: string
    tags:
        string: string
Copy

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:

ConnectedDeviceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the second device in the connection.
DeviceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the first device in the connection.
GlobalNetworkId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the global network.
ConnectedLinkId string
The ID of the link for the second device.
Description string
A description of the connection.
LinkId string
The ID of the link for the first device.
Tags Dictionary<string, string>
Key-value tags for the connection. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
ConnectedDeviceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the second device in the connection.
DeviceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the first device in the connection.
GlobalNetworkId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the global network.
ConnectedLinkId string
The ID of the link for the second device.
Description string
A description of the connection.
LinkId string
The ID of the link for the first device.
Tags map[string]string
Key-value tags for the connection. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
connectedDeviceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the second device in the connection.
deviceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the first device in the connection.
globalNetworkId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the global network.
connectedLinkId String
The ID of the link for the second device.
description String
A description of the connection.
linkId String
The ID of the link for the first device.
tags Map<String,String>
Key-value tags for the connection. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
connectedDeviceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the second device in the connection.
deviceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the first device in the connection.
globalNetworkId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the global network.
connectedLinkId string
The ID of the link for the second device.
description string
A description of the connection.
linkId string
The ID of the link for the first device.
tags {[key: string]: string}
Key-value tags for the connection. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
connected_device_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the second device in the connection.
device_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the first device in the connection.
global_network_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the global network.
connected_link_id str
The ID of the link for the second device.
description str
A description of the connection.
link_id str
The ID of the link for the first device.
tags Mapping[str, str]
Key-value tags for the connection. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
connectedDeviceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the second device in the connection.
deviceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the first device in the connection.
globalNetworkId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the global network.
connectedLinkId String
The ID of the link for the second device.
description String
A description of the connection.
linkId String
The ID of the link for the first device.
tags Map<String>
Key-value tags for the connection. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Outputs

All input properties are implicitly available as output properties. Additionally, the Connection resource produces the following output properties:

Arn string
The Amazon Resource Name (ARN) of the connection.
Id string
The provider-assigned unique ID for this managed resource.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Arn string
The Amazon Resource Name (ARN) of the connection.
Id string
The provider-assigned unique ID for this managed resource.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The Amazon Resource Name (ARN) of the connection.
id String
The provider-assigned unique ID for this managed resource.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn string
The Amazon Resource Name (ARN) of the connection.
id string
The provider-assigned unique ID for this managed resource.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn str
The Amazon Resource Name (ARN) of the connection.
id str
The provider-assigned unique ID for this managed resource.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The Amazon Resource Name (ARN) of the connection.
id String
The provider-assigned unique ID for this managed resource.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

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,
        arn: Optional[str] = None,
        connected_device_id: Optional[str] = None,
        connected_link_id: Optional[str] = None,
        description: Optional[str] = None,
        device_id: Optional[str] = None,
        global_network_id: Optional[str] = None,
        link_id: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = 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)
resources:  _:    type: aws:networkmanager:Connection    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
Arn string
The Amazon Resource Name (ARN) of the connection.
ConnectedDeviceId Changes to this property will trigger replacement. string
The ID of the second device in the connection.
ConnectedLinkId string
The ID of the link for the second device.
Description string
A description of the connection.
DeviceId Changes to this property will trigger replacement. string
The ID of the first device in the connection.
GlobalNetworkId Changes to this property will trigger replacement. string
The ID of the global network.
LinkId string
The ID of the link for the first device.
Tags Dictionary<string, string>
Key-value tags for the connection. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Arn string
The Amazon Resource Name (ARN) of the connection.
ConnectedDeviceId Changes to this property will trigger replacement. string
The ID of the second device in the connection.
ConnectedLinkId string
The ID of the link for the second device.
Description string
A description of the connection.
DeviceId Changes to this property will trigger replacement. string
The ID of the first device in the connection.
GlobalNetworkId Changes to this property will trigger replacement. string
The ID of the global network.
LinkId string
The ID of the link for the first device.
Tags map[string]string
Key-value tags for the connection. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The Amazon Resource Name (ARN) of the connection.
connectedDeviceId Changes to this property will trigger replacement. String
The ID of the second device in the connection.
connectedLinkId String
The ID of the link for the second device.
description String
A description of the connection.
deviceId Changes to this property will trigger replacement. String
The ID of the first device in the connection.
globalNetworkId Changes to this property will trigger replacement. String
The ID of the global network.
linkId String
The ID of the link for the first device.
tags Map<String,String>
Key-value tags for the connection. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn string
The Amazon Resource Name (ARN) of the connection.
connectedDeviceId Changes to this property will trigger replacement. string
The ID of the second device in the connection.
connectedLinkId string
The ID of the link for the second device.
description string
A description of the connection.
deviceId Changes to this property will trigger replacement. string
The ID of the first device in the connection.
globalNetworkId Changes to this property will trigger replacement. string
The ID of the global network.
linkId string
The ID of the link for the first device.
tags {[key: string]: string}
Key-value tags for the connection. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn str
The Amazon Resource Name (ARN) of the connection.
connected_device_id Changes to this property will trigger replacement. str
The ID of the second device in the connection.
connected_link_id str
The ID of the link for the second device.
description str
A description of the connection.
device_id Changes to this property will trigger replacement. str
The ID of the first device in the connection.
global_network_id Changes to this property will trigger replacement. str
The ID of the global network.
link_id str
The ID of the link for the first device.
tags Mapping[str, str]
Key-value tags for the connection. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
The Amazon Resource Name (ARN) of the connection.
connectedDeviceId Changes to this property will trigger replacement. String
The ID of the second device in the connection.
connectedLinkId String
The ID of the link for the second device.
description String
A description of the connection.
deviceId Changes to this property will trigger replacement. String
The ID of the first device in the connection.
globalNetworkId Changes to this property will trigger replacement. String
The ID of the global network.
linkId String
The ID of the link for the first device.
tags Map<String>
Key-value tags for the connection. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Import

Using pulumi import, import aws_networkmanager_connection using the connection ARN. For example:

$ pulumi import aws:networkmanager/connection:Connection example arn:aws:networkmanager::123456789012:device/global-network-0d47f6t230mz46dy4/connection-07f6fd08867abc123
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.