AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.4.0 published on Wednesday, May 4, 2022 by Pulumi

getNetworkAcls

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleNetworkAcls = Output.Create(Aws.Ec2.GetNetworkAcls.InvokeAsync(new Aws.Ec2.GetNetworkAclsArgs
        {
            VpcId = @var.Vpc_id,
        }));
        this.Example = exampleNetworkAcls.Apply(exampleNetworkAcls => exampleNetworkAcls.Ids);
    }

    [Output("example")]
    public Output<string> Example { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleNetworkAcls, err := ec2.GetNetworkAcls(ctx, &ec2.GetNetworkAclsArgs{
			VpcId: pulumi.StringRef(_var.Vpc_id),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("example", exampleNetworkAcls.Ids)
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var exampleNetworkAcls = Output.of(Ec2Functions.getNetworkAcls(GetNetworkAclsArgs.builder()
            .vpcId(var_.getVpc_id())
            .build()));

        ctx.export("example", exampleNetworkAcls.apply(getNetworkAclsResult -> getNetworkAclsResult.getIds()));
        }
}
import pulumi
import pulumi_aws as aws

example_network_acls = aws.ec2.get_network_acls(vpc_id=var["vpc_id"])
pulumi.export("example", example_network_acls.ids)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleNetworkAcls = aws.ec2.getNetworkAcls({
    vpcId: _var.vpc_id,
});
export const example = exampleNetworkAcls.then(exampleNetworkAcls => exampleNetworkAcls.ids);
variables:
  exampleNetworkAcls:
    Fn::Invoke:
      Function: aws:ec2:getNetworkAcls
      Arguments:
        vpcId: ${var.vpc_id}
outputs:
  example: ${exampleNetworkAcls.ids}

Using getNetworkAcls

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getNetworkAcls(args: GetNetworkAclsArgs, opts?: InvokeOptions): Promise<GetNetworkAclsResult>
function getNetworkAclsOutput(args: GetNetworkAclsOutputArgs, opts?: InvokeOptions): Output<GetNetworkAclsResult>
def get_network_acls(filters: Optional[Sequence[GetNetworkAclsFilter]] = None,
                     tags: Optional[Mapping[str, str]] = None,
                     vpc_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetNetworkAclsResult
def get_network_acls_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetNetworkAclsFilterArgs]]]] = None,
                     tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                     vpc_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetNetworkAclsResult]
func GetNetworkAcls(ctx *Context, args *GetNetworkAclsArgs, opts ...InvokeOption) (*GetNetworkAclsResult, error)
func GetNetworkAclsOutput(ctx *Context, args *GetNetworkAclsOutputArgs, opts ...InvokeOption) GetNetworkAclsResultOutput

> Note: This function is named GetNetworkAcls in the Go SDK.

public static class GetNetworkAcls 
{
    public static Task<GetNetworkAclsResult> InvokeAsync(GetNetworkAclsArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkAclsResult> Invoke(GetNetworkAclsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworkAclsResult> getNetworkAcls(GetNetworkAclsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:ec2/getNetworkAcls:getNetworkAcls
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Filters List<Pulumi.Aws.Ec2.Inputs.GetNetworkAclsFilter>

Custom filter block as described below.

Tags Dictionary<string, string>

A map of tags, each pair of which must exactly match a pair on the desired network ACLs.

VpcId string

The VPC ID that you want to filter from.

Filters []GetNetworkAclsFilter

Custom filter block as described below.

Tags map[string]string

A map of tags, each pair of which must exactly match a pair on the desired network ACLs.

VpcId string

The VPC ID that you want to filter from.

filters ListNetworkAclsFilter>

Custom filter block as described below.

tags Map

A map of tags, each pair of which must exactly match a pair on the desired network ACLs.

vpcId String

The VPC ID that you want to filter from.

filters GetNetworkAclsFilter[]

Custom filter block as described below.

tags {[key: string]: string}

A map of tags, each pair of which must exactly match a pair on the desired network ACLs.

vpcId string

The VPC ID that you want to filter from.

filters Sequence[GetNetworkAclsFilter]

Custom filter block as described below.

tags Mapping[str, str]

A map of tags, each pair of which must exactly match a pair on the desired network ACLs.

vpc_id str

The VPC ID that you want to filter from.

filters List

Custom filter block as described below.

tags Map

A map of tags, each pair of which must exactly match a pair on the desired network ACLs.

vpcId String

The VPC ID that you want to filter from.

getNetworkAcls Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of all the network ACL ids found.

Tags Dictionary<string, string>
Filters List<Pulumi.Aws.Ec2.Outputs.GetNetworkAclsFilter>
VpcId string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of all the network ACL ids found.

Tags map[string]string
Filters []GetNetworkAclsFilter
VpcId string
id String

The provider-assigned unique ID for this managed resource.

ids List

A list of all the network ACL ids found.

tags Map
filters ListNetworkAclsFilter>
vpcId String
id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of all the network ACL ids found.

tags {[key: string]: string}
filters GetNetworkAclsFilter[]
vpcId string
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]

A list of all the network ACL ids found.

tags Mapping[str, str]
filters Sequence[GetNetworkAclsFilter]
vpc_id str
id String

The provider-assigned unique ID for this managed resource.

ids List

A list of all the network ACL ids found.

tags Map
filters List
vpcId String

Supporting Types

GetNetworkAclsFilter

Name string

The name of the field to filter by, as defined by the underlying AWS API.

Values List<string>

Set of values that are accepted for the given field. A VPC will be selected if any one of the given values matches.

Name string

The name of the field to filter by, as defined by the underlying AWS API.

Values []string

Set of values that are accepted for the given field. A VPC will be selected if any one of the given values matches.

name String

The name of the field to filter by, as defined by the underlying AWS API.

values List

Set of values that are accepted for the given field. A VPC will be selected if any one of the given values matches.

name string

The name of the field to filter by, as defined by the underlying AWS API.

values string[]

Set of values that are accepted for the given field. A VPC will be selected if any one of the given values matches.

name str

The name of the field to filter by, as defined by the underlying AWS API.

values Sequence[str]

Set of values that are accepted for the given field. A VPC will be selected if any one of the given values matches.

name String

The name of the field to filter by, as defined by the underlying AWS API.

values List

Set of values that are accepted for the given field. A VPC will be selected if any one of the given values matches.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.