GetTransitGateway
Get information on an EC2 Transit Gateway.
Example Usage
By Filter
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Aws.Ec2TransitGateway.GetTransitGateway.InvokeAsync(new Aws.Ec2TransitGateway.GetTransitGatewayArgs
{
Filters =
{
new Aws.Ec2TransitGateway.Inputs.GetTransitGatewayFilterArgs
{
Name = "options.amazon-side-asn",
Values =
{
"64512",
},
},
},
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2transitgateway"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ec2transitgateway.LookupTransitGateway(ctx, &ec2transitgateway.LookupTransitGatewayArgs{
Filters: []ec2transitgateway.GetTransitGatewayFilter{
ec2transitgateway.GetTransitGatewayFilter{
Name: "options.amazon-side-asn",
Values: []string{
"64512",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.get_transit_gateway(filters=[{
"name": "options.amazon-side-asn",
"values": ["64512"],
}])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.ec2transitgateway.getTransitGateway({
filters: [{
name: "options.amazon-side-asn",
values: ["64512"],
}],
}, { async: true }));By Identifier
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Aws.Ec2TransitGateway.GetTransitGateway.InvokeAsync(new Aws.Ec2TransitGateway.GetTransitGatewayArgs
{
Id = "tgw-12345678",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2transitgateway"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := "tgw-12345678"
_, err := ec2transitgateway.LookupTransitGateway(ctx, &ec2transitgateway.LookupTransitGatewayArgs{
Id: &opt0,
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.ec2transitgateway.get_transit_gateway(id="tgw-12345678")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.ec2transitgateway.getTransitGateway({
id: "tgw-12345678",
}, { async: true }));Using GetTransitGateway
function getTransitGateway(args: GetTransitGatewayArgs, opts?: InvokeOptions): Promise<GetTransitGatewayResult>function get_transit_gateway(filters=None, id=None, tags=None, opts=None)func LookupTransitGateway(ctx *Context, args *LookupTransitGatewayArgs, opts ...InvokeOption) (*LookupTransitGatewayResult, error)Note: This function is named
LookupTransitGatewayin the Go SDK.
public static class GetTransitGateway {
public static Task<GetTransitGatewayResult> InvokeAsync(GetTransitGatewayArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Filters
List<Get
Transit Gateway Filter Args> One or more configuration blocks containing name-values filters. Detailed below.
- Id string
Identifier of the EC2 Transit Gateway.
- Dictionary<string, string>
Key-value tags for the EC2 Transit Gateway
- Filters
[]Get
Transit Gateway Filter One or more configuration blocks containing name-values filters. Detailed below.
- Id string
Identifier of the EC2 Transit Gateway.
- map[string]string
Key-value tags for the EC2 Transit Gateway
- filters
Get
Transit Gateway Filter[] One or more configuration blocks containing name-values filters. Detailed below.
- id string
Identifier of the EC2 Transit Gateway.
- {[key: string]: string}
Key-value tags for the EC2 Transit Gateway
- filters
List[Get
Transit Gateway Filter] One or more configuration blocks containing name-values filters. Detailed below.
- id str
Identifier of the EC2 Transit Gateway.
- Dict[str, str]
Key-value tags for the EC2 Transit Gateway
GetTransitGateway Result
The following output properties are available:
- Amazon
Side intAsn Private Autonomous System Number (ASN) for the Amazon side of a BGP session
- Arn string
EC2 Transit Gateway Amazon Resource Name (ARN)
- Association
Default stringRoute Table Id Identifier of the default association route table
- string
Whether resource attachment requests are automatically accepted.
- Default
Route stringTable Association Whether resource attachments are automatically associated with the default association route table.
- Default
Route stringTable Propagation Whether resource attachments automatically propagate routes to the default propagation route table.
- Description string
Description of the EC2 Transit Gateway
- Dns
Support string Whether DNS support is enabled.
- Owner
Id string Identifier of the AWS account that owns the EC2 Transit Gateway
- Propagation
Default stringRoute Table Id Identifier of the default propagation route table.
- Dictionary<string, string>
Key-value tags for the EC2 Transit Gateway
- Vpn
Ecmp stringSupport Whether VPN Equal Cost Multipath Protocol support is enabled.
- Filters
List<Get
Transit Gateway Filter> - Id string
EC2 Transit Gateway identifier
- Amazon
Side intAsn Private Autonomous System Number (ASN) for the Amazon side of a BGP session
- Arn string
EC2 Transit Gateway Amazon Resource Name (ARN)
- Association
Default stringRoute Table Id Identifier of the default association route table
- string
Whether resource attachment requests are automatically accepted.
- Default
Route stringTable Association Whether resource attachments are automatically associated with the default association route table.
- Default
Route stringTable Propagation Whether resource attachments automatically propagate routes to the default propagation route table.
- Description string
Description of the EC2 Transit Gateway
- Dns
Support string Whether DNS support is enabled.
- Owner
Id string Identifier of the AWS account that owns the EC2 Transit Gateway
- Propagation
Default stringRoute Table Id Identifier of the default propagation route table.
- map[string]string
Key-value tags for the EC2 Transit Gateway
- Vpn
Ecmp stringSupport Whether VPN Equal Cost Multipath Protocol support is enabled.
- Filters
[]Get
Transit Gateway Filter - Id string
EC2 Transit Gateway identifier
- amazon
Side numberAsn Private Autonomous System Number (ASN) for the Amazon side of a BGP session
- arn string
EC2 Transit Gateway Amazon Resource Name (ARN)
- association
Default stringRoute Table Id Identifier of the default association route table
- string
Whether resource attachment requests are automatically accepted.
- default
Route stringTable Association Whether resource attachments are automatically associated with the default association route table.
- default
Route stringTable Propagation Whether resource attachments automatically propagate routes to the default propagation route table.
- description string
Description of the EC2 Transit Gateway
- dns
Support string Whether DNS support is enabled.
- owner
Id string Identifier of the AWS account that owns the EC2 Transit Gateway
- propagation
Default stringRoute Table Id Identifier of the default propagation route table.
- {[key: string]: string}
Key-value tags for the EC2 Transit Gateway
- vpn
Ecmp stringSupport Whether VPN Equal Cost Multipath Protocol support is enabled.
- filters
Get
Transit Gateway Filter[] - id string
EC2 Transit Gateway identifier
- amazon_
side_ floatasn Private Autonomous System Number (ASN) for the Amazon side of a BGP session
- arn str
EC2 Transit Gateway Amazon Resource Name (ARN)
- association_
default_ strroute_ table_ id Identifier of the default association route table
- str
Whether resource attachment requests are automatically accepted.
- default_
route_ strtable_ association Whether resource attachments are automatically associated with the default association route table.
- default_
route_ strtable_ propagation Whether resource attachments automatically propagate routes to the default propagation route table.
- description str
Description of the EC2 Transit Gateway
- dns_
support str Whether DNS support is enabled.
- owner_
id str Identifier of the AWS account that owns the EC2 Transit Gateway
- propagation_
default_ strroute_ table_ id Identifier of the default propagation route table.
- Dict[str, str]
Key-value tags for the EC2 Transit Gateway
- vpn_
ecmp_ strsupport Whether VPN Equal Cost Multipath Protocol support is enabled.
- filters
List[Get
Transit Gateway Filter] - id str
EC2 Transit Gateway identifier
Supporting Types
GetTransitGatewayFilter
- Name string
Name of the filter.
- Values List<string>
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
awsTerraform Provider.