AWS::WAFRegional::WebACLAssociation - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AWS::WAFRegional::WebACLAssociation

Note

This is Amazon WAF Classic documentation. For more information, see Amazon WAF Classic in the developer guide.

For the latest version of Amazon WAF , use the Amazon WAFV2 API and see the Amazon WAF Developer Guide. With the latest version, Amazon WAF has a single set of endpoints for regional and global use.

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

Syntax

To declare this entity in your Amazon 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

Return values

Fn::GetAtt

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