associate_web_acl#
State module for managing Amazon WAF v2 web ACL associations.
- async idem_aws.states.aws.wafv2.associate_web_acl.present(hub, ctx, name: str, web_acl_arn: str, resource_arn: str, resource_id: str = None) Dict[str, Any] [source]#
Associates a web ACL with a regional application resource, to protect the resource.
A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
- Parameters:
name (str) – An Idem name of the resource.
resource_id (str, Optional) – The Amazon Resource Name (ARN) of the resource associated with the web ACL.
web_acl_arn (str) – The Amazon Resource Name (ARN) of the web ACL that you want to associate with the resource.
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:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id
For an Amazon API Gateway REST API:
arn:aws:apigateway:region::/restapis/api-id/stages/stage-name
For an AppSync GraphQL API:
arn:aws:appsync:region:account-id:apis/GraphQLApiId
For an Amazon Cognito user pool:
arn:aws:cognito-idp:region:account-id:userpool/user-pool-id
- Returns:
Dict[str, Any]
- Request syntax:
[idem_test_aws_wafv2_associate_web_acl]: aws.wafv2.associate_web_acl.present: - name: 'string' - resource_id: 'string' - web_acl_arn: 'string' - resource_arn: 'string'
- Returns:
Dict[str, Any]
Examples
idem_test_aws_wafv2_associate_web_acl: aws.wafv2.associate_web_acl.present: - name: 'idem_test_associate_web_acl' - web_acl_arn: 'arn:aws:wafv2:us-west-2:123456789012:regional/webacl/idem_test_web_acl/e3706582-69b0-4487-97b6-63f82b8a3147' - resource_arn: 'arn:aws:apigateway:us-west-2::/restapis/1234567890/stages/dev'
- async idem_aws.states.aws.wafv2.associate_web_acl.absent(hub, ctx, name: str, resource_id: str = None) Dict[str, Any] [source]#
Disassociates the specified regional resource from any existing web ACL association.
A resource can have at most one web ACL association. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
- Parameters:
- Returns:
Dict[str, Any]
- Request syntax:
[idem_test_aws_wafv2_associate_web_acl]: aws.wafv2.associate_web_acl.absent: - name: 'string' - resource_id: 'string'
- Returns:
Dict[str, Any]
Examples
idem_test_aws_wafv2_associate_web_acl: aws.wafv2.associate_web_acl.absent: - name: 'idem_test_associate_web_acl' - resource_id: 'arn:aws:apigateway:us-west-2::/restapis/1234567890/stages/dev'
- async idem_aws.states.aws.wafv2.associate_web_acl.describe(hub, ctx) Dict[str, Dict[str, Any]] [source]#
Describes AWS WAF v2 regional resources associations with web ACLs in a way that can be recreated/managed with the corresponding “present” function.
- Returns:
Dict[str, Dict[str, Any]]
Examples
$ idem describe aws.wafv2.associate_web_acl