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. boto3 documentation

# create_deployment method definition

def create_deployment(
    self,
    *,
    restApiId: str,
    stageName: str = ...,
    stageDescription: str = ...,
    description: str = ...,
    cacheClusterEnabled: bool = ...,
    cacheClusterSize: CacheClusterSizeType = ...,  # (1)
    variables: Mapping[str, str] = ...,
    canarySettings: DeploymentCanarySettingsTypeDef = ...,  # (2)
    tracingEnabled: bool = ...,
) -> DeploymentResponseTypeDef:  # (3)
    ...
  1. See CacheClusterSizeType
  2. See DeploymentCanarySettingsTypeDef
  3. See DeploymentResponseTypeDef
# create_deployment method usage example with argument unpacking

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

parent.create_deployment(**kwargs)
  1. See CreateDeploymentRequestRequestTypeDef

create_documentation_part#

Creates a documentation part.

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

# create_documentation_part method definition

def create_documentation_part(
    self,
    *,
    restApiId: str,
    location: DocumentationPartLocationTypeDef,  # (1)
    properties: str,
) -> DocumentationPartResponseTypeDef:  # (2)
    ...
  1. See DocumentationPartLocationTypeDef
  2. See DocumentationPartResponseTypeDef
# create_documentation_part method usage example with argument unpacking

kwargs: CreateDocumentationPartRequestRequestTypeDef = {  # (1)
    "restApiId": ...,
    "location": ...,
    "properties": ...,
}

parent.create_documentation_part(**kwargs)
  1. See CreateDocumentationPartRequestRequestTypeDef

create_documentation_version#

Creates a documentation version See also: AWS API Documentation.

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

# create_documentation_version method definition

def create_documentation_version(
    self,
    *,
    restApiId: str,
    documentationVersion: str,
    stageName: str = ...,
    description: str = ...,
) -> DocumentationVersionResponseTypeDef:  # (1)
    ...
  1. See DocumentationVersionResponseTypeDef
# create_documentation_version method usage example with argument unpacking

kwargs: CreateDocumentationVersionRequestRequestTypeDef = {  # (1)
    "restApiId": ...,
    "documentationVersion": ...,
}

parent.create_documentation_version(**kwargs)
  1. See CreateDocumentationVersionRequestRequestTypeDef

create_domain_name#

Creates a new domain name.

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

# create_domain_name method definition

def create_domain_name(
    self,
    *,
    domainName: str,
    certificateName: str = ...,
    certificateBody: str = ...,
    certificatePrivateKey: str = ...,
    certificateChain: str = ...,
    certificateArn: str = ...,
    regionalCertificateName: str = ...,
    regionalCertificateArn: str = ...,
    endpointConfiguration: EndpointConfigurationTypeDef = ...,  # (1)
    tags: Mapping[str, str] = ...,
    securityPolicy: SecurityPolicyType = ...,  # (2)
    mutualTlsAuthentication: MutualTlsAuthenticationInputTypeDef = ...,  # (3)
    ownershipVerificationCertificateArn: str = ...,
) -> DomainNameResponseTypeDef:  # (4)
    ...
  1. See EndpointConfigurationTypeDef
  2. See SecurityPolicyType
  3. See MutualTlsAuthenticationInputTypeDef
  4. See DomainNameResponseTypeDef
# create_domain_name method usage example with argument unpacking

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

parent.create_domain_name(**kwargs)
  1. See