CmdID

CmdID / aws / aws wafv2

aws wafv2 get-web-acl-for-resource

Retrieves the WebACL for the specified resource. AWS CLI reference

1 example 1 option Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To retrieve the web ACL that's associated with an AWS resource

The following get-web-acl-for-resource example retrieves the JSON for the web ACL that's associated with the specified resource.

aws wafv2 get-web-acl-for-resource --resource-arn arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/waf-cli-alb/1ea17125f8b25a2aIdentify
--resource-arnThe Amazon Resource Name (ARN) of the resource whose web ACL you want to retrieve.
Its output, shortened
{
    "WebACL":{
        "Capacity":3,
        "Description":"",
        "Rules":[
            {
                "Priority":1,
                "Action":{
                    "Block":{

                    }
                },
                "VisibilityConfig":{
                    "SampledRequestsEnabled":true,
                    "CloudWatchMetricsEnabled":true,
                    "MetricName":"testrule01"
                },
                "Name":"testrule01",
                "Statement":{
                    "AndStatement":{
                        "Statements":[
                            {
                                "ByteMatchStatement":{
                                    "PositionalConstraint":"EXACTLY",
                                    "TextTransformations":[
                                        {
                                            "Priority":0,
                                            "Type":"NONE"
                                        }
                                    ],
… 45 more lines

For more information, see Associating or Disassociating a Web ACL with an AWS Resource in the AWS WAF, AWS Firewall Manager, and AWS Shield Advanced Developer Guide.

Options

1 in the AWS CLI reference
--resource-arnThe Amazon Resource Name (ARN) of the resource whose web ACL you want to retrieve.