AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi
aws.ec2transitgateway.getConnect
Explore with Pulumi AI
Get information on an EC2 Transit Gateway Connect.
Example Usage
By Filter
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ec2transitgateway.getConnect({
filters: [{
name: "transport-transit-gateway-attachment-id",
values: ["tgw-attach-12345678"],
}],
});
import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.get_connect(filters=[{
"name": "transport-transit-gateway-attachment-id",
"values": ["tgw-attach-12345678"],
}])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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{
{
Name: "transport-transit-gateway-attachment-id",
Values: []string{
"tgw-attach-12345678",
},
},
},
}, 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.Ec2TransitGateway.GetConnect.Invoke(new()
{
Filters = new[]
{
new Aws.Ec2TransitGateway.Inputs.GetConnectFilterInputArgs
{
Name = "transport-transit-gateway-attachment-id",
Values = new[]
{
"tgw-attach-12345678",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2transitgateway.Ec2transitgatewayFunctions;
import com.pulumi.aws.ec2transitgateway.inputs.GetConnectArgs;
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 = Ec2transitgatewayFunctions.getConnect(GetConnectArgs.builder()
.filters(GetConnectFilterArgs.builder()
.name("transport-transit-gateway-attachment-id")
.values("tgw-attach-12345678")
.build())
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:ec2transitgateway:getConnect
Arguments:
filters:
- name: transport-transit-gateway-attachment-id
values:
- tgw-attach-12345678
By Identifier
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ec2transitgateway.getConnect({
transitGatewayConnectId: "tgw-attach-12345678",
});
import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.get_connect(transit_gateway_connect_id="tgw-attach-12345678")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Ec2TransitGateway.GetConnect.Invoke(new()
{
TransitGatewayConnectId = "tgw-attach-12345678",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2transitgateway.Ec2transitgatewayFunctions;
import com.pulumi.aws.ec2transitgateway.inputs.GetConnectArgs;
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 = Ec2transitgatewayFunctions.getConnect(GetConnectArgs.builder()
.transitGatewayConnectId("tgw-attach-12345678")
.build());
}
}
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<Get
Connect Filter> - One or more configuration blocks containing name-values filters. Detailed below.
- Dictionary<string, string>
- Key-value tags for the EC2 Transit Gateway Connect
- Transit
Gateway stringConnect Id - Identifier of the EC2 Transit Gateway Connect.
- Filters
[]Get
Connect Filter - One or more configuration blocks containing name-values filters. Detailed below.
- map[string]string
- Key-value tags for the EC2 Transit Gateway Connect
- Transit
Gateway stringConnect Id - Identifier of the EC2 Transit Gateway Connect.
- filters
List<Get
Connect Filter> - One or more configuration blocks containing name-values filters. Detailed below.
- Map<String,String>
- Key-value tags for the EC2 Transit Gateway Connect
- transit
Gateway StringConnect Id - Identifier of the EC2 Transit Gateway Connect.
- filters
Get
Connect Filter[] - One or more configuration blocks containing name-values filters. Detailed below.
- {[key: string]: string}
- Key-value tags for the EC2 Transit Gateway Connect
- transit
Gateway stringConnect Id - Identifier of the EC2 Transit Gateway Connect.
- filters
Sequence[Get
Connect Filter] - One or more configuration blocks containing name-values filters. Detailed below.
- Mapping[str, str]
- Key-value tags for the EC2 Transit Gateway Connect
- transit_
gateway_ strconnect_ id - Identifier of the EC2 Transit Gateway Connect.
- filters List<Property Map>
- One or more configuration blocks containing name-values filters. Detailed below.
- Map<String>
- Key-value tags for the EC2 Transit Gateway Connect
- transit
Gateway StringConnect Id - 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
- Tunnel protocol
- Dictionary<string, string>
- Key-value tags for the EC2 Transit Gateway Connect
- Transit
Gateway stringConnect Id - Transit
Gateway stringId - EC2 Transit Gateway identifier
- Transport
Attachment stringId - The underlaying VPC attachment
- Filters
List<Get
Connect Filter>
- Id string
- The provider-assigned unique ID for this managed resource.
- Protocol string
- Tunnel protocol
- map[string]string
- Key-value tags for the EC2 Transit Gateway Connect
- Transit
Gateway stringConnect Id - Transit
Gateway stringId - EC2 Transit Gateway identifier
- Transport
Attachment stringId - The underlaying VPC attachment
- Filters
[]Get
Connect Filter
- id String
- The provider-assigned unique ID for this managed resource.
- protocol String
- Tunnel protocol
- Map<String,String>
- Key-value tags for the EC2 Transit Gateway Connect
- transit
Gateway StringConnect Id - transit
Gateway StringId - EC2 Transit Gateway identifier
- transport
Attachment StringId - The underlaying VPC attachment
- filters
List<Get
Connect Filter>
- id string
- The provider-assigned unique ID for this managed resource.
- protocol string
- Tunnel protocol
- {[key: string]: string}
- Key-value tags for the EC2 Transit Gateway Connect
- transit
Gateway stringConnect Id - transit
Gateway stringId - EC2 Transit Gateway identifier
- transport
Attachment stringId - The underlaying VPC attachment
- filters
Get
Connect Filter[]
- id str
- The provider-assigned unique ID for this managed resource.
- protocol str
- Tunnel protocol
- Mapping[str, str]
- Key-value tags for the EC2 Transit Gateway Connect
- transit_
gateway_ strconnect_ id - transit_
gateway_ strid - EC2 Transit Gateway identifier
- transport_
attachment_ strid - The underlaying VPC attachment
- filters
Sequence[Get
Connect Filter]
- id String
- The provider-assigned unique ID for this managed resource.
- protocol String
- Tunnel protocol
- Map<String>
- Key-value tags for the EC2 Transit Gateway Connect
- transit
Gateway StringConnect Id - transit
Gateway StringId - EC2 Transit Gateway identifier
- transport
Attachment StringId - The underlaying VPC attachment
- filters List<Property Map>
Supporting Types
GetConnectFilter
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.