@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
76 lines • 2.42 kB
JavaScript
;
// *** 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.getNatGatewaysOutput = exports.getNatGateways = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* This resource can be useful for getting back a list of NAT gateway ids to be referenced elsewhere.
*
* ## Example Usage
*
* The following returns all NAT gateways in a specified VPC that are marked as available
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const ngws = aws.ec2.getNatGateways({
* vpcId: vpcId,
* filters: [{
* name: "state",
* values: ["available"],
* }],
* });
* const ngw = .map(__index => (aws.ec2.getNatGateway({
* id: _arg0_.ids[__index],
* })));
* ```
*/
function getNatGateways(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:ec2/getNatGateways:getNatGateways", {
"filters": args.filters,
"region": args.region,
"tags": args.tags,
"vpcId": args.vpcId,
}, opts);
}
exports.getNatGateways = getNatGateways;
/**
* This resource can be useful for getting back a list of NAT gateway ids to be referenced elsewhere.
*
* ## Example Usage
*
* The following returns all NAT gateways in a specified VPC that are marked as available
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const ngws = aws.ec2.getNatGateways({
* vpcId: vpcId,
* filters: [{
* name: "state",
* values: ["available"],
* }],
* });
* const ngw = .map(__index => (aws.ec2.getNatGateway({
* id: _arg0_.ids[__index],
* })));
* ```
*/
function getNatGatewaysOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:ec2/getNatGateways:getNatGateways", {
"filters": args.filters,
"region": args.region,
"tags": args.tags,
"vpcId": args.vpcId,
}, opts);
}
exports.getNatGatewaysOutput = getNatGatewaysOutput;
//# sourceMappingURL=getNatGateways.js.map