1. Packages
  2. AWS
  3. API Docs
  4. wafv2
  5. getWebAcl
AWS v6.78.0 published on Thursday, Apr 24, 2025 by Pulumi

aws.wafv2.getWebAcl

Explore with Pulumi AI

AWS v6.78.0 published on Thursday, Apr 24, 2025 by Pulumi

Retrieves the summary of a WAFv2 Web ACL.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.wafv2.getWebAcl({
    name: "some-web-acl",
    scope: "REGIONAL",
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.wafv2.get_web_acl(name="some-web-acl",
    scope="REGIONAL")
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/wafv2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := wafv2.LookupWebAcl(ctx, &wafv2.LookupWebAclArgs{
			Name:  "some-web-acl",
			Scope: "REGIONAL",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.WafV2.GetWebAcl.Invoke(new()
    {
        Name = "some-web-acl",
        Scope = "REGIONAL",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.wafv2.Wafv2Functions;
import com.pulumi.aws.wafv2.inputs.GetWebAclArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

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

    public static void stack(Context ctx) {
        final var example = Wafv2Functions.getWebAcl(GetWebAclArgs.builder()
            .name("some-web-acl")
            .scope("REGIONAL")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:wafv2:getWebAcl
      arguments:
        name: some-web-acl
        scope: REGIONAL
Copy

Using getWebAcl

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 getWebAcl(args: GetWebAclArgs, opts?: InvokeOptions): Promise<GetWebAclResult>
function getWebAclOutput(args: GetWebAclOutputArgs, opts?: InvokeOptions): Output<GetWebAclResult>
Copy
def get_web_acl(name: Optional[str] = None,
                scope: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetWebAclResult
def get_web_acl_output(name: Optional[pulumi.Input[str]] = None,
                scope: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetWebAclResult]
Copy
func LookupWebAcl(ctx *Context, args *LookupWebAclArgs, opts ...InvokeOption) (*LookupWebAclResult, error)
func LookupWebAclOutput(ctx *Context, args *LookupWebAclOutputArgs, opts ...InvokeOption) LookupWebAclResultOutput
Copy

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

public static class GetWebAcl 
{
    public static Task<GetWebAclResult> InvokeAsync(GetWebAclArgs args, InvokeOptions? opts = null)
    public static Output<GetWebAclResult> Invoke(GetWebAclInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetWebAclResult> getWebAcl(GetWebAclArgs args, InvokeOptions options)
public static Output<GetWebAclResult> getWebAcl(GetWebAclArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:wafv2/getWebAcl:getWebAcl
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Name of the WAFv2 Web ACL.
Scope This property is required. string
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the region us-east-1 (N. Virginia) on the AWS provider.
Name This property is required. string
Name of the WAFv2 Web ACL.
Scope This property is required. string
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the region us-east-1 (N. Virginia) on the AWS provider.
name This property is required. String
Name of the WAFv2 Web ACL.
scope This property is required. String
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the region us-east-1 (N. Virginia) on the AWS provider.
name This property is required. string
Name of the WAFv2 Web ACL.
scope This property is required. string
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the region us-east-1 (N. Virginia) on the AWS provider.
name This property is required. str
Name of the WAFv2 Web ACL.
scope This property is required. str
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the region us-east-1 (N. Virginia) on the AWS provider.
name This property is required. String
Name of the WAFv2 Web ACL.
scope This property is required. String
Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the region us-east-1 (N. Virginia) on the AWS provider.

getWebAcl Result

The following output properties are available:

Arn string
ARN of the entity.
Description string
Description of the WebACL that helps with identification.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Scope string
Arn string
ARN of the entity.
Description string
Description of the WebACL that helps with identification.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Scope string
arn String
ARN of the entity.
description String
Description of the WebACL that helps with identification.
id String
The provider-assigned unique ID for this managed resource.
name String
scope String
arn string
ARN of the entity.
description string
Description of the WebACL that helps with identification.
id string
The provider-assigned unique ID for this managed resource.
name string
scope string
arn str
ARN of the entity.
description str
Description of the WebACL that helps with identification.
id str
The provider-assigned unique ID for this managed resource.
name str
scope str
arn String
ARN of the entity.
description String
Description of the WebACL that helps with identification.
id String
The provider-assigned unique ID for this managed resource.
name String
scope String

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.78.0 published on Thursday, Apr 24, 2025 by Pulumi