WAFV2Client#
Auto-generated documentation for WAFV2 type annotations stubs module mypy-boto3-wafv2.
WAFV2Client#
Type annotations and code completion for boto3.client("wafv2")
.
boto3 documentation
# WAFV2Client usage example
from boto3.session import Session
from mypy_boto3_wafv2.client import WAFV2Client
def get_wafv2_client() -> WAFV2Client:
return Session().client("wafv2")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("wafv2").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("wafv2")
try:
do_something(client)
except (
client.exceptions.ClientError,
client.exceptions.WAFAssociatedItemException,
client.exceptions.WAFConfigurationWarningException,
client.exceptions.WAFDuplicateItemException,
client.exceptions.WAFExpiredManagedRuleGroupVersionException,
client.exceptions.WAFInternalErrorException,
client.exceptions.WAFInvalidOperationException,
client.exceptions.WAFInvalidParameterException,
client.exceptions.WAFInvalidPermissionPolicyException,
client.exceptions.WAFInvalidResourceException,
client.exceptions.WAFLimitsExceededException,
client.exceptions.WAFLogDestinationPermissionIssueException,
client.exceptions.WAFNonexistentItemException,
client.exceptions.WAFOptimisticLockException,
client.exceptions.WAFServiceLinkedRoleErrorException,
client.exceptions.WAFSubscriptionNotFoundException,
client.exceptions.WAFTagOperationException,
client.exceptions.WAFTagOperationInternalErrorException,
client.exceptions.WAFUnavailableEntityException,
client.exceptions.WAFUnsupportedAggregateKeyTypeException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_wafv2.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods#
associate_web_acl#
Associates a web ACL with a regional application resource, to protect the resource.
Type annotations and code completion for boto3.client("wafv2").associate_web_acl
method.
boto3 documentation
# associate_web_acl method definition
def associate_web_acl(
self,
*,
WebACLArn: str,
ResourceArn: str,
) -> Dict[str, Any]:
...
# associate_web_acl method usage example with argument unpacking
kwargs: AssociateWebACLRequestRequestTypeDef = { # (1)
"WebACLArn": ...,
"ResourceArn": ...,
}
parent.associate_web_acl(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("wafv2").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
check_capacity#
Returns the web ACL capacity unit (WCU) requirements for a specified scope and set of rules.
Type annotations and code completion for boto3.client("wafv2").check_capacity
method.
boto3 documentation
# check_capacity method definition
def check_capacity(
self,
*,
Scope: ScopeType, # (1)
Rules: Sequence[RuleTypeDef], # (2)
) -> CheckCapacityResponseTypeDef: # (3)
...
- See ScopeType
- See RuleTypeDef
- See CheckCapacityResponseTypeDef
# check_capacity method usage example with argument unpacking
kwargs: CheckCapacityRequestRequestTypeDef = { # (1)
"Scope": ...,
"Rules": ...,
}
parent.check_capacity(**kwargs)
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("wafv2").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
create_api_key#
Creates an API key that contains a set of token domains.
Type annotations and code completion for boto3.client("wafv2").create_api_key
method.
boto3 documentation
# create_api_key method definition
def create_api_key(
self,
*,
Scope: ScopeType, # (1)
TokenDomains: Sequence[str],
) -> CreateAPIKeyResponseTypeDef: # (2)
...
- See ScopeType
- See CreateAPIKeyResponseTypeDef
# create_api_key method usage example with argument unpacking
kwargs: CreateAPIKeyRequestRequestTypeDef = { # (1)
"Scope": ...,
"TokenDomains": ...,
}
parent.create_api_key(**kwargs)
create_ip_set#
Creates an IPSet, which you use to identify web requests that originate from specific IP addresses or ranges of IP addresses.
Type annotations and code completion for boto3.client("wafv2").create_ip_set
method.
boto3 documentation
# create_ip_set method definition
def create_ip_set(
self,
*,
Name: str,
Scope: ScopeType, # (1)
IPAddressVersion: IPAddressVersionType, # (2)
Addresses: Sequence[str],
Description: str = ...,
Tags: Sequence[TagTypeDef] = ..., # (3)
) -> CreateIPSetResponseTypeDef: # (4)
...
- See ScopeType
- See IPAddressVersionType
- See TagTypeDef
- See CreateIPSetResponseTypeDef
# create_ip_set method usage example with argument unpacking
kwargs: CreateIPSetRequestRequestTypeDef = { # (1)
"Name": ...,
"Scope": ...,
"IPAddressVersion": ...,
"Addresses": ...,
}
parent.create_ip_set(**kwargs)
create_regex_pattern_set#
Creates a RegexPatternSet, which you reference in a RegexPatternSetReferenceStatement, to have WAF inspect a web request component for the specified patterns.
Type annotations and code completion for boto3.client("wafv2").create_regex_pattern_set
method.
boto3 documentation
# create_regex_pattern_set method definition
def create_regex_pattern_set(
self,
*,
Name: str,
Scope: ScopeType, # (1)
RegularExpressionList: Sequence[RegexTypeDef], # (2)
Description: str = ...,
Tags: Sequence[TagTypeDef] = ..., # (3)
) -> CreateRegexPatternSetResponseTypeDef: # (4)
...
- See ScopeType
- See RegexTypeDef
- See TagTypeDef
- See CreateRegexPatternSetResponseTypeDef
# create_regex_pattern_set method usage example with argument unpacking
kwargs: CreateRegexPatternSetRequestRequestTypeDef = { # (1)
"Name": ...,
"Scope": ...,
"RegularExpressionList": ...,
}
parent.create_regex_pattern_set(**kwargs)
create_rule_group#
Creates a RuleGroup per the specifications provided.
Type annotations and code completion for boto3.client("wafv2").create_rule_group
method.
boto3 documentation
# create_rule_group method definition
def create_rule_group(
self,
*,
Name: str,
Scope: ScopeType, # (1)
Capacity: int,
VisibilityConfig: VisibilityConfigTypeDef, # (2)
Description: str = ...,
Rules: Sequence[RuleTypeDef] = ..., # (3)
Tags: Sequence[TagTypeDef] = ..., # (4)
CustomResponseBodies: Mapping[str, CustomResponseBodyTypeDef] = ..., # (5)
) -> CreateRuleGroupResponseTypeDef: # (6)
...
- See ScopeType
- See VisibilityConfigTypeDef
- See RuleTypeDef
- See TagTypeDef
- See CustomResponseBodyTypeDef
- See CreateRuleGroupResponseTypeDef
# create_rule_group method usage example with argument unpacking
kwargs: CreateRuleGroupRequestRequestTypeDef = { # (1)
"Name": ...,
"Scope": ...,
"Capacity": ...,
"VisibilityConfig": ...,
}
parent.create_rule_group(**kwargs)
create_web_acl#
Creates a WebACL per the specifications provided.
Type annotations and code completion for boto3.client("wafv2").create_web_acl
method.
boto3 documentation
# create_web_acl method definition
def create_web_acl(
self,
*,
Name: str,
Scope: ScopeType, # (1)
DefaultAction: DefaultActionTypeDef, # (2)
VisibilityConfig: VisibilityConfigTypeDef, # (3)
Description: str = ...,
Rules: Sequence[RuleTypeDef] = ..., # (4)
Tags: Sequence[TagTypeDef] = ..., # (5)
CustomResponseBodies: Mapping[str, CustomResponseBodyTypeDef] = ..., # (6)
CaptchaConfig: CaptchaConfigTypeDef = ..., # (7)
ChallengeConfig: ChallengeConfigTypeDef = ..., # (8)
TokenDomains: Sequence[str] = ...,
AssociationConfig: AssociationConfigTypeDef = ..., # (9)
) -> CreateWebACLResponseTypeDef: # (10)
...
- See ScopeType
- See DefaultActionTypeDef
- See VisibilityConfigTypeDef
- See RuleTypeDef
- See TagTypeDef
- See CustomResponseBodyTypeDef
- See CaptchaConfigTypeDef
- See ChallengeConfigTypeDef
- See AssociationConfigTypeDef
- See CreateWebACLResponseTypeDef
# create_web_acl method usage example with argument unpacking
kwargs: CreateWebACLRequestRequestTypeDef = { # (1)
"Name": ...,
"Scope": ...,
"DefaultAction": ...,
"VisibilityConfig": ...,
}
parent.create_web_acl(**kwargs)
delete_firewall_manager_rule_groups#
Deletes all rule groups that are managed by Firewall Manager for the specified web ACL.
Type annotations and code completion for boto3.client("wafv2").delete_firewall_manager_rule_groups
method.
boto3 documentation
# delete_firewall_manager_rule_groups method definition
def delete_firewall_manager_rule_groups(
self,
*,
WebACLArn: str,
WebACLLockToken: str,
) -> DeleteFirewallManagerRuleGroupsResponseTypeDef: # (1)
...
# delete_firewall_manager_rule_groups method usage example with argument unpacking
kwargs: DeleteFirewallManagerRuleGroupsRequestRequestTypeDef = { # (1)
"WebACLArn": ...,
"WebACLLockToken": ...,
}
parent.delete_firewall_manager_rule_groups(**kwargs)
delete_ip_set#
Deletes the specified IPSet.
Type annotations and code completion for boto3.client("wafv2").delete_ip_set
method.
boto3 documentation
# delete_ip_set method definition
def delete_ip_set(
self,
*,
Name: str,
Scope: ScopeType, # (1)
Id: str,
LockToken: str,
) -> Dict[str, Any]:
...
- See ScopeType
# delete_ip_set method usage example with argument unpacking
kwargs: DeleteIPSetRequestRequestTypeDef = { # (1)
"Name": ...,
"Scope": ...,
"Id": ...,
"LockToken": ...,
}
parent.delete_ip_set(**kwargs)
delete_logging_configuration#
Deletes the LoggingConfiguration from the specified web ACL.
Type annotations and code completion for boto3.client("wafv2").delete_logging_configuration
method.
boto3 documentation
# delete_logging_configuration method definition
def delete_logging_configuration(
self,
*,
ResourceArn: str,
) -> Dict[str, Any]:
...
# delete_logging_configuration method usage example with argument unpacking
kwargs: DeleteLoggingConfigurationRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
}
parent.delete_logging_configuration(**kwargs)
delete_permission_policy#
Permanently deletes an IAM policy from the specified rule group.
Type annotations and code completion for boto3.client("wafv2").delete_permission_policy
method.
boto3 documentation
# delete_permission_policy method definition
def delete_permission_policy(
self,
*,
ResourceArn: str,
) -> Dict[str, Any]:
...
# delete_permission_policy method usage example with argument unpacking
kwargs: DeletePermissionPolicyRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
}
parent.delete_permission_policy(**kwargs)
delete_regex_pattern_set#
Deletes the specified RegexPatternSet.
Type annotations and code completion for boto3.client("wafv2").delete_regex_pattern_set
method.
boto3 documentation
# delete_regex_pattern_set method definition
def delete_regex_pattern_set(
self,
*,
Name: str,
Scope: ScopeType, # (1)
Id: str,
LockToken: str,
) -> Dict[str, Any]:
...
- See ScopeType
# delete_regex_pattern_set method usage example with argument unpacking
kwargs: DeleteRegexPatternSetRequestRequestTypeDef = { # (1)
"Name": ...,
"Scope": ...,
"Id": ...,
"LockToken": ...,
}
parent.delete_regex_pattern_set(**kwargs)
delete_rule_group#
Deletes the specified RuleGroup.
Type annotations and code completion for boto3.client("wafv2").delete_rule_group
method.
boto3 documentation
# delete_rule_group method definition
def delete_rule_group(
self,
*,
Name: str,
Scope: ScopeType, # (1)
Id: str,
LockToken: str,
) -> Dict[str, Any]:
...
- See ScopeType
# delete_rule_group method usage example with argument unpacking
kwargs: DeleteRuleGroupRequestRequestTypeDef = { # (1)
"Name": ...,
"Scope": ...,
"Id": ...,
"LockToken": ...,
}
parent.delete_rule_group(**kwargs)
delete_web_acl#
Deletes the specified WebACL.
Type annotations and code completion for boto3.client("wafv2").delete_web_acl
method.
boto3 documentation
# delete_web_acl method definition
def delete_web_acl(
self,
*,
Name: str,
Scope: ScopeType, # (1)
Id: str,
LockToken: str,
) -> Dict[str, Any]:
...
- See ScopeType
# delete_web_acl method usage example with argument unpacking
kwargs: DeleteWebACLRequestRequestTypeDef = { # (1)
"Name": ...,
"Scope": ...,
"Id": ...,
"LockToken": ...,
}
parent.delete_web_acl(**kwargs)
describe_all_managed_products#
Provides high-level information for the Amazon Web Services Managed Rules rule groups and Amazon Web Services Marketplace managed rule groups.
Type annotations and code completion for boto3.client("wafv2").describe_all_managed_products
method.
boto3 documentation
# describe_all_managed_products method definition
def describe_all_managed_products(
self,
*,
Scope: ScopeType, # (1)
) -> DescribeAllManagedProductsResponseTypeDef: # (2)
...
# describe_all_managed_products method usage example with argument unpacking
kwargs: DescribeAllManagedProductsRequestRequestTypeDef = { # (1)
"Scope": ...,
}
parent.describe_all_managed_products(**kwargs)
describe_managed_products_by_vendor#
Provides high-level information for the managed rule groups owned by a specific vendor.
Type annotations and code completion for boto3.client("wafv2").describe_managed_products_by_vendor
method.
boto3 documentation
# describe_managed_products_by_vendor method definition
def describe_managed_products_by_vendor(
self,
*,
VendorName: str,
Scope: ScopeType, # (1)
) -> DescribeManagedProductsByVendorResponseTypeDef: # (2)
...
# describe_managed_products_by_vendor method usage example with argument unpacking
kwargs: DescribeManagedProductsByVendorRequestRequestTypeDef = { # (1)
"VendorName": ...,
"Scope": ...,
}
parent.describe_managed_products_by_vendor(**kwargs)
describe_managed_rule_group#
Provides high-level information for a managed rule group, including descriptions of the rules.
Type annotations and code completion for boto3.client("wafv2").describe_managed_rule_group
method.
boto3 documentation
# describe_managed_rule_group method definition
def describe_managed_rule_group(
self,
*,
VendorName: str,
Name: str,
Scope: ScopeType, # (1)
VersionName: str = ...,
) -> DescribeManagedRuleGroupResponseTypeDef: # (2)
...
# describe_managed_rule_group method usage example with argument unpacking
kwargs: DescribeManagedRuleGroupRequestRequestTypeDef = { # (1)
"VendorName": ...,
"Name": ...,
"Scope": ...,
}
parent.describe_managed_rule_group(**kwargs)
disassociate_web_acl#
Disassociates the specified regional application resource from any existing web ACL association.
Type annotations and code completion for boto3.client("wafv2").disassociate_web_acl
method.
boto3 documentation
# disassociate_web_acl method definition
def disassociate_web_acl(
self,
*,
ResourceArn: str,
) -> Dict[str, Any]:
...
# disassociate_web_acl method usage example with argument unpacking
kwargs: DisassociateWebACLRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
}
parent.disassociate_web_acl(**kwargs)
generate_mobile_sdk_release_url#
Generates a presigned download URL for the specified release of the mobile SDK.
Type annotations and code completion for boto3.client("wafv2").generate_mobile_sdk_release_url
method.
boto3 documentation
# generate_mobile_sdk_release_url method definition
def generate_mobile_sdk_release_url(
self,
*,
Platform: PlatformType, # (1)
ReleaseVersion: str,
) -> GenerateMobileSdkReleaseUrlResponseTypeDef: # (2)
...
# generate_mobile_sdk_release_url method usage example with argument unpacking
kwargs: GenerateMobileSdkReleaseUrlRequestRequestTypeDef = { # (1)
"Platform": ...,
"ReleaseVersion": ...,
}
parent.generate_mobile_sdk_release_url(**kwargs)
generate_presigned_url#
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for boto3.client("wafv2").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
get_decrypted_api_key#
Returns your API key in decrypted form.
Type annotations and code completion for boto3.client("wafv2").get_decrypted_api_key
method.
boto3 documentation
# get_decrypted_api_key method definition
def get_decrypted_api_key(
self,
*,
Scope: ScopeType, # (1)
APIKey: str,
) -> GetDecryptedAPIKeyResponseTypeDef: # (2)
...
# get_decrypted_api_key method usage example with argument unpacking
kwargs: GetDecryptedAPIKeyRequestRequestTypeDef = { # (1)
"Scope": ...,
"APIKey": ...,
}
parent.get_decrypted_api_key(**kwargs)
get_ip_set#
Retrieves the specified IPSet.
Type annotations and code completion for boto3.client("wafv2").get_ip_set
method.
boto3 documentation
# get_ip_set method definition
def get_ip_set(
self,
*,
Name: str,
Scope: ScopeType, # (1)
Id: str,
) -> GetIPSetResponseTypeDef: # (2)
...
- See ScopeType
- See GetIPSetResponseTypeDef
# get_ip_set method usage example with argument unpacking
kwargs: GetIPSetRequestRequestTypeDef = { # (1)
"Name": ...,
"Scope": ...,
"Id": ...,
}
parent.get_ip_set(**kwargs)
get_logging_configuration#
Returns the LoggingConfiguration for the specified web ACL.
Type annotations and code completion for boto3.client("wafv2").get_logging_configuration
method.
boto3 documentation
# get_logging_configuration method definition
def get_logging_configuration(
self,
*,
ResourceArn: str,
) -> GetLoggingConfigurationResponseTypeDef: # (1)
...
# get_logging_configuration method usage example with argument unpacking
kwargs: GetLoggingConfigurationRequestRequestTypeDef = { # (1)
"ResourceArn": ...,
}
parent.get_logging_configuration(**kwargs)
get_managed_rule_set#
Retrieves the specified managed rule set.
Type annotations and code completion for boto3.client("wafv2").get_managed_rule_set
method.
boto3 documentation
# get_managed_rule_set method definition
def get_managed_rule_set(
self,
*,
Name: str,
Scope: ScopeType, # (1)
Id: str,
) -> GetManagedRuleSetResponseTypeDef: # (2)
...
# get_managed_rule_set method usage example with argument unpacking
kwargs: GetManagedRuleSetRequestRequestTypeDef = { # (1)
"Name": ...,
"Scope": ...,
"Id": ...,
}
parent.get_managed_rule_set(**kwargs)
get_mobile_sdk_release#
Retrieves information for the specified mobile SDK release, including release notes and tags.
Type annotations and code completion for boto3.client("wafv2").get_mobile_sdk_release
method.