AppSync

Table of Contents

Client

class AppSync.Client

A low-level client representing AWS AppSync

AppSync provides API actions for creating and interacting with data sources using GraphQL from your application.

import boto3

client = boto3.client('appsync')

These are the available methods:

associate_api(**kwargs)

Maps an endpoint to your custom domain.

See also: AWS API Documentation

Request Syntax

response = client.associate_api(
    domainName='string',
    apiId='string'
)
Parameters
  • domainName (string) --

    [REQUIRED]

    The domain name.

  • apiId (string) --

    [REQUIRED]

    The API ID.

Return type

dict

Returns

Response Syntax

{
    'apiAssociation': {
        'domainName': 'string',
        'apiId': 'string',
        'associationStatus': 'PROCESSING'|'FAILED'|'SUCCESS',
        'deploymentDetail': 'string'
    }
}

Response Structure

  • (dict) --

    • apiAssociation (dict) --

      The ApiAssociation object.

      • domainName (string) --

        The domain name.

      • apiId (string) --

        The API ID.

      • associationStatus (string) --

        Identifies the status of an association.

        • PROCESSING : The API association is being created. You cannot modify association requests during processing.
        • SUCCESS : The API association was successful. You can modify associations after success.
        • FAILED : The API association has failed. You can modify associations after failure.
      • deploymentDetail (string) --

        Details about the last deployment status.

Exceptions

  • AppSync.Client.exceptions.AccessDeniedException
  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.InternalFailureException
  • AppSync.Client.exceptions.NotFoundException
can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
create_api_cache(**kwargs)

Creates a cache for the GraphQL API.

See also: AWS API Documentation

Request Syntax

response = client.create_api_cache(
    apiId='string',
    ttl=123,
    transitEncryptionEnabled=True|False,
    atRestEncryptionEnabled=True|False,
    apiCachingBehavior='FULL_REQUEST_CACHING'|'PER_RESOLVER_CACHING',
    type='T2_SMALL'|'T2_MEDIUM'|'R4_LARGE'|'R4_XLARGE'|'R4_2XLARGE'|'R4_4XLARGE'|'R4_8XLARGE'|'SMALL'|'MEDIUM'|'LARGE'|'XLARGE'|'LARGE_2X'|'LARGE_4X'|'LARGE_8X'|'LARGE_12X'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The GraphQL API ID.

  • ttl (integer) --

    [REQUIRED]

    TTL in seconds for cache entries.

    Valid values are 1–3,600 seconds.

  • transitEncryptionEnabled (boolean) -- Transit encryption flag when connecting to cache. You cannot update this setting after creation.
  • atRestEncryptionEnabled (boolean) -- At-rest encryption flag for cache. You cannot update this setting after creation.
  • apiCachingBehavior (string) --

    [REQUIRED]

    Caching behavior.

    • FULL_REQUEST_CACHING : All requests are fully cached.
    • PER_RESOLVER_CACHING : Individual resolvers that you specify are cached.
  • type (string) --

    [REQUIRED]

    The cache instance type. Valid values are

    • SMALL
    • MEDIUM
    • LARGE
    • XLARGE
    • LARGE_2X
    • LARGE_4X
    • LARGE_8X (not available in all regions)
    • LARGE_12X

    Historically, instance types were identified by an EC2-style value. As of July 2020, this is deprecated, and the generic identifiers above should be used.

    The following legacy instance types are available, but their use is discouraged:

    • T2_SMALL : A t2.small instance type.
    • T2_MEDIUM : A t2.medium instance type.
    • R4_LARGE : A r4.large instance type.
    • R4_XLARGE : A r4.xlarge instance type.
    • R4_2XLARGE : A r4.2xlarge instance type.
    • R4_4XLARGE : A r4.4xlarge instance type.
    • R4_8XLARGE : A r4.8xlarge instance type.
Return type

dict

Returns

Response Syntax

{
    'apiCache': {
        'ttl': 123,
        'apiCachingBehavior': 'FULL_REQUEST_CACHING'|'PER_RESOLVER_CACHING',
        'transitEncryptionEnabled': True|False,
        'atRestEncryptionEnabled': True|False,
        'type': 'T2_SMALL'|'T2_MEDIUM'|'R4_LARGE'|'R4_XLARGE'|'R4_2XLARGE'|'R4_4XLARGE'|'R4_8XLARGE'|'SMALL'|'MEDIUM'|'LARGE'|'XLARGE'|'LARGE_2X'|'LARGE_4X'|'LARGE_8X'|'LARGE_12X',
        'status': 'AVAILABLE'|'CREATING'|'DELETING'|'MODIFYING'|'FAILED'
    }
}

Response Structure

  • (dict) --

    Represents the output of a CreateApiCache operation.

    • apiCache (dict) --

      The ApiCache object.

      • ttl (integer) --

        TTL in seconds for cache entries.

        Valid values are 1–3,600 seconds.

      • apiCachingBehavior (string) --

        Caching behavior.

        • FULL_REQUEST_CACHING : All requests are fully cached.
        • PER_RESOLVER_CACHING : Individual resolvers that you specify are cached.
      • transitEncryptionEnabled (boolean) --

        Transit encryption flag when connecting to cache. You cannot update this setting after creation.

      • atRestEncryptionEnabled (boolean) --

        At-rest encryption flag for cache. You cannot update this setting after creation.

      • type (string) --

        The cache instance type. Valid values are

        • SMALL
        • MEDIUM
        • LARGE
        • XLARGE
        • LARGE_2X
        • LARGE_4X
        • LARGE_8X (not available in all regions)
        • LARGE_12X

        Historically, instance types were identified by an EC2-style value. As of July 2020, this is deprecated, and the generic identifiers above should be used.

        The following legacy instance types are available, but their use is discouraged:

        • T2_SMALL : A t2.small instance type.
        • T2_MEDIUM : A t2.medium instance type.
        • R4_LARGE : A r4.large instance type.
        • R4_XLARGE : A r4.xlarge instance type.
        • R4_2XLARGE : A r4.2xlarge instance type.
        • R4_4XLARGE : A r4.4xlarge instance type.
        • R4_8XLARGE : A r4.8xlarge instance type.
      • status (string) --

        The cache instance status.

        • AVAILABLE : The instance is available for use.
        • CREATING : The instance is currently creating.
        • DELETING : The instance is currently deleting.
        • MODIFYING : The instance is currently modifying.
        • FAILED : The instance has failed creation.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
create_api_key(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.create_api_key(
    apiId='string',
    description='string',
    expires=123
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The ID for your GraphQL API.

  • description (string) -- A description of the purpose of the API key.
  • expires (integer) -- From the creation time, the time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour. The default value for this parameter is 7 days from creation time. For more information, see .
Return type

dict

Returns

Response Syntax

{
    'apiKey': {
        'id': 'string',
        'description': 'string',
        'expires': 123,
        'deletes': 123
    }
}

Response Structure

  • (dict) --

    • apiKey (dict) --

      The API key.

      • id (string) --

        The API key ID.

      • description (string) --

        A description of the purpose of the API key.

      • expires (integer) --

        The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.

      • deletes (integer) --

        The time after which the API key is deleted. The date is represented as seconds since the epoch, rounded down to the nearest hour.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.LimitExceededException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.LimitExceededException
  • AppSync.Client.exceptions.InternalFailureException
  • AppSync.Client.exceptions.ApiKeyLimitExceededException
  • AppSync.Client.exceptions.ApiKeyValidityOutOfBoundsException
create_data_source(**kwargs)

Creates a DataSource object.

See also: AWS API Documentation

Request Syntax

response = client.create_data_source(
    apiId='string',
    name='string',
    description='string',
    type='AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP'|'RELATIONAL_DATABASE'|'AMAZON_OPENSEARCH_SERVICE',
    serviceRoleArn='string',
    dynamodbConfig={
        'tableName': 'string',
        'awsRegion': 'string',
        'useCallerCredentials': True|False,
        'deltaSyncConfig': {
            'baseTableTTL': 123,
            'deltaSyncTableName': 'string',
            'deltaSyncTableTTL': 123
        },
        'versioned': True|False
    },
    lambdaConfig={
        'lambdaFunctionArn': 'string'
    },
    elasticsearchConfig={
        'endpoint': 'string',
        'awsRegion': 'string'
    },
    openSearchServiceConfig={
        'endpoint': 'string',
        'awsRegion': 'string'
    },
    httpConfig={
        'endpoint': 'string',
        'authorizationConfig': {
            'authorizationType': 'AWS_IAM',
            'awsIamConfig': {
                'signingRegion': 'string',
                'signingServiceName': 'string'
            }
        }
    },
    relationalDatabaseConfig={
        'relationalDatabaseSourceType': 'RDS_HTTP_ENDPOINT',
        'rdsHttpEndpointConfig': {
            'awsRegion': 'string',
            'dbClusterIdentifier': 'string',
            'databaseName': 'string',
            'schema': 'string',
            'awsSecretStoreArn': 'string'
        }
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID for the GraphQL API for the DataSource .

  • name (string) --

    [REQUIRED]

    A user-supplied name for the DataSource .

  • description (string) -- A description of the DataSource .
  • type (string) --

    [REQUIRED]

    The type of the DataSource .

  • serviceRoleArn (string) -- The Identity and Access Management (IAM) service role Amazon Resource Name (ARN) for the data source. The system assumes this role when accessing the data source.
  • dynamodbConfig (dict) --

    Amazon DynamoDB settings.

    • tableName (string) -- [REQUIRED]

      The table name.

    • awsRegion (string) -- [REQUIRED]

      The Amazon Web Services Region.

    • useCallerCredentials (boolean) --

      Set to TRUE to use Amazon Cognito credentials with this data source.

    • deltaSyncConfig (dict) --

      The DeltaSyncConfig for a versioned data source.

      • baseTableTTL (integer) --

        The number of minutes that an Item is stored in the data source.

      • deltaSyncTableName (string) --

        The Delta Sync table name.

      • deltaSyncTableTTL (integer) --

        The number of minutes that a Delta Sync log entry is stored in the Delta Sync table.

    • versioned (boolean) --

      Set to TRUE to use Conflict Detection and Resolution with this data source.

  • lambdaConfig (dict) --

    Lambda settings.

    • lambdaFunctionArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) for the Lambda function.

  • elasticsearchConfig (dict) --

    Amazon OpenSearch Service settings.

    As of September 2021, Amazon Elasticsearch service is Amazon OpenSearch Service. This configuration is deprecated. For new data sources, use CreateDataSourceRequest$openSearchServiceConfig to create an OpenSearch data source.

    • endpoint (string) -- [REQUIRED]

      The endpoint.

    • awsRegion (string) -- [REQUIRED]

      The Amazon Web Services Region.

  • openSearchServiceConfig (dict) --

    Amazon OpenSearch Service settings.

    • endpoint (string) -- [REQUIRED]

      The endpoint.

    • awsRegion (string) -- [REQUIRED]

      The Amazon Web Services Region.

  • httpConfig (dict) --

    HTTP endpoint settings.

    • endpoint (string) --

      The HTTP URL endpoint. You can specify either the domain name or IP, and port combination, and the URL scheme must be HTTP or HTTPS. If you don't specify the port, AppSync uses the default port 80 for the HTTP endpoint and port 443 for HTTPS endpoints.

    • authorizationConfig (dict) --

      The authorization configuration in case the HTTP endpoint requires authorization.

      • authorizationType (string) -- [REQUIRED]

        The authorization type that the HTTP endpoint requires.

        • AWS_IAM : The authorization type is Signature Version 4 (SigV4).
      • awsIamConfig (dict) --

        The Identity and Access Management (IAM) settings.

        • signingRegion (string) --

          The signing Amazon Web Services Region for IAM authorization.

        • signingServiceName (string) --

          The signing service name for IAM authorization.

  • relationalDatabaseConfig (dict) --

    Relational database settings.

    • relationalDatabaseSourceType (string) --

      Source type for the relational database.

      • RDS_HTTP_ENDPOINT : The relational database source type is an Amazon Relational Database Service (Amazon RDS) HTTP endpoint.
    • rdsHttpEndpointConfig (dict) --

      Amazon RDS HTTP endpoint settings.

      • awsRegion (string) --

        Amazon Web Services Region for Amazon RDS HTTP endpoint.

      • dbClusterIdentifier (string) --

        Amazon RDS cluster Amazon Resource Name (ARN).

      • databaseName (string) --

        Logical database name.

      • schema (string) --

        Logical schema name.

      • awsSecretStoreArn (string) --

        Amazon Web Services secret store Amazon Resource Name (ARN) for database credentials.

Return type

dict

Returns

Response Syntax

{
    'dataSource': {
        'dataSourceArn': 'string',
        'name': 'string',
        'description': 'string',
        'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP'|'RELATIONAL_DATABASE'|'AMAZON_OPENSEARCH_SERVICE',
        'serviceRoleArn': 'string',
        'dynamodbConfig': {
            'tableName': 'string',
            'awsRegion': 'string',
            'useCallerCredentials': True|False,
            'deltaSyncConfig': {
                'baseTableTTL': 123,
                'deltaSyncTableName': 'string',
                'deltaSyncTableTTL': 123
            },
            'versioned': True|False
        },
        'lambdaConfig': {
            'lambdaFunctionArn': 'string'
        },
        'elasticsearchConfig': {
            'endpoint': 'string',
            'awsRegion': 'string'
        },
        'openSearchServiceConfig': {
            'endpoint': 'string',
            'awsRegion': 'string'
        },
        'httpConfig': {
            'endpoint': 'string',
            'authorizationConfig': {
                'authorizationType': 'AWS_IAM',
                'awsIamConfig': {
                    'signingRegion': 'string',
                    'signingServiceName': 'string'
                }
            }
        },
        'relationalDatabaseConfig': {
            'relationalDatabaseSourceType': 'RDS_HTTP_ENDPOINT',
            'rdsHttpEndpointConfig': {
                'awsRegion': 'string',
                'dbClusterIdentifier': 'string',
                'databaseName': 'string',
                'schema': 'string',
                'awsSecretStoreArn': 'string'
            }
        }
    }
}

Response Structure

  • (dict) --

    • dataSource (dict) --

      The DataSource object.

      • dataSourceArn (string) --

        The data source Amazon Resource Name (ARN).

      • name (string) --

        The name of the data source.

      • description (string) --

        The description of the data source.

      • type (string) --

        The type of the data source.

        • AWS_LAMBDA : The data source is an Lambda function.
        • AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table.
        • AMAZON_ELASTICSEARCH : The data source is an Amazon OpenSearch Service domain.
        • AMAZON_OPENSEARCH_SERVICE : The data source is an Amazon OpenSearch Service domain.
        • NONE : There is no data source. Use this type when you want to invoke a GraphQL operation without connecting to a data source, such as when you're performing data transformation with resolvers or invoking a subscription from a mutation.
        • HTTP : The data source is an HTTP endpoint.
        • RELATIONAL_DATABASE : The data source is a relational database.
      • serviceRoleArn (string) --

        The Identity and Access Management (IAM) service role Amazon Resource Name (ARN) for the data source. The system assumes this role when accessing the data source.

      • dynamodbConfig (dict) --

        DynamoDB settings.

        • tableName (string) --

          The table name.

        • awsRegion (string) --

          The Amazon Web Services Region.

        • useCallerCredentials (boolean) --

          Set to TRUE to use Amazon Cognito credentials with this data source.

        • deltaSyncConfig (dict) --

          The DeltaSyncConfig for a versioned data source.

          • baseTableTTL (integer) --

            The number of minutes that an Item is stored in the data source.

          • deltaSyncTableName (string) --

            The Delta Sync table name.

          • deltaSyncTableTTL (integer) --

            The number of minutes that a Delta Sync log entry is stored in the Delta Sync table.

        • versioned (boolean) --

          Set to TRUE to use Conflict Detection and Resolution with this data source.

      • lambdaConfig (dict) --

        Lambda settings.

        • lambdaFunctionArn (string) --

          The Amazon Resource Name (ARN) for the Lambda function.

      • elasticsearchConfig (dict) --

        Amazon OpenSearch Service settings.

        • endpoint (string) --

          The endpoint.

        • awsRegion (string) --

          The Amazon Web Services Region.

      • openSearchServiceConfig (dict) --

        Amazon OpenSearch Service settings.

        • endpoint (string) --

          The endpoint.

        • awsRegion (string) --

          The Amazon Web Services Region.

      • httpConfig (dict) --

        HTTP endpoint settings.

        • endpoint (string) --

          The HTTP URL endpoint. You can specify either the domain name or IP, and port combination, and the URL scheme must be HTTP or HTTPS. If you don't specify the port, AppSync uses the default port 80 for the HTTP endpoint and port 443 for HTTPS endpoints.

        • authorizationConfig (dict) --

          The authorization configuration in case the HTTP endpoint requires authorization.

          • authorizationType (string) --

            The authorization type that the HTTP endpoint requires.

            • AWS_IAM : The authorization type is Signature Version 4 (SigV4).
          • awsIamConfig (dict) --

            The Identity and Access Management (IAM) settings.

            • signingRegion (string) --

              The signing Amazon Web Services Region for IAM authorization.

            • signingServiceName (string) --

              The signing service name for IAM authorization.

      • relationalDatabaseConfig (dict) --

        Relational database settings.

        • relationalDatabaseSourceType (string) --

          Source type for the relational database.

          • RDS_HTTP_ENDPOINT : The relational database source type is an Amazon Relational Database Service (Amazon RDS) HTTP endpoint.
        • rdsHttpEndpointConfig (dict) --

          Amazon RDS HTTP endpoint settings.

          • awsRegion (string) --

            Amazon Web Services Region for Amazon RDS HTTP endpoint.

          • dbClusterIdentifier (string) --

            Amazon RDS cluster Amazon Resource Name (ARN).

          • databaseName (string) --

            Logical database name.

          • schema (string) --

            Logical schema name.

          • awsSecretStoreArn (string) --

            Amazon Web Services secret store Amazon Resource Name (ARN) for database credentials.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
create_domain_name(**kwargs)

Creates a custom DomainName object.

See also: AWS API Documentation

Request Syntax

response = client.create_domain_name(
    domainName='string',
    certificateArn='string',
    description='string'
)
Parameters
  • domainName (string) --

    [REQUIRED]

    The domain name.

  • certificateArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate.

  • description (string) -- A description of the DomainName .
Return type

dict

Returns

Response Syntax

{
    'domainNameConfig': {
        'domainName': 'string',
        'description': 'string',
        'certificateArn': 'string',
        'appsyncDomainName': 'string',
        'hostedZoneId': 'string'
    }
}

Response Structure

  • (dict) --

    • domainNameConfig (dict) --

      The configuration for the DomainName .

      • domainName (string) --

        The domain name.

      • description (string) --

        A description of the DomainName configuration.

      • certificateArn (string) --

        The Amazon Resource Name (ARN) of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate.

      • appsyncDomainName (string) --

        The domain name that AppSync provides.

      • hostedZoneId (string) --

        The ID of your Amazon Route 53 hosted zone.

Exceptions

  • AppSync.Client.exceptions.AccessDeniedException
  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.InternalFailureException
create_function(**kwargs)

Creates a Function object.

A function is a reusable entity. You can use multiple functions to compose the resolver logic.

See also: AWS API Documentation

Request Syntax

response = client.create_function(
    apiId='string',
    name='string',
    description='string',
    dataSourceName='string',
    requestMappingTemplate='string',
    responseMappingTemplate='string',
    functionVersion='string',
    syncConfig={
        'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
        'conflictDetection': 'VERSION'|'NONE',
        'lambdaConflictHandlerConfig': {
            'lambdaConflictHandlerArn': 'string'
        }
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The GraphQL API ID.

  • name (string) --

    [REQUIRED]

    The Function name. The function name does not have to be unique.

  • description (string) -- The Function description.
  • dataSourceName (string) --

    [REQUIRED]

    The Function DataSource name.

  • requestMappingTemplate (string) -- The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
  • responseMappingTemplate (string) -- The Function response mapping template.
  • functionVersion (string) --

    [REQUIRED]

    The version of the request mapping template. Currently, the supported value is 2018-05-29.

  • syncConfig (dict) --

    Describes a Sync configuration for a resolver.

    Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.

    • conflictHandler (string) --

      The Conflict Resolution strategy to perform in the event of a conflict.

      • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
      • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
      • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
    • conflictDetection (string) --

      The Conflict Detection strategy to use.

      • VERSION : Detect conflicts based on object versions for this resolver.
      • NONE : Do not detect conflicts when invoking this resolver.
    • lambdaConflictHandlerConfig (dict) --

      The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

      • lambdaConflictHandlerArn (string) --

        The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

Return type

dict

Returns

Response Syntax

{
    'functionConfiguration': {
        'functionId': 'string',
        'functionArn': 'string',
        'name': 'string',
        'description': 'string',
        'dataSourceName': 'string',
        'requestMappingTemplate': 'string',
        'responseMappingTemplate': 'string',
        'functionVersion': 'string',
        'syncConfig': {
            'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
            'conflictDetection': 'VERSION'|'NONE',
            'lambdaConflictHandlerConfig': {
                'lambdaConflictHandlerArn': 'string'
            }
        }
    }
}

Response Structure

  • (dict) --

    • functionConfiguration (dict) --

      The Function object.

      • functionId (string) --

        A unique ID representing the Function object.

      • functionArn (string) --

        The Amazon Resource Name (ARN) of the Function object.

      • name (string) --

        The name of the Function object.

      • description (string) --

        The Function description.

      • dataSourceName (string) --

        The name of the DataSource .

      • requestMappingTemplate (string) --

        The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.

      • responseMappingTemplate (string) --

        The Function response mapping template.

      • functionVersion (string) --

        The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.

      • syncConfig (dict) --

        Describes a Sync configuration for a resolver.

        Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.

        • conflictHandler (string) --

          The Conflict Resolution strategy to perform in the event of a conflict.

          • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
          • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
          • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
        • conflictDetection (string) --

          The Conflict Detection strategy to use.

          • VERSION : Detect conflicts based on object versions for this resolver.
          • NONE : Do not detect conflicts when invoking this resolver.
        • lambdaConflictHandlerConfig (dict) --

          The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

          • lambdaConflictHandlerArn (string) --

            The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

Exceptions

  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
create_graphql_api(**kwargs)

Creates a GraphqlApi object.

See also: AWS API Documentation

Request Syntax

response = client.create_graphql_api(
    name='string',
    logConfig={
        'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
        'cloudWatchLogsRoleArn': 'string',
        'excludeVerboseContent': True|False
    },
    authenticationType='API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT'|'AWS_LAMBDA',
    userPoolConfig={
        'userPoolId': 'string',
        'awsRegion': 'string',
        'defaultAction': 'ALLOW'|'DENY',
        'appIdClientRegex': 'string'
    },
    openIDConnectConfig={
        'issuer': 'string',
        'clientId': 'string',
        'iatTTL': 123,
        'authTTL': 123
    },
    tags={
        'string': 'string'
    },
    additionalAuthenticationProviders=[
        {
            'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT'|'AWS_LAMBDA',
            'openIDConnectConfig': {
                'issuer': 'string',
                'clientId': 'string',
                'iatTTL': 123,
                'authTTL': 123
            },
            'userPoolConfig': {
                'userPoolId': 'string',
                'awsRegion': 'string',
                'appIdClientRegex': 'string'
            },
            'lambdaAuthorizerConfig': {
                'authorizerResultTtlInSeconds': 123,
                'authorizerUri': 'string',
                'identityValidationExpression': 'string'
            }
        },
    ],
    xrayEnabled=True|False,
    lambdaAuthorizerConfig={
        'authorizerResultTtlInSeconds': 123,
        'authorizerUri': 'string',
        'identityValidationExpression': 'string'
    }
)
Parameters
  • name (string) --

    [REQUIRED]

    A user-supplied name for the GraphqlApi .

  • logConfig (dict) --

    The Amazon CloudWatch Logs configuration.

    • fieldLogLevel (string) -- [REQUIRED]

      The field logging level. Values can be NONE, ERROR, or ALL.

      • NONE : No field-level logs are captured.
      • ERROR : Logs the following information only for the fields that are in error:
        • The error section in the server response.
        • Field-level errors.
        • The generated request/response functions that got resolved for error fields.
      • ALL : The following information is logged for all fields in the query:
        • Field-level tracing information.
        • The generated request/response functions that got resolved for each field.
    • cloudWatchLogsRoleArn (string) -- [REQUIRED]

      The service role that AppSync assumes to publish to CloudWatch logs in your account.

    • excludeVerboseContent (boolean) --

      Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level.

  • authenticationType (string) --

    [REQUIRED]

    The authentication type: API key, Identity and Access Management (IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or Lambda.

  • userPoolConfig (dict) --

    The Amazon Cognito user pool configuration.

    • userPoolId (string) -- [REQUIRED]

      The user pool ID.

    • awsRegion (string) -- [REQUIRED]

      The Amazon Web Services Region in which the user pool was created.

    • defaultAction (string) -- [REQUIRED]

      The action that you want your GraphQL API to take when a request that uses Amazon Cognito user pool authentication doesn't match the Amazon Cognito user pool configuration.

    • appIdClientRegex (string) --

      A regular expression for validating the incoming Amazon Cognito user pool app client ID.

  • openIDConnectConfig (dict) --

    The OIDC configuration.

    • issuer (string) -- [REQUIRED]

      The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

    • clientId (string) --

      The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

    • iatTTL (integer) --

      The number of milliseconds that a token is valid after it's issued to a user.

    • authTTL (integer) --

      The number of milliseconds that a token is valid after being authenticated.

  • tags (dict) --

    A TagMap object.

    • (string) --

      The key for the tag.

      • (string) --

        The value for the tag.

  • additionalAuthenticationProviders (list) --

    A list of additional authentication providers for the GraphqlApi API.

    • (dict) --

      Describes an additional authentication provider.

      • authenticationType (string) --

        The authentication type: API key, Identity and Access Management (IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or Lambda.

      • openIDConnectConfig (dict) --

        The OIDC configuration.

        • issuer (string) -- [REQUIRED]

          The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

        • clientId (string) --

          The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

        • iatTTL (integer) --

          The number of milliseconds that a token is valid after it's issued to a user.

        • authTTL (integer) --

          The number of milliseconds that a token is valid after being authenticated.

      • userPoolConfig (dict) --

        The Amazon Cognito user pool configuration.

        • userPoolId (string) -- [REQUIRED]

          The user pool ID.

        • awsRegion (string) -- [REQUIRED]

          The Amazon Web Services Region in which the user pool was created.

        • appIdClientRegex (string) --

          A regular expression for validating the incoming Amazon Cognito user pool app client ID.

      • lambdaAuthorizerConfig (dict) --

        Configuration for Lambda function authorization.

        • authorizerResultTtlInSeconds (integer) --

          The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

        • authorizerUri (string) -- [REQUIRED]

          The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3 ), or an alias ARN.

          Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

          aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

        • identityValidationExpression (string) --

          A regular expression for validation of tokens before the Lambda function is called.

  • xrayEnabled (boolean) -- A flag indicating whether to use X-Ray tracing for the GraphqlApi .
  • lambdaAuthorizerConfig (dict) --

    Configuration for Lambda function authorization.

    • authorizerResultTtlInSeconds (integer) --

      The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

    • authorizerUri (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3 ), or an alias ARN.

      Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

      aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

    • identityValidationExpression (string) --

      A regular expression for validation of tokens before the Lambda function is called.

Return type

dict

Returns

Response Syntax

{
    'graphqlApi': {
        'name': 'string',
        'apiId': 'string',
        'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT'|'AWS_LAMBDA',
        'logConfig': {
            'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
            'cloudWatchLogsRoleArn': 'string',
            'excludeVerboseContent': True|False
        },
        'userPoolConfig': {
            'userPoolId': 'string',
            'awsRegion': 'string',
            'defaultAction': 'ALLOW'|'DENY',
            'appIdClientRegex': 'string'
        },
        'openIDConnectConfig': {
            'issuer': 'string',
            'clientId': 'string',
            'iatTTL': 123,
            'authTTL': 123
        },
        'arn': 'string',
        'uris': {
            'string': 'string'
        },
        'tags': {
            'string': 'string'
        },
        'additionalAuthenticationProviders': [
            {
                'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT'|'AWS_LAMBDA',
                'openIDConnectConfig': {
                    'issuer': 'string',
                    'clientId': 'string',
                    'iatTTL': 123,
                    'authTTL': 123
                },
                'userPoolConfig': {
                    'userPoolId': 'string',
                    'awsRegion': 'string',
                    'appIdClientRegex': 'string'
                },
                'lambdaAuthorizerConfig': {
                    'authorizerResultTtlInSeconds': 123,
                    'authorizerUri': 'string',
                    'identityValidationExpression': 'string'
                }
            },
        ],
        'xrayEnabled': True|False,
        'wafWebAclArn': 'string',
        'lambdaAuthorizerConfig': {
            'authorizerResultTtlInSeconds': 123,
            'authorizerUri': 'string',
            'identityValidationExpression': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • graphqlApi (dict) --

      The GraphqlApi .

      • name (string) --

        The API name.

      • apiId (string) --

        The API ID.

      • authenticationType (string) --

        The authentication type.

      • logConfig (dict) --

        The Amazon CloudWatch Logs configuration.

        • fieldLogLevel (string) --

          The field logging level. Values can be NONE, ERROR, or ALL.

          • NONE : No field-level logs are captured.
          • ERROR : Logs the following information only for the fields that are in error:
            • The error section in the server response.
            • Field-level errors.
            • The generated request/response functions that got resolved for error fields.
          • ALL : The following information is logged for all fields in the query:
            • Field-level tracing information.
            • The generated request/response functions that got resolved for each field.
        • cloudWatchLogsRoleArn (string) --

          The service role that AppSync assumes to publish to CloudWatch logs in your account.

        • excludeVerboseContent (boolean) --

          Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level.

      • userPoolConfig (dict) --

        The Amazon Cognito user pool configuration.

        • userPoolId (string) --

          The user pool ID.

        • awsRegion (string) --

          The Amazon Web Services Region in which the user pool was created.

        • defaultAction (string) --

          The action that you want your GraphQL API to take when a request that uses Amazon Cognito user pool authentication doesn't match the Amazon Cognito user pool configuration.

        • appIdClientRegex (string) --

          A regular expression for validating the incoming Amazon Cognito user pool app client ID.

      • openIDConnectConfig (dict) --

        The OpenID Connect configuration.

        • issuer (string) --

          The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

        • clientId (string) --

          The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

        • iatTTL (integer) --

          The number of milliseconds that a token is valid after it's issued to a user.

        • authTTL (integer) --

          The number of milliseconds that a token is valid after being authenticated.

      • arn (string) --

        The Amazon Resource Name (ARN).

      • uris (dict) --

        The URIs.

        • (string) --
          • (string) --
      • tags (dict) --

        The tags.

        • (string) --

          The key for the tag.

          • (string) --

            The value for the tag.

      • additionalAuthenticationProviders (list) --

        A list of additional authentication providers for the GraphqlApi API.

        • (dict) --

          Describes an additional authentication provider.

          • authenticationType (string) --

            The authentication type: API key, Identity and Access Management (IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or Lambda.

          • openIDConnectConfig (dict) --

            The OIDC configuration.

            • issuer (string) --

              The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

            • clientId (string) --

              The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

            • iatTTL (integer) --

              The number of milliseconds that a token is valid after it's issued to a user.

            • authTTL (integer) --

              The number of milliseconds that a token is valid after being authenticated.

          • userPoolConfig (dict) --

            The Amazon Cognito user pool configuration.

            • userPoolId (string) --

              The user pool ID.

            • awsRegion (string) --

              The Amazon Web Services Region in which the user pool was created.

            • appIdClientRegex (string) --

              A regular expression for validating the incoming Amazon Cognito user pool app client ID.

          • lambdaAuthorizerConfig (dict) --

            Configuration for Lambda function authorization.

            • authorizerResultTtlInSeconds (integer) --

              The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

            • authorizerUri (string) --

              The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3 ), or an alias ARN.

              Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

              aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

            • identityValidationExpression (string) --

              A regular expression for validation of tokens before the Lambda function is called.

      • xrayEnabled (boolean) --

        A flag indicating whether to use X-Ray tracing for this GraphqlApi .

      • wafWebAclArn (string) --

        The ARN of the WAF access control list (ACL) associated with this GraphqlApi , if one exists.

      • lambdaAuthorizerConfig (dict) --

        Configuration for Lambda function authorization.

        • authorizerResultTtlInSeconds (integer) --

          The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

        • authorizerUri (string) --

          The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3 ), or an alias ARN.

          Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

          aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

        • identityValidationExpression (string) --

          A regular expression for validation of tokens before the Lambda function is called.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.LimitExceededException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
  • AppSync.Client.exceptions.ApiLimitExceededException
create_resolver(**kwargs)

Creates a Resolver object.

A resolver converts incoming requests into a format that a data source can understand, and converts the data source's responses into GraphQL.

See also: AWS API Documentation

Request Syntax

response = client.create_resolver(
    apiId='string',
    typeName='string',
    fieldName='string',
    dataSourceName='string',
    requestMappingTemplate='string',
    responseMappingTemplate='string',
    kind='UNIT'|'PIPELINE',
    pipelineConfig={
        'functions': [
            'string',
        ]
    },
    syncConfig={
        'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
        'conflictDetection': 'VERSION'|'NONE',
        'lambdaConflictHandlerConfig': {
            'lambdaConflictHandlerArn': 'string'
        }
    },
    cachingConfig={
        'ttl': 123,
        'cachingKeys': [
            'string',
        ]
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The ID for the GraphQL API for which the resolver is being created.

  • typeName (string) --

    [REQUIRED]

    The name of the Type .

  • fieldName (string) --

    [REQUIRED]

    The name of the field to attach the resolver to.

  • dataSourceName (string) -- The name of the data source for which the resolver is being created.
  • requestMappingTemplate (string) --

    The mapping template to use for requests.

    A resolver uses a request mapping template to convert a GraphQL expression into a format that a data source can understand. Mapping templates are written in Apache Velocity Template Language (VTL).

    VTL request mapping templates are optional when using an Lambda data source. For all other data sources, VTL request and response mapping templates are required.

  • responseMappingTemplate (string) -- The mapping template to use for responses from the data source.
  • kind (string) --

    The resolver type.

    • UNIT : A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
    • PIPELINE : A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
  • pipelineConfig (dict) --

    The PipelineConfig .

    • functions (list) --

      A list of Function objects.

      • (string) --
  • syncConfig (dict) --

    The SyncConfig for a resolver attached to a versioned data source.

    • conflictHandler (string) --

      The Conflict Resolution strategy to perform in the event of a conflict.

      • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
      • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
      • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
    • conflictDetection (string) --

      The Conflict Detection strategy to use.

      • VERSION : Detect conflicts based on object versions for this resolver.
      • NONE : Do not detect conflicts when invoking this resolver.
    • lambdaConflictHandlerConfig (dict) --

      The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

      • lambdaConflictHandlerArn (string) --

        The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

  • cachingConfig (dict) --

    The caching configuration for the resolver.

    • ttl (integer) --

      The TTL in seconds for a resolver that has caching activated.

      Valid values are 1–3,600 seconds.

    • cachingKeys (list) --

      The caching keys for a resolver that has caching activated.

      Valid values are entries from the $context.arguments , $context.source , and $context.identity maps.

      • (string) --
Return type

dict

Returns

Response Syntax

{
    'resolver': {
        'typeName': 'string',
        'fieldName': 'string',
        'dataSourceName': 'string',
        'resolverArn': 'string',
        'requestMappingTemplate': 'string',
        'responseMappingTemplate': 'string',
        'kind': 'UNIT'|'PIPELINE',
        'pipelineConfig': {
            'functions': [
                'string',
            ]
        },
        'syncConfig': {
            'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
            'conflictDetection': 'VERSION'|'NONE',
            'lambdaConflictHandlerConfig': {
                'lambdaConflictHandlerArn': 'string'
            }
        },
        'cachingConfig': {
            'ttl': 123,
            'cachingKeys': [
                'string',
            ]
        }
    }
}

Response Structure

  • (dict) --

    • resolver (dict) --

      The Resolver object.

      • typeName (string) --

        The resolver type name.

      • fieldName (string) --

        The resolver field name.

      • dataSourceName (string) --

        The resolver data source name.

      • resolverArn (string) --

        The resolver Amazon Resource Name (ARN).

      • requestMappingTemplate (string) --

        The request mapping template.

      • responseMappingTemplate (string) --

        The response mapping template.

      • kind (string) --

        The resolver type.

        • UNIT : A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
        • PIPELINE : A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
      • pipelineConfig (dict) --

        The PipelineConfig .

        • functions (list) --

          A list of Function objects.

          • (string) --
      • syncConfig (dict) --

        The SyncConfig for a resolver attached to a versioned data source.

        • conflictHandler (string) --

          The Conflict Resolution strategy to perform in the event of a conflict.

          • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
          • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
          • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
        • conflictDetection (string) --

          The Conflict Detection strategy to use.

          • VERSION : Detect conflicts based on object versions for this resolver.
          • NONE : Do not detect conflicts when invoking this resolver.
        • lambdaConflictHandlerConfig (dict) --

          The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

          • lambdaConflictHandlerArn (string) --

            The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

      • cachingConfig (dict) --

        The caching configuration for the resolver.

        • ttl (integer) --

          The TTL in seconds for a resolver that has caching activated.

          Valid values are 1–3,600 seconds.

        • cachingKeys (list) --

          The caching keys for a resolver that has caching activated.

          Valid values are entries from the $context.arguments , $context.source , and $context.identity maps.

          • (string) --

Exceptions

  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
create_type(**kwargs)

Creates a Type object.

See also: AWS API Documentation

Request Syntax

response = client.create_type(
    apiId='string',
    definition='string',
    format='SDL'|'JSON'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • definition (string) --

    [REQUIRED]

    The type definition, in GraphQL Schema Definition Language (SDL) format.

    For more information, see the GraphQL SDL documentation .

  • format (string) --

    [REQUIRED]

    The type format: SDL or JSON.

Return type

dict

Returns

Response Syntax

{
    'type': {
        'name': 'string',
        'description': 'string',
        'arn': 'string',
        'definition': 'string',
        'format': 'SDL'|'JSON'
    }
}

Response Structure

  • (dict) --

    • type (dict) --

      The Type object.

      • name (string) --

        The type name.

      • description (string) --

        The type description.

      • arn (string) --

        The type Amazon Resource Name (ARN).

      • definition (string) --

        The type definition.

      • format (string) --

        The type format: SDL or JSON.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
delete_api_cache(**kwargs)

Deletes an ApiCache object.

See also: AWS API Documentation

Request Syntax

response = client.delete_api_cache(
    apiId='string'
)
Parameters
apiId (string) --

[REQUIRED]

The API ID.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

    Represents the output of a DeleteApiCache operation.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
delete_api_key(**kwargs)

Deletes an API key.

See also: AWS API Documentation

Request Syntax

response = client.delete_api_key(
    apiId='string',
    id='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • id (string) --

    [REQUIRED]

    The ID for the API key.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
delete_data_source(**kwargs)

Deletes a DataSource object.

See also: AWS API Documentation

Request Syntax

response = client.delete_data_source(
    apiId='string',
    name='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • name (string) --

    [REQUIRED]

    The name of the data source.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
delete_domain_name(**kwargs)

Deletes a custom DomainName object.

See also: AWS API Documentation

Request Syntax

response = client.delete_domain_name(
    domainName='string'
)
Parameters
domainName (string) --

[REQUIRED]

The domain name.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • AppSync.Client.exceptions.AccessDeniedException
  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.InternalFailureException
  • AppSync.Client.exceptions.NotFoundException
delete_function(**kwargs)

Deletes a Function .

See also: AWS API Documentation

Request Syntax

response = client.delete_function(
    apiId='string',
    functionId='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The GraphQL API ID.

  • functionId (string) --

    [REQUIRED]

    The Function ID.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
delete_graphql_api(**kwargs)

Deletes a GraphqlApi object.

See also: AWS API Documentation

Request Syntax

response = client.delete_graphql_api(
    apiId='string'
)
Parameters
apiId (string) --

[REQUIRED]

The API ID.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
  • AppSync.Client.exceptions.AccessDeniedException
delete_resolver(**kwargs)

Deletes a Resolver object.

See also: AWS API Documentation

Request Syntax

response = client.delete_resolver(
    apiId='string',
    typeName='string',
    fieldName='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • typeName (string) --

    [REQUIRED]

    The name of the resolver type.

  • fieldName (string) --

    [REQUIRED]

    The resolver field name.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
delete_type(**kwargs)

Deletes a Type object.

See also: AWS API Documentation

Request Syntax

response = client.delete_type(
    apiId='string',
    typeName='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • typeName (string) --

    [REQUIRED]

    The type name.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
disassociate_api(**kwargs)

Removes an ApiAssociation object from a custom domain.

See also: AWS API Documentation

Request Syntax

response = client.disassociate_api(
    domainName='string'
)
Parameters
domainName (string) --

[REQUIRED]

The domain name.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • AppSync.Client.exceptions.AccessDeniedException
  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.InternalFailureException
  • AppSync.Client.exceptions.NotFoundException
flush_api_cache(**kwargs)

Flushes an ApiCache object.

See also: AWS API Documentation

Request Syntax

response = client.flush_api_cache(
    apiId='string'
)
Parameters
apiId (string) --

[REQUIRED]

The API ID.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

    Represents the output of a FlushApiCache operation.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
get_api_association(**kwargs)

Retrieves an ApiAssociation object.

See also: AWS API Documentation

Request Syntax

response = client.get_api_association(
    domainName='string'
)
Parameters
domainName (string) --

[REQUIRED]

The domain name.

Return type
dict
Returns
Response Syntax
{
    'apiAssociation': {
        'domainName': 'string',
        'apiId': 'string',
        'associationStatus': 'PROCESSING'|'FAILED'|'SUCCESS',
        'deploymentDetail': 'string'
    }
}

Response Structure

  • (dict) --
    • apiAssociation (dict) --

      The ApiAssociation object.

      • domainName (string) --

        The domain name.

      • apiId (string) --

        The API ID.

      • associationStatus (string) --

        Identifies the status of an association.

        • PROCESSING : The API association is being created. You cannot modify association requests during processing.
        • SUCCESS : The API association was successful. You can modify associations after success.
        • FAILED : The API association has failed. You can modify associations after failure.
      • deploymentDetail (string) --

        Details about the last deployment status.

Exceptions

  • AppSync.Client.exceptions.AccessDeniedException
  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.InternalFailureException
  • AppSync.Client.exceptions.NotFoundException
get_api_cache(**kwargs)

Retrieves an ApiCache object.

See also: AWS API Documentation

Request Syntax

response = client.get_api_cache(
    apiId='string'
)
Parameters
apiId (string) --

[REQUIRED]

The API ID.

Return type
dict
Returns
Response Syntax
{
    'apiCache': {
        'ttl': 123,
        'apiCachingBehavior': 'FULL_REQUEST_CACHING'|'PER_RESOLVER_CACHING',
        'transitEncryptionEnabled': True|False,
        'atRestEncryptionEnabled': True|False,
        'type': 'T2_SMALL'|'T2_MEDIUM'|'R4_LARGE'|'R4_XLARGE'|'R4_2XLARGE'|'R4_4XLARGE'|'R4_8XLARGE'|'SMALL'|'MEDIUM'|'LARGE'|'XLARGE'|'LARGE_2X'|'LARGE_4X'|'LARGE_8X'|'LARGE_12X',
        'status': 'AVAILABLE'|'CREATING'|'DELETING'|'MODIFYING'|'FAILED'
    }
}

Response Structure

  • (dict) --

    Represents the output of a GetApiCache operation.

    • apiCache (dict) --

      The ApiCache object.

      • ttl (integer) --

        TTL in seconds for cache entries.

        Valid values are 1–3,600 seconds.

      • apiCachingBehavior (string) --

        Caching behavior.

        • FULL_REQUEST_CACHING : All requests are fully cached.
        • PER_RESOLVER_CACHING : Individual resolvers that you specify are cached.
      • transitEncryptionEnabled (boolean) --

        Transit encryption flag when connecting to cache. You cannot update this setting after creation.

      • atRestEncryptionEnabled (boolean) --

        At-rest encryption flag for cache. You cannot update this setting after creation.

      • type (string) --

        The cache instance type. Valid values are

        • SMALL
        • MEDIUM
        • LARGE
        • XLARGE
        • LARGE_2X
        • LARGE_4X
        • LARGE_8X (not available in all regions)
        • LARGE_12X

        Historically, instance types were identified by an EC2-style value. As of July 2020, this is deprecated, and the generic identifiers above should be used.

        The following legacy instance types are available, but their use is discouraged:

        • T2_SMALL : A t2.small instance type.
        • T2_MEDIUM : A t2.medium instance type.
        • R4_LARGE : A r4.large instance type.
        • R4_XLARGE : A r4.xlarge instance type.
        • R4_2XLARGE : A r4.2xlarge instance type.
        • R4_4XLARGE : A r4.4xlarge instance type.
        • R4_8XLARGE : A r4.8xlarge instance type.
      • status (string) --

        The cache instance status.

        • AVAILABLE : The instance is available for use.
        • CREATING : The instance is currently creating.
        • DELETING : The instance is currently deleting.
        • MODIFYING : The instance is currently modifying.
        • FAILED : The instance has failed creation.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
get_data_source(**kwargs)

Retrieves a DataSource object.

See also: AWS API Documentation

Request Syntax

response = client.get_data_source(
    apiId='string',
    name='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • name (string) --

    [REQUIRED]

    The name of the data source.

Return type

dict

Returns

Response Syntax

{
    'dataSource': {
        'dataSourceArn': 'string',
        'name': 'string',
        'description': 'string',
        'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP'|'RELATIONAL_DATABASE'|'AMAZON_OPENSEARCH_SERVICE',
        'serviceRoleArn': 'string',
        'dynamodbConfig': {
            'tableName': 'string',
            'awsRegion': 'string',
            'useCallerCredentials': True|False,
            'deltaSyncConfig': {
                'baseTableTTL': 123,
                'deltaSyncTableName': 'string',
                'deltaSyncTableTTL': 123
            },
            'versioned': True|False
        },
        'lambdaConfig': {
            'lambdaFunctionArn': 'string'
        },
        'elasticsearchConfig': {
            'endpoint': 'string',
            'awsRegion': 'string'
        },
        'openSearchServiceConfig': {
            'endpoint': 'string',
            'awsRegion': 'string'
        },
        'httpConfig': {
            'endpoint': 'string',
            'authorizationConfig': {
                'authorizationType': 'AWS_IAM',
                'awsIamConfig': {
                    'signingRegion': 'string',
                    'signingServiceName': 'string'
                }
            }
        },
        'relationalDatabaseConfig': {
            'relationalDatabaseSourceType': 'RDS_HTTP_ENDPOINT',
            'rdsHttpEndpointConfig': {
                'awsRegion': 'string',
                'dbClusterIdentifier': 'string',
                'databaseName': 'string',
                'schema': 'string',
                'awsSecretStoreArn': 'string'
            }
        }
    }
}

Response Structure

  • (dict) --

    • dataSource (dict) --

      The DataSource object.

      • dataSourceArn (string) --

        The data source Amazon Resource Name (ARN).

      • name (string) --

        The name of the data source.

      • description (string) --

        The description of the data source.

      • type (string) --

        The type of the data source.

        • AWS_LAMBDA : The data source is an Lambda function.
        • AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table.
        • AMAZON_ELASTICSEARCH : The data source is an Amazon OpenSearch Service domain.
        • AMAZON_OPENSEARCH_SERVICE : The data source is an Amazon OpenSearch Service domain.
        • NONE : There is no data source. Use this type when you want to invoke a GraphQL operation without connecting to a data source, such as when you're performing data transformation with resolvers or invoking a subscription from a mutation.
        • HTTP : The data source is an HTTP endpoint.
        • RELATIONAL_DATABASE : The data source is a relational database.
      • serviceRoleArn (string) --

        The Identity and Access Management (IAM) service role Amazon Resource Name (ARN) for the data source. The system assumes this role when accessing the data source.

      • dynamodbConfig (dict) --

        DynamoDB settings.

        • tableName (string) --

          The table name.

        • awsRegion (string) --

          The Amazon Web Services Region.

        • useCallerCredentials (boolean) --

          Set to TRUE to use Amazon Cognito credentials with this data source.

        • deltaSyncConfig (dict) --

          The DeltaSyncConfig for a versioned data source.

          • baseTableTTL (integer) --

            The number of minutes that an Item is stored in the data source.

          • deltaSyncTableName (string) --

            The Delta Sync table name.

          • deltaSyncTableTTL (integer) --

            The number of minutes that a Delta Sync log entry is stored in the Delta Sync table.

        • versioned (boolean) --

          Set to TRUE to use Conflict Detection and Resolution with this data source.

      • lambdaConfig (dict) --

        Lambda settings.

        • lambdaFunctionArn (string) --

          The Amazon Resource Name (ARN) for the Lambda function.

      • elasticsearchConfig (dict) --

        Amazon OpenSearch Service settings.

        • endpoint (string) --

          The endpoint.

        • awsRegion (string) --

          The Amazon Web Services Region.

      • openSearchServiceConfig (dict) --

        Amazon OpenSearch Service settings.

        • endpoint (string) --

          The endpoint.

        • awsRegion (string) --

          The Amazon Web Services Region.

      • httpConfig (dict) --

        HTTP endpoint settings.

        • endpoint (string) --

          The HTTP URL endpoint. You can specify either the domain name or IP, and port combination, and the URL scheme must be HTTP or HTTPS. If you don't specify the port, AppSync uses the default port 80 for the HTTP endpoint and port 443 for HTTPS endpoints.

        • authorizationConfig (dict) --

          The authorization configuration in case the HTTP endpoint requires authorization.

          • authorizationType (string) --

            The authorization type that the HTTP endpoint requires.

            • AWS_IAM : The authorization type is Signature Version 4 (SigV4).
          • awsIamConfig (dict) --

            The Identity and Access Management (IAM) settings.

            • signingRegion (string) --

              The signing Amazon Web Services Region for IAM authorization.

            • signingServiceName (string) --

              The signing service name for IAM authorization.

      • relationalDatabaseConfig (dict) --

        Relational database settings.

        • relationalDatabaseSourceType (string) --

          Source type for the relational database.

          • RDS_HTTP_ENDPOINT : The relational database source type is an Amazon Relational Database Service (Amazon RDS) HTTP endpoint.
        • rdsHttpEndpointConfig (dict) --

          Amazon RDS HTTP endpoint settings.

          • awsRegion (string) --

            Amazon Web Services Region for Amazon RDS HTTP endpoint.

          • dbClusterIdentifier (string) --

            Amazon RDS cluster Amazon Resource Name (ARN).

          • databaseName (string) --

            Logical database name.

          • schema (string) --

            Logical schema name.

          • awsSecretStoreArn (string) --

            Amazon Web Services secret store Amazon Resource Name (ARN) for database credentials.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
get_domain_name(**kwargs)

Retrieves a custom DomainName object.

See also: AWS API Documentation

Request Syntax

response = client.get_domain_name(
    domainName='string'
)
Parameters
domainName (string) --

[REQUIRED]

The domain name.

Return type
dict
Returns
Response Syntax
{
    'domainNameConfig': {
        'domainName': 'string',
        'description': 'string',
        'certificateArn': 'string',
        'appsyncDomainName': 'string',
        'hostedZoneId': 'string'
    }
}

Response Structure

  • (dict) --
    • domainNameConfig (dict) --

      The configuration for the DomainName .

      • domainName (string) --

        The domain name.

      • description (string) --

        A description of the DomainName configuration.

      • certificateArn (string) --

        The Amazon Resource Name (ARN) of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate.

      • appsyncDomainName (string) --

        The domain name that AppSync provides.

      • hostedZoneId (string) --

        The ID of your Amazon Route 53 hosted zone.

Exceptions

  • AppSync.Client.exceptions.AccessDeniedException
  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.InternalFailureException
  • AppSync.Client.exceptions.NotFoundException
get_function(**kwargs)

Get a Function .

See also: AWS API Documentation

Request Syntax

response = client.get_function(
    apiId='string',
    functionId='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The GraphQL API ID.

  • functionId (string) --

    [REQUIRED]

    The Function ID.

Return type

dict

Returns

Response Syntax

{
    'functionConfiguration': {
        'functionId': 'string',
        'functionArn': 'string',
        'name': 'string',
        'description': 'string',
        'dataSourceName': 'string',
        'requestMappingTemplate': 'string',
        'responseMappingTemplate': 'string',
        'functionVersion': 'string',
        'syncConfig': {
            'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
            'conflictDetection': 'VERSION'|'NONE',
            'lambdaConflictHandlerConfig': {
                'lambdaConflictHandlerArn': 'string'
            }
        }
    }
}

Response Structure

  • (dict) --

    • functionConfiguration (dict) --

      The Function object.

      • functionId (string) --

        A unique ID representing the Function object.

      • functionArn (string) --

        The Amazon Resource Name (ARN) of the Function object.

      • name (string) --

        The name of the Function object.

      • description (string) --

        The Function description.

      • dataSourceName (string) --

        The name of the DataSource .

      • requestMappingTemplate (string) --

        The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.

      • responseMappingTemplate (string) --

        The Function response mapping template.

      • functionVersion (string) --

        The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.

      • syncConfig (dict) --

        Describes a Sync configuration for a resolver.

        Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.

        • conflictHandler (string) --

          The Conflict Resolution strategy to perform in the event of a conflict.

          • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
          • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
          • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
        • conflictDetection (string) --

          The Conflict Detection strategy to use.

          • VERSION : Detect conflicts based on object versions for this resolver.
          • NONE : Do not detect conflicts when invoking this resolver.
        • lambdaConflictHandlerConfig (dict) --

          The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

          • lambdaConflictHandlerArn (string) --

            The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

Exceptions

  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
get_graphql_api(**kwargs)

Retrieves a GraphqlApi object.

See also: AWS API Documentation

Request Syntax

response = client.get_graphql_api(
    apiId='string'
)
Parameters
apiId (string) --

[REQUIRED]

The API ID for the GraphQL API.

Return type
dict
Returns
Response Syntax
{
    'graphqlApi': {
        'name': 'string',
        'apiId': 'string',
        'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT'|'AWS_LAMBDA',
        'logConfig': {
            'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
            'cloudWatchLogsRoleArn': 'string',
            'excludeVerboseContent': True|False
        },
        'userPoolConfig': {
            'userPoolId': 'string',
            'awsRegion': 'string',
            'defaultAction': 'ALLOW'|'DENY',
            'appIdClientRegex': 'string'
        },
        'openIDConnectConfig': {
            'issuer': 'string',
            'clientId': 'string',
            'iatTTL': 123,
            'authTTL': 123
        },
        'arn': 'string',
        'uris': {
            'string': 'string'
        },
        'tags': {
            'string': 'string'
        },
        'additionalAuthenticationProviders': [
            {
                'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT'|'AWS_LAMBDA',
                'openIDConnectConfig': {
                    'issuer': 'string',
                    'clientId': 'string',
                    'iatTTL': 123,
                    'authTTL': 123
                },
                'userPoolConfig': {
                    'userPoolId': 'string',
                    'awsRegion': 'string',
                    'appIdClientRegex': 'string'
                },
                'lambdaAuthorizerConfig': {
                    'authorizerResultTtlInSeconds': 123,
                    'authorizerUri': 'string',
                    'identityValidationExpression': 'string'
                }
            },
        ],
        'xrayEnabled': True|False,
        'wafWebAclArn': 'string',
        'lambdaAuthorizerConfig': {
            'authorizerResultTtlInSeconds': 123,
            'authorizerUri': 'string',
            'identityValidationExpression': 'string'
        }
    }
}

Response Structure

  • (dict) --
    • graphqlApi (dict) --

      The GraphqlApi object.

      • name (string) --

        The API name.

      • apiId (string) --

        The API ID.

      • authenticationType (string) --

        The authentication type.

      • logConfig (dict) --

        The Amazon CloudWatch Logs configuration.

        • fieldLogLevel (string) --

          The field logging level. Values can be NONE, ERROR, or ALL.

          • NONE : No field-level logs are captured.
          • ERROR : Logs the following information only for the fields that are in error:
            • The error section in the server response.
            • Field-level errors.
            • The generated request/response functions that got resolved for error fields.
          • ALL : The following information is logged for all fields in the query:
            • Field-level tracing information.
            • The generated request/response functions that got resolved for each field.
        • cloudWatchLogsRoleArn (string) --

          The service role that AppSync assumes to publish to CloudWatch logs in your account.

        • excludeVerboseContent (boolean) --

          Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level.

      • userPoolConfig (dict) --

        The Amazon Cognito user pool configuration.

        • userPoolId (string) --

          The user pool ID.

        • awsRegion (string) --

          The Amazon Web Services Region in which the user pool was created.

        • defaultAction (string) --

          The action that you want your GraphQL API to take when a request that uses Amazon Cognito user pool authentication doesn't match the Amazon Cognito user pool configuration.

        • appIdClientRegex (string) --

          A regular expression for validating the incoming Amazon Cognito user pool app client ID.

      • openIDConnectConfig (dict) --

        The OpenID Connect configuration.

        • issuer (string) --

          The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

        • clientId (string) --

          The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

        • iatTTL (integer) --

          The number of milliseconds that a token is valid after it's issued to a user.

        • authTTL (integer) --

          The number of milliseconds that a token is valid after being authenticated.

      • arn (string) --

        The Amazon Resource Name (ARN).

      • uris (dict) --

        The URIs.

        • (string) --
          • (string) --
      • tags (dict) --

        The tags.

        • (string) --

          The key for the tag.

          • (string) --

            The value for the tag.

      • additionalAuthenticationProviders (list) --

        A list of additional authentication providers for the GraphqlApi API.

        • (dict) --

          Describes an additional authentication provider.

          • authenticationType (string) --

            The authentication type: API key, Identity and Access Management (IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or Lambda.

          • openIDConnectConfig (dict) --

            The OIDC configuration.

            • issuer (string) --

              The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

            • clientId (string) --

              The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

            • iatTTL (integer) --

              The number of milliseconds that a token is valid after it's issued to a user.

            • authTTL (integer) --

              The number of milliseconds that a token is valid after being authenticated.

          • userPoolConfig (dict) --

            The Amazon Cognito user pool configuration.

            • userPoolId (string) --

              The user pool ID.

            • awsRegion (string) --

              The Amazon Web Services Region in which the user pool was created.

            • appIdClientRegex (string) --

              A regular expression for validating the incoming Amazon Cognito user pool app client ID.

          • lambdaAuthorizerConfig (dict) --

            Configuration for Lambda function authorization.

            • authorizerResultTtlInSeconds (integer) --

              The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

            • authorizerUri (string) --

              The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3 ), or an alias ARN.

              Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

              aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

            • identityValidationExpression (string) --

              A regular expression for validation of tokens before the Lambda function is called.

      • xrayEnabled (boolean) --

        A flag indicating whether to use X-Ray tracing for this GraphqlApi .

      • wafWebAclArn (string) --

        The ARN of the WAF access control list (ACL) associated with this GraphqlApi , if one exists.

      • lambdaAuthorizerConfig (dict) --

        Configuration for Lambda function authorization.

        • authorizerResultTtlInSeconds (integer) --

          The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

        • authorizerUri (string) --

          The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3 ), or an alias ARN.

          Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

          aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

        • identityValidationExpression (string) --

          A regular expression for validation of tokens before the Lambda function is called.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
  • AppSync.Client.exceptions.AccessDeniedException
get_introspection_schema(**kwargs)

Retrieves the introspection schema for a GraphQL API.

See also: AWS API Documentation

Request Syntax

response = client.get_introspection_schema(
    apiId='string',
    format='SDL'|'JSON',
    includeDirectives=True|False
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • format (string) --

    [REQUIRED]

    The schema format: SDL or JSON.

  • includeDirectives (boolean) -- A flag that specifies whether the schema introspection should contain directives.
Return type

dict

Returns

Response Syntax

{
    'schema': StreamingBody()
}

Response Structure

  • (dict) --

    • schema (StreamingBody) --

      The schema, in GraphQL Schema Definition Language (SDL) format.

      For more information, see the GraphQL SDL documentation .

Exceptions

  • AppSync.Client.exceptions.GraphQLSchemaException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_resolver(**kwargs)

Retrieves a Resolver object.

See also: AWS API Documentation

Request Syntax

response = client.get_resolver(
    apiId='string',
    typeName='string',
    fieldName='string'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • typeName (string) --

    [REQUIRED]

    The resolver type name.

  • fieldName (string) --

    [REQUIRED]

    The resolver field name.

Return type

dict

Returns

Response Syntax

{
    'resolver': {
        'typeName': 'string',
        'fieldName': 'string',
        'dataSourceName': 'string',
        'resolverArn': 'string',
        'requestMappingTemplate': 'string',
        'responseMappingTemplate': 'string',
        'kind': 'UNIT'|'PIPELINE',
        'pipelineConfig': {
            'functions': [
                'string',
            ]
        },
        'syncConfig': {
            'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
            'conflictDetection': 'VERSION'|'NONE',
            'lambdaConflictHandlerConfig': {
                'lambdaConflictHandlerArn': 'string'
            }
        },
        'cachingConfig': {
            'ttl': 123,
            'cachingKeys': [
                'string',
            ]
        }
    }
}

Response Structure

  • (dict) --

    • resolver (dict) --

      The Resolver object.

      • typeName (string) --

        The resolver type name.

      • fieldName (string) --

        The resolver field name.

      • dataSourceName (string) --

        The resolver data source name.

      • resolverArn (string) --

        The resolver Amazon Resource Name (ARN).

      • requestMappingTemplate (string) --

        The request mapping template.

      • responseMappingTemplate (string) --

        The response mapping template.

      • kind (string) --

        The resolver type.

        • UNIT : A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
        • PIPELINE : A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
      • pipelineConfig (dict) --

        The PipelineConfig .

        • functions (list) --

          A list of Function objects.

          • (string) --
      • syncConfig (dict) --

        The SyncConfig for a resolver attached to a versioned data source.

        • conflictHandler (string) --

          The Conflict Resolution strategy to perform in the event of a conflict.

          • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
          • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
          • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
        • conflictDetection (string) --

          The Conflict Detection strategy to use.

          • VERSION : Detect conflicts based on object versions for this resolver.
          • NONE : Do not detect conflicts when invoking this resolver.
        • lambdaConflictHandlerConfig (dict) --

          The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

          • lambdaConflictHandlerArn (string) --

            The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

      • cachingConfig (dict) --

        The caching configuration for the resolver.

        • ttl (integer) --

          The TTL in seconds for a resolver that has caching activated.

          Valid values are 1–3,600 seconds.

        • cachingKeys (list) --

          The caching keys for a resolver that has caching activated.

          Valid values are entries from the $context.arguments , $context.source , and $context.identity maps.

          • (string) --

Exceptions

  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
get_schema_creation_status(**kwargs)

Retrieves the current status of a schema creation operation.

See also: AWS API Documentation

Request Syntax

response = client.get_schema_creation_status(
    apiId='string'
)
Parameters
apiId (string) --

[REQUIRED]

The API ID.

Return type
dict
Returns
Response Syntax
{
    'status': 'PROCESSING'|'ACTIVE'|'DELETING'|'FAILED'|'SUCCESS'|'NOT_APPLICABLE',
    'details': 'string'
}

Response Structure

  • (dict) --
    • status (string) --

      The current state of the schema (PROCESSING, FAILED, SUCCESS, or NOT_APPLICABLE). When the schema is in the ACTIVE state, you can add data.

    • details (string) --

      Detailed information about the status of the schema creation operation.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
get_type(**kwargs)

Retrieves a Type object.

See also: AWS API Documentation

Request Syntax

response = client.get_type(
    apiId='string',
    typeName='string',
    format='SDL'|'JSON'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • typeName (string) --

    [REQUIRED]

    The type name.

  • format (string) --

    [REQUIRED]

    The type format: SDL or JSON.

Return type

dict

Returns

Response Syntax

{
    'type': {
        'name': 'string',
        'description': 'string',
        'arn': 'string',
        'definition': 'string',
        'format': 'SDL'|'JSON'
    }
}

Response Structure

  • (dict) --

    • type (dict) --

      The Type object.

      • name (string) --

        The type name.

      • description (string) --

        The type description.

      • arn (string) --

        The type Amazon Resource Name (ARN).

      • definition (string) --

        The type definition.

      • format (string) --

        The type format: SDL or JSON.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_api_keys(**kwargs)

Lists the API keys for a given API.

Note

API keys are deleted automatically 60 days after they expire. However, they may still be included in the response until they have actually been deleted. You can safely call DeleteApiKey to manually delete a key before it's automatically deleted.

See also: AWS API Documentation

Request Syntax

response = client.list_api_keys(
    apiId='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • nextToken (string) -- An identifier that was returned from the previous call to this operation, which you can use to return the next set of items in the list.
  • maxResults (integer) -- The maximum number of results that you want the request to return.
Return type

dict

Returns

Response Syntax

{
    'apiKeys': [
        {
            'id': 'string',
            'description': 'string',
            'expires': 123,
            'deletes': 123
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • apiKeys (list) --

      The ApiKey objects.

      • (dict) --

        Describes an API key.

        Customers invoke AppSync GraphQL API operations with API keys as an identity mechanism. There are two key versions:

        da1 : We introduced this version at launch in November 2017. These keys always expire after 7 days. Amazon DynamoDB TTL manages key expiration. These keys ceased to be valid after February 21, 2018, and they should no longer be used.

        • ListApiKeys returns the expiration time in milliseconds.
        • CreateApiKey returns the expiration time in milliseconds.
        • UpdateApiKey is not available for this key version.
        • DeleteApiKey deletes the item from the table.
        • Expiration is stored in DynamoDB as milliseconds. This results in a bug where keys are not automatically deleted because DynamoDB expects the TTL to be stored in seconds. As a one-time action, we deleted these keys from the table on February 21, 2018.

        da2 : We introduced this version in February 2018 when AppSync added support to extend key expiration.

        • ListApiKeys returns the expiration time and deletion time in seconds.
        • CreateApiKey returns the expiration time and deletion time in seconds and accepts a user-provided expiration time in seconds.
        • UpdateApiKey returns the expiration time and and deletion time in seconds and accepts a user-provided expiration time in seconds. Expired API keys are kept for 60 days after the expiration time. You can update the key expiration time as long as the key isn't deleted.
        • DeleteApiKey deletes the item from the table.
        • Expiration is stored in DynamoDB as seconds. After the expiration time, using the key to authenticate will fail. However, you can reinstate the key before deletion.
        • Deletion is stored in DynamoDB as seconds. The key is deleted after deletion time.
        • id (string) --

          The API key ID.

        • description (string) --

          A description of the purpose of the API key.

        • expires (integer) --

          The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.

        • deletes (integer) --

          The time after which the API key is deleted. The date is represented as seconds since the epoch, rounded down to the nearest hour.

    • nextToken (string) --

      An identifier to pass in the next request to this operation to return the next set of items in the list.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
list_data_sources(**kwargs)

Lists the data sources for a given API.

See also: AWS API Documentation

Request Syntax

response = client.list_data_sources(
    apiId='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • nextToken (string) -- An identifier that was returned from the previous call to this operation, which you can use to return the next set of items in the list.
  • maxResults (integer) -- The maximum number of results that you want the request to return.
Return type

dict

Returns

Response Syntax

{
    'dataSources': [
        {
            'dataSourceArn': 'string',
            'name': 'string',
            'description': 'string',
            'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP'|'RELATIONAL_DATABASE'|'AMAZON_OPENSEARCH_SERVICE',
            'serviceRoleArn': 'string',
            'dynamodbConfig': {
                'tableName': 'string',
                'awsRegion': 'string',
                'useCallerCredentials': True|False,
                'deltaSyncConfig': {
                    'baseTableTTL': 123,
                    'deltaSyncTableName': 'string',
                    'deltaSyncTableTTL': 123
                },
                'versioned': True|False
            },
            'lambdaConfig': {
                'lambdaFunctionArn': 'string'
            },
            'elasticsearchConfig': {
                'endpoint': 'string',
                'awsRegion': 'string'
            },
            'openSearchServiceConfig': {
                'endpoint': 'string',
                'awsRegion': 'string'
            },
            'httpConfig': {
                'endpoint': 'string',
                'authorizationConfig': {
                    'authorizationType': 'AWS_IAM',
                    'awsIamConfig': {
                        'signingRegion': 'string',
                        'signingServiceName': 'string'
                    }
                }
            },
            'relationalDatabaseConfig': {
                'relationalDatabaseSourceType': 'RDS_HTTP_ENDPOINT',
                'rdsHttpEndpointConfig': {
                    'awsRegion': 'string',
                    'dbClusterIdentifier': 'string',
                    'databaseName': 'string',
                    'schema': 'string',
                    'awsSecretStoreArn': 'string'
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • dataSources (list) --

      The DataSource objects.

      • (dict) --

        Describes a data source.

        • dataSourceArn (string) --

          The data source Amazon Resource Name (ARN).

        • name (string) --

          The name of the data source.

        • description (string) --

          The description of the data source.

        • type (string) --

          The type of the data source.

          • AWS_LAMBDA : The data source is an Lambda function.
          • AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table.
          • AMAZON_ELASTICSEARCH : The data source is an Amazon OpenSearch Service domain.
          • AMAZON_OPENSEARCH_SERVICE : The data source is an Amazon OpenSearch Service domain.
          • NONE : There is no data source. Use this type when you want to invoke a GraphQL operation without connecting to a data source, such as when you're performing data transformation with resolvers or invoking a subscription from a mutation.
          • HTTP : The data source is an HTTP endpoint.
          • RELATIONAL_DATABASE : The data source is a relational database.
        • serviceRoleArn (string) --

          The Identity and Access Management (IAM) service role Amazon Resource Name (ARN) for the data source. The system assumes this role when accessing the data source.

        • dynamodbConfig (dict) --

          DynamoDB settings.

          • tableName (string) --

            The table name.

          • awsRegion (string) --

            The Amazon Web Services Region.

          • useCallerCredentials (boolean) --

            Set to TRUE to use Amazon Cognito credentials with this data source.

          • deltaSyncConfig (dict) --

            The DeltaSyncConfig for a versioned data source.

            • baseTableTTL (integer) --

              The number of minutes that an Item is stored in the data source.

            • deltaSyncTableName (string) --

              The Delta Sync table name.

            • deltaSyncTableTTL (integer) --

              The number of minutes that a Delta Sync log entry is stored in the Delta Sync table.

          • versioned (boolean) --

            Set to TRUE to use Conflict Detection and Resolution with this data source.

        • lambdaConfig (dict) --

          Lambda settings.

          • lambdaFunctionArn (string) --

            The Amazon Resource Name (ARN) for the Lambda function.

        • elasticsearchConfig (dict) --

          Amazon OpenSearch Service settings.

          • endpoint (string) --

            The endpoint.

          • awsRegion (string) --

            The Amazon Web Services Region.

        • openSearchServiceConfig (dict) --

          Amazon OpenSearch Service settings.

          • endpoint (string) --

            The endpoint.

          • awsRegion (string) --

            The Amazon Web Services Region.

        • httpConfig (dict) --

          HTTP endpoint settings.

          • endpoint (string) --

            The HTTP URL endpoint. You can specify either the domain name or IP, and port combination, and the URL scheme must be HTTP or HTTPS. If you don't specify the port, AppSync uses the default port 80 for the HTTP endpoint and port 443 for HTTPS endpoints.

          • authorizationConfig (dict) --

            The authorization configuration in case the HTTP endpoint requires authorization.

            • authorizationType (string) --

              The authorization type that the HTTP endpoint requires.

              • AWS_IAM : The authorization type is Signature Version 4 (SigV4).
            • awsIamConfig (dict) --

              The Identity and Access Management (IAM) settings.

              • signingRegion (string) --

                The signing Amazon Web Services Region for IAM authorization.

              • signingServiceName (string) --

                The signing service name for IAM authorization.

        • relationalDatabaseConfig (dict) --

          Relational database settings.

          • relationalDatabaseSourceType (string) --

            Source type for the relational database.

            • RDS_HTTP_ENDPOINT : The relational database source type is an Amazon Relational Database Service (Amazon RDS) HTTP endpoint.
          • rdsHttpEndpointConfig (dict) --

            Amazon RDS HTTP endpoint settings.

            • awsRegion (string) --

              Amazon Web Services Region for Amazon RDS HTTP endpoint.

            • dbClusterIdentifier (string) --

              Amazon RDS cluster Amazon Resource Name (ARN).

            • databaseName (string) --

              Logical database name.

            • schema (string) --

              Logical schema name.

            • awsSecretStoreArn (string) --

              Amazon Web Services secret store Amazon Resource Name (ARN) for database credentials.

    • nextToken (string) --

      An identifier to pass in the next request to this operation to return the next set of items in the list.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
list_domain_names(**kwargs)

Lists multiple custom domain names.

See also: AWS API Documentation

Request Syntax

response = client.list_domain_names(
    nextToken='string',
    maxResults=123
)
Parameters
  • nextToken (string) -- The API token.
  • maxResults (integer) -- The maximum number of results that you want the request to return.
Return type

dict

Returns

Response Syntax

{
    'domainNameConfigs': [
        {
            'domainName': 'string',
            'description': 'string',
            'certificateArn': 'string',
            'appsyncDomainName': 'string',
            'hostedZoneId': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • domainNameConfigs (list) --

      Lists configurations for multiple domain names.

      • (dict) --

        Describes a configuration for a custom domain.

        • domainName (string) --

          The domain name.

        • description (string) --

          A description of the DomainName configuration.

        • certificateArn (string) --

          The Amazon Resource Name (ARN) of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate.

        • appsyncDomainName (string) --

          The domain name that AppSync provides.

        • hostedZoneId (string) --

          The ID of your Amazon Route 53 hosted zone.

    • nextToken (string) --

      The API token.

Exceptions

  • AppSync.Client.exceptions.AccessDeniedException
  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.InternalFailureException
list_functions(**kwargs)

List multiple functions.

See also: AWS API Documentation

Request Syntax

response = client.list_functions(
    apiId='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The GraphQL API ID.

  • nextToken (string) -- An identifier that was returned from the previous call to this operation, which you can use to return the next set of items in the list.
  • maxResults (integer) -- The maximum number of results that you want the request to return.
Return type

dict

Returns

Response Syntax

{
    'functions': [
        {
            'functionId': 'string',
            'functionArn': 'string',
            'name': 'string',
            'description': 'string',
            'dataSourceName': 'string',
            'requestMappingTemplate': 'string',
            'responseMappingTemplate': 'string',
            'functionVersion': 'string',
            'syncConfig': {
                'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
                'conflictDetection': 'VERSION'|'NONE',
                'lambdaConflictHandlerConfig': {
                    'lambdaConflictHandlerArn': 'string'
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • functions (list) --

      A list of Function objects.

      • (dict) --

        A function is a reusable entity. You can use multiple functions to compose the resolver logic.

        • functionId (string) --

          A unique ID representing the Function object.

        • functionArn (string) --

          The Amazon Resource Name (ARN) of the Function object.

        • name (string) --

          The name of the Function object.

        • description (string) --

          The Function description.

        • dataSourceName (string) --

          The name of the DataSource .

        • requestMappingTemplate (string) --

          The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.

        • responseMappingTemplate (string) --

          The Function response mapping template.

        • functionVersion (string) --

          The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.

        • syncConfig (dict) --

          Describes a Sync configuration for a resolver.

          Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.

          • conflictHandler (string) --

            The Conflict Resolution strategy to perform in the event of a conflict.

            • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
            • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
            • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
          • conflictDetection (string) --

            The Conflict Detection strategy to use.

            • VERSION : Detect conflicts based on object versions for this resolver.
            • NONE : Do not detect conflicts when invoking this resolver.
          • lambdaConflictHandlerConfig (dict) --

            The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

            • lambdaConflictHandlerArn (string) --

              The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

    • nextToken (string) --

      An identifier that was returned from the previous call to this operation, which you can use to return the next set of items in the list.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
list_graphql_apis(**kwargs)

Lists your GraphQL APIs.

See also: AWS API Documentation

Request Syntax

response = client.list_graphql_apis(
    nextToken='string',
    maxResults=123
)
Parameters
  • nextToken (string) -- An identifier that was returned from the previous call to this operation, which you can use to return the next set of items in the list.
  • maxResults (integer) -- The maximum number of results that you want the request to return.
Return type

dict

Returns

Response Syntax

{
    'graphqlApis': [
        {
            'name': 'string',
            'apiId': 'string',
            'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT'|'AWS_LAMBDA',
            'logConfig': {
                'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
                'cloudWatchLogsRoleArn': 'string',
                'excludeVerboseContent': True|False
            },
            'userPoolConfig': {
                'userPoolId': 'string',
                'awsRegion': 'string',
                'defaultAction': 'ALLOW'|'DENY',
                'appIdClientRegex': 'string'
            },
            'openIDConnectConfig': {
                'issuer': 'string',
                'clientId': 'string',
                'iatTTL': 123,
                'authTTL': 123
            },
            'arn': 'string',
            'uris': {
                'string': 'string'
            },
            'tags': {
                'string': 'string'
            },
            'additionalAuthenticationProviders': [
                {
                    'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT'|'AWS_LAMBDA',
                    'openIDConnectConfig': {
                        'issuer': 'string',
                        'clientId': 'string',
                        'iatTTL': 123,
                        'authTTL': 123
                    },
                    'userPoolConfig': {
                        'userPoolId': 'string',
                        'awsRegion': 'string',
                        'appIdClientRegex': 'string'
                    },
                    'lambdaAuthorizerConfig': {
                        'authorizerResultTtlInSeconds': 123,
                        'authorizerUri': 'string',
                        'identityValidationExpression': 'string'
                    }
                },
            ],
            'xrayEnabled': True|False,
            'wafWebAclArn': 'string',
            'lambdaAuthorizerConfig': {
                'authorizerResultTtlInSeconds': 123,
                'authorizerUri': 'string',
                'identityValidationExpression': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • graphqlApis (list) --

      The GraphqlApi objects.

      • (dict) --

        Describes a GraphQL API.

        • name (string) --

          The API name.

        • apiId (string) --

          The API ID.

        • authenticationType (string) --

          The authentication type.

        • logConfig (dict) --

          The Amazon CloudWatch Logs configuration.

          • fieldLogLevel (string) --

            The field logging level. Values can be NONE, ERROR, or ALL.

            • NONE : No field-level logs are captured.
            • ERROR : Logs the following information only for the fields that are in error:
              • The error section in the server response.
              • Field-level errors.
              • The generated request/response functions that got resolved for error fields.
            • ALL : The following information is logged for all fields in the query:
              • Field-level tracing information.
              • The generated request/response functions that got resolved for each field.
          • cloudWatchLogsRoleArn (string) --

            The service role that AppSync assumes to publish to CloudWatch logs in your account.

          • excludeVerboseContent (boolean) --

            Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level.

        • userPoolConfig (dict) --

          The Amazon Cognito user pool configuration.

          • userPoolId (string) --

            The user pool ID.

          • awsRegion (string) --

            The Amazon Web Services Region in which the user pool was created.

          • defaultAction (string) --

            The action that you want your GraphQL API to take when a request that uses Amazon Cognito user pool authentication doesn't match the Amazon Cognito user pool configuration.

          • appIdClientRegex (string) --

            A regular expression for validating the incoming Amazon Cognito user pool app client ID.

        • openIDConnectConfig (dict) --

          The OpenID Connect configuration.

          • issuer (string) --

            The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

          • clientId (string) --

            The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

          • iatTTL (integer) --

            The number of milliseconds that a token is valid after it's issued to a user.

          • authTTL (integer) --

            The number of milliseconds that a token is valid after being authenticated.

        • arn (string) --

          The Amazon Resource Name (ARN).

        • uris (dict) --

          The URIs.

          • (string) --
            • (string) --
        • tags (dict) --

          The tags.

          • (string) --

            The key for the tag.

            • (string) --

              The value for the tag.

        • additionalAuthenticationProviders (list) --

          A list of additional authentication providers for the GraphqlApi API.

          • (dict) --

            Describes an additional authentication provider.

            • authenticationType (string) --

              The authentication type: API key, Identity and Access Management (IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or Lambda.

            • openIDConnectConfig (dict) --

              The OIDC configuration.

              • issuer (string) --

                The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

              • clientId (string) --

                The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

              • iatTTL (integer) --

                The number of milliseconds that a token is valid after it's issued to a user.

              • authTTL (integer) --

                The number of milliseconds that a token is valid after being authenticated.

            • userPoolConfig (dict) --

              The Amazon Cognito user pool configuration.

              • userPoolId (string) --

                The user pool ID.

              • awsRegion (string) --

                The Amazon Web Services Region in which the user pool was created.

              • appIdClientRegex (string) --

                A regular expression for validating the incoming Amazon Cognito user pool app client ID.

            • lambdaAuthorizerConfig (dict) --

              Configuration for Lambda function authorization.

              • authorizerResultTtlInSeconds (integer) --

                The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

              • authorizerUri (string) --

                The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3 ), or an alias ARN.

                Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

                aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

              • identityValidationExpression (string) --

                A regular expression for validation of tokens before the Lambda function is called.

        • xrayEnabled (boolean) --

          A flag indicating whether to use X-Ray tracing for this GraphqlApi .

        • wafWebAclArn (string) --

          The ARN of the WAF access control list (ACL) associated with this GraphqlApi , if one exists.

        • lambdaAuthorizerConfig (dict) --

          Configuration for Lambda function authorization.

          • authorizerResultTtlInSeconds (integer) --

            The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

          • authorizerUri (string) --

            The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3 ), or an alias ARN.

            Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

            aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

          • identityValidationExpression (string) --

            A regular expression for validation of tokens before the Lambda function is called.

    • nextToken (string) --

      An identifier to pass in the next request to this operation to return the next set of items in the list.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
list_resolvers(**kwargs)

Lists the resolvers for a given API and type.

See also: AWS API Documentation

Request Syntax

response = client.list_resolvers(
    apiId='string',
    typeName='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • typeName (string) --

    [REQUIRED]

    The type name.

  • nextToken (string) -- An identifier that was returned from the previous call to this operation, which you can use to return the next set of items in the list.
  • maxResults (integer) -- The maximum number of results that you want the request to return.
Return type

dict

Returns

Response Syntax

{
    'resolvers': [
        {
            'typeName': 'string',
            'fieldName': 'string',
            'dataSourceName': 'string',
            'resolverArn': 'string',
            'requestMappingTemplate': 'string',
            'responseMappingTemplate': 'string',
            'kind': 'UNIT'|'PIPELINE',
            'pipelineConfig': {
                'functions': [
                    'string',
                ]
            },
            'syncConfig': {
                'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
                'conflictDetection': 'VERSION'|'NONE',
                'lambdaConflictHandlerConfig': {
                    'lambdaConflictHandlerArn': 'string'
                }
            },
            'cachingConfig': {
                'ttl': 123,
                'cachingKeys': [
                    'string',
                ]
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • resolvers (list) --

      The Resolver objects.

      • (dict) --

        Describes a resolver.

        • typeName (string) --

          The resolver type name.

        • fieldName (string) --

          The resolver field name.

        • dataSourceName (string) --

          The resolver data source name.

        • resolverArn (string) --

          The resolver Amazon Resource Name (ARN).

        • requestMappingTemplate (string) --

          The request mapping template.

        • responseMappingTemplate (string) --

          The response mapping template.

        • kind (string) --

          The resolver type.

          • UNIT : A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
          • PIPELINE : A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
        • pipelineConfig (dict) --

          The PipelineConfig .

          • functions (list) --

            A list of Function objects.

            • (string) --
        • syncConfig (dict) --

          The SyncConfig for a resolver attached to a versioned data source.

          • conflictHandler (string) --

            The Conflict Resolution strategy to perform in the event of a conflict.

            • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
            • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
            • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
          • conflictDetection (string) --

            The Conflict Detection strategy to use.

            • VERSION : Detect conflicts based on object versions for this resolver.
            • NONE : Do not detect conflicts when invoking this resolver.
          • lambdaConflictHandlerConfig (dict) --

            The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

            • lambdaConflictHandlerArn (string) --

              The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

        • cachingConfig (dict) --

          The caching configuration for the resolver.

          • ttl (integer) --

            The TTL in seconds for a resolver that has caching activated.

            Valid values are 1–3,600 seconds.

          • cachingKeys (list) --

            The caching keys for a resolver that has caching activated.

            Valid values are entries from the $context.arguments , $context.source , and $context.identity maps.

            • (string) --
    • nextToken (string) --

      An identifier to pass in the next request to this operation to return the next set of items in the list.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
list_resolvers_by_function(**kwargs)

List the resolvers that are associated with a specific function.

See also: AWS API Documentation

Request Syntax

response = client.list_resolvers_by_function(
    apiId='string',
    functionId='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • functionId (string) --

    [REQUIRED]

    The function ID.

  • nextToken (string) -- An identifier that was returned from the previous call to this operation, which you can use to return the next set of items in the list.
  • maxResults (integer) -- The maximum number of results that you want the request to return.
Return type

dict

Returns

Response Syntax

{
    'resolvers': [
        {
            'typeName': 'string',
            'fieldName': 'string',
            'dataSourceName': 'string',
            'resolverArn': 'string',
            'requestMappingTemplate': 'string',
            'responseMappingTemplate': 'string',
            'kind': 'UNIT'|'PIPELINE',
            'pipelineConfig': {
                'functions': [
                    'string',
                ]
            },
            'syncConfig': {
                'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
                'conflictDetection': 'VERSION'|'NONE',
                'lambdaConflictHandlerConfig': {
                    'lambdaConflictHandlerArn': 'string'
                }
            },
            'cachingConfig': {
                'ttl': 123,
                'cachingKeys': [
                    'string',
                ]
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • resolvers (list) --

      The list of resolvers.

      • (dict) --

        Describes a resolver.

        • typeName (string) --

          The resolver type name.

        • fieldName (string) --

          The resolver field name.

        • dataSourceName (string) --

          The resolver data source name.

        • resolverArn (string) --

          The resolver Amazon Resource Name (ARN).

        • requestMappingTemplate (string) --

          The request mapping template.

        • responseMappingTemplate (string) --

          The response mapping template.

        • kind (string) --

          The resolver type.

          • UNIT : A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
          • PIPELINE : A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
        • pipelineConfig (dict) --

          The PipelineConfig .

          • functions (list) --

            A list of Function objects.

            • (string) --
        • syncConfig (dict) --

          The SyncConfig for a resolver attached to a versioned data source.

          • conflictHandler (string) --

            The Conflict Resolution strategy to perform in the event of a conflict.

            • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
            • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
            • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
          • conflictDetection (string) --

            The Conflict Detection strategy to use.

            • VERSION : Detect conflicts based on object versions for this resolver.
            • NONE : Do not detect conflicts when invoking this resolver.
          • lambdaConflictHandlerConfig (dict) --

            The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

            • lambdaConflictHandlerArn (string) --

              The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

        • cachingConfig (dict) --

          The caching configuration for the resolver.

          • ttl (integer) --

            The TTL in seconds for a resolver that has caching activated.

            Valid values are 1–3,600 seconds.

          • cachingKeys (list) --

            The caching keys for a resolver that has caching activated.

            Valid values are entries from the $context.arguments , $context.source , and $context.identity maps.

            • (string) --
    • nextToken (string) --

      An identifier that you can use to return the next set of items in the list.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
list_tags_for_resource(**kwargs)

Lists the tags for a resource.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    resourceArn='string'
)
Parameters
resourceArn (string) --

[REQUIRED]

The GraphqlApi Amazon Resource Name (ARN).

Return type
dict
Returns
Response Syntax
{
    'tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --
    • tags (dict) --

      A TagMap object.

      • (string) --

        The key for the tag.

        • (string) --

          The value for the tag.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.LimitExceededException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
  • AppSync.Client.exceptions.AccessDeniedException
list_types(**kwargs)

Lists the types for a given API.

See also: AWS API Documentation

Request Syntax

response = client.list_types(
    apiId='string',
    format='SDL'|'JSON',
    nextToken='string',
    maxResults=123
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • format (string) --

    [REQUIRED]

    The type format: SDL or JSON.

  • nextToken (string) -- An identifier that was returned from the previous call to this operation, which you can use to return the next set of items in the list.
  • maxResults (integer) -- The maximum number of results that you want the request to return.
Return type

dict

Returns

Response Syntax

{
    'types': [
        {
            'name': 'string',
            'description': 'string',
            'arn': 'string',
            'definition': 'string',
            'format': 'SDL'|'JSON'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • types (list) --

      The Type objects.

      • (dict) --

        Describes a type.

        • name (string) --

          The type name.

        • description (string) --

          The type description.

        • arn (string) --

          The type Amazon Resource Name (ARN).

        • definition (string) --

          The type definition.

        • format (string) --

          The type format: SDL or JSON.

    • nextToken (string) --

      An identifier to pass in the next request to this operation to return the next set of items in the list.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
start_schema_creation(**kwargs)

Adds a new schema to your GraphQL API.

This operation is asynchronous. Use to determine when it has completed.

See also: AWS API Documentation

Request Syntax

response = client.start_schema_creation(
    apiId='string',
    definition=b'bytes'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • definition (bytes) --

    [REQUIRED]

    The schema definition, in GraphQL schema language format.

Return type

dict

Returns

Response Syntax

{
    'status': 'PROCESSING'|'ACTIVE'|'DELETING'|'FAILED'|'SUCCESS'|'NOT_APPLICABLE'
}

Response Structure

  • (dict) --

    • status (string) --

      The current state of the schema (PROCESSING, FAILED, SUCCESS, or NOT_APPLICABLE). When the schema is in the ACTIVE state, you can add data.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
tag_resource(**kwargs)

Tags a resource with user-supplied tags.

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    resourceArn='string',
    tags={
        'string': 'string'
    }
)
Parameters
  • resourceArn (string) --

    [REQUIRED]

    The GraphqlApi Amazon Resource Name (ARN).

  • tags (dict) --

    [REQUIRED]

    A TagMap object.

    • (string) --

      The key for the tag.

      • (string) --

        The value for the tag.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.LimitExceededException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
  • AppSync.Client.exceptions.AccessDeniedException
untag_resource(**kwargs)

Untags a resource.

See also: AWS API Documentation

Request Syntax

response = client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
Parameters
  • resourceArn (string) --

    [REQUIRED]

    The GraphqlApi Amazon Resource Name (ARN).

  • tagKeys (list) --

    [REQUIRED]

    A list of TagKey objects.

    • (string) --

      The key for the tag.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.LimitExceededException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
  • AppSync.Client.exceptions.AccessDeniedException
update_api_cache(**kwargs)

Updates the cache for the GraphQL API.

See also: AWS API Documentation

Request Syntax

response = client.update_api_cache(
    apiId='string',
    ttl=123,
    apiCachingBehavior='FULL_REQUEST_CACHING'|'PER_RESOLVER_CACHING',
    type='T2_SMALL'|'T2_MEDIUM'|'R4_LARGE'|'R4_XLARGE'|'R4_2XLARGE'|'R4_4XLARGE'|'R4_8XLARGE'|'SMALL'|'MEDIUM'|'LARGE'|'XLARGE'|'LARGE_2X'|'LARGE_4X'|'LARGE_8X'|'LARGE_12X'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The GraphQL API ID.

  • ttl (integer) --

    [REQUIRED]

    TTL in seconds for cache entries.

    Valid values are 1–3,600 seconds.

  • apiCachingBehavior (string) --

    [REQUIRED]

    Caching behavior.

    • FULL_REQUEST_CACHING : All requests are fully cached.
    • PER_RESOLVER_CACHING : Individual resolvers that you specify are cached.
  • type (string) --

    [REQUIRED]

    The cache instance type. Valid values are

    • SMALL
    • MEDIUM
    • LARGE
    • XLARGE
    • LARGE_2X
    • LARGE_4X
    • LARGE_8X (not available in all regions)
    • LARGE_12X

    Historically, instance types were identified by an EC2-style value. As of July 2020, this is deprecated, and the generic identifiers above should be used.

    The following legacy instance types are available, but their use is discouraged:

    • T2_SMALL : A t2.small instance type.
    • T2_MEDIUM : A t2.medium instance type.
    • R4_LARGE : A r4.large instance type.
    • R4_XLARGE : A r4.xlarge instance type.
    • R4_2XLARGE : A r4.2xlarge instance type.
    • R4_4XLARGE : A r4.4xlarge instance type.
    • R4_8XLARGE : A r4.8xlarge instance type.
Return type

dict

Returns

Response Syntax

{
    'apiCache': {
        'ttl': 123,
        'apiCachingBehavior': 'FULL_REQUEST_CACHING'|'PER_RESOLVER_CACHING',
        'transitEncryptionEnabled': True|False,
        'atRestEncryptionEnabled': True|False,
        'type': 'T2_SMALL'|'T2_MEDIUM'|'R4_LARGE'|'R4_XLARGE'|'R4_2XLARGE'|'R4_4XLARGE'|'R4_8XLARGE'|'SMALL'|'MEDIUM'|'LARGE'|'XLARGE'|'LARGE_2X'|'LARGE_4X'|'LARGE_8X'|'LARGE_12X',
        'status': 'AVAILABLE'|'CREATING'|'DELETING'|'MODIFYING'|'FAILED'
    }
}

Response Structure

  • (dict) --

    Represents the output of a UpdateApiCache operation.

    • apiCache (dict) --

      The ApiCache object.

      • ttl (integer) --

        TTL in seconds for cache entries.

        Valid values are 1–3,600 seconds.

      • apiCachingBehavior (string) --

        Caching behavior.

        • FULL_REQUEST_CACHING : All requests are fully cached.
        • PER_RESOLVER_CACHING : Individual resolvers that you specify are cached.
      • transitEncryptionEnabled (boolean) --

        Transit encryption flag when connecting to cache. You cannot update this setting after creation.

      • atRestEncryptionEnabled (boolean) --

        At-rest encryption flag for cache. You cannot update this setting after creation.

      • type (string) --

        The cache instance type. Valid values are

        • SMALL
        • MEDIUM
        • LARGE
        • XLARGE
        • LARGE_2X
        • LARGE_4X
        • LARGE_8X (not available in all regions)
        • LARGE_12X

        Historically, instance types were identified by an EC2-style value. As of July 2020, this is deprecated, and the generic identifiers above should be used.

        The following legacy instance types are available, but their use is discouraged:

        • T2_SMALL : A t2.small instance type.
        • T2_MEDIUM : A t2.medium instance type.
        • R4_LARGE : A r4.large instance type.
        • R4_XLARGE : A r4.xlarge instance type.
        • R4_2XLARGE : A r4.2xlarge instance type.
        • R4_4XLARGE : A r4.4xlarge instance type.
        • R4_8XLARGE : A r4.8xlarge instance type.
      • status (string) --

        The cache instance status.

        • AVAILABLE : The instance is available for use.
        • CREATING : The instance is currently creating.
        • DELETING : The instance is currently deleting.
        • MODIFYING : The instance is currently modifying.
        • FAILED : The instance has failed creation.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
update_api_key(**kwargs)

Updates an API key. You can update the key as long as it's not deleted.

See also: AWS API Documentation

Request Syntax

response = client.update_api_key(
    apiId='string',
    id='string',
    description='string',
    expires=123
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The ID for the GraphQL API.

  • id (string) --

    [REQUIRED]

    The API key ID.

  • description (string) -- A description of the purpose of the API key.
  • expires (integer) -- From the update time, the time after which the API key expires. The date is represented as seconds since the epoch. For more information, see .
Return type

dict

Returns

Response Syntax

{
    'apiKey': {
        'id': 'string',
        'description': 'string',
        'expires': 123,
        'deletes': 123
    }
}

Response Structure

  • (dict) --

    • apiKey (dict) --

      The API key.

      • id (string) --

        The API key ID.

      • description (string) --

        A description of the purpose of the API key.

      • expires (integer) --

        The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.

      • deletes (integer) --

        The time after which the API key is deleted. The date is represented as seconds since the epoch, rounded down to the nearest hour.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.LimitExceededException
  • AppSync.Client.exceptions.InternalFailureException
  • AppSync.Client.exceptions.ApiKeyValidityOutOfBoundsException
update_data_source(**kwargs)

Updates a DataSource object.

See also: AWS API Documentation

Request Syntax

response = client.update_data_source(
    apiId='string',
    name='string',
    description='string',
    type='AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP'|'RELATIONAL_DATABASE'|'AMAZON_OPENSEARCH_SERVICE',
    serviceRoleArn='string',
    dynamodbConfig={
        'tableName': 'string',
        'awsRegion': 'string',
        'useCallerCredentials': True|False,
        'deltaSyncConfig': {
            'baseTableTTL': 123,
            'deltaSyncTableName': 'string',
            'deltaSyncTableTTL': 123
        },
        'versioned': True|False
    },
    lambdaConfig={
        'lambdaFunctionArn': 'string'
    },
    elasticsearchConfig={
        'endpoint': 'string',
        'awsRegion': 'string'
    },
    openSearchServiceConfig={
        'endpoint': 'string',
        'awsRegion': 'string'
    },
    httpConfig={
        'endpoint': 'string',
        'authorizationConfig': {
            'authorizationType': 'AWS_IAM',
            'awsIamConfig': {
                'signingRegion': 'string',
                'signingServiceName': 'string'
            }
        }
    },
    relationalDatabaseConfig={
        'relationalDatabaseSourceType': 'RDS_HTTP_ENDPOINT',
        'rdsHttpEndpointConfig': {
            'awsRegion': 'string',
            'dbClusterIdentifier': 'string',
            'databaseName': 'string',
            'schema': 'string',
            'awsSecretStoreArn': 'string'
        }
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • name (string) --

    [REQUIRED]

    The new name for the data source.

  • description (string) -- The new description for the data source.
  • type (string) --

    [REQUIRED]

    The new data source type.

  • serviceRoleArn (string) -- The new service role Amazon Resource Name (ARN) for the data source.
  • dynamodbConfig (dict) --

    The new Amazon DynamoDB configuration.

    • tableName (string) -- [REQUIRED]

      The table name.

    • awsRegion (string) -- [REQUIRED]

      The Amazon Web Services Region.

    • useCallerCredentials (boolean) --

      Set to TRUE to use Amazon Cognito credentials with this data source.

    • deltaSyncConfig (dict) --

      The DeltaSyncConfig for a versioned data source.

      • baseTableTTL (integer) --

        The number of minutes that an Item is stored in the data source.

      • deltaSyncTableName (string) --

        The Delta Sync table name.

      • deltaSyncTableTTL (integer) --

        The number of minutes that a Delta Sync log entry is stored in the Delta Sync table.

    • versioned (boolean) --

      Set to TRUE to use Conflict Detection and Resolution with this data source.

  • lambdaConfig (dict) --

    The new Lambda configuration.

    • lambdaFunctionArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) for the Lambda function.

  • elasticsearchConfig (dict) --

    The new OpenSearch configuration.

    As of September 2021, Amazon Elasticsearch service is Amazon OpenSearch Service. This configuration is deprecated. Instead, use UpdateDataSourceRequest$openSearchServiceConfig to update an OpenSearch data source.

    • endpoint (string) -- [REQUIRED]

      The endpoint.

    • awsRegion (string) -- [REQUIRED]

      The Amazon Web Services Region.

  • openSearchServiceConfig (dict) --

    The new OpenSearch configuration.

    • endpoint (string) -- [REQUIRED]

      The endpoint.

    • awsRegion (string) -- [REQUIRED]

      The Amazon Web Services Region.

  • httpConfig (dict) --

    The new HTTP endpoint configuration.

    • endpoint (string) --

      The HTTP URL endpoint. You can specify either the domain name or IP, and port combination, and the URL scheme must be HTTP or HTTPS. If you don't specify the port, AppSync uses the default port 80 for the HTTP endpoint and port 443 for HTTPS endpoints.

    • authorizationConfig (dict) --

      The authorization configuration in case the HTTP endpoint requires authorization.

      • authorizationType (string) -- [REQUIRED]

        The authorization type that the HTTP endpoint requires.

        • AWS_IAM : The authorization type is Signature Version 4 (SigV4).
      • awsIamConfig (dict) --

        The Identity and Access Management (IAM) settings.

        • signingRegion (string) --

          The signing Amazon Web Services Region for IAM authorization.

        • signingServiceName (string) --

          The signing service name for IAM authorization.

  • relationalDatabaseConfig (dict) --

    The new relational database configuration.

    • relationalDatabaseSourceType (string) --

      Source type for the relational database.

      • RDS_HTTP_ENDPOINT : The relational database source type is an Amazon Relational Database Service (Amazon RDS) HTTP endpoint.
    • rdsHttpEndpointConfig (dict) --

      Amazon RDS HTTP endpoint settings.

      • awsRegion (string) --

        Amazon Web Services Region for Amazon RDS HTTP endpoint.

      • dbClusterIdentifier (string) --

        Amazon RDS cluster Amazon Resource Name (ARN).

      • databaseName (string) --

        Logical database name.

      • schema (string) --

        Logical schema name.

      • awsSecretStoreArn (string) --

        Amazon Web Services secret store Amazon Resource Name (ARN) for database credentials.

Return type

dict

Returns

Response Syntax

{
    'dataSource': {
        'dataSourceArn': 'string',
        'name': 'string',
        'description': 'string',
        'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP'|'RELATIONAL_DATABASE'|'AMAZON_OPENSEARCH_SERVICE',
        'serviceRoleArn': 'string',
        'dynamodbConfig': {
            'tableName': 'string',
            'awsRegion': 'string',
            'useCallerCredentials': True|False,
            'deltaSyncConfig': {
                'baseTableTTL': 123,
                'deltaSyncTableName': 'string',
                'deltaSyncTableTTL': 123
            },
            'versioned': True|False
        },
        'lambdaConfig': {
            'lambdaFunctionArn': 'string'
        },
        'elasticsearchConfig': {
            'endpoint': 'string',
            'awsRegion': 'string'
        },
        'openSearchServiceConfig': {
            'endpoint': 'string',
            'awsRegion': 'string'
        },
        'httpConfig': {
            'endpoint': 'string',
            'authorizationConfig': {
                'authorizationType': 'AWS_IAM',
                'awsIamConfig': {
                    'signingRegion': 'string',
                    'signingServiceName': 'string'
                }
            }
        },
        'relationalDatabaseConfig': {
            'relationalDatabaseSourceType': 'RDS_HTTP_ENDPOINT',
            'rdsHttpEndpointConfig': {
                'awsRegion': 'string',
                'dbClusterIdentifier': 'string',
                'databaseName': 'string',
                'schema': 'string',
                'awsSecretStoreArn': 'string'
            }
        }
    }
}

Response Structure

  • (dict) --

    • dataSource (dict) --

      The updated DataSource object.

      • dataSourceArn (string) --

        The data source Amazon Resource Name (ARN).

      • name (string) --

        The name of the data source.

      • description (string) --

        The description of the data source.

      • type (string) --

        The type of the data source.

        • AWS_LAMBDA : The data source is an Lambda function.
        • AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table.
        • AMAZON_ELASTICSEARCH : The data source is an Amazon OpenSearch Service domain.
        • AMAZON_OPENSEARCH_SERVICE : The data source is an Amazon OpenSearch Service domain.
        • NONE : There is no data source. Use this type when you want to invoke a GraphQL operation without connecting to a data source, such as when you're performing data transformation with resolvers or invoking a subscription from a mutation.
        • HTTP : The data source is an HTTP endpoint.
        • RELATIONAL_DATABASE : The data source is a relational database.
      • serviceRoleArn (string) --

        The Identity and Access Management (IAM) service role Amazon Resource Name (ARN) for the data source. The system assumes this role when accessing the data source.

      • dynamodbConfig (dict) --

        DynamoDB settings.

        • tableName (string) --

          The table name.

        • awsRegion (string) --

          The Amazon Web Services Region.

        • useCallerCredentials (boolean) --

          Set to TRUE to use Amazon Cognito credentials with this data source.

        • deltaSyncConfig (dict) --

          The DeltaSyncConfig for a versioned data source.

          • baseTableTTL (integer) --

            The number of minutes that an Item is stored in the data source.

          • deltaSyncTableName (string) --

            The Delta Sync table name.

          • deltaSyncTableTTL (integer) --

            The number of minutes that a Delta Sync log entry is stored in the Delta Sync table.

        • versioned (boolean) --

          Set to TRUE to use Conflict Detection and Resolution with this data source.

      • lambdaConfig (dict) --

        Lambda settings.

        • lambdaFunctionArn (string) --

          The Amazon Resource Name (ARN) for the Lambda function.

      • elasticsearchConfig (dict) --

        Amazon OpenSearch Service settings.

        • endpoint (string) --

          The endpoint.

        • awsRegion (string) --

          The Amazon Web Services Region.

      • openSearchServiceConfig (dict) --

        Amazon OpenSearch Service settings.

        • endpoint (string) --

          The endpoint.

        • awsRegion (string) --

          The Amazon Web Services Region.

      • httpConfig (dict) --

        HTTP endpoint settings.

        • endpoint (string) --

          The HTTP URL endpoint. You can specify either the domain name or IP, and port combination, and the URL scheme must be HTTP or HTTPS. If you don't specify the port, AppSync uses the default port 80 for the HTTP endpoint and port 443 for HTTPS endpoints.

        • authorizationConfig (dict) --

          The authorization configuration in case the HTTP endpoint requires authorization.

          • authorizationType (string) --

            The authorization type that the HTTP endpoint requires.

            • AWS_IAM : The authorization type is Signature Version 4 (SigV4).
          • awsIamConfig (dict) --

            The Identity and Access Management (IAM) settings.

            • signingRegion (string) --

              The signing Amazon Web Services Region for IAM authorization.

            • signingServiceName (string) --

              The signing service name for IAM authorization.

      • relationalDatabaseConfig (dict) --

        Relational database settings.

        • relationalDatabaseSourceType (string) --

          Source type for the relational database.

          • RDS_HTTP_ENDPOINT : The relational database source type is an Amazon Relational Database Service (Amazon RDS) HTTP endpoint.
        • rdsHttpEndpointConfig (dict) --

          Amazon RDS HTTP endpoint settings.

          • awsRegion (string) --

            Amazon Web Services Region for Amazon RDS HTTP endpoint.

          • dbClusterIdentifier (string) --

            Amazon RDS cluster Amazon Resource Name (ARN).

          • databaseName (string) --

            Logical database name.

          • schema (string) --

            Logical schema name.

          • awsSecretStoreArn (string) --

            Amazon Web Services secret store Amazon Resource Name (ARN) for database credentials.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
update_domain_name(**kwargs)

Updates a custom DomainName object.

See also: AWS API Documentation

Request Syntax

response = client.update_domain_name(
    domainName='string',
    description='string'
)
Parameters
  • domainName (string) --

    [REQUIRED]

    The domain name.

  • description (string) -- A description of the DomainName .
Return type

dict

Returns

Response Syntax

{
    'domainNameConfig': {
        'domainName': 'string',
        'description': 'string',
        'certificateArn': 'string',
        'appsyncDomainName': 'string',
        'hostedZoneId': 'string'
    }
}

Response Structure

  • (dict) --

    • domainNameConfig (dict) --

      The configuration for the DomainName .

      • domainName (string) --

        The domain name.

      • description (string) --

        A description of the DomainName configuration.

      • certificateArn (string) --

        The Amazon Resource Name (ARN) of the certificate. This can be an Certificate Manager (ACM) certificate or an Identity and Access Management (IAM) server certificate.

      • appsyncDomainName (string) --

        The domain name that AppSync provides.

      • hostedZoneId (string) --

        The ID of your Amazon Route 53 hosted zone.

Exceptions

  • AppSync.Client.exceptions.AccessDeniedException
  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.InternalFailureException
  • AppSync.Client.exceptions.NotFoundException
update_function(**kwargs)

Updates a Function object.

See also: AWS API Documentation

Request Syntax

response = client.update_function(
    apiId='string',
    name='string',
    description='string',
    functionId='string',
    dataSourceName='string',
    requestMappingTemplate='string',
    responseMappingTemplate='string',
    functionVersion='string',
    syncConfig={
        'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
        'conflictDetection': 'VERSION'|'NONE',
        'lambdaConflictHandlerConfig': {
            'lambdaConflictHandlerArn': 'string'
        }
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The GraphQL API ID.

  • name (string) --

    [REQUIRED]

    The Function name.

  • description (string) -- The Function description.
  • functionId (string) --

    [REQUIRED]

    The function ID.

  • dataSourceName (string) --

    [REQUIRED]

    The Function DataSource name.

  • requestMappingTemplate (string) -- The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
  • responseMappingTemplate (string) -- The Function request mapping template.
  • functionVersion (string) --

    [REQUIRED]

    The version of the request mapping template. Currently, the supported value is 2018-05-29.

  • syncConfig (dict) --

    Describes a Sync configuration for a resolver.

    Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.

    • conflictHandler (string) --

      The Conflict Resolution strategy to perform in the event of a conflict.

      • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
      • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
      • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
    • conflictDetection (string) --

      The Conflict Detection strategy to use.

      • VERSION : Detect conflicts based on object versions for this resolver.
      • NONE : Do not detect conflicts when invoking this resolver.
    • lambdaConflictHandlerConfig (dict) --

      The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

      • lambdaConflictHandlerArn (string) --

        The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

Return type

dict

Returns

Response Syntax

{
    'functionConfiguration': {
        'functionId': 'string',
        'functionArn': 'string',
        'name': 'string',
        'description': 'string',
        'dataSourceName': 'string',
        'requestMappingTemplate': 'string',
        'responseMappingTemplate': 'string',
        'functionVersion': 'string',
        'syncConfig': {
            'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
            'conflictDetection': 'VERSION'|'NONE',
            'lambdaConflictHandlerConfig': {
                'lambdaConflictHandlerArn': 'string'
            }
        }
    }
}

Response Structure

  • (dict) --

    • functionConfiguration (dict) --

      The Function object.

      • functionId (string) --

        A unique ID representing the Function object.

      • functionArn (string) --

        The Amazon Resource Name (ARN) of the Function object.

      • name (string) --

        The name of the Function object.

      • description (string) --

        The Function description.

      • dataSourceName (string) --

        The name of the DataSource .

      • requestMappingTemplate (string) --

        The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.

      • responseMappingTemplate (string) --

        The Function response mapping template.

      • functionVersion (string) --

        The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.

      • syncConfig (dict) --

        Describes a Sync configuration for a resolver.

        Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.

        • conflictHandler (string) --

          The Conflict Resolution strategy to perform in the event of a conflict.

          • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
          • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
          • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
        • conflictDetection (string) --

          The Conflict Detection strategy to use.

          • VERSION : Detect conflicts based on object versions for this resolver.
          • NONE : Do not detect conflicts when invoking this resolver.
        • lambdaConflictHandlerConfig (dict) --

          The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

          • lambdaConflictHandlerArn (string) --

            The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

Exceptions

  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
update_graphql_api(**kwargs)

Updates a GraphqlApi object.

See also: AWS API Documentation

Request Syntax

response = client.update_graphql_api(
    apiId='string',
    name='string',
    logConfig={
        'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
        'cloudWatchLogsRoleArn': 'string',
        'excludeVerboseContent': True|False
    },
    authenticationType='API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT'|'AWS_LAMBDA',
    userPoolConfig={
        'userPoolId': 'string',
        'awsRegion': 'string',
        'defaultAction': 'ALLOW'|'DENY',
        'appIdClientRegex': 'string'
    },
    openIDConnectConfig={
        'issuer': 'string',
        'clientId': 'string',
        'iatTTL': 123,
        'authTTL': 123
    },
    additionalAuthenticationProviders=[
        {
            'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT'|'AWS_LAMBDA',
            'openIDConnectConfig': {
                'issuer': 'string',
                'clientId': 'string',
                'iatTTL': 123,
                'authTTL': 123
            },
            'userPoolConfig': {
                'userPoolId': 'string',
                'awsRegion': 'string',
                'appIdClientRegex': 'string'
            },
            'lambdaAuthorizerConfig': {
                'authorizerResultTtlInSeconds': 123,
                'authorizerUri': 'string',
                'identityValidationExpression': 'string'
            }
        },
    ],
    xrayEnabled=True|False,
    lambdaAuthorizerConfig={
        'authorizerResultTtlInSeconds': 123,
        'authorizerUri': 'string',
        'identityValidationExpression': 'string'
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • name (string) --

    [REQUIRED]

    The new name for the GraphqlApi object.

  • logConfig (dict) --

    The Amazon CloudWatch Logs configuration for the GraphqlApi object.

    • fieldLogLevel (string) -- [REQUIRED]

      The field logging level. Values can be NONE, ERROR, or ALL.

      • NONE : No field-level logs are captured.
      • ERROR : Logs the following information only for the fields that are in error:
        • The error section in the server response.
        • Field-level errors.
        • The generated request/response functions that got resolved for error fields.
      • ALL : The following information is logged for all fields in the query:
        • Field-level tracing information.
        • The generated request/response functions that got resolved for each field.
    • cloudWatchLogsRoleArn (string) -- [REQUIRED]

      The service role that AppSync assumes to publish to CloudWatch logs in your account.

    • excludeVerboseContent (boolean) --

      Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level.

  • authenticationType (string) -- The new authentication type for the GraphqlApi object.
  • userPoolConfig (dict) --

    The new Amazon Cognito user pool configuration for the ~GraphqlApi object.

    • userPoolId (string) -- [REQUIRED]

      The user pool ID.

    • awsRegion (string) -- [REQUIRED]

      The Amazon Web Services Region in which the user pool was created.

    • defaultAction (string) -- [REQUIRED]

      The action that you want your GraphQL API to take when a request that uses Amazon Cognito user pool authentication doesn't match the Amazon Cognito user pool configuration.

    • appIdClientRegex (string) --

      A regular expression for validating the incoming Amazon Cognito user pool app client ID.

  • openIDConnectConfig (dict) --

    The OpenID Connect configuration for the GraphqlApi object.

    • issuer (string) -- [REQUIRED]

      The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

    • clientId (string) --

      The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

    • iatTTL (integer) --

      The number of milliseconds that a token is valid after it's issued to a user.

    • authTTL (integer) --

      The number of milliseconds that a token is valid after being authenticated.

  • additionalAuthenticationProviders (list) --

    A list of additional authentication providers for the GraphqlApi API.

    • (dict) --

      Describes an additional authentication provider.

      • authenticationType (string) --

        The authentication type: API key, Identity and Access Management (IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or Lambda.

      • openIDConnectConfig (dict) --

        The OIDC configuration.

        • issuer (string) -- [REQUIRED]

          The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

        • clientId (string) --

          The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

        • iatTTL (integer) --

          The number of milliseconds that a token is valid after it's issued to a user.

        • authTTL (integer) --

          The number of milliseconds that a token is valid after being authenticated.

      • userPoolConfig (dict) --

        The Amazon Cognito user pool configuration.

        • userPoolId (string) -- [REQUIRED]

          The user pool ID.

        • awsRegion (string) -- [REQUIRED]

          The Amazon Web Services Region in which the user pool was created.

        • appIdClientRegex (string) --

          A regular expression for validating the incoming Amazon Cognito user pool app client ID.

      • lambdaAuthorizerConfig (dict) --

        Configuration for Lambda function authorization.

        • authorizerResultTtlInSeconds (integer) --

          The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

        • authorizerUri (string) -- [REQUIRED]

          The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3 ), or an alias ARN.

          Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

          aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

        • identityValidationExpression (string) --

          A regular expression for validation of tokens before the Lambda function is called.

  • xrayEnabled (boolean) -- A flag indicating whether to use X-Ray tracing for the GraphqlApi .
  • lambdaAuthorizerConfig (dict) --

    Configuration for Lambda function authorization.

    • authorizerResultTtlInSeconds (integer) --

      The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

    • authorizerUri (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3 ), or an alias ARN.

      Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

      aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

    • identityValidationExpression (string) --

      A regular expression for validation of tokens before the Lambda function is called.

Return type

dict

Returns

Response Syntax

{
    'graphqlApi': {
        'name': 'string',
        'apiId': 'string',
        'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT'|'AWS_LAMBDA',
        'logConfig': {
            'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
            'cloudWatchLogsRoleArn': 'string',
            'excludeVerboseContent': True|False
        },
        'userPoolConfig': {
            'userPoolId': 'string',
            'awsRegion': 'string',
            'defaultAction': 'ALLOW'|'DENY',
            'appIdClientRegex': 'string'
        },
        'openIDConnectConfig': {
            'issuer': 'string',
            'clientId': 'string',
            'iatTTL': 123,
            'authTTL': 123
        },
        'arn': 'string',
        'uris': {
            'string': 'string'
        },
        'tags': {
            'string': 'string'
        },
        'additionalAuthenticationProviders': [
            {
                'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT'|'AWS_LAMBDA',
                'openIDConnectConfig': {
                    'issuer': 'string',
                    'clientId': 'string',
                    'iatTTL': 123,
                    'authTTL': 123
                },
                'userPoolConfig': {
                    'userPoolId': 'string',
                    'awsRegion': 'string',
                    'appIdClientRegex': 'string'
                },
                'lambdaAuthorizerConfig': {
                    'authorizerResultTtlInSeconds': 123,
                    'authorizerUri': 'string',
                    'identityValidationExpression': 'string'
                }
            },
        ],
        'xrayEnabled': True|False,
        'wafWebAclArn': 'string',
        'lambdaAuthorizerConfig': {
            'authorizerResultTtlInSeconds': 123,
            'authorizerUri': 'string',
            'identityValidationExpression': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • graphqlApi (dict) --

      The updated GraphqlApi object.

      • name (string) --

        The API name.

      • apiId (string) --

        The API ID.

      • authenticationType (string) --

        The authentication type.

      • logConfig (dict) --

        The Amazon CloudWatch Logs configuration.

        • fieldLogLevel (string) --

          The field logging level. Values can be NONE, ERROR, or ALL.

          • NONE : No field-level logs are captured.
          • ERROR : Logs the following information only for the fields that are in error:
            • The error section in the server response.
            • Field-level errors.
            • The generated request/response functions that got resolved for error fields.
          • ALL : The following information is logged for all fields in the query:
            • Field-level tracing information.
            • The generated request/response functions that got resolved for each field.
        • cloudWatchLogsRoleArn (string) --

          The service role that AppSync assumes to publish to CloudWatch logs in your account.

        • excludeVerboseContent (boolean) --

          Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level.

      • userPoolConfig (dict) --

        The Amazon Cognito user pool configuration.

        • userPoolId (string) --

          The user pool ID.

        • awsRegion (string) --

          The Amazon Web Services Region in which the user pool was created.

        • defaultAction (string) --

          The action that you want your GraphQL API to take when a request that uses Amazon Cognito user pool authentication doesn't match the Amazon Cognito user pool configuration.

        • appIdClientRegex (string) --

          A regular expression for validating the incoming Amazon Cognito user pool app client ID.

      • openIDConnectConfig (dict) --

        The OpenID Connect configuration.

        • issuer (string) --

          The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

        • clientId (string) --

          The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

        • iatTTL (integer) --

          The number of milliseconds that a token is valid after it's issued to a user.

        • authTTL (integer) --

          The number of milliseconds that a token is valid after being authenticated.

      • arn (string) --

        The Amazon Resource Name (ARN).

      • uris (dict) --

        The URIs.

        • (string) --
          • (string) --
      • tags (dict) --

        The tags.

        • (string) --

          The key for the tag.

          • (string) --

            The value for the tag.

      • additionalAuthenticationProviders (list) --

        A list of additional authentication providers for the GraphqlApi API.

        • (dict) --

          Describes an additional authentication provider.

          • authenticationType (string) --

            The authentication type: API key, Identity and Access Management (IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or Lambda.

          • openIDConnectConfig (dict) --

            The OIDC configuration.

            • issuer (string) --

              The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

            • clientId (string) --

              The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

            • iatTTL (integer) --

              The number of milliseconds that a token is valid after it's issued to a user.

            • authTTL (integer) --

              The number of milliseconds that a token is valid after being authenticated.

          • userPoolConfig (dict) --

            The Amazon Cognito user pool configuration.

            • userPoolId (string) --

              The user pool ID.

            • awsRegion (string) --

              The Amazon Web Services Region in which the user pool was created.

            • appIdClientRegex (string) --

              A regular expression for validating the incoming Amazon Cognito user pool app client ID.

          • lambdaAuthorizerConfig (dict) --

            Configuration for Lambda function authorization.

            • authorizerResultTtlInSeconds (integer) --

              The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

            • authorizerUri (string) --

              The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3 ), or an alias ARN.

              Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

              aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

            • identityValidationExpression (string) --

              A regular expression for validation of tokens before the Lambda function is called.

      • xrayEnabled (boolean) --

        A flag indicating whether to use X-Ray tracing for this GraphqlApi .

      • wafWebAclArn (string) --

        The ARN of the WAF access control list (ACL) associated with this GraphqlApi , if one exists.

      • lambdaAuthorizerConfig (dict) --

        Configuration for Lambda function authorization.

        • authorizerResultTtlInSeconds (integer) --

          The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

        • authorizerUri (string) --

          The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3 ), or an alias ARN.

          Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

          aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

        • identityValidationExpression (string) --

          A regular expression for validation of tokens before the Lambda function is called.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
  • AppSync.Client.exceptions.AccessDeniedException
update_resolver(**kwargs)

Updates a Resolver object.

See also: AWS API Documentation

Request Syntax

response = client.update_resolver(
    apiId='string',
    typeName='string',
    fieldName='string',
    dataSourceName='string',
    requestMappingTemplate='string',
    responseMappingTemplate='string',
    kind='UNIT'|'PIPELINE',
    pipelineConfig={
        'functions': [
            'string',
        ]
    },
    syncConfig={
        'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
        'conflictDetection': 'VERSION'|'NONE',
        'lambdaConflictHandlerConfig': {
            'lambdaConflictHandlerArn': 'string'
        }
    },
    cachingConfig={
        'ttl': 123,
        'cachingKeys': [
            'string',
        ]
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • typeName (string) --

    [REQUIRED]

    The new type name.

  • fieldName (string) --

    [REQUIRED]

    The new field name.

  • dataSourceName (string) -- The new data source name.
  • requestMappingTemplate (string) --

    The new request mapping template.

    A resolver uses a request mapping template to convert a GraphQL expression into a format that a data source can understand. Mapping templates are written in Apache Velocity Template Language (VTL).

    VTL request mapping templates are optional when using an Lambda data source. For all other data sources, VTL request and response mapping templates are required.

  • responseMappingTemplate (string) -- The new response mapping template.
  • kind (string) --

    The resolver type.

    • UNIT : A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
    • PIPELINE : A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
  • pipelineConfig (dict) --

    The PipelineConfig .

    • functions (list) --

      A list of Function objects.

      • (string) --
  • syncConfig (dict) --

    The SyncConfig for a resolver attached to a versioned data source.

    • conflictHandler (string) --

      The Conflict Resolution strategy to perform in the event of a conflict.

      • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
      • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
      • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
    • conflictDetection (string) --

      The Conflict Detection strategy to use.

      • VERSION : Detect conflicts based on object versions for this resolver.
      • NONE : Do not detect conflicts when invoking this resolver.
    • lambdaConflictHandlerConfig (dict) --

      The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

      • lambdaConflictHandlerArn (string) --

        The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

  • cachingConfig (dict) --

    The caching configuration for the resolver.

    • ttl (integer) --

      The TTL in seconds for a resolver that has caching activated.

      Valid values are 1–3,600 seconds.

    • cachingKeys (list) --

      The caching keys for a resolver that has caching activated.

      Valid values are entries from the $context.arguments , $context.source , and $context.identity maps.

      • (string) --
Return type

dict

Returns

Response Syntax

{
    'resolver': {
        'typeName': 'string',
        'fieldName': 'string',
        'dataSourceName': 'string',
        'resolverArn': 'string',
        'requestMappingTemplate': 'string',
        'responseMappingTemplate': 'string',
        'kind': 'UNIT'|'PIPELINE',
        'pipelineConfig': {
            'functions': [
                'string',
            ]
        },
        'syncConfig': {
            'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
            'conflictDetection': 'VERSION'|'NONE',
            'lambdaConflictHandlerConfig': {
                'lambdaConflictHandlerArn': 'string'
            }
        },
        'cachingConfig': {
            'ttl': 123,
            'cachingKeys': [
                'string',
            ]
        }
    }
}

Response Structure

  • (dict) --

    • resolver (dict) --

      The updated Resolver object.

      • typeName (string) --

        The resolver type name.

      • fieldName (string) --

        The resolver field name.

      • dataSourceName (string) --

        The resolver data source name.

      • resolverArn (string) --

        The resolver Amazon Resource Name (ARN).

      • requestMappingTemplate (string) --

        The request mapping template.

      • responseMappingTemplate (string) --

        The response mapping template.

      • kind (string) --

        The resolver type.

        • UNIT : A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
        • PIPELINE : A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
      • pipelineConfig (dict) --

        The PipelineConfig .

        • functions (list) --

          A list of Function objects.

          • (string) --
      • syncConfig (dict) --

        The SyncConfig for a resolver attached to a versioned data source.

        • conflictHandler (string) --

          The Conflict Resolution strategy to perform in the event of a conflict.

          • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
          • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
          • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
        • conflictDetection (string) --

          The Conflict Detection strategy to use.

          • VERSION : Detect conflicts based on object versions for this resolver.
          • NONE : Do not detect conflicts when invoking this resolver.
        • lambdaConflictHandlerConfig (dict) --

          The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

          • lambdaConflictHandlerArn (string) --

            The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

      • cachingConfig (dict) --

        The caching configuration for the resolver.

        • ttl (integer) --

          The TTL in seconds for a resolver that has caching activated.

          Valid values are 1–3,600 seconds.

        • cachingKeys (list) --

          The caching keys for a resolver that has caching activated.

          Valid values are entries from the $context.arguments , $context.source , and $context.identity maps.

          • (string) --

Exceptions

  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException
update_type(**kwargs)

Updates a Type object.

See also: AWS API Documentation

Request Syntax

response = client.update_type(
    apiId='string',
    typeName='string',
    definition='string',
    format='SDL'|'JSON'
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • typeName (string) --

    [REQUIRED]

    The new type name.

  • definition (string) -- The new definition.
  • format (string) --

    [REQUIRED]

    The new type format: SDL or JSON.

Return type

dict

Returns

Response Syntax

{
    'type': {
        'name': 'string',
        'description': 'string',
        'arn': 'string',
        'definition': 'string',
        'format': 'SDL'|'JSON'
    }
}

Response Structure

  • (dict) --

    • type (dict) --

      The updated Type object.

      • name (string) --

        The type name.

      • description (string) --

        The type description.

      • arn (string) --

        The type Amazon Resource Name (ARN).

      • definition (string) --

        The type definition.

      • format (string) --

        The type format: SDL or JSON.

Exceptions

  • AppSync.Client.exceptions.BadRequestException
  • AppSync.Client.exceptions.ConcurrentModificationException
  • AppSync.Client.exceptions.NotFoundException
  • AppSync.Client.exceptions.UnauthorizedException
  • AppSync.Client.exceptions.InternalFailureException

Paginators

The available paginators are:

class AppSync.Paginator.ListApiKeys
paginator = client.get_paginator('list_api_keys')
paginate(**kwargs)

Creates an iterator that will paginate through responses from AppSync.Client.list_api_keys().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    apiId='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'apiKeys': [
        {
            'id': 'string',
            'description': 'string',
            'expires': 123,
            'deletes': 123
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • apiKeys (list) --

      The ApiKey objects.

      • (dict) --

        Describes an API key.

        Customers invoke AppSync GraphQL API operations with API keys as an identity mechanism. There are two key versions:

        da1 : We introduced this version at launch in November 2017. These keys always expire after 7 days. Amazon DynamoDB TTL manages key expiration. These keys ceased to be valid after February 21, 2018, and they should no longer be used.

        • ListApiKeys returns the expiration time in milliseconds.
        • CreateApiKey returns the expiration time in milliseconds.
        • UpdateApiKey is not available for this key version.
        • DeleteApiKey deletes the item from the table.
        • Expiration is stored in DynamoDB as milliseconds. This results in a bug where keys are not automatically deleted because DynamoDB expects the TTL to be stored in seconds. As a one-time action, we deleted these keys from the table on February 21, 2018.

        da2 : We introduced this version in February 2018 when AppSync added support to extend key expiration.

        • ListApiKeys returns the expiration time and deletion time in seconds.
        • CreateApiKey returns the expiration time and deletion time in seconds and accepts a user-provided expiration time in seconds.
        • UpdateApiKey returns the expiration time and and deletion time in seconds and accepts a user-provided expiration time in seconds. Expired API keys are kept for 60 days after the expiration time. You can update the key expiration time as long as the key isn't deleted.
        • DeleteApiKey deletes the item from the table.
        • Expiration is stored in DynamoDB as seconds. After the expiration time, using the key to authenticate will fail. However, you can reinstate the key before deletion.
        • Deletion is stored in DynamoDB as seconds. The key is deleted after deletion time.
        • id (string) --

          The API key ID.

        • description (string) --

          A description of the purpose of the API key.

        • expires (integer) --

          The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.

        • deletes (integer) --

          The time after which the API key is deleted. The date is represented as seconds since the epoch, rounded down to the nearest hour.

    • NextToken (string) --

      A token to resume pagination.

class AppSync.Paginator.ListDataSources
paginator = client.get_paginator('list_data_sources')
paginate(**kwargs)

Creates an iterator that will paginate through responses from AppSync.Client.list_data_sources().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    apiId='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'dataSources': [
        {
            'dataSourceArn': 'string',
            'name': 'string',
            'description': 'string',
            'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP'|'RELATIONAL_DATABASE'|'AMAZON_OPENSEARCH_SERVICE',
            'serviceRoleArn': 'string',
            'dynamodbConfig': {
                'tableName': 'string',
                'awsRegion': 'string',
                'useCallerCredentials': True|False,
                'deltaSyncConfig': {
                    'baseTableTTL': 123,
                    'deltaSyncTableName': 'string',
                    'deltaSyncTableTTL': 123
                },
                'versioned': True|False
            },
            'lambdaConfig': {
                'lambdaFunctionArn': 'string'
            },
            'elasticsearchConfig': {
                'endpoint': 'string',
                'awsRegion': 'string'
            },
            'openSearchServiceConfig': {
                'endpoint': 'string',
                'awsRegion': 'string'
            },
            'httpConfig': {
                'endpoint': 'string',
                'authorizationConfig': {
                    'authorizationType': 'AWS_IAM',
                    'awsIamConfig': {
                        'signingRegion': 'string',
                        'signingServiceName': 'string'
                    }
                }
            },
            'relationalDatabaseConfig': {
                'relationalDatabaseSourceType': 'RDS_HTTP_ENDPOINT',
                'rdsHttpEndpointConfig': {
                    'awsRegion': 'string',
                    'dbClusterIdentifier': 'string',
                    'databaseName': 'string',
                    'schema': 'string',
                    'awsSecretStoreArn': 'string'
                }
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • dataSources (list) --

      The DataSource objects.

      • (dict) --

        Describes a data source.

        • dataSourceArn (string) --

          The data source Amazon Resource Name (ARN).

        • name (string) --

          The name of the data source.

        • description (string) --

          The description of the data source.

        • type (string) --

          The type of the data source.

          • AWS_LAMBDA : The data source is an Lambda function.
          • AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table.
          • AMAZON_ELASTICSEARCH : The data source is an Amazon OpenSearch Service domain.
          • AMAZON_OPENSEARCH_SERVICE : The data source is an Amazon OpenSearch Service domain.
          • NONE : There is no data source. Use this type when you want to invoke a GraphQL operation without connecting to a data source, such as when you're performing data transformation with resolvers or invoking a subscription from a mutation.
          • HTTP : The data source is an HTTP endpoint.
          • RELATIONAL_DATABASE : The data source is a relational database.
        • serviceRoleArn (string) --

          The Identity and Access Management (IAM) service role Amazon Resource Name (ARN) for the data source. The system assumes this role when accessing the data source.

        • dynamodbConfig (dict) --

          DynamoDB settings.

          • tableName (string) --

            The table name.

          • awsRegion (string) --

            The Amazon Web Services Region.

          • useCallerCredentials (boolean) --

            Set to TRUE to use Amazon Cognito credentials with this data source.

          • deltaSyncConfig (dict) --

            The DeltaSyncConfig for a versioned data source.

            • baseTableTTL (integer) --

              The number of minutes that an Item is stored in the data source.

            • deltaSyncTableName (string) --

              The Delta Sync table name.

            • deltaSyncTableTTL (integer) --

              The number of minutes that a Delta Sync log entry is stored in the Delta Sync table.

          • versioned (boolean) --

            Set to TRUE to use Conflict Detection and Resolution with this data source.

        • lambdaConfig (dict) --

          Lambda settings.

          • lambdaFunctionArn (string) --

            The Amazon Resource Name (ARN) for the Lambda function.

        • elasticsearchConfig (dict) --

          Amazon OpenSearch Service settings.

          • endpoint (string) --

            The endpoint.

          • awsRegion (string) --

            The Amazon Web Services Region.

        • openSearchServiceConfig (dict) --

          Amazon OpenSearch Service settings.

          • endpoint (string) --

            The endpoint.

          • awsRegion (string) --

            The Amazon Web Services Region.

        • httpConfig (dict) --

          HTTP endpoint settings.

          • endpoint (string) --

            The HTTP URL endpoint. You can specify either the domain name or IP, and port combination, and the URL scheme must be HTTP or HTTPS. If you don't specify the port, AppSync uses the default port 80 for the HTTP endpoint and port 443 for HTTPS endpoints.

          • authorizationConfig (dict) --

            The authorization configuration in case the HTTP endpoint requires authorization.

            • authorizationType (string) --

              The authorization type that the HTTP endpoint requires.

              • AWS_IAM : The authorization type is Signature Version 4 (SigV4).
            • awsIamConfig (dict) --

              The Identity and Access Management (IAM) settings.

              • signingRegion (string) --

                The signing Amazon Web Services Region for IAM authorization.

              • signingServiceName (string) --

                The signing service name for IAM authorization.

        • relationalDatabaseConfig (dict) --

          Relational database settings.

          • relationalDatabaseSourceType (string) --

            Source type for the relational database.

            • RDS_HTTP_ENDPOINT : The relational database source type is an Amazon Relational Database Service (Amazon RDS) HTTP endpoint.
          • rdsHttpEndpointConfig (dict) --

            Amazon RDS HTTP endpoint settings.

            • awsRegion (string) --

              Amazon Web Services Region for Amazon RDS HTTP endpoint.

            • dbClusterIdentifier (string) --

              Amazon RDS cluster Amazon Resource Name (ARN).

            • databaseName (string) --

              Logical database name.

            • schema (string) --

              Logical schema name.

            • awsSecretStoreArn (string) --

              Amazon Web Services secret store Amazon Resource Name (ARN) for database credentials.

    • NextToken (string) --

      A token to resume pagination.

class AppSync.Paginator.ListFunctions
paginator = client.get_paginator('list_functions')
paginate(**kwargs)

Creates an iterator that will paginate through responses from AppSync.Client.list_functions().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    apiId='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The GraphQL API ID.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'functions': [
        {
            'functionId': 'string',
            'functionArn': 'string',
            'name': 'string',
            'description': 'string',
            'dataSourceName': 'string',
            'requestMappingTemplate': 'string',
            'responseMappingTemplate': 'string',
            'functionVersion': 'string',
            'syncConfig': {
                'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
                'conflictDetection': 'VERSION'|'NONE',
                'lambdaConflictHandlerConfig': {
                    'lambdaConflictHandlerArn': 'string'
                }
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • functions (list) --

      A list of Function objects.

      • (dict) --

        A function is a reusable entity. You can use multiple functions to compose the resolver logic.

        • functionId (string) --

          A unique ID representing the Function object.

        • functionArn (string) --

          The Amazon Resource Name (ARN) of the Function object.

        • name (string) --

          The name of the Function object.

        • description (string) --

          The Function description.

        • dataSourceName (string) --

          The name of the DataSource .

        • requestMappingTemplate (string) --

          The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.

        • responseMappingTemplate (string) --

          The Function response mapping template.

        • functionVersion (string) --

          The version of the request mapping template. Currently, only the 2018-05-29 version of the template is supported.

        • syncConfig (dict) --

          Describes a Sync configuration for a resolver.

          Specifies which Conflict Detection strategy and Resolution strategy to use when the resolver is invoked.

          • conflictHandler (string) --

            The Conflict Resolution strategy to perform in the event of a conflict.

            • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
            • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
            • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
          • conflictDetection (string) --

            The Conflict Detection strategy to use.

            • VERSION : Detect conflicts based on object versions for this resolver.
            • NONE : Do not detect conflicts when invoking this resolver.
          • lambdaConflictHandlerConfig (dict) --

            The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

            • lambdaConflictHandlerArn (string) --

              The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

    • NextToken (string) --

      A token to resume pagination.

class AppSync.Paginator.ListGraphqlApis
paginator = client.get_paginator('list_graphql_apis')
paginate(**kwargs)

Creates an iterator that will paginate through responses from AppSync.Client.list_graphql_apis().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
PaginationConfig (dict) --

A dictionary that provides parameters to control pagination.

  • MaxItems (integer) --

    The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

  • PageSize (integer) --

    The size of each page.

  • StartingToken (string) --

    A token to specify where to start paginating. This is the NextToken from a previous response.

Return type
dict
Returns
Response Syntax
{
    'graphqlApis': [
        {
            'name': 'string',
            'apiId': 'string',
            'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT'|'AWS_LAMBDA',
            'logConfig': {
                'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
                'cloudWatchLogsRoleArn': 'string',
                'excludeVerboseContent': True|False
            },
            'userPoolConfig': {
                'userPoolId': 'string',
                'awsRegion': 'string',
                'defaultAction': 'ALLOW'|'DENY',
                'appIdClientRegex': 'string'
            },
            'openIDConnectConfig': {
                'issuer': 'string',
                'clientId': 'string',
                'iatTTL': 123,
                'authTTL': 123
            },
            'arn': 'string',
            'uris': {
                'string': 'string'
            },
            'tags': {
                'string': 'string'
            },
            'additionalAuthenticationProviders': [
                {
                    'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT'|'AWS_LAMBDA',
                    'openIDConnectConfig': {
                        'issuer': 'string',
                        'clientId': 'string',
                        'iatTTL': 123,
                        'authTTL': 123
                    },
                    'userPoolConfig': {
                        'userPoolId': 'string',
                        'awsRegion': 'string',
                        'appIdClientRegex': 'string'
                    },
                    'lambdaAuthorizerConfig': {
                        'authorizerResultTtlInSeconds': 123,
                        'authorizerUri': 'string',
                        'identityValidationExpression': 'string'
                    }
                },
            ],
            'xrayEnabled': True|False,
            'wafWebAclArn': 'string',
            'lambdaAuthorizerConfig': {
                'authorizerResultTtlInSeconds': 123,
                'authorizerUri': 'string',
                'identityValidationExpression': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --
    • graphqlApis (list) --

      The GraphqlApi objects.

      • (dict) --

        Describes a GraphQL API.

        • name (string) --

          The API name.

        • apiId (string) --

          The API ID.

        • authenticationType (string) --

          The authentication type.

        • logConfig (dict) --

          The Amazon CloudWatch Logs configuration.

          • fieldLogLevel (string) --

            The field logging level. Values can be NONE, ERROR, or ALL.

            • NONE : No field-level logs are captured.
            • ERROR : Logs the following information only for the fields that are in error:
              • The error section in the server response.
              • Field-level errors.
              • The generated request/response functions that got resolved for error fields.
            • ALL : The following information is logged for all fields in the query:
              • Field-level tracing information.
              • The generated request/response functions that got resolved for each field.
          • cloudWatchLogsRoleArn (string) --

            The service role that AppSync assumes to publish to CloudWatch logs in your account.

          • excludeVerboseContent (boolean) --

            Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level.

        • userPoolConfig (dict) --

          The Amazon Cognito user pool configuration.

          • userPoolId (string) --

            The user pool ID.

          • awsRegion (string) --

            The Amazon Web Services Region in which the user pool was created.

          • defaultAction (string) --

            The action that you want your GraphQL API to take when a request that uses Amazon Cognito user pool authentication doesn't match the Amazon Cognito user pool configuration.

          • appIdClientRegex (string) --

            A regular expression for validating the incoming Amazon Cognito user pool app client ID.

        • openIDConnectConfig (dict) --

          The OpenID Connect configuration.

          • issuer (string) --

            The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

          • clientId (string) --

            The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

          • iatTTL (integer) --

            The number of milliseconds that a token is valid after it's issued to a user.

          • authTTL (integer) --

            The number of milliseconds that a token is valid after being authenticated.

        • arn (string) --

          The Amazon Resource Name (ARN).

        • uris (dict) --

          The URIs.

          • (string) --
            • (string) --
        • tags (dict) --

          The tags.

          • (string) --

            The key for the tag.

            • (string) --

              The value for the tag.

        • additionalAuthenticationProviders (list) --

          A list of additional authentication providers for the GraphqlApi API.

          • (dict) --

            Describes an additional authentication provider.

            • authenticationType (string) --

              The authentication type: API key, Identity and Access Management (IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or Lambda.

            • openIDConnectConfig (dict) --

              The OIDC configuration.

              • issuer (string) --

                The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

              • clientId (string) --

                The client identifier of the relying party at the OpenID identity provider. This identifier is typically obtained when the relying party is registered with the OpenID identity provider. You can specify a regular expression so that AppSync can validate against multiple client identifiers at a time.

              • iatTTL (integer) --

                The number of milliseconds that a token is valid after it's issued to a user.

              • authTTL (integer) --

                The number of milliseconds that a token is valid after being authenticated.

            • userPoolConfig (dict) --

              The Amazon Cognito user pool configuration.

              • userPoolId (string) --

                The user pool ID.

              • awsRegion (string) --

                The Amazon Web Services Region in which the user pool was created.

              • appIdClientRegex (string) --

                A regular expression for validating the incoming Amazon Cognito user pool app client ID.

            • lambdaAuthorizerConfig (dict) --

              Configuration for Lambda function authorization.

              • authorizerResultTtlInSeconds (integer) --

                The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

              • authorizerUri (string) --

                The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3 ), or an alias ARN.

                Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

                aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

              • identityValidationExpression (string) --

                A regular expression for validation of tokens before the Lambda function is called.

        • xrayEnabled (boolean) --

          A flag indicating whether to use X-Ray tracing for this GraphqlApi .

        • wafWebAclArn (string) --

          The ARN of the WAF access control list (ACL) associated with this GraphqlApi , if one exists.

        • lambdaAuthorizerConfig (dict) --

          Configuration for Lambda function authorization.

          • authorizerResultTtlInSeconds (integer) --

            The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

          • authorizerUri (string) --

            The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3 ), or an alias ARN.

            Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To use the Command Line Interface (CLI), run the following:

            aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

          • identityValidationExpression (string) --

            A regular expression for validation of tokens before the Lambda function is called.

    • NextToken (string) --

      A token to resume pagination.

class AppSync.Paginator.ListResolvers
paginator = client.get_paginator('list_resolvers')
paginate(**kwargs)

Creates an iterator that will paginate through responses from AppSync.Client.list_resolvers().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    apiId='string',
    typeName='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • typeName (string) --

    [REQUIRED]

    The type name.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'resolvers': [
        {
            'typeName': 'string',
            'fieldName': 'string',
            'dataSourceName': 'string',
            'resolverArn': 'string',
            'requestMappingTemplate': 'string',
            'responseMappingTemplate': 'string',
            'kind': 'UNIT'|'PIPELINE',
            'pipelineConfig': {
                'functions': [
                    'string',
                ]
            },
            'syncConfig': {
                'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
                'conflictDetection': 'VERSION'|'NONE',
                'lambdaConflictHandlerConfig': {
                    'lambdaConflictHandlerArn': 'string'
                }
            },
            'cachingConfig': {
                'ttl': 123,
                'cachingKeys': [
                    'string',
                ]
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • resolvers (list) --

      The Resolver objects.

      • (dict) --

        Describes a resolver.

        • typeName (string) --

          The resolver type name.

        • fieldName (string) --

          The resolver field name.

        • dataSourceName (string) --

          The resolver data source name.

        • resolverArn (string) --

          The resolver Amazon Resource Name (ARN).

        • requestMappingTemplate (string) --

          The request mapping template.

        • responseMappingTemplate (string) --

          The response mapping template.

        • kind (string) --

          The resolver type.

          • UNIT : A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
          • PIPELINE : A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
        • pipelineConfig (dict) --

          The PipelineConfig .

          • functions (list) --

            A list of Function objects.

            • (string) --
        • syncConfig (dict) --

          The SyncConfig for a resolver attached to a versioned data source.

          • conflictHandler (string) --

            The Conflict Resolution strategy to perform in the event of a conflict.

            • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
            • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
            • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
          • conflictDetection (string) --

            The Conflict Detection strategy to use.

            • VERSION : Detect conflicts based on object versions for this resolver.
            • NONE : Do not detect conflicts when invoking this resolver.
          • lambdaConflictHandlerConfig (dict) --

            The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

            • lambdaConflictHandlerArn (string) --

              The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

        • cachingConfig (dict) --

          The caching configuration for the resolver.

          • ttl (integer) --

            The TTL in seconds for a resolver that has caching activated.

            Valid values are 1–3,600 seconds.

          • cachingKeys (list) --

            The caching keys for a resolver that has caching activated.

            Valid values are entries from the $context.arguments , $context.source , and $context.identity maps.

            • (string) --
    • NextToken (string) --

      A token to resume pagination.

class AppSync.Paginator.ListResolversByFunction
paginator = client.get_paginator('list_resolvers_by_function')
paginate(**kwargs)

Creates an iterator that will paginate through responses from AppSync.Client.list_resolvers_by_function().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    apiId='string',
    functionId='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • functionId (string) --

    [REQUIRED]

    The function ID.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'resolvers': [
        {
            'typeName': 'string',
            'fieldName': 'string',
            'dataSourceName': 'string',
            'resolverArn': 'string',
            'requestMappingTemplate': 'string',
            'responseMappingTemplate': 'string',
            'kind': 'UNIT'|'PIPELINE',
            'pipelineConfig': {
                'functions': [
                    'string',
                ]
            },
            'syncConfig': {
                'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE',
                'conflictDetection': 'VERSION'|'NONE',
                'lambdaConflictHandlerConfig': {
                    'lambdaConflictHandlerArn': 'string'
                }
            },
            'cachingConfig': {
                'ttl': 123,
                'cachingKeys': [
                    'string',
                ]
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • resolvers (list) --

      The list of resolvers.

      • (dict) --

        Describes a resolver.

        • typeName (string) --

          The resolver type name.

        • fieldName (string) --

          The resolver field name.

        • dataSourceName (string) --

          The resolver data source name.

        • resolverArn (string) --

          The resolver Amazon Resource Name (ARN).

        • requestMappingTemplate (string) --

          The request mapping template.

        • responseMappingTemplate (string) --

          The response mapping template.

        • kind (string) --

          The resolver type.

          • UNIT : A UNIT resolver type. A UNIT resolver is the default resolver type. You can use a UNIT resolver to run a GraphQL query against a single data source.
          • PIPELINE : A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of Function objects in a serial manner. You can use a pipeline resolver to run a GraphQL query against multiple data sources.
        • pipelineConfig (dict) --

          The PipelineConfig .

          • functions (list) --

            A list of Function objects.

            • (string) --
        • syncConfig (dict) --

          The SyncConfig for a resolver attached to a versioned data source.

          • conflictHandler (string) --

            The Conflict Resolution strategy to perform in the event of a conflict.

            • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions don't match the latest version at the server.
            • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.
            • LAMBDA : Resolve conflicts with an Lambda function supplied in the LambdaConflictHandlerConfig .
          • conflictDetection (string) --

            The Conflict Detection strategy to use.

            • VERSION : Detect conflicts based on object versions for this resolver.
            • NONE : Do not detect conflicts when invoking this resolver.
          • lambdaConflictHandlerConfig (dict) --

            The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

            • lambdaConflictHandlerArn (string) --

              The Amazon Resource Name (ARN) for the Lambda function to use as the Conflict Handler.

        • cachingConfig (dict) --

          The caching configuration for the resolver.

          • ttl (integer) --

            The TTL in seconds for a resolver that has caching activated.

            Valid values are 1–3,600 seconds.

          • cachingKeys (list) --

            The caching keys for a resolver that has caching activated.

            Valid values are entries from the $context.arguments , $context.source , and $context.identity maps.

            • (string) --
    • NextToken (string) --

      A token to resume pagination.

class AppSync.Paginator.ListTypes
paginator = client.get_paginator('list_types')
paginate(**kwargs)

Creates an iterator that will paginate through responses from AppSync.Client.list_types().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    apiId='string',
    format='SDL'|'JSON',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • apiId (string) --

    [REQUIRED]

    The API ID.

  • format (string) --

    [REQUIRED]

    The type format: SDL or JSON.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'types': [
        {
            'name': 'string',
            'description': 'string',
            'arn': 'string',
            'definition': 'string',
            'format': 'SDL'|'JSON'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • types (list) --

      The Type objects.

      • (dict) --

        Describes a type.

        • name (string) --

          The type name.

        • description (string) --

          The type description.

        • arn (string) --

          The type Amazon Resource Name (ARN).

        • definition (string) --

          The type definition.

        • format (string) --

          The type format: SDL or JSON.

    • NextToken (string) --

      A token to resume pagination.