AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi
aws.networkmanager.getConnection
Explore with Pulumi AI
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)
public static Output<GetConnectionResult> getConnection(GetConnectionArgs args, InvokeOptions options)
fn::invoke:
  function: aws:networkmanager/getConnection:getConnection
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ConnectionId string
- ID of the specific connection to retrieve.
- GlobalNetwork stringId 
- ID of the Global Network of the connection to retrieve.
- Dictionary<string, string>
- Key-value tags for the connection.
- ConnectionId string
- ID of the specific connection to retrieve.
- GlobalNetwork stringId 
- ID of the Global Network of the connection to retrieve.
- map[string]string
- Key-value tags for the connection.
- connectionId String
- ID of the specific connection to retrieve.
- globalNetwork StringId 
- ID of the Global Network of the connection to retrieve.
- Map<String,String>
- Key-value tags for the connection.
- connectionId string
- ID of the specific connection to retrieve.
- globalNetwork stringId 
- ID of the Global Network of the connection to retrieve.
- {[key: string]: string}
- Key-value tags for the connection.
- connection_id str
- ID of the specific connection to retrieve.
- global_network_ strid 
- ID of the Global Network of the connection to retrieve.
- Mapping[str, str]
- Key-value tags for the connection.
- connectionId String
- ID of the specific connection to retrieve.
- globalNetwork StringId 
- ID of the Global Network of the connection to retrieve.
- Map<String>
- Key-value tags for the connection.
getConnection Result
The following output properties are available:
- Arn string
- ARN of the connection.
- ConnectedDevice stringId 
- ID of the second device in the connection.
- ConnectedLink stringId 
- 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.
- GlobalNetwork stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- LinkId string
- ID of the link for the first device.
- Dictionary<string, string>
- Key-value tags for the connection.
- Arn string
- ARN of the connection.
- ConnectedDevice stringId 
- ID of the second device in the connection.
- ConnectedLink stringId 
- 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.
- GlobalNetwork stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- LinkId string
- ID of the link for the first device.
- map[string]string
- Key-value tags for the connection.
- arn String
- ARN of the connection.
- connectedDevice StringId 
- ID of the second device in the connection.
- connectedLink StringId 
- 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.
- globalNetwork StringId 
- id String
- The provider-assigned unique ID for this managed resource.
- linkId String
- ID of the link for the first device.
- Map<String,String>
- Key-value tags for the connection.
- arn string
- ARN of the connection.
- connectedDevice stringId 
- ID of the second device in the connection.
- connectedLink stringId 
- 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.
- globalNetwork stringId 
- id string
- The provider-assigned unique ID for this managed resource.
- linkId string
- ID of the link for the first device.
- {[key: string]: string}
- Key-value tags for the connection.
- arn str
- ARN of the connection.
- connected_device_ strid 
- ID of the second device in the connection.
- connected_link_ strid 
- 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_ strid 
- id str
- The provider-assigned unique ID for this managed resource.
- link_id str
- ID of the link for the first device.
- Mapping[str, str]
- Key-value tags for the connection.
- arn String
- ARN of the connection.
- connectedDevice StringId 
- ID of the second device in the connection.
- connectedLink StringId 
- 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.
- globalNetwork StringId 
- id String
- The provider-assigned unique ID for this managed resource.
- linkId String
- ID of the link for the first device.
- 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 awsTerraform Provider.