UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

112 lines (111 loc) 3.5 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Get information on EC2 Transit Gateway Attachments. * * ## Example Usage * * ### By Filter * * ```typescript * 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], * }))); * ``` */ export declare function getAttachments(args?: GetAttachmentsArgs, opts?: pulumi.InvokeOptions): Promise<GetAttachmentsResult>; /** * A collection of arguments for invoking getAttachments. */ export interface GetAttachmentsArgs { /** * One or more configuration blocks containing name-values filters. Detailed below. */ filters?: inputs.ec2transitgateway.GetAttachmentsFilter[]; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: string; tags?: { [key: string]: string; }; } /** * A collection of values returned by getAttachments. */ export interface GetAttachmentsResult { readonly filters?: outputs.ec2transitgateway.GetAttachmentsFilter[]; /** * The provider-assigned unique ID for this managed resource. */ readonly id: 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. */ readonly ids: string[]; readonly region: string; readonly tags: { [key: string]: string; }; } /** * Get information on EC2 Transit Gateway Attachments. * * ## Example Usage * * ### By Filter * * ```typescript * 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], * }))); * ``` */ export declare function getAttachmentsOutput(args?: GetAttachmentsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetAttachmentsResult>; /** * A collection of arguments for invoking getAttachments. */ export interface GetAttachmentsOutputArgs { /** * One or more configuration blocks containing name-values filters. Detailed below. */ filters?: pulumi.Input<pulumi.Input<inputs.ec2transitgateway.GetAttachmentsFilterArgs>[]>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; }