@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
130 lines • 3.55 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.getNetworkAclsOutput = exports.getNetworkAcls = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* ## Example Usage
*
* The following shows outputting all network ACL ids in a vpc.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* export = async () => {
* const example = await aws.ec2.getNetworkAcls({
* vpcId: vpcId,
* });
* return {
* example: example.ids,
* };
* }
* ```
*
* The following example retrieves a list of all network ACL ids in a VPC with a custom
* tag of `Tier` set to a value of "Private".
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = aws.ec2.getNetworkAcls({
* vpcId: vpcId,
* tags: {
* Tier: "Private",
* },
* });
* ```
*
* The following example retrieves a network ACL id in a VPC which associated
* with specific subnet.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = aws.ec2.getNetworkAcls({
* vpcId: vpcId,
* filters: [{
* name: "association.subnet-id",
* values: [test.id],
* }],
* });
* ```
*/
function getNetworkAcls(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:ec2/getNetworkAcls:getNetworkAcls", {
"filters": args.filters,
"region": args.region,
"tags": args.tags,
"vpcId": args.vpcId,
}, opts);
}
exports.getNetworkAcls = getNetworkAcls;
/**
* ## Example Usage
*
* The following shows outputting all network ACL ids in a vpc.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* export = async () => {
* const example = await aws.ec2.getNetworkAcls({
* vpcId: vpcId,
* });
* return {
* example: example.ids,
* };
* }
* ```
*
* The following example retrieves a list of all network ACL ids in a VPC with a custom
* tag of `Tier` set to a value of "Private".
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = aws.ec2.getNetworkAcls({
* vpcId: vpcId,
* tags: {
* Tier: "Private",
* },
* });
* ```
*
* The following example retrieves a network ACL id in a VPC which associated
* with specific subnet.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = aws.ec2.getNetworkAcls({
* vpcId: vpcId,
* filters: [{
* name: "association.subnet-id",
* values: [test.id],
* }],
* });
* ```
*/
function getNetworkAclsOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:ec2/getNetworkAcls:getNetworkAcls", {
"filters": args.filters,
"region": args.region,
"tags": args.tags,
"vpcId": args.vpcId,
}, opts);
}
exports.getNetworkAclsOutput = getNetworkAclsOutput;
//# sourceMappingURL=getNetworkAcls.js.map