WAFV2#
Client#
- class WAFV2.Client#
A low-level client representing AWS WAFV2
Note
This is the latest version of the WAF API, released in November, 2019. The names of the entities that you use to access this API, like endpoints and namespaces, all have the versioning information added, like “V2” or “v2”, to distinguish from the prior version. We recommend migrating your resources to this version, because it has a number of significant improvements.
If you used WAF prior to this release, you can’t use this WAFV2 API to access any WAF resources that you created before. WAF Classic support will end on September 30, 2025.
For information about WAF, including how to migrate your WAF Classic resources to this version, see the WAF Developer Guide.
WAF is a web application firewall that lets you monitor the HTTP and HTTPS requests that are forwarded to an Amazon CloudFront distribution, Amazon API Gateway REST API, Application Load Balancer, AppSync GraphQL API, Amazon Cognito user pool, App Runner service, or Amazon Web Services Verified Access instance. WAF also lets you control access to your content, to protect the Amazon Web Services resource that WAF is monitoring. Based on conditions that you specify, such as the IP addresses that requests originate from or the values of query strings, the protected resource responds to requests with either the requested content, an HTTP 403 status code (Forbidden), or with a custom response.
This API guide is for developers who need detailed information about WAF API actions, data types, and errors. For detailed information about WAF features and guidance for configuring and using WAF, see the WAF Developer Guide.
You can make calls using the endpoints listed in WAF endpoints and quotas.
For regional applications, you can use any of the endpoints in the list. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.
For Amazon CloudFront applications, you must use the API endpoint listed for US East (N. Virginia): us-east-1.
Alternatively, you can use one of the Amazon Web Services SDKs to access an API that’s tailored to the programming language or platform that you’re using. For more information, see Amazon Web Services SDKs.
client = session.create_client('wafv2')
These are the available methods:
- associate_web_acl
- can_paginate
- check_capacity
- close
- create_api_key
- create_ip_set
- create_regex_pattern_set
- create_rule_group
- create_web_acl
- delete_api_key
- delete_firewall_manager_rule_groups
- delete_ip_set
- delete_logging_configuration
- delete_permission_policy
- delete_regex_pattern_set
- delete_rule_group
- delete_web_acl
- describe_all_managed_products
- describe_managed_products_by_vendor
- describe_managed_rule_group
- disassociate_web_acl
- generate_mobile_sdk_release_url
- get_decrypted_api_key
- get_ip_set
- get_logging_configuration
- get_managed_rule_set
- get_mobile_sdk_release
- get_paginator
- get_permission_policy
- get_rate_based_statement_managed_keys
- get_regex_pattern_set
- get_rule_group
- get_sampled_requests
- get_waiter
- get_web_acl
- get_web_acl_for_resource
- list_api_keys
- list_available_managed_rule_group_versions
- list_available_managed_rule_groups
- list_ip_sets
- list_logging_configurations
- list_managed_rule_sets
- list_mobile_sdk_releases
- list_regex_pattern_sets
- list_resources_for_web_acl
- list_rule_groups
- list_tags_for_resource
- list_web_acls
- put_logging_configuration
- put_managed_rule_set_versions
- put_permission_policy
- tag_resource
- untag_resource
- update_ip_set
- update_managed_rule_set_version_expiry_date
- update_regex_pattern_set
- update_rule_group
- update_web_acl
Client Exceptions#
Client exceptions are available on a client instance via the exceptions
property. For more detailed instructions and examples on the exact usage of client exceptions, see the error handling user guide.
The available client exceptions are:
- WAFAssociatedItemException
- WAFConfigurationWarningException
- WAFDuplicateItemException
- WAFExpiredManagedRuleGroupVersionException
- WAFInternalErrorException
- WAFInvalidOperationException
- WAFInvalidParameterException
- WAFInvalidPermissionPolicyException
- WAFInvalidResourceException
- WAFLimitsExceededException
- WAFLogDestinationPermissionIssueException
- WAFNonexistentItemException
- WAFOptimisticLockException
- WAFServiceLinkedRoleErrorException
- WAFSubscriptionNotFoundException
- WAFTagOperationException
- WAFTagOperationInternalErrorException
- WAFUnavailableEntityException
- WAFUnsupportedAggregateKeyTypeException