CfnWebACLAssociationProps

class aws_cdk.aws_wafv2.CfnWebACLAssociationProps(*, resource_arn, web_acl_arn)

Bases: object

Properties for defining a CfnWebACLAssociation.

Parameters:
  • resource_arn (str) – The Amazon Resource Name (ARN) of the resource to associate with the web ACL. The ARN must be in one of the following formats: - For an Application Load Balancer: arn: *partition* :elasticloadbalancing: *region* : *account-id* :loadbalancer/app/ *load-balancer-name* / *load-balancer-id* - For an Amazon API Gateway REST API: arn: *partition* :apigateway: *region* ::/restapis/ *api-id* /stages/ *stage-name* - For an AWS AppSync GraphQL API: arn: *partition* :appsync: *region* : *account-id* :apis/ *GraphQLApiId* - For an Amazon Cognito user pool: arn: *partition* :cognito-idp: *region* : *account-id* :userpool/ *user-pool-id* - For an AWS App Runner service: arn: *partition* :apprunner: *region* : *account-id* :service/ *apprunner-service-name* / *apprunner-service-id* - For an AWS Verified Access instance: arn: *partition* :ec2: *region* : *account-id* :verified-access-instance/ *instance-id*

  • web_acl_arn (str) – The Amazon Resource Name (ARN) of the web ACL that you want to associate with the resource.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webaclassociation.html

ExampleMetadata:

infused

Example:

# api: appsync.EventApi
# web_acl: wafv2.CfnWebACL


# Associate waf with Event API
wafv2.CfnWebACLAssociation(self, "WafAssociation",
    resource_arn=api.api_arn,
    web_acl_arn=web_acl.attr_arn
)

Attributes

resource_arn

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

The ARN must be in one of the following formats:

  • For an Application Load Balancer: arn: *partition* :elasticloadbalancing: *region* : *account-id* :loadbalancer/app/ *load-balancer-name* / *load-balancer-id*

  • For an Amazon API Gateway REST API: arn: *partition* :apigateway: *region* ::/restapis/ *api-id* /stages/ *stage-name*

  • For an AWS AppSync GraphQL API: arn: *partition* :appsync: *region* : *account-id* :apis/ *GraphQLApiId*

  • For an Amazon Cognito user pool: arn: *partition* :cognito-idp: *region* : *account-id* :userpool/ *user-pool-id*

  • For an AWS App Runner service: arn: *partition* :apprunner: *region* : *account-id* :service/ *apprunner-service-name* / *apprunner-service-id*

  • For an AWS Verified Access instance: arn: *partition* :ec2: *region* : *account-id* :verified-access-instance/ *instance-id*

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webaclassociation.html#cfn-wafv2-webaclassociation-resourcearn

web_acl_arn

The Amazon Resource Name (ARN) of the web ACL that you want to associate with the resource.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webaclassociation.html#cfn-wafv2-webaclassociation-webaclarn