UNPKG

@pulumi/aws

Version:

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

130 lines 3.79 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getNetworkInterfacesOutput = exports.getNetworkInterfaces = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## 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, * }; * } * ``` */ function getNetworkInterfaces(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:ec2/getNetworkInterfaces:getNetworkInterfaces", { "filters": args.filters, "region": args.region, "tags": args.tags, }, opts); } exports.getNetworkInterfaces = getNetworkInterfaces; /** * ## 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, * }; * } * ``` */ function getNetworkInterfacesOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:ec2/getNetworkInterfaces:getNetworkInterfaces", { "filters": args.filters, "region": args.region, "tags": args.tags, }, opts); } exports.getNetworkInterfacesOutput = getNetworkInterfacesOutput; //# sourceMappingURL=getNetworkInterfaces.js.map