Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::WAFRegional::WebACLAssociation

The AWS::WAFRegional::WebACLAssociation resource associates an AWS WAF Regional web access control group (ACL) with a resource. For more information, see AssociateWebACL in the AWS WAF Regional API Reference.

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

Note

For more information about constraints and values for each property, see AssociateWebACL in the AWS WAF Regional API Reference.

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

Example

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: