Skip to content

WAFClient#

Index > WAF > 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)
    ...
  1. See CreateByteMatchSetResponseTypeDef
# create_byte_match_set method usage example with argument unpacking

kwargs: CreateByteMatchSetRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "ChangeToken": ...,
}

parent.create_byte_match_set(**kwargs)
  1. See CreateByteMatchSetRequestRequestTypeDef

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)
    ...
  1. See CreateGeoMatchSetResponseTypeDef
# create_geo_match_set method usage example with argument unpacking

kwargs: CreateGeoMatchSetRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "ChangeToken": ...,
}

parent.create_geo_match_set(**kwargs)
  1. See CreateGeoMatchSetRequestRequestTypeDef

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)
    ...
  1. See CreateIPSetResponseTypeDef
# create_ip_set method usage example with argument unpacking

kwargs: CreateIPSetRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "ChangeToken": ...,
}

parent.create_ip_set(**kwargs)
  1. See CreateIPSetRequestRequestTypeDef

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)
    ...
  1. See RateKeyType
  2. See TagTypeDef
  3. 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)
  1. See CreateRateBasedRuleRequestRequestTypeDef

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)
    ...
  1. See CreateRegexMatchSetResponseTypeDef
# create_regex_match_set method usage example with argument unpacking

kwargs: CreateRegexMatchSetRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "ChangeToken": ...,
}

parent.create_regex_match_set(**kwargs)
  1. See CreateRegexMatchSetRequestRequestTypeDef

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)
    ...
  1. See CreateRegexPatternSetResponseTypeDef
# create_regex_pattern_set method usage example with argument unpacking

kwargs: CreateRegexPatternSetRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "ChangeToken": ...,
}

parent.create_regex_pattern_set(**kwargs)
  1. See CreateRegexPatternSetRequestRequestTypeDef

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)
    ...
  1. See TagTypeDef
  2. See CreateRuleResponseTypeDef
# create_rule method usage example with argument unpacking

kwargs: CreateRuleRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "MetricName": ...,
    "ChangeToken": ...,
}

parent.create_rule(**kwargs)
  1. See CreateRuleRequestRequestTypeDef

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)
    ...
  1. See TagTypeDef
  2. See CreateRuleGroupResponseTypeDef
# create_rule_group method usage example with argument unpacking

kwargs: CreateRuleGroupRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "MetricName": ...,
    "ChangeToken": ...,
}

parent.create_rule_group(**kwargs)
  1. See CreateRuleGroupRequestRequestTypeDef

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)
    ...
  1. See CreateSizeConstraintSetResponseTypeDef
# create_size_constraint_set method usage example with argument unpacking

kwargs: CreateSizeConstraintSetRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "ChangeToken": ...,
}

parent.create_size_constraint_set(**kwargs)
  1. See CreateSizeConstraintSetRequestRequestTypeDef

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)
    ...
  1. See CreateSqlInjectionMatchSetResponseTypeDef
# create_sql_injection_match_set method usage example with argument unpacking

kwargs: CreateSqlInjectionMatchSetRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "ChangeToken": ...,
}

parent.create_sql_injection_match_set(**kwargs)
  1. See CreateSqlInjectionMatchSetRequestRequestTypeDef

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)
    ...
  1. See WafActionTypeDef
  2. See TagTypeDef
  3. See CreateWebACLResponseTypeDef
# create_web_acl method usage example with argument unpacking

kwargs: CreateWebACLRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "MetricName": ...,
    "DefaultAction": ...,
    "ChangeToken": ...,
}

parent.create_web_acl(**kwargs)
  1. See CreateWebACLRequestRequestTypeDef

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)
    ...
  1. See CreateWebACLMigrationStackResponseTypeDef
# create_web_acl_migration_stack method usage example with argument unpacking

kwargs: CreateWebACLMigrationStackRequestRequestTypeDef = {  # (1)
    "WebACLId": ...,
    "S3BucketName": ...,
    "IgnoreUnsupportedType": ...,
}

parent.create_web_acl_migration_stack(**kwargs)
  1. See CreateWebACLMigrationStackRequestRequestTypeDef

create_xss_match_set#

.

Type annotations and code completion for boto3.client("waf").create_xss_match_set method.