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

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

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.networkmanager.getConnection

Explore with Pulumi AI

aws logo

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

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Retrieve information about a connection.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.networkmanager.getConnection({
        globalNetworkId: globalNetworkId,
        connectionId: connectionId,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.networkmanager.get_connection(global_network_id=global_network_id,
        connection_id=connection_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.LookupConnection(ctx, &networkmanager.LookupConnectionArgs{
    			GlobalNetworkId: globalNetworkId,
    			ConnectionId:    connectionId,
    		}, nil)
    		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 = Aws.NetworkManager.GetConnection.Invoke(new()
        {
            GlobalNetworkId = globalNetworkId,
            ConnectionId = connectionId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.networkmanager.NetworkmanagerFunctions;
    import com.pulumi.aws.networkmanager.inputs.GetConnectionArgs;
    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) {
            final var example = NetworkmanagerFunctions.getConnection(GetConnectionArgs.builder()
                .globalNetworkId(globalNetworkId)
                .connectionId(connectionId)
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:networkmanager:getConnection
          Arguments:
            globalNetworkId: ${globalNetworkId}
            connectionId: ${connectionId}
    

    Using getConnection

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getConnection(args: GetConnectionArgs, opts?: InvokeOptions): Promise<GetConnectionResult>
    function getConnectionOutput(args: GetConnectionOutputArgs, opts?: InvokeOptions): Output<GetConnectionResult>
    def get_connection(connection_id: Optional[str] = None,
                       global_network_id: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None,
                       opts: Optional[InvokeOptions] = None) -> GetConnectionResult
    def get_connection_output(connection_id: Optional[pulumi.Input[str]] = None,
                       global_network_id: Optional[pulumi.Input[str]] = None,
                       tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetConnectionResult]
    func LookupConnection(ctx *Context, args *LookupConnectionArgs, opts ...InvokeOption) (*LookupConnectionResult, error)
    func LookupConnectionOutput(ctx *Context, args *LookupConnectionOutputArgs, opts ...InvokeOption) LookupConnectionResultOutput

    > Note: This function is named LookupConnection in the Go SDK.

    public static class GetConnection 
    {
        public static Task<GetConnectionResult> InvokeAsync(GetConnectionArgs args, InvokeOptions? opts = null)
        public static Output<GetConnectionResult> Invoke(GetConnectionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetConnectionResult> getConnection(GetConnectionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:networkmanager/getConnection:getConnection
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ConnectionId string
    ID of the specific connection to retrieve.
    GlobalNetworkId string
    ID of the Global Network of the connection to retrieve.
    Tags Dictionary<string, string>
    Key-value tags for the connection.
    ConnectionId string
    ID of the specific connection to retrieve.
    GlobalNetworkId string
    ID of the Global Network of the connection to retrieve.
    Tags map[string]string
    Key-value tags for the connection.
    connectionId String
    ID of the specific connection to retrieve.
    globalNetworkId String
    ID of the Global Network of the connection to retrieve.
    tags Map<String,String>
    Key-value tags for the connection.
    connectionId string
    ID of the specific connection to retrieve.
    globalNetworkId string
    ID of the Global Network of the connection to retrieve.
    tags {[key: string]: string}
    Key-value tags for the connection.
    connection_id str
    ID of the specific connection to retrieve.
    global_network_id str
    ID of the Global Network of the connection to retrieve.
    tags Mapping[str, str]
    Key-value tags for the connection.
    connectionId String
    ID of the specific connection to retrieve.
    globalNetworkId String
    ID of the Global Network of the connection to retrieve.
    tags Map<String>
    Key-value tags for the connection.

    getConnection Result

    The following output properties are available:

    Arn string
    ARN of the connection.
    ConnectedDeviceId string
    ID of the second device in the connection.
    ConnectedLinkId string
    ID of the link for the second device.
    ConnectionId string
    Description string
    Description of the connection.
    DeviceId string
    ID of the first device in the connection.
    GlobalNetworkId string
    Id string
    The provider-assigned unique ID for this managed resource.
    LinkId string
    ID of the link for the first device.
    Tags Dictionary<string, string>
    Key-value tags for the connection.
    Arn string
    ARN of the connection.
    ConnectedDeviceId string
    ID of the second device in the connection.
    ConnectedLinkId string
    ID of the link for the second device.
    ConnectionId string
    Description string
    Description of the connection.
    DeviceId string
    ID of the first device in the connection.
    GlobalNetworkId string
    Id string
    The provider-assigned unique ID for this managed resource.
    LinkId string
    ID of the link for the first device.
    Tags map[string]string
    Key-value tags for the connection.
    arn String
    ARN of the connection.
    connectedDeviceId String
    ID of the second device in the connection.
    connectedLinkId String
    ID of the link for the second device.
    connectionId String
    description String
    Description of the connection.
    deviceId String
    ID of the first device in the connection.
    globalNetworkId String
    id String
    The provider-assigned unique ID for this managed resource.
    linkId String
    ID of the link for the first device.
    tags Map<String,String>
    Key-value tags for the connection.
    arn string
    ARN of the connection.
    connectedDeviceId string
    ID of the second device in the connection.
    connectedLinkId string
    ID of the link for the second device.
    connectionId string
    description string
    Description of the connection.
    deviceId string
    ID of the first device in the connection.
    globalNetworkId string
    id string
    The provider-assigned unique ID for this managed resource.
    linkId string
    ID of the link for the first device.
    tags {[key: string]: string}
    Key-value tags for the connection.
    arn str
    ARN of the connection.
    connected_device_id str
    ID of the second device in the connection.
    connected_link_id str
    ID of the link for the second device.
    connection_id str
    description str
    Description of the connection.
    device_id str
    ID of the first device in the connection.
    global_network_id str
    id str
    The provider-assigned unique ID for this managed resource.
    link_id str
    ID of the link for the first device.
    tags Mapping[str, str]
    Key-value tags for the connection.
    arn String
    ARN of the connection.
    connectedDeviceId String
    ID of the second device in the connection.
    connectedLinkId String
    ID of the link for the second device.
    connectionId String
    description String
    Description of the connection.
    deviceId String
    ID of the first device in the connection.
    globalNetworkId String
    id String
    The provider-assigned unique ID for this managed resource.
    linkId String
    ID of the link for the first device.
    tags Map<String>
    Key-value tags for the connection.

    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.42.0 published on Wednesday, Jun 26, 2024 by Pulumi