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.