AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.4.0 published on Wednesday, May 4, 2022 by Pulumi

getConnect

Get information on an EC2 Transit Gateway Connect.

Example Usage

By Filter

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ec2TransitGateway.GetConnect.InvokeAsync(new Aws.Ec2TransitGateway.GetConnectArgs
        {
            Filters = 
            {
                new Aws.Ec2TransitGateway.Inputs.GetConnectFilterArgs
                {
                    Name = "transport-transit-gateway-attachment-id",
                    Values = 
                    {
                        "tgw-attach-12345678",
                    },
                },
            },
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2transitgateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2transitgateway.LookupConnect(ctx, &ec2transitgateway.LookupConnectArgs{
			Filters: []ec2transitgateway.GetConnectFilter{
				ec2transitgateway.GetConnectFilter{
					Name: "transport-transit-gateway-attachment-id",
					Values: []string{
						"tgw-attach-12345678",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(Ec2transitgatewayFunctions.getConnect(GetConnectArgs.builder()
            .filters(GetConnectFilter.builder()
                .name("transport-transit-gateway-attachment-id")
                .values("tgw-attach-12345678")
                .build())
            .build()));

        }
}
import pulumi
import pulumi_aws as aws

example = aws.ec2transitgateway.get_connect(filters=[aws.ec2transitgateway.GetConnectFilterArgs(
    name="transport-transit-gateway-attachment-id",
    values=["tgw-attach-12345678"],
)])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.ec2transitgateway.getConnect({
    filters: [{
        name: "transport-transit-gateway-attachment-id",
        values: ["tgw-attach-12345678"],
    }],
}));
variables:
  example:
    Fn::Invoke:
      Function: aws:ec2transitgateway:getConnect
      Arguments:
        filters:
          - name: transport-transit-gateway-attachment-id
            values:
              - tgw-attach-12345678

By Identifier

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ec2TransitGateway.GetConnect.InvokeAsync(new Aws.Ec2TransitGateway.GetConnectArgs
        {
            TransitGatewayConnectId = "tgw-attach-12345678",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2transitgateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2transitgateway.LookupConnect(ctx, &ec2transitgateway.LookupConnectArgs{
			TransitGatewayConnectId: pulumi.StringRef("tgw-attach-12345678"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(Ec2transitgatewayFunctions.getConnect(GetConnectArgs.builder()
            .transitGatewayConnectId("tgw-attach-12345678")
            .build()));

        }
}
import pulumi
import pulumi_aws as aws

example = aws.ec2transitgateway.get_connect(transit_gateway_connect_id="tgw-attach-12345678")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.ec2transitgateway.getConnect({
    transitGatewayConnectId: "tgw-attach-12345678",
}));
variables:
  example:
    Fn::Invoke:
      Function: aws:ec2transitgateway:getConnect
      Arguments:
        transitGatewayConnectId: tgw-attach-12345678

Using getConnect

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 getConnect(args: GetConnectArgs, opts?: InvokeOptions): Promise<GetConnectResult>
function getConnectOutput(args: GetConnectOutputArgs, opts?: InvokeOptions): Output<GetConnectResult>
def get_connect(filters: Optional[Sequence[GetConnectFilter]] = None,
                tags: Optional[Mapping[str, str]] = None,
                transit_gateway_connect_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetConnectResult
def get_connect_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetConnectFilterArgs]]]] = None,
                tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                transit_gateway_connect_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetConnectResult]
func LookupConnect(ctx *Context, args *LookupConnectArgs, opts ...InvokeOption) (*LookupConnectResult, error)
func LookupConnectOutput(ctx *Context, args *LookupConnectOutputArgs, opts ...InvokeOption) LookupConnectResultOutput

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

public static class GetConnect 
{
    public static Task<GetConnectResult> InvokeAsync(GetConnectArgs args, InvokeOptions? opts = null)
    public static Output<GetConnectResult> Invoke(GetConnectInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetConnectResult> getConnect(GetConnectArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:ec2transitgateway/getConnect:getConnect
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Filters List<GetConnectFilter>

One or more configuration blocks containing name-values filters. Detailed below.

Tags Dictionary<string, string>

Key-value tags for the EC2 Transit Gateway Connect

TransitGatewayConnectId string

Identifier of the EC2 Transit Gateway Connect.

Filters []GetConnectFilter

One or more configuration blocks containing name-values filters. Detailed below.

Tags map[string]string

Key-value tags for the EC2 Transit Gateway Connect

TransitGatewayConnectId string

Identifier of the EC2 Transit Gateway Connect.

filters ListConnectFilter>

One or more configuration blocks containing name-values filters. Detailed below.

tags Map

Key-value tags for the EC2 Transit Gateway Connect

transitGatewayConnectId String

Identifier of the EC2 Transit Gateway Connect.

filters GetConnectFilter[]

One or more configuration blocks containing name-values filters. Detailed below.

tags {[key: string]: string}

Key-value tags for the EC2 Transit Gateway Connect

transitGatewayConnectId string

Identifier of the EC2 Transit Gateway Connect.

filters Sequence[GetConnectFilter]

One or more configuration blocks containing name-values filters. Detailed below.

tags Mapping[str, str]

Key-value tags for the EC2 Transit Gateway Connect

transit_gateway_connect_id str

Identifier of the EC2 Transit Gateway Connect.

filters List

One or more configuration blocks containing name-values filters. Detailed below.

tags Map

Key-value tags for the EC2 Transit Gateway Connect

transitGatewayConnectId String

Identifier of the EC2 Transit Gateway Connect.

getConnect Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Protocol string

The tunnel protocol

Tags Dictionary<string, string>

Key-value tags for the EC2 Transit Gateway Connect

TransitGatewayConnectId string
TransitGatewayId string

EC2 Transit Gateway identifier

TransportAttachmentId string

The underlaying VPC attachment

Filters List<GetConnectFilter>
Id string

The provider-assigned unique ID for this managed resource.

Protocol string

The tunnel protocol

Tags map[string]string

Key-value tags for the EC2 Transit Gateway Connect

TransitGatewayConnectId string
TransitGatewayId string

EC2 Transit Gateway identifier

TransportAttachmentId string

The underlaying VPC attachment

Filters []GetConnectFilter
id String

The provider-assigned unique ID for this managed resource.

protocol String

The tunnel protocol

tags Map

Key-value tags for the EC2 Transit Gateway Connect

transitGatewayConnectId String
transitGatewayId String

EC2 Transit Gateway identifier

transportAttachmentId String

The underlaying VPC attachment

filters ListConnectFilter>
id string

The provider-assigned unique ID for this managed resource.

protocol string

The tunnel protocol

tags {[key: string]: string}

Key-value tags for the EC2 Transit Gateway Connect

transitGatewayConnectId string
transitGatewayId string

EC2 Transit Gateway identifier

transportAttachmentId string

The underlaying VPC attachment

filters GetConnectFilter[]
id str

The provider-assigned unique ID for this managed resource.

protocol str

The tunnel protocol

tags Mapping[str, str]

Key-value tags for the EC2 Transit Gateway Connect

transit_gateway_connect_id str
transit_gateway_id str

EC2 Transit Gateway identifier

transport_attachment_id str

The underlaying VPC attachment

filters Sequence[GetConnectFilter]
id String

The provider-assigned unique ID for this managed resource.

protocol String

The tunnel protocol

tags Map

Key-value tags for the EC2 Transit Gateway Connect

transitGatewayConnectId String
transitGatewayId String

EC2 Transit Gateway identifier

transportAttachmentId String

The underlaying VPC attachment

filters List

Supporting Types

GetConnectFilter

Name string

Name of the filter.

Values List<string>

List of one or more values for the filter.

Name string

Name of the filter.

Values []string

List of one or more values for the filter.

name String

Name of the filter.

values List

List of one or more values for the filter.

name string

Name of the filter.

values string[]

List of one or more values for the filter.

name str

Name of the filter.

values Sequence[str]

List of one or more values for the filter.

name String

Name of the filter.

values List

List of one or more values for the filter.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.