1. Packages
  2. AWS
  3. API Docs
  4. networkmanager
  5. LinkAssociation
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.networkmanager.LinkAssociation

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    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,
    });
    
    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"])
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    resources:
      example:
        type: aws:networkmanager:LinkAssociation
        properties:
          globalNetworkId: ${exampleAwsNetworkmanagerGlobalNetwork.id}
          linkId: ${exampleAwsNetworkmanagerLink.id}
          deviceId: ${exampleAwsNetworkmanagerDevice.id}
    

    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 string
    The unique name of the resource.
    args LinkAssociationArgs
    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 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 string
    The unique name of the resource.
    args LinkAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LinkAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
    });
    
    example, err := networkmanager.NewLinkAssociation(ctx, "linkAssociationResource", &networkmanager.LinkAssociationArgs{
    	DeviceId:        pulumi.String("string"),
    	GlobalNetworkId: pulumi.String("string"),
    	LinkId:          pulumi.String("string"),
    })
    
    var linkAssociationResource = new LinkAssociation("linkAssociationResource", LinkAssociationArgs.builder()
        .deviceId("string")
        .globalNetworkId("string")
        .linkId("string")
        .build());
    
    link_association_resource = aws.networkmanager.LinkAssociation("linkAssociationResource",
        device_id="string",
        global_network_id="string",
        link_id="string")
    
    const linkAssociationResource = new aws.networkmanager.LinkAssociation("linkAssociationResource", {
        deviceId: "string",
        globalNetworkId: "string",
        linkId: "string",
    });
    
    type: aws:networkmanager:LinkAssociation
    properties:
        deviceId: string
        globalNetworkId: string
        linkId: string
    

    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

    The LinkAssociation resource accepts the following input properties:

    DeviceId string
    The ID of the device.
    GlobalNetworkId string
    The ID of the global network.
    LinkId string
    The ID of the link.
    DeviceId string
    The ID of the device.
    GlobalNetworkId string
    The ID of the global network.
    LinkId string
    The ID of the link.
    deviceId String
    The ID of the device.
    globalNetworkId String
    The ID of the global network.
    linkId String
    The ID of the link.
    deviceId string
    The ID of the device.
    globalNetworkId string
    The ID of the global network.
    linkId string
    The ID of the link.
    device_id str
    The ID of the device.
    global_network_id str
    The ID of the global network.
    link_id str
    The ID of the link.
    deviceId String
    The ID of the device.
    globalNetworkId String
    The ID of the global network.
    linkId 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)
    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:
    DeviceId string
    The ID of the device.
    GlobalNetworkId string
    The ID of the global network.
    LinkId string
    The ID of the link.
    DeviceId string
    The ID of the device.
    GlobalNetworkId string
    The ID of the global network.
    LinkId string
    The ID of the link.
    deviceId String
    The ID of the device.
    globalNetworkId String
    The ID of the global network.
    linkId String
    The ID of the link.
    deviceId string
    The ID of the device.
    globalNetworkId string
    The ID of the global network.
    linkId string
    The ID of the link.
    device_id str
    The ID of the device.
    global_network_id str
    The ID of the global network.
    link_id str
    The ID of the link.
    deviceId String
    The ID of the device.
    globalNetworkId String
    The ID of the global network.
    linkId 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
    

    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
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi