1. Packages
  2. AWS Classic
  3. API Docs
  4. networkmanager
  5. Connection

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.41.0 published on Tuesday, Jun 18, 2024 by Pulumi

aws.networkmanager.Connection

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.41.0 published on Tuesday, Jun 18, 2024 by Pulumi

    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,
    });
    
    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"])
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      example:
        type: aws:networkmanager:Connection
        properties:
          globalNetworkId: ${exampleAwsNetworkmanagerGlobalNetwork.id}
          deviceId: ${example1.id}
          connectedDeviceId: ${example2.id}
    

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

    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" },
        },
    });
    
    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"),
    	},
    })
    
    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());
    
    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",
        })
    
    const exampleconnectionResourceResourceFromNetworkmanagerconnection = new aws.networkmanager.Connection("exampleconnectionResourceResourceFromNetworkmanagerconnection", {
        connectedDeviceId: "string",
        deviceId: "string",
        globalNetworkId: "string",
        connectedLinkId: "string",
        description: "string",
        linkId: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:networkmanager:Connection
    properties:
        connectedDeviceId: string
        connectedLinkId: string
        description: string
        deviceId: string
        globalNetworkId: string
        linkId: string
        tags:
            string: 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

    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>
    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 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
    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 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>
    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 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}
    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 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]
    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 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>
    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)
    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>
    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 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
    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 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>
    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 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}
    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 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]
    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 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>
    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
    

    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.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.41.0 published on Tuesday, Jun 18, 2024 by Pulumi