1. Packages
  2. AWS
  3. API Docs
  4. ec2transitgateway
  5. getAttachments
AWS v6.55.0 published on Monday, Oct 7, 2024 by Pulumi

aws.ec2transitgateway.getAttachments

Explore with Pulumi AI

aws logo
AWS v6.55.0 published on Monday, Oct 7, 2024 by Pulumi

    Get information on EC2 Transit Gateway Attachments.

    Example Usage

    By Filter

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const filtered = aws.ec2transitgateway.getAttachments({
        filters: [
            {
                name: "state",
                values: ["pendingAcceptance"],
            },
            {
                name: "resource-type",
                values: ["vpc"],
            },
        ],
    });
    const unit = .map(__index => (aws.ec2transitgateway.getAttachment({
        transitGatewayAttachmentId: _arg0_.ids[__index],
    })));
    
    import pulumi
    import pulumi_aws as aws
    
    filtered = aws.ec2transitgateway.get_attachments(filters=[
        {
            "name": "state",
            "values": ["pendingAcceptance"],
        },
        {
            "name": "resource-type",
            "values": ["vpc"],
        },
    ])
    unit = [aws.ec2transitgateway.get_attachment(transit_gateway_attachment_id=filtered.ids[__index]) for __index in range(len(filtered.ids))]
    
    Coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var filtered = Aws.Ec2TransitGateway.GetAttachments.Invoke(new()
        {
            Filters = new[]
            {
                new Aws.Ec2TransitGateway.Inputs.GetAttachmentsFilterInputArgs
                {
                    Name = "state",
                    Values = new[]
                    {
                        "pendingAcceptance",
                    },
                },
                new Aws.Ec2TransitGateway.Inputs.GetAttachmentsFilterInputArgs
                {
                    Name = "resource-type",
                    Values = new[]
                    {
                        "vpc",
                    },
                },
            },
        });
    
        var unit = ;
    
    });
    
    Coming soon!
    
    Coming soon!
    

    Using getAttachments

    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 getAttachments(args: GetAttachmentsArgs, opts?: InvokeOptions): Promise<GetAttachmentsResult>
    function getAttachmentsOutput(args: GetAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetAttachmentsResult>
    def get_attachments(filters: Optional[Sequence[GetAttachmentsFilter]] = None,
                        tags: Optional[Mapping[str, str]] = None,
                        opts: Optional[InvokeOptions] = None) -> GetAttachmentsResult
    def get_attachments_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetAttachmentsFilterArgs]]]] = None,
                        tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetAttachmentsResult]
    func GetAttachments(ctx *Context, args *GetAttachmentsArgs, opts ...InvokeOption) (*GetAttachmentsResult, error)
    func GetAttachmentsOutput(ctx *Context, args *GetAttachmentsOutputArgs, opts ...InvokeOption) GetAttachmentsResultOutput

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

    public static class GetAttachments 
    {
        public static Task<GetAttachmentsResult> InvokeAsync(GetAttachmentsArgs args, InvokeOptions? opts = null)
        public static Output<GetAttachmentsResult> Invoke(GetAttachmentsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAttachmentsResult> getAttachments(GetAttachmentsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:ec2transitgateway/getAttachments:getAttachments
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<GetAttachmentsFilter>
    One or more configuration blocks containing name-values filters. Detailed below.
    Tags Dictionary<string, string>
    Filters []GetAttachmentsFilter
    One or more configuration blocks containing name-values filters. Detailed below.
    Tags map[string]string
    filters List<GetAttachmentsFilter>
    One or more configuration blocks containing name-values filters. Detailed below.
    tags Map<String,String>
    filters GetAttachmentsFilter[]
    One or more configuration blocks containing name-values filters. Detailed below.
    tags {[key: string]: string}
    filters Sequence[GetAttachmentsFilter]
    One or more configuration blocks containing name-values filters. Detailed below.
    tags Mapping[str, str]
    filters List<Property Map>
    One or more configuration blocks containing name-values filters. Detailed below.
    tags Map<String>

    getAttachments Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.getAttachment][2] data source, searching by identifier.
    Tags Dictionary<string, string>
    Filters List<GetAttachmentsFilter>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.getAttachment][2] data source, searching by identifier.
    Tags map[string]string
    Filters []GetAttachmentsFilter
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.getAttachment][2] data source, searching by identifier.
    tags Map<String,String>
    filters List<GetAttachmentsFilter>
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.getAttachment][2] data source, searching by identifier.
    tags {[key: string]: string}
    filters GetAttachmentsFilter[]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.getAttachment][2] data source, searching by identifier.
    tags Mapping[str, str]
    filters Sequence[GetAttachmentsFilter]
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of all attachments ids matching the filter. You can retrieve more information about the attachment using the [aws.ec2transitgateway.getAttachment][2] data source, searching by identifier.
    tags Map<String>
    filters List<Property Map>

    Supporting Types

    GetAttachmentsFilter

    Name string
    Name of the filter check available value on official documentation
    Values List<string>
    List of one or more values for the filter.
    Name string
    Name of the filter check available value on official documentation
    Values []string
    List of one or more values for the filter.
    name String
    Name of the filter check available value on official documentation
    values List<String>
    List of one or more values for the filter.
    name string
    Name of the filter check available value on official documentation
    values string[]
    List of one or more values for the filter.
    name str
    Name of the filter check available value on official documentation
    values Sequence[str]
    List of one or more values for the filter.
    name String
    Name of the filter check available value on official documentation
    values List<String>
    List of one or more values for the filter.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.55.0 published on Monday, Oct 7, 2024 by Pulumi