Skip to content

APIGatewayClient#

Index > APIGateway > APIGatewayClient

Auto-generated documentation for APIGateway type annotations stubs module mypy-boto3-apigateway.

APIGatewayClient#

Type annotations and code completion for boto3.client("apigateway"). boto3 documentation

# APIGatewayClient usage example

from boto3.session import Session
from mypy_boto3_apigateway.client import APIGatewayClient

def get_apigateway_client() -> APIGatewayClient:
    return Session().client("apigateway")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("apigateway").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("apigateway")

try:
    do_something(client)
except (
    client.exceptions.BadRequestException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.LimitExceededException,
    client.exceptions.NotFoundException,
    client.exceptions.ServiceUnavailableException,
    client.exceptions.TooManyRequestsException,
    client.exceptions.UnauthorizedException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_apigateway.client import Exceptions

def handle_error(exc: Exceptions.BadRequestException) -> None:
    ...

Methods#

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("apigateway").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("apigateway").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

create_api_key#

Create an ApiKey resource.

Type annotations and code completion for boto3.client("apigateway").create_api_key method. boto3 documentation

# create_api_key method definition

def create_api_key(
    self,
    *,
    name: str = ...,
    description: str = ...,
    enabled: bool = ...,
    generateDistinctId: bool = ...,
    value: str = ...,
    stageKeys: Sequence[StageKeyTypeDef] = ...,  # (1)
    customerId: str = ...,
    tags: Mapping[str, str] = ...,
) -> ApiKeyResponseTypeDef:  # (2)
    ...
  1. See StageKeyTypeDef
  2. See ApiKeyResponseTypeDef
# create_api_key method usage example with argument unpacking

kwargs: CreateApiKeyRequestRequestTypeDef = {  # (1)
    "name": ...,
}

parent.create_api_key(**kwargs)
  1. See CreateApiKeyRequestRequestTypeDef

create_authorizer#

Adds a new Authorizer resource to an existing RestApi resource.

Type annotations and code completion for boto3.client("apigateway").create_authorizer method. boto3 documentation

# create_authorizer method definition

def create_authorizer(
    self,
    *,
    restApiId: str,
    name: str,
    type: AuthorizerTypeType,  # (1)
    providerARNs: Sequence[str] = ...,
    authType: str = ...,
    authorizerUri: str = ...,
    authorizerCredentials: str = ...,
    identitySource: str = ...,
    identityValidationExpression: str = ...,
    authorizerResultTtlInSeconds: int = ...,
) -> AuthorizerResponseTypeDef:  # (2)
    ...
  1. See AuthorizerTypeType
  2. See AuthorizerResponseTypeDef
# create_authorizer method usage example with argument unpacking

kwargs: CreateAuthorizerRequestRequestTypeDef = {  # (1)
    "restApiId": ...,
    "name": ...,
    "type": ...,
}

parent.create_authorizer(**kwargs)
  1. See CreateAuthorizerRequestRequestTypeDef

create_base_path_mapping#

Creates a new BasePathMapping resource.

Type annotations and code completion for boto3.client("apigateway").create_base_path_mapping method. boto3 documentation

# create_base_path_mapping method definition

def create_base_path_mapping(
    self,
    *,
    domainName: str,
    restApiId: str,
    basePath: str = ...,
    stage: str = ...,
) -> BasePathMappingResponseTypeDef:  # (1)
    ...
  1. See BasePathMappingResponseTypeDef
# create_base_path_mapping method usage example with argument unpacking

kwargs: CreateBasePathMappingRequestRequestTypeDef = {  # (1)
    "domainName": ...,
    "restApiId": ...,
}

parent.create_base_path_mapping(**kwargs)
  1. See CreateBasePathMappingRequestRequestTypeDef

create_deployment#

Creates a Deployment resource, which makes a specified RestApi callable over the internet.

Type annotations and code completion for boto3.client("apigateway").create_deployment method.