AWS Classic

v5.16.0 published on Saturday, Sep 24, 2022 by Pulumi

getConnection

Retrieve information about a connection.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.NetworkManager.GetConnection.Invoke(new()
    {
        GlobalNetworkId = @var.Global_network_id,
        ConnectionId = @var.Connection_id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/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: _var.Global_network_id,
			ConnectionId:    _var.Connection_id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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.codestarconnections.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(var_.global_network_id())
            .connectionId(var_.connection_id())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.networkmanager.get_connection(global_network_id=var["global_network_id"],
    connection_id=var["connection_id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.networkmanager.getConnection({
    globalNetworkId: _var.global_network_id,
    connectionId: _var.connection_id,
});
variables:
  example:
    Fn::Invoke:
      Function: aws:networkmanager:getConnection
      Arguments:
        globalNetworkId: ${var.global_network_id}
        connectionId: ${var.connection_id}

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
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.