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,
});
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.
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" },
},
});
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:
- Connected
Device stringId - The ID of the second device in the connection.
- Device
Id string - The ID of the first device in the connection.
- Global
Network stringId - The ID of the global network.
- Connected
Link stringId - The ID of the link for the second device.
- Description string
- A description of the connection.
- Link
Id string - The ID of the link for the first device.
- 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.
- Connected
Device stringId - The ID of the second device in the connection.
- Device
Id string - The ID of the first device in the connection.
- Global
Network stringId - The ID of the global network.
- Connected
Link stringId - The ID of the link for the second device.
- Description string
- A description of the connection.
- Link
Id string - The ID of the link for the first device.
- 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.
- connected
Device StringId - The ID of the second device in the connection.
- device
Id String - The ID of the first device in the connection.
- global
Network StringId - The ID of the global network.
- connected
Link StringId - The ID of the link for the second device.
- description String
- A description of the connection.
- link
Id String - The ID of the link for the first device.
- 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.
- connected
Device stringId - The ID of the second device in the connection.
- device
Id string - The ID of the first device in the connection.
- global
Network stringId - The ID of the global network.
- connected
Link stringId - The ID of the link for the second device.
- description string
- A description of the connection.
- link
Id string - The ID of the link for the first device.
- {[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_ strid - The ID of the second device in the connection.
- device_
id str - The ID of the first device in the connection.
- global_
network_ strid - The ID of the global network.
- connected_
link_ strid - 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.
- 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.
- connected
Device StringId - The ID of the second device in the connection.
- device
Id String - The ID of the first device in the connection.
- global
Network StringId - The ID of the global network.
- connected
Link StringId - The ID of the link for the second device.
- description String
- A description of the connection.
- link
Id String - The ID of the link for the first device.
- 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:
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.
- Arn string
- The Amazon Resource Name (ARN) of the connection.
- Connected
Device stringId - The ID of the second device in the connection.
- Connected
Link stringId - The ID of the link for the second device.
- Description string
- A description of the connection.
- Device
Id string - The ID of the first device in the connection.
- Global
Network stringId - The ID of the global network.
- Link
Id string - The ID of the link for the first device.
- 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. - 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.
- Connected
Device stringId - The ID of the second device in the connection.
- Connected
Link stringId - The ID of the link for the second device.
- Description string
- A description of the connection.
- Device
Id string - The ID of the first device in the connection.
- Global
Network stringId - The ID of the global network.
- Link
Id string - The ID of the link for the first device.
- 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. - 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.
- connected
Device StringId - The ID of the second device in the connection.
- connected
Link StringId - The ID of the link for the second device.
- description String
- A description of the connection.
- device
Id String - The ID of the first device in the connection.
- global
Network StringId - The ID of the global network.
- link
Id String - The ID of the link for the first device.
- 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. - 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.
- connected
Device stringId - The ID of the second device in the connection.
- connected
Link stringId - The ID of the link for the second device.
- description string
- A description of the connection.
- device
Id string - The ID of the first device in the connection.
- global
Network stringId - The ID of the global network.
- link
Id string - The ID of the link for the first device.
- {[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. - {[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_ strid - The ID of the second device in the connection.
- connected_
link_ strid - 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_ strid - The ID of the global network.
- link_
id str - The ID of the link for the first device.
- 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. - 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.
- connected
Device StringId - The ID of the second device in the connection.
- connected
Link StringId - The ID of the link for the second device.
- description String
- A description of the connection.
- device
Id String - The ID of the first device in the connection.
- global
Network StringId - The ID of the global network.
- link
Id String - The ID of the link for the first device.
- 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. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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.