AWS CloudFormation
User Guide (Version )

AWS::WAFRegional::WebACLAssociation

The AWS::WAFRegional::WebACLAssociation resource associates an AWS WAF Regional web access control group (ACL) with a resource.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::WAFRegional::WebACLAssociation", "Properties" : { "ResourceArn" : String, "WebACLId" : String } }

YAML

Type: AWS::WAFRegional::WebACLAssociation Properties: ResourceArn: String WebACLId: String

Properties

ResourceArn

The Amazon Resource Name (ARN) of the resource to protect with the web ACL.

Required: Yes

Type: String

Update requires: Replacement

WebACLId

A unique identifier (ID) for the web ACL.

Required: Yes

Type: String

Update requires: Replacement

Examples

Associate an Application Load Balancer resource with a web ACL

The following example associates an Application Load Balancer resource with a web ACL.

JSON

"MyWebACLAssociation": { "Type": "AWS::WAFRegional::WebACLAssociation", "Properties": { "ResourceArn": { "Ref": "MyLoadBalancer" }, "WebACLId": { "Ref": "MyWebACL" } } }

YAML

MyWebACLAssociation: Type: "AWS::WAFRegional::WebACLAssociation" Properties: ResourceArn: Ref: MyLoadBalancer WebACLId: Ref: MyWebACL

On this page: