WAFClient#
Auto-generated documentation for WAF type annotations stubs module mypy-boto3-waf.
WAFClient#
Type annotations and code completion for boto3.client("waf")
.
boto3 documentation
# WAFClient usage example
from boto3.session import Session
from mypy_boto3_waf.client import WAFClient
def get_waf_client() -> WAFClient:
return Session().client("waf")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("waf").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("waf")
try:
do_something(client)
except (
client.exceptions.ClientError,
client.exceptions.WAFBadRequestException,
client.exceptions.WAFDisallowedNameException,
client.exceptions.WAFEntityMigrationException,
client.exceptions.WAFInternalErrorException,
client.exceptions.WAFInvalidAccountException,
client.exceptions.WAFInvalidOperationException,
client.exceptions.WAFInvalidParameterException,
client.exceptions.WAFInvalidPermissionPolicyException,
client.exceptions.WAFInvalidRegexPatternException,
client.exceptions.WAFLimitsExceededException,
client.exceptions.WAFNonEmptyEntityException,
client.exceptions.WAFNonexistentContainerException,
client.exceptions.WAFNonexistentItemException,
client.exceptions.WAFReferencedItemException,
client.exceptions.WAFServiceLinkedRoleErrorException,
client.exceptions.WAFStaleDataException,
client.exceptions.WAFSubscriptionNotFoundException,
client.exceptions.WAFTagOperationException,
client.exceptions.WAFTagOperationInternalErrorException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_waf.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods#
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("waf").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("waf").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
create_byte_match_set#
.
Type annotations and code completion for boto3.client("waf").create_byte_match_set
method.
boto3 documentation
# create_byte_match_set method definition
def create_byte_match_set(
self,
*,
Name: str,
ChangeToken: str,
) -> CreateByteMatchSetResponseTypeDef: # (1)
...
# create_byte_match_set method usage example with argument unpacking
kwargs: CreateByteMatchSetRequestRequestTypeDef = { # (1)
"Name": ...,
"ChangeToken": ...,
}
parent.create_byte_match_set(**kwargs)
create_geo_match_set#
.
Type annotations and code completion for boto3.client("waf").create_geo_match_set
method.
boto3 documentation
# create_geo_match_set method definition
def create_geo_match_set(
self,
*,
Name: str,
ChangeToken: str,
) -> CreateGeoMatchSetResponseTypeDef: # (1)
...
# create_geo_match_set method usage example with argument unpacking
kwargs: CreateGeoMatchSetRequestRequestTypeDef = { # (1)
"Name": ...,
"ChangeToken": ...,
}
parent.create_geo_match_set(**kwargs)
create_ip_set#
.
Type annotations and code completion for boto3.client("waf").create_ip_set
method.
boto3 documentation
# create_ip_set method definition
def create_ip_set(
self,
*,
Name: str,
ChangeToken: str,
) -> CreateIPSetResponseTypeDef: # (1)
...
# create_ip_set method usage example with argument unpacking
kwargs: CreateIPSetRequestRequestTypeDef = { # (1)
"Name": ...,
"ChangeToken": ...,
}
parent.create_ip_set(**kwargs)
create_rate_based_rule#
.
Type annotations and code completion for boto3.client("waf").create_rate_based_rule
method.
boto3 documentation
# create_rate_based_rule method definition
def create_rate_based_rule(
self,
*,
Name: str,
MetricName: str,
RateKey: RateKeyType, # (1)
RateLimit: int,
ChangeToken: str,
Tags: Sequence[TagTypeDef] = ..., # (2)
) -> CreateRateBasedRuleResponseTypeDef: # (3)
...
- See RateKeyType
- See TagTypeDef
- See CreateRateBasedRuleResponseTypeDef
# create_rate_based_rule method usage example with argument unpacking
kwargs: CreateRateBasedRuleRequestRequestTypeDef = { # (1)
"Name": ...,
"MetricName": ...,
"RateKey": ...,
"RateLimit": ...,
"ChangeToken": ...,
}
parent.create_rate_based_rule(**kwargs)
create_regex_match_set#
.
Type annotations and code completion for boto3.client("waf").create_regex_match_set
method.
boto3 documentation
# create_regex_match_set method definition
def create_regex_match_set(
self,
*,
Name: str,
ChangeToken: str,
) -> CreateRegexMatchSetResponseTypeDef: # (1)
...
# create_regex_match_set method usage example with argument unpacking
kwargs: CreateRegexMatchSetRequestRequestTypeDef = { # (1)
"Name": ...,
"ChangeToken": ...,
}
parent.create_regex_match_set(**kwargs)
create_regex_pattern_set#
.
Type annotations and code completion for boto3.client("waf").create_regex_pattern_set
method.
boto3 documentation
# create_regex_pattern_set method definition
def create_regex_pattern_set(
self,
*,
Name: str,
ChangeToken: str,
) -> CreateRegexPatternSetResponseTypeDef: # (1)
...
# create_regex_pattern_set method usage example with argument unpacking
kwargs: CreateRegexPatternSetRequestRequestTypeDef = { # (1)
"Name": ...,
"ChangeToken": ...,
}
parent.create_regex_pattern_set(**kwargs)
create_rule#
.
Type annotations and code completion for boto3.client("waf").create_rule
method.
boto3 documentation
# create_rule method definition
def create_rule(
self,
*,
Name: str,
MetricName: str,
ChangeToken: str,
Tags: Sequence[TagTypeDef] = ..., # (1)
) -> CreateRuleResponseTypeDef: # (2)
...
- See TagTypeDef
- See CreateRuleResponseTypeDef
# create_rule method usage example with argument unpacking
kwargs: CreateRuleRequestRequestTypeDef = { # (1)
"Name": ...,
"MetricName": ...,
"ChangeToken": ...,
}
parent.create_rule(**kwargs)
create_rule_group#
.
Type annotations and code completion for boto3.client("waf").create_rule_group
method.
boto3 documentation
# create_rule_group method definition
def create_rule_group(
self,
*,
Name: str,
MetricName: str,
ChangeToken: str,
Tags: Sequence[TagTypeDef] = ..., # (1)
) -> CreateRuleGroupResponseTypeDef: # (2)
...
# create_rule_group method usage example with argument unpacking
kwargs: CreateRuleGroupRequestRequestTypeDef = { # (1)
"Name": ...,
"MetricName": ...,
"ChangeToken": ...,
}
parent.create_rule_group(**kwargs)
create_size_constraint_set#
.
Type annotations and code completion for boto3.client("waf").create_size_constraint_set
method.
boto3 documentation
# create_size_constraint_set method definition
def create_size_constraint_set(
self,
*,
Name: str,
ChangeToken: str,
) -> CreateSizeConstraintSetResponseTypeDef: # (1)
...
# create_size_constraint_set method usage example with argument unpacking
kwargs: CreateSizeConstraintSetRequestRequestTypeDef = { # (1)
"Name": ...,
"ChangeToken": ...,
}
parent.create_size_constraint_set(**kwargs)
create_sql_injection_match_set#
.
Type annotations and code completion for boto3.client("waf").create_sql_injection_match_set
method.
boto3 documentation
# create_sql_injection_match_set method definition
def create_sql_injection_match_set(
self,
*,
Name: str,
ChangeToken: str,
) -> CreateSqlInjectionMatchSetResponseTypeDef: # (1)
...
# create_sql_injection_match_set method usage example with argument unpacking
kwargs: CreateSqlInjectionMatchSetRequestRequestTypeDef = { # (1)
"Name": ...,
"ChangeToken": ...,
}
parent.create_sql_injection_match_set(**kwargs)
create_web_acl#
.
Type annotations and code completion for boto3.client("waf").create_web_acl
method.
boto3 documentation
# create_web_acl method definition
def create_web_acl(
self,
*,
Name: str,
MetricName: str,
DefaultAction: WafActionTypeDef, # (1)
ChangeToken: str,
Tags: Sequence[TagTypeDef] = ..., # (2)
) -> CreateWebACLResponseTypeDef: # (3)
...
- See WafActionTypeDef
- See TagTypeDef
- See CreateWebACLResponseTypeDef
# create_web_acl method usage example with argument unpacking
kwargs: CreateWebACLRequestRequestTypeDef = { # (1)
"Name": ...,
"MetricName": ...,
"DefaultAction": ...,
"ChangeToken": ...,
}
parent.create_web_acl(**kwargs)
create_web_acl_migration_stack#
Creates an AWS CloudFormation WAFV2 template for the specified web ACL in the specified Amazon S3 bucket.
Type annotations and code completion for boto3.client("waf").create_web_acl_migration_stack
method.
boto3 documentation
# create_web_acl_migration_stack method definition
def create_web_acl_migration_stack(
self,
*,
WebACLId: str,
S3BucketName: str,
IgnoreUnsupportedType: bool,
) -> CreateWebACLMigrationStackResponseTypeDef: # (1)
...
# create_web_acl_migration_stack method usage example with argument unpacking
kwargs: CreateWebACLMigrationStackRequestRequestTypeDef = { # (1)
"WebACLId": ...,
"S3BucketName": ...,
"IgnoreUnsupportedType": ...,
}
parent.create_web_acl_migration_stack(**kwargs)
create_xss_match_set#
.
Type annotations and code completion for boto3.client("waf").create_xss_match_set
method.