AWS Classic

v5.15.0 published on Thursday, Sep 22, 2022 by Pulumi

Connection

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

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.NetworkManager.Connection("example", new()
    {
        GlobalNetworkId = aws_networkmanager_global_network.Example.Id,
        DeviceId = aws_networkmanager_device.Example1.Id,
        ConnectedDeviceId = aws_networkmanager_device.Example2.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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(aws_networkmanager_global_network.Example.Id),
			DeviceId:          pulumi.Any(aws_networkmanager_device.Example1.Id),
			ConnectedDeviceId: pulumi.Any(aws_networkmanager_device.Example2.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.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(aws_networkmanager_global_network.example().id())
            .deviceId(aws_networkmanager_device.example1().id())
            .connectedDeviceId(aws_networkmanager_device.example2().id())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.networkmanager.Connection("example",
    global_network_id=aws_networkmanager_global_network["example"]["id"],
    device_id=aws_networkmanager_device["example1"]["id"],
    connected_device_id=aws_networkmanager_device["example2"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.networkmanager.Connection("example", {
    globalNetworkId: aws_networkmanager_global_network.example.id,
    deviceId: aws_networkmanager_device.example1.id,
    connectedDeviceId: aws_networkmanager_device.example2.id,
});
resources:
  example:
    type: aws:networkmanager:Connection
    properties:
      globalNetworkId: ${aws_networkmanager_global_network.example.id}
      deviceId: ${aws_networkmanager_device.example1.id}
      connectedDeviceId: ${aws_networkmanager_device.example2.id}

Create a Connection Resource

new Connection(name: string, args: ConnectionArgs, opts?: CustomResourceOptions);
@overload
def Connection(resource_name: str,
               opts: Optional[ResourceOptions] = 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)
@overload
def Connection(resource_name: str,
               args: ConnectionArgs,
               opts: Optional[ResourceOptions] = 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.

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.

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

The Connection resource accepts the following input properties:

ConnectedDeviceId string

The ID of the second device in the connection.

DeviceId string

The ID of the first device in the connection.

GlobalNetworkId 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>
ConnectedDeviceId string

The ID of the second device in the connection.

DeviceId string

The ID of the first device in the connection.

GlobalNetworkId 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
connectedDeviceId String

The ID of the second device in the connection.

deviceId String

The ID of the first device in the connection.

globalNetworkId 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>
connectedDeviceId string

The ID of the second device in the connection.

deviceId string

The ID of the first device in the connection.

globalNetworkId 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}
connected_device_id str

The ID of the second device in the connection.

device_id str

The ID of the first device in the connection.

global_network_id 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]
connectedDeviceId String

The ID of the second device in the connection.

deviceId String

The ID of the first device in the connection.

globalNetworkId 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>

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.

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.

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.

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.

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.

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.

Look up an 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)
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.
The following state arguments are supported:
Arn string

The Amazon Resource Name (ARN) of the connection.

ConnectedDeviceId 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 string

The ID of the first device in the connection.

GlobalNetworkId string

The ID of the global network.

LinkId string

The ID of the link for the first device.

Tags Dictionary<string, string>
TagsAll Dictionary<string, string>

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

Arn string

The Amazon Resource Name (ARN) of the connection.

ConnectedDeviceId 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 string

The ID of the first device in the connection.

GlobalNetworkId string

The ID of the global network.

LinkId string

The ID of the link for the first device.

Tags map[string]string
TagsAll map[string]string

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

arn String

The Amazon Resource Name (ARN) of the connection.

connectedDeviceId 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 String

The ID of the first device in the connection.

globalNetworkId String

The ID of the global network.

linkId String

The ID of the link for the first device.

tags Map<String,String>
tagsAll Map<String,String>

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

arn string

The Amazon Resource Name (ARN) of the connection.

connectedDeviceId 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 string

The ID of the first device in the connection.

globalNetworkId string

The ID of the global network.

linkId string

The ID of the link for the first device.

tags {[key: string]: string}
tagsAll {[key: string]: string}

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

arn str

The Amazon Resource Name (ARN) of the connection.

connected_device_id 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 str

The ID of the first device in the connection.

global_network_id str

The ID of the global network.

link_id str

The ID of the link for the first device.

tags Mapping[str, str]
tags_all Mapping[str, str]

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

arn String

The Amazon Resource Name (ARN) of the connection.

connectedDeviceId 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 String

The ID of the first device in the connection.

globalNetworkId String

The ID of the global network.

linkId String

The ID of the link for the first device.

tags Map<String>
tagsAll Map<String>

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

Import

aws_networkmanager_connection can be imported using the connection ARN, e.g.

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

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.