1. Packages
  2. AWS
  3. API Docs
  4. networkmanager
  5. LinkAssociation
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.networkmanager.LinkAssociation

Explore with Pulumi AI

Associates a link to a device. A device can be associated to multiple links and a link can be associated to multiple devices. The device and link must be in the same global network and the same site.

Example Usage

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

const example = new aws.networkmanager.LinkAssociation("example", {
    globalNetworkId: exampleAwsNetworkmanagerGlobalNetwork.id,
    linkId: exampleAwsNetworkmanagerLink.id,
    deviceId: exampleAwsNetworkmanagerDevice.id,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.networkmanager.LinkAssociation("example",
    global_network_id=example_aws_networkmanager_global_network["id"],
    link_id=example_aws_networkmanager_link["id"],
    device_id=example_aws_networkmanager_device["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.NewLinkAssociation(ctx, "example", &networkmanager.LinkAssociationArgs{
			GlobalNetworkId: pulumi.Any(exampleAwsNetworkmanagerGlobalNetwork.Id),
			LinkId:          pulumi.Any(exampleAwsNetworkmanagerLink.Id),
			DeviceId:        pulumi.Any(exampleAwsNetworkmanagerDevice.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.LinkAssociation("example", new()
    {
        GlobalNetworkId = exampleAwsNetworkmanagerGlobalNetwork.Id,
        LinkId = exampleAwsNetworkmanagerLink.Id,
        DeviceId = exampleAwsNetworkmanagerDevice.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.networkmanager.LinkAssociation;
import com.pulumi.aws.networkmanager.LinkAssociationArgs;
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 LinkAssociation("example", LinkAssociationArgs.builder()
            .globalNetworkId(exampleAwsNetworkmanagerGlobalNetwork.id())
            .linkId(exampleAwsNetworkmanagerLink.id())
            .deviceId(exampleAwsNetworkmanagerDevice.id())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:networkmanager:LinkAssociation
    properties:
      globalNetworkId: ${exampleAwsNetworkmanagerGlobalNetwork.id}
      linkId: ${exampleAwsNetworkmanagerLink.id}
      deviceId: ${exampleAwsNetworkmanagerDevice.id}
Copy

Create LinkAssociation Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new LinkAssociation(name: string, args: LinkAssociationArgs, opts?: CustomResourceOptions);
@overload
def LinkAssociation(resource_name: str,
                    args: LinkAssociationArgs,
                    opts: Optional[ResourceOptions] = None)

@overload
def LinkAssociation(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    device_id: Optional[str] = None,
                    global_network_id: Optional[str] = None,
                    link_id: Optional[str] = None)
func NewLinkAssociation(ctx *Context, name string, args LinkAssociationArgs, opts ...ResourceOption) (*LinkAssociation, error)
public LinkAssociation(string name, LinkAssociationArgs args, CustomResourceOptions? opts = null)
public LinkAssociation(String name, LinkAssociationArgs args)
public LinkAssociation(String name, LinkAssociationArgs args, CustomResourceOptions options)
type: aws:networkmanager:LinkAssociation
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. LinkAssociationArgs
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. LinkAssociationArgs
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. LinkAssociationArgs
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. LinkAssociationArgs
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. LinkAssociationArgs
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 linkAssociationResource = new Aws.NetworkManager.LinkAssociation("linkAssociationResource", new()
{
    DeviceId = "string",
    GlobalNetworkId = "string",
    LinkId = "string",
});
Copy
example, err := networkmanager.NewLinkAssociation(ctx, "linkAssociationResource", &networkmanager.LinkAssociationArgs{
	DeviceId:        pulumi.String("string"),
	GlobalNetworkId: pulumi.String("string"),
	LinkId:          pulumi.String("string"),
})
Copy
var linkAssociationResource = new LinkAssociation("linkAssociationResource", LinkAssociationArgs.builder()
    .deviceId("string")
    .globalNetworkId("string")
    .linkId("string")
    .build());
Copy
link_association_resource = aws.networkmanager.LinkAssociation("linkAssociationResource",
    device_id="string",
    global_network_id="string",
    link_id="string")
Copy
const linkAssociationResource = new aws.networkmanager.LinkAssociation("linkAssociationResource", {
    deviceId: "string",
    globalNetworkId: "string",
    linkId: "string",
});
Copy
type: aws:networkmanager:LinkAssociation
properties:
    deviceId: string
    globalNetworkId: string
    linkId: string
Copy

LinkAssociation 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 LinkAssociation resource accepts the following input properties:

DeviceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the device.
GlobalNetworkId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the global network.
LinkId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the link.
DeviceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the device.
GlobalNetworkId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the global network.
LinkId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the link.
deviceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the device.
globalNetworkId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the global network.
linkId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the link.
deviceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the device.
globalNetworkId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the global network.
linkId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the link.
device_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the device.
global_network_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the global network.
link_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the link.
deviceId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the device.
globalNetworkId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the global network.
linkId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the link.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing LinkAssociation Resource

Get an existing LinkAssociation 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?: LinkAssociationState, opts?: CustomResourceOptions): LinkAssociation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        device_id: Optional[str] = None,
        global_network_id: Optional[str] = None,
        link_id: Optional[str] = None) -> LinkAssociation
func GetLinkAssociation(ctx *Context, name string, id IDInput, state *LinkAssociationState, opts ...ResourceOption) (*LinkAssociation, error)
public static LinkAssociation Get(string name, Input<string> id, LinkAssociationState? state, CustomResourceOptions? opts = null)
public static LinkAssociation get(String name, Output<String> id, LinkAssociationState state, CustomResourceOptions options)
resources:  _:    type: aws:networkmanager:LinkAssociation    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:
DeviceId Changes to this property will trigger replacement. string
The ID of the device.
GlobalNetworkId Changes to this property will trigger replacement. string
The ID of the global network.
LinkId Changes to this property will trigger replacement. string
The ID of the link.
DeviceId Changes to this property will trigger replacement. string
The ID of the device.
GlobalNetworkId Changes to this property will trigger replacement. string
The ID of the global network.
LinkId Changes to this property will trigger replacement. string
The ID of the link.
deviceId Changes to this property will trigger replacement. String
The ID of the device.
globalNetworkId Changes to this property will trigger replacement. String
The ID of the global network.
linkId Changes to this property will trigger replacement. String
The ID of the link.
deviceId Changes to this property will trigger replacement. string
The ID of the device.
globalNetworkId Changes to this property will trigger replacement. string
The ID of the global network.
linkId Changes to this property will trigger replacement. string
The ID of the link.
device_id Changes to this property will trigger replacement. str
The ID of the device.
global_network_id Changes to this property will trigger replacement. str
The ID of the global network.
link_id Changes to this property will trigger replacement. str
The ID of the link.
deviceId Changes to this property will trigger replacement. String
The ID of the device.
globalNetworkId Changes to this property will trigger replacement. String
The ID of the global network.
linkId Changes to this property will trigger replacement. String
The ID of the link.

Import

Using pulumi import, import aws_networkmanager_link_association using the global network ID, link ID and device ID. For example:

$ pulumi import aws:networkmanager/linkAssociation:LinkAssociation example global-network-0d47f6t230mz46dy4,link-444555aaabbb11223,device-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.