Skip to content

ApiGatewayV2Client#

Index > ApiGatewayV2 > ApiGatewayV2Client

Auto-generated documentation for ApiGatewayV2 type annotations stubs module mypy-boto3-apigatewayv2.

ApiGatewayV2Client#

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

# ApiGatewayV2Client usage example

from boto3.session import Session
from mypy_boto3_apigatewayv2.client import ApiGatewayV2Client

def get_apigatewayv2_client() -> ApiGatewayV2Client:
    return Session().client("apigatewayv2")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("apigatewayv2")

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

from mypy_boto3_apigatewayv2.client import Exceptions

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

Methods#

can_paginate#

Check if an operation can be paginated.

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

# close method definition

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

create_api#

Creates an Api resource.

Type annotations and code completion for boto3.client("apigatewayv2").create_api method. boto3 documentation

# create_api method definition

def create_api(
    self,
    *,
    Name: str,
    ProtocolType: ProtocolTypeType,  # (1)
    ApiKeySelectionExpression: str = ...,
    CorsConfiguration: CorsTypeDef = ...,  # (2)
    CredentialsArn: str = ...,
    Description: str = ...,
    DisableSchemaValidation: bool = ...,
    DisableExecuteApiEndpoint: bool = ...,
    RouteKey: str = ...,
    RouteSelectionExpression: str = ...,
    Tags: Mapping[str, str] = ...,
    Target: str = ...,
    Version: str = ...,
) -> CreateApiResponseTypeDef:  # (3)
    ...
  1. See ProtocolTypeType
  2. See CorsTypeDef
  3. See CreateApiResponseTypeDef
# create_api method usage example with argument unpacking

kwargs: CreateApiRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "ProtocolType": ...,
}

parent.create_api(**kwargs)
  1. See CreateApiRequestRequestTypeDef

create_api_mapping#

Creates an API mapping.

Type annotations and code completion for boto3.client("apigatewayv2").create_api_mapping method. boto3 documentation

# create_api_mapping method definition

def create_api_mapping(
    self,
    *,
    ApiId: str,
    DomainName: str,
    Stage: str,
    ApiMappingKey: str = ...,
) -> CreateApiMappingResponseTypeDef:  # (1)
    ...
  1. See CreateApiMappingResponseTypeDef
# create_api_mapping method usage example with argument unpacking

kwargs: CreateApiMappingRequestRequestTypeDef = {  # (1)
    "ApiId": ...,
    "DomainName": ...,
    "Stage": ...,
}

parent.create_api_mapping(**kwargs)
  1. See CreateApiMappingRequestRequestTypeDef

create_authorizer#

Creates an Authorizer for an API.

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

# create_authorizer method definition

def create_authorizer(
    self,
    *,
    ApiId: str,
    AuthorizerType: AuthorizerTypeType,  # (1)
    IdentitySource: Sequence[str],
    Name: str,
    AuthorizerCredentialsArn: str = ...,
    AuthorizerPayloadFormatVersion: str = ...,
    AuthorizerResultTtlInSeconds: int = ...,
    AuthorizerUri: str = ...,
    EnableSimpleResponses: bool = ...,
    IdentityValidationExpression: str = ...,
    JwtConfiguration: JWTConfigurationTypeDef = ...,  # (2)
) -> CreateAuthorizerResponseTypeDef:  # (3)
    ...
  1. See AuthorizerTypeType
  2. See JWTConfigurationTypeDef
  3. See CreateAuthorizerResponseTypeDef
# create_authorizer method usage example with argument unpacking

kwargs: CreateAuthorizerRequestRequestTypeDef = {  # (1)
    "ApiId": ...,
    "AuthorizerType": ...,
    "IdentitySource": ...,
    "Name": ...,
}

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

create_deployment#

Creates a Deployment for an API.

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

# create_deployment method definition

def create_deployment(
    self,
    *,
    ApiId: str,
    Description: str = ...,
    StageName: str = ...,
) -> CreateDeploymentResponseTypeDef:  # (1)
    ...
  1. See CreateDeploymentResponseTypeDef
# create_deployment method usage example with argument unpacking

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

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

create_domain_name#

Creates a domain name.

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

# create_domain_name method definition

def create_domain_name(
    self,
    *,
    DomainName: str,
    DomainNameConfigurations: Sequence[DomainNameConfigurationTypeDef] = ...,  # (1)
    MutualTlsAuthentication: MutualTlsAuthenticationInputTypeDef = ...,  # (2)
    Tags: Mapping[str, str] = ...,
) -> CreateDomainNameResponseTypeDef:  # (3)
    ...
  1. See DomainNameConfigurationTypeDef
  2. See MutualTlsAuthenticationInputTypeDef
  3. See CreateDomainNameResponseTypeDef
# create_domain_name method usage example with argument unpacking

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

parent.create_domain_name(**kwargs)
  1. See CreateDomainNameRequestRequestTypeDef

create_integration#

Creates an Integration.

Type annotations and code completion for boto3.client("apigatewayv2").create_integration method. boto3 documentation

# create_integration method definition

def create_integration(
    self,
    *,
    ApiId: str,
    IntegrationType: IntegrationTypeType,  # (1)
    ConnectionId: str = ...,
    ConnectionType: ConnectionTypeType = ...,  # (2)
    ContentHandlingStrategy: ContentHandlingStrategyType = ...,  # (3)
    CredentialsArn: str = ...,
    Description: str = ...,
    IntegrationMethod: str = ...,
    IntegrationSubtype: str = ...,
    IntegrationUri: str = ...,
    PassthroughBehavior: PassthroughBehaviorType = ...,  # (4)
    PayloadFormatVersion: str = ...,
    RequestParameters: Mapping[str, str] = ...,
    RequestTemplates: Mapping[str, str] = ...,
    ResponseParameters: Mapping[str, Mapping[str, str]] = ...,
    TemplateSelectionExpression: str = ...,
    TimeoutInMillis: int = ...,
    TlsConfig: TlsConfigInputTypeDef = ...,  # (5)
) -> CreateIntegrationResultTypeDef:  # (6)
    ...
  1. See IntegrationTypeType
  2. See ConnectionTypeType
  3. See ContentHandlingStrategyType
  4. See PassthroughBehaviorType
  5. See TlsConfigInputTypeDef
  6. See CreateIntegrationResultTypeDef
# create_integration method usage example with argument unpacking

kwargs: CreateIntegrationRequestRequestTypeDef = {  # (1)
    "ApiId": ...,
    "IntegrationType": ...,
}

parent.create_integration(**kwargs)
  1. See CreateIntegrationRequestRequestTypeDef

create_integration_response#

Creates an IntegrationResponses.

Type annotations and code completion for boto3.client("apigatewayv2").create_integration_response method. boto3 documentation

# create_integration_response method definition

def create_integration_response(
    self,
    *,
    ApiId: str,
    IntegrationId: str,
    IntegrationResponseKey: str,
    ContentHandlingStrategy: ContentHandlingStrategyType = ...,  # (1)
    ResponseParameters: Mapping[str, str] = ...,
    ResponseTemplates: Mapping[str, str] = ...,
    TemplateSelectionExpression: str = ...,
) -> CreateIntegrationResponseResponseTypeDef:  # (2)
    ...
  1. See ContentHandlingStrategyType
  2. See CreateIntegrationResponseResponseTypeDef
# create_integration_response method usage example with argument unpacking

kwargs: CreateIntegrationResponseRequestRequestTypeDef = {  # (1)
    "ApiId": ...,
    "IntegrationId": ...,
    "IntegrationResponseKey": ...,
}

parent.create_integration_response(**kwargs)
  1. See CreateIntegrationResponseRequestRequestTypeDef

create_model#

Creates a Model for an API.

Type annotations and code completion for boto3.client("apigatewayv2").create_model method.