CmdID / aws / aws cloudfront
aws cloudfront associate-distribution-tenant-web-acl
Associates the WAF web ACL with a distribution tenant. AWS CLI reference
1 example 3 options Its page in the AWS CLI reference
Examples
To associate a web ACL with a CloudFront distribution tenant
The following associate-distribution-tenant-web-acl example associates a web ACL with a CloudFront distribution with ETag E13V1IB3VIYABC.
aws cloudfront associate-distribution-tenant-web-acl --id dt_2wjDZi3hD1ivOXf6rpZJO1AB --if-match E13V1IB3VIYABC --web-acl-arn arn:aws:wafv2:us-east-1:123456789012:global/webacl/web-global-example/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111Identify--idThe ID of the distribution tenant.--if-matchThe current ETag of the distribution tenant.--web-acl-arnThe Amazon Resource Name (ARN) of the WAF web ACL to associate.Its output
{
"ETag": "E1VC38T7YXBABC",
"Id": "dt_2wjDZi3hD1ivOXf6rpZJO1AB",
"WebACLArn": "arn:aws:wafv2:us-east-1:123456789012:global/webacl/web-global-example/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
}For more information, see Use AWS WAF protections in the Amazon CloudFront Developer Guide.
Options
--idThe ID of the distribution tenant.--if-matchThe current ETag of the distribution tenant.--web-acl-arnThe Amazon Resource Name (ARN) of the WAF web ACL to associate.