Skip to content

AppSyncClient#

Index > AppSync > AppSyncClient

Auto-generated documentation for AppSync type annotations stubs module mypy-boto3-appsync.

AppSyncClient#

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

# AppSyncClient usage example

from boto3.session import Session
from mypy_boto3_appsync.client import AppSyncClient

def get_appsync_client() -> AppSyncClient:
    return Session().client("appsync")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("appsync")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ApiKeyLimitExceededException,
    client.exceptions.ApiKeyValidityOutOfBoundsException,
    client.exceptions.ApiLimitExceededException,
    client.exceptions.BadRequestException,
    client.exceptions.ClientError,
    client.exceptions.ConcurrentModificationException,
    client.exceptions.GraphQLSchemaException,
    client.exceptions.InternalFailureException,
    client.exceptions.LimitExceededException,
    client.exceptions.NotFoundException,
    client.exceptions.UnauthorizedException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_appsync.client import Exceptions

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

Methods#

associate_api#

Maps an endpoint to your custom domain.

Type annotations and code completion for boto3.client("appsync").associate_api method. boto3 documentation

# associate_api method definition

def associate_api(
    self,
    *,
    domainName: str,
    apiId: str,
) -> AssociateApiResponseTypeDef:  # (1)
    ...
  1. See AssociateApiResponseTypeDef
# associate_api method usage example with argument unpacking

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

parent.associate_api(**kwargs)
  1. See AssociateApiRequestRequestTypeDef

associate_merged_graphql_api#

Creates an association between a Merged API and source API using the source API's identifier.

Type annotations and code completion for boto3.client("appsync").associate_merged_graphql_api method. boto3 documentation

# associate_merged_graphql_api method definition

def associate_merged_graphql_api(
    self,
    *,
    sourceApiIdentifier: str,
    mergedApiIdentifier: str,
    description: str = ...,
    sourceApiAssociationConfig: SourceApiAssociationConfigTypeDef = ...,  # (1)
) -> AssociateMergedGraphqlApiResponseTypeDef:  # (2)
    ...
  1. See SourceApiAssociationConfigTypeDef
  2. See AssociateMergedGraphqlApiResponseTypeDef
# associate_merged_graphql_api method usage example with argument unpacking

kwargs: AssociateMergedGraphqlApiRequestRequestTypeDef = {  # (1)
    "sourceApiIdentifier": ...,
    "mergedApiIdentifier": ...,
}

parent.associate_merged_graphql_api(**kwargs)
  1. See AssociateMergedGraphqlApiRequestRequestTypeDef

associate_source_graphql_api#

Creates an association between a Merged API and source API using the Merged API's identifier.

Type annotations and code completion for boto3.client("appsync").associate_source_graphql_api method. boto3 documentation

# associate_source_graphql_api method definition

def associate_source_graphql_api(
    self,
    *,
    mergedApiIdentifier: str,
    sourceApiIdentifier: str,
    description: str = ...,
    sourceApiAssociationConfig: SourceApiAssociationConfigTypeDef = ...,  # (1)
) -> AssociateSourceGraphqlApiResponseTypeDef:  # (2)
    ...
  1. See SourceApiAssociationConfigTypeDef
  2. See AssociateSourceGraphqlApiResponseTypeDef
# associate_source_graphql_api method usage example with argument unpacking

kwargs: AssociateSourceGraphqlApiRequestRequestTypeDef = {  # (1)
    "mergedApiIdentifier": ...,
    "sourceApiIdentifier": ...,
}

parent.associate_source_graphql_api(**kwargs)
  1. See AssociateSourceGraphqlApiRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

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

# close method definition

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

create_api_cache#

Creates a cache for the GraphQL API.

Type annotations and code completion for boto3.client("appsync").create_api_cache method. boto3 documentation

# create_api_cache method definition

def create_api_cache(
    self,
    *,
    apiId: str,
    ttl: int,
    apiCachingBehavior: ApiCachingBehaviorType,  # (1)
    type: ApiCacheTypeType,  # (2)
    transitEncryptionEnabled: bool = ...,
    atRestEncryptionEnabled: bool = ...,
    healthMetricsConfig: CacheHealthMetricsConfigType = ...,  # (3)
) -> CreateApiCacheResponseTypeDef:  # (4)
    ...
  1. See ApiCachingBehaviorType
  2. See ApiCacheTypeType
  3. See CacheHealthMetricsConfigType
  4. See CreateApiCacheResponseTypeDef
# create_api_cache method usage example with argument unpacking

kwargs: CreateApiCacheRequestRequestTypeDef = {  # (1)
    "apiId": ...,
    "ttl": ...,
    "apiCachingBehavior": ...,
    "type": ...,
}

parent.create_api_cache(**kwargs)
  1. See CreateApiCacheRequestRequestTypeDef

create_api_key#

Creates a unique key that you can distribute to clients who invoke your API.

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

# create_api_key method definition

def create_api_key(
    self,
    *,
    apiId: str,
    description: str = ...,
    expires: int = ...,
) -> CreateApiKeyResponseTypeDef:  # (1)
    ...
  1. See CreateApiKeyResponseTypeDef
# create_api_key method usage example with argument unpacking

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

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

create_data_source#

Creates a DataSource object.

Type annotations and code completion for boto3.client("appsync").create_data_source method. boto3 documentation

# create_data_source method definition

def create_data_source(
    self,
    *,
    apiId: str,
    name: str,
    type: DataSourceTypeType,  # (1)
    description: str = ...,
    serviceRoleArn: str = ...,
    dynamodbConfig: DynamodbDataSourceConfigTypeDef = ...,  # (2)
    lambdaConfig: LambdaDataSourceConfigTypeDef = ...,  # (3)
    elasticsearchConfig: ElasticsearchDataSourceConfigTypeDef = ...,  # (4)
    openSearchServiceConfig: OpenSearchServiceDataSourceConfigTypeDef = ...,  # (5)
    httpConfig: HttpDataSourceConfigTypeDef = ...,  # (6)
    relationalDatabaseConfig: RelationalDatabaseDataSourceConfigTypeDef = ...,  # (7)
    eventBridgeConfig: EventBridgeDataSourceConfigTypeDef = ...,  # (8)
    metricsConfig: DataSourceLevelMetricsConfigType = ...,  # (9)
) -> CreateDataSourceResponseTypeDef:  # (10)
    ...
  1. See DataSourceTypeType
  2. See DynamodbDataSourceConfigTypeDef <