UNPKG

@pulumi/aws

Version:

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

166 lines (165 loc) 4.8 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * ## Example Usage * * The following shows outputting all network interface ids in a region. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * export = async () => { * const example = await aws.ec2.getNetworkInterfaces({}); * return { * example: example.ids, * }; * } * ``` * * The following example retrieves a list of all network interface ids with a custom tag of `Name` set to a value of `test`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2.getNetworkInterfaces({ * tags: { * Name: "test", * }, * }); * export const example1 = example.then(example => example.ids); * ``` * * The following example retrieves a network interface ids which associated * with specific subnet. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * export = async () => { * const example = await aws.ec2.getNetworkInterfaces({ * filters: [{ * name: "subnet-id", * values: [test.id], * }], * }); * return { * example: example.ids, * }; * } * ``` */ export declare function getNetworkInterfaces(args?: GetNetworkInterfacesArgs, opts?: pulumi.InvokeOptions): Promise<GetNetworkInterfacesResult>; /** * A collection of arguments for invoking getNetworkInterfaces. */ export interface GetNetworkInterfacesArgs { /** * Custom filter block as described below. */ filters?: inputs.ec2.GetNetworkInterfacesFilter[]; /** * 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; /** * Map of tags, each pair of which must exactly match * a pair on the desired network interfaces. */ tags?: { [key: string]: string; }; } /** * A collection of values returned by getNetworkInterfaces. */ export interface GetNetworkInterfacesResult { readonly filters?: outputs.ec2.GetNetworkInterfacesFilter[]; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * List of all the network interface ids found. */ readonly ids: string[]; readonly region: string; readonly tags: { [key: string]: string; }; } /** * ## Example Usage * * The following shows outputting all network interface ids in a region. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * export = async () => { * const example = await aws.ec2.getNetworkInterfaces({}); * return { * example: example.ids, * }; * } * ``` * * The following example retrieves a list of all network interface ids with a custom tag of `Name` set to a value of `test`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2.getNetworkInterfaces({ * tags: { * Name: "test", * }, * }); * export const example1 = example.then(example => example.ids); * ``` * * The following example retrieves a network interface ids which associated * with specific subnet. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * export = async () => { * const example = await aws.ec2.getNetworkInterfaces({ * filters: [{ * name: "subnet-id", * values: [test.id], * }], * }); * return { * example: example.ids, * }; * } * ``` */ export declare function getNetworkInterfacesOutput(args?: GetNetworkInterfacesOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetNetworkInterfacesResult>; /** * A collection of arguments for invoking getNetworkInterfaces. */ export interface GetNetworkInterfacesOutputArgs { /** * Custom filter block as described below. */ filters?: pulumi.Input<pulumi.Input<inputs.ec2.GetNetworkInterfacesFilterArgs>[]>; /** * 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>; /** * Map of tags, each pair of which must exactly match * a pair on the desired network interfaces. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; }