AWS AppSync

2019/11/21 - AWS AppSync - 5 new 9 updated api methods

Changes  AppSync: AWS AppSync now supports the ability to add, configure, and maintain caching for your AWS AppSync GraphQL API.

CreateApiCache (new) Link ¶

Creates a cache for the GraphQL API.

See also: AWS API Documentation

Request Syntax

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'
)
type apiId

string

param apiId

[REQUIRED]

The GraphQL API Id.

type ttl

integer

param ttl

[REQUIRED]

TTL in seconds for cache entries.

Valid values are between 1 and 3600 seconds.

type transitEncryptionEnabled

boolean

param transitEncryptionEnabled

Transit encryption flag when connecting to cache. This setting cannot be updated after creation.

type atRestEncryptionEnabled

boolean

param atRestEncryptionEnabled

At rest encryption flag for cache. This setting cannot be updated after creation.

type apiCachingBehavior

string

param apiCachingBehavior

[REQUIRED]

Caching behavior.

  • FULL_REQUEST_CACHING : All requests are fully cached.

  • PER_RESOLVER_CACHING : Individual resovlers that you specify are cached.

type type

string

param type

[REQUIRED]

The cache instance type.

  • 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.

rtype

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',
        '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 between 1 and 3600 seconds.

      • apiCachingBehavior (string) --

        Caching behavior.

        • FULL_REQUEST_CACHING : All requests are fully cached.

        • PER_RESOLVER_CACHING : Individual resovlers that you specify are cached.

      • transitEncryptionEnabled (boolean) --

        Transit encryption flag when connecting to cache. This setting cannot be updated after creation.

      • atRestEncryptionEnabled (boolean) --

        At rest encryption flag for cache. This setting cannot be updated after creation.

      • type (string) --

        The cache instance type.

        • 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.

UpdateApiCache (new) Link ¶

Updates the cache for the GraphQL API.

See also: AWS API Documentation

Request Syntax

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'
)
type apiId

string

param apiId

[REQUIRED]

The GraphQL API Id.

type ttl

integer

param ttl

[REQUIRED]

TTL in seconds for cache entries.

Valid values are between 1 and 3600 seconds.

type apiCachingBehavior

string

param apiCachingBehavior

[REQUIRED]

Caching behavior.

  • FULL_REQUEST_CACHING : All requests are fully cached.

  • PER_RESOLVER_CACHING : Individual resovlers that you specify are cached.

type type

string

param type

[REQUIRED]

The cache instance type.

  • 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.

rtype

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',
        '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 between 1 and 3600 seconds.

      • apiCachingBehavior (string) --

        Caching behavior.

        • FULL_REQUEST_CACHING : All requests are fully cached.

        • PER_RESOLVER_CACHING : Individual resovlers that you specify are cached.

      • transitEncryptionEnabled (boolean) --

        Transit encryption flag when connecting to cache. This setting cannot be updated after creation.

      • atRestEncryptionEnabled (boolean) --

        At rest encryption flag for cache. This setting cannot be updated after creation.

      • type (string) --

        The cache instance type.

        • 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.

FlushApiCache (new) Link ¶

Flushes an ApiCache object.

See also: AWS API Documentation

Request Syntax

client.flush_api_cache(
    apiId='string'
)
type apiId

string

param apiId

[REQUIRED]

The API ID.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    Represents the output of a FlushApiCache operation.

GetApiCache (new) Link ¶

Retrieves an ApiCache object.

See also: AWS API Documentation

Request Syntax

client.get_api_cache(
    apiId='string'
)
type apiId

string

param apiId

[REQUIRED]

The API ID.

rtype

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',
        'status': 'AVAILABLE'|'CREATING'|'DELETING'|'MODIFYING'|'FAILED'
    }
}

Response Structure

  • (dict) --

    Represents the output of a GetApiCache operation.

    • apiCache (dict) --

      • ttl (integer) --

        TTL in seconds for cache entries.

        Valid values are between 1 and 3600 seconds.

      • apiCachingBehavior (string) --

        Caching behavior.

        • FULL_REQUEST_CACHING : All requests are fully cached.

        • PER_RESOLVER_CACHING : Individual resovlers that you specify are cached.

      • transitEncryptionEnabled (boolean) --

        Transit encryption flag when connecting to cache. This setting cannot be updated after creation.

      • atRestEncryptionEnabled (boolean) --

        At rest encryption flag for cache. This setting cannot be updated after creation.

      • type (string) --

        The cache instance type.

        • 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.

DeleteApiCache (new) Link ¶

Deletes an ApiCache object.

See also: AWS API Documentation

Request Syntax

client.delete_api_cache(
    apiId='string'
)
type apiId

string

param apiId

[REQUIRED]

The API ID.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    Represents the output of a DeleteApiCache operation.

CreateDataSource (updated) Link ¶
Changes (request, response)
Request
{'dynamodbConfig': {'deltaSyncConfig': {'baseTableTTL': 'long',
                                        'deltaSyncTableName': 'string',
                                        'deltaSyncTableTTL': 'long'},
                    'versioned': 'boolean'}}
Response
{'dataSource': {'dynamodbConfig': {'deltaSyncConfig': {'baseTableTTL': 'long',
                                                       'deltaSyncTableName': 'string',
                                                       'deltaSyncTableTTL': 'long'},
                                   'versioned': 'boolean'}}}

Creates a DataSource object.

See also: AWS API Documentation

Request Syntax

client.create_data_source(
    apiId='string',
    name='string',
    description='string',
    type='AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP'|'RELATIONAL_DATABASE',
    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'
    },
    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'
        }
    }
)
type apiId

string

param apiId

[REQUIRED]

The API ID for the GraphQL API for the DataSource .

type name

string

param name

[REQUIRED]

A user-supplied name for the DataSource .

type description

string

param description

A description of the DataSource .

type type

string

param type

[REQUIRED]

The type of the DataSource .

type serviceRoleArn

string

param serviceRoleArn

The AWS IAM service role ARN for the data source. The system assumes this role when accessing the data source.

type dynamodbConfig

dict

param dynamodbConfig

Amazon DynamoDB settings.

  • tableName (string) -- [REQUIRED]

    The table name.

  • awsRegion (string) -- [REQUIRED]

    The AWS Region.

  • useCallerCredentials (boolean) --

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

  • deltaSyncConfig (dict) --

    The DeltaSyncConfig for a versioned datasource.

    • baseTableTTL (integer) --

      The number of minutes an Item is stored in the datasource.

    • deltaSyncTableName (string) --

      The Delta Sync table name.

    • deltaSyncTableTTL (integer) --

      The number of minutes 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.

type lambdaConfig

dict

param lambdaConfig

AWS Lambda settings.

  • lambdaFunctionArn (string) -- [REQUIRED]

    The ARN for the Lambda function.

type elasticsearchConfig

dict

param elasticsearchConfig

Amazon Elasticsearch Service settings.

  • endpoint (string) -- [REQUIRED]

    The endpoint.

  • awsRegion (string) -- [REQUIRED]

    The AWS Region.

type httpConfig

dict

param httpConfig

HTTP endpoint settings.

  • endpoint (string) --

    The HTTP URL endpoint. You can either specify the domain name or IP, and port combination, and the URL scheme must be HTTP or HTTPS. If the port is not specified, AWS AppSync uses the default port 80 for the HTTP endpoint and port 443 for HTTPS endpoints.

  • authorizationConfig (dict) --

    The authorization config in case the HTTP endpoint requires authorization.

    • authorizationType (string) -- [REQUIRED]

      The authorization type required by the HTTP endpoint.

      • AWS_IAM : The authorization type is Sigv4.

    • awsIamConfig (dict) --

      The AWS IAM settings.

      • signingRegion (string) --

        The signing region for AWS IAM authorization.

      • signingServiceName (string) --

        The signing service name for AWS IAM authorization.

type relationalDatabaseConfig

dict

param relationalDatabaseConfig

Relational database settings.

  • relationalDatabaseSourceType (string) --

    Source type for the relational database.

    • RDS_HTTP_ENDPOINT : The relational database source type is an Amazon RDS HTTP endpoint.

  • rdsHttpEndpointConfig (dict) --

    Amazon RDS HTTP endpoint settings.

    • awsRegion (string) --

      AWS Region for RDS HTTP endpoint.

    • dbClusterIdentifier (string) --

      Amazon RDS cluster identifier.

    • databaseName (string) --

      Logical database name.

    • schema (string) --

      Logical schema name.

    • awsSecretStoreArn (string) --

      AWS secret store ARN for database credentials.

rtype

dict

returns

Response Syntax

{
    'dataSource': {
        'dataSourceArn': 'string',
        'name': 'string',
        'description': 'string',
        'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP'|'RELATIONAL_DATABASE',
        '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'
        },
        '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 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.

        • AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table.

        • AMAZON_ELASTICSEARCH : The data source is an Amazon Elasticsearch Service domain.

        • AWS_LAMBDA : The data source is an AWS Lambda function.

        • NONE : There is no data source. This type is used when you wish to invoke a GraphQL operation without connecting to a data source, such as performing data transformation with resolvers or triggering a subscription to be invoked from a mutation.

        • HTTP : The data source is an HTTP endpoint.

        • RELATIONAL_DATABASE : The data source is a relational database.

      • serviceRoleArn (string) --

        The AWS IAM service role ARN for the data source. The system assumes this role when accessing the data source.

      • dynamodbConfig (dict) --

        Amazon DynamoDB settings.

        • tableName (string) --

          The table name.

        • awsRegion (string) --

          The AWS Region.

        • useCallerCredentials (boolean) --

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

        • deltaSyncConfig (dict) --

          The DeltaSyncConfig for a versioned datasource.

          • baseTableTTL (integer) --

            The number of minutes an Item is stored in the datasource.

          • deltaSyncTableName (string) --

            The Delta Sync table name.

          • deltaSyncTableTTL (integer) --

            The number of minutes 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) --

        AWS Lambda settings.

        • lambdaFunctionArn (string) --

          The ARN for the Lambda function.

      • elasticsearchConfig (dict) --

        Amazon Elasticsearch Service settings.

        • endpoint (string) --

          The endpoint.

        • awsRegion (string) --

          The AWS Region.

      • httpConfig (dict) --

        HTTP endpoint settings.

        • endpoint (string) --

          The HTTP URL endpoint. You can either specify the domain name or IP, and port combination, and the URL scheme must be HTTP or HTTPS. If the port is not specified, AWS AppSync uses the default port 80 for the HTTP endpoint and port 443 for HTTPS endpoints.

        • authorizationConfig (dict) --

          The authorization config in case the HTTP endpoint requires authorization.

          • authorizationType (string) --

            The authorization type required by the HTTP endpoint.

            • AWS_IAM : The authorization type is Sigv4.

          • awsIamConfig (dict) --

            The AWS IAM settings.

            • signingRegion (string) --

              The signing region for AWS IAM authorization.

            • signingServiceName (string) --

              The signing service name for AWS 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 RDS HTTP endpoint.

        • rdsHttpEndpointConfig (dict) --

          Amazon RDS HTTP endpoint settings.

          • awsRegion (string) --

            AWS Region for RDS HTTP endpoint.

          • dbClusterIdentifier (string) --

            Amazon RDS cluster identifier.

          • databaseName (string) --

            Logical database name.

          • schema (string) --

            Logical schema name.

          • awsSecretStoreArn (string) --

            AWS secret store ARN for database credentials.

CreateResolver (updated) Link ¶
Changes (request, response)
Request
{'cachingConfig': {'cachingKeys': ['string'], 'ttl': 'long'},
 'syncConfig': {'conflictDetection': 'VERSION | NONE',
                'conflictHandler': 'OPTIMISTIC_CONCURRENCY | LAMBDA | '
                                   'AUTOMERGE | NONE',
                'lambdaConflictHandlerConfig': {'lambdaConflictHandlerArn': 'string'}}}
Response
{'resolver': {'cachingConfig': {'cachingKeys': ['string'], 'ttl': 'long'},
              'syncConfig': {'conflictDetection': 'VERSION | NONE',
                             'conflictHandler': 'OPTIMISTIC_CONCURRENCY | '
                                                'LAMBDA | AUTOMERGE | NONE',
                             'lambdaConflictHandlerConfig': {'lambdaConflictHandlerArn': 'string'}}}}

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

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',
        ]
    }
)
type apiId

string

param apiId

[REQUIRED]

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

type typeName

string

param typeName

[REQUIRED]

The name of the Type .

type fieldName

string

param fieldName

[REQUIRED]

The name of the field to attach the resolver to.

type dataSourceName

string

param dataSourceName

The name of the data source for which the resolver is being created.

type requestMappingTemplate

string

param requestMappingTemplate

[REQUIRED]

The mapping template to be used 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).

type responseMappingTemplate

string

param responseMappingTemplate

The mapping template to be used for responses from the data source.

type kind

string

param kind

The resolver type.

  • UNIT : A UNIT resolver type. A UNIT resolver is the default resolver type. A UNIT resolver enables you to execute a GraphQL query against a single data source.

  • PIPELINE : A PIPELINE resolver type. A PIPELINE resolver enables you to execute a series of Function in a serial manner. You can use a pipeline resolver to execute a GraphQL query against multiple data sources.

type pipelineConfig

dict

param pipelineConfig

The PipelineConfig .

  • functions (list) --

    A list of Function objects.

    • (string) --

type syncConfig

dict

param syncConfig

The SyncConfig for a resolver attached to a versioned datasource.

  • conflictHandler (string) --

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

    • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions do not match the latest version at the server.

    • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.

    • LAMBDA : Resolve conflicts with a 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 executing this resolver.

  • lambdaConflictHandlerConfig (dict) --

    The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

    • lambdaConflictHandlerArn (string) --

      The Arn for the Lambda function to use as the Conflict Handler.

type cachingConfig

dict

param cachingConfig

The caching configuration for the resolver.

  • ttl (integer) --

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

    Valid values are between 1 and 3600 seconds.

  • cachingKeys (list) --

    The caching keys for a resolver that has caching enabled.

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

    • (string) --

rtype

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 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. A UNIT resolver enables you to execute a GraphQL query against a single data source.

        • PIPELINE : A PIPELINE resolver type. A PIPELINE resolver enables you to execute a series of Function in a serial manner. You can use a pipeline resolver to execute 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 datasource.

        • conflictHandler (string) --

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

          • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions do not match the latest version at the server.

          • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.

          • LAMBDA : Resolve conflicts with a 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 executing this resolver.

        • lambdaConflictHandlerConfig (dict) --

          The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

          • lambdaConflictHandlerArn (string) --

            The 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 enabled.

          Valid values are between 1 and 3600 seconds.

        • cachingKeys (list) --

          The caching keys for a resolver that has caching enabled.

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

          • (string) --

GetDataSource (updated) Link ¶
Changes (response)
{'dataSource': {'dynamodbConfig': {'deltaSyncConfig': {'baseTableTTL': 'long',
                                                       'deltaSyncTableName': 'string',
                                                       'deltaSyncTableTTL': 'long'},
                                   'versioned': 'boolean'}}}

Retrieves a DataSource object.

See also: AWS API Documentation

Request Syntax

client.get_data_source(
    apiId='string',
    name='string'
)
type apiId

string

param apiId

[REQUIRED]

The API ID.

type name

string

param name

[REQUIRED]

The name of the data source.

rtype

dict

returns

Response Syntax

{
    'dataSource': {
        'dataSourceArn': 'string',
        'name': 'string',
        'description': 'string',
        'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP'|'RELATIONAL_DATABASE',
        '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'
        },
        '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 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.

        • AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table.

        • AMAZON_ELASTICSEARCH : The data source is an Amazon Elasticsearch Service domain.

        • AWS_LAMBDA : The data source is an AWS Lambda function.

        • NONE : There is no data source. This type is used when you wish to invoke a GraphQL operation without connecting to a data source, such as performing data transformation with resolvers or triggering a subscription to be invoked from a mutation.

        • HTTP : The data source is an HTTP endpoint.

        • RELATIONAL_DATABASE : The data source is a relational database.

      • serviceRoleArn (string) --

        The AWS IAM service role ARN for the data source. The system assumes this role when accessing the data source.

      • dynamodbConfig (dict) --

        Amazon DynamoDB settings.

        • tableName (string) --

          The table name.

        • awsRegion (string) --

          The AWS Region.

        • useCallerCredentials (boolean) --

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

        • deltaSyncConfig (dict) --

          The DeltaSyncConfig for a versioned datasource.

          • baseTableTTL (integer) --

            The number of minutes an Item is stored in the datasource.

          • deltaSyncTableName (string) --

            The Delta Sync table name.

          • deltaSyncTableTTL (integer) --

            The number of minutes 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) --

        AWS Lambda settings.

        • lambdaFunctionArn (string) --

          The ARN for the Lambda function.

      • elasticsearchConfig (dict) --

        Amazon Elasticsearch Service settings.

        • endpoint (string) --

          The endpoint.

        • awsRegion (string) --

          The AWS Region.

      • httpConfig (dict) --

        HTTP endpoint settings.

        • endpoint (string) --

          The HTTP URL endpoint. You can either specify the domain name or IP, and port combination, and the URL scheme must be HTTP or HTTPS. If the port is not specified, AWS AppSync uses the default port 80 for the HTTP endpoint and port 443 for HTTPS endpoints.

        • authorizationConfig (dict) --

          The authorization config in case the HTTP endpoint requires authorization.

          • authorizationType (string) --

            The authorization type required by the HTTP endpoint.

            • AWS_IAM : The authorization type is Sigv4.

          • awsIamConfig (dict) --

            The AWS IAM settings.

            • signingRegion (string) --

              The signing region for AWS IAM authorization.

            • signingServiceName (string) --

              The signing service name for AWS 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 RDS HTTP endpoint.

        • rdsHttpEndpointConfig (dict) --

          Amazon RDS HTTP endpoint settings.

          • awsRegion (string) --

            AWS Region for RDS HTTP endpoint.

          • dbClusterIdentifier (string) --

            Amazon RDS cluster identifier.

          • databaseName (string) --

            Logical database name.

          • schema (string) --

            Logical schema name.

          • awsSecretStoreArn (string) --

            AWS secret store ARN for database credentials.

GetResolver (updated) Link ¶
Changes (response)
{'resolver': {'cachingConfig': {'cachingKeys': ['string'], 'ttl': 'long'},
              'syncConfig': {'conflictDetection': 'VERSION | NONE',
                             'conflictHandler': 'OPTIMISTIC_CONCURRENCY | '
                                                'LAMBDA | AUTOMERGE | NONE',
                             'lambdaConflictHandlerConfig': {'lambdaConflictHandlerArn': 'string'}}}}

Retrieves a Resolver object.

See also: AWS API Documentation

Request Syntax

client.get_resolver(
    apiId='string',
    typeName='string',
    fieldName='string'
)
type apiId

string

param apiId

[REQUIRED]

The API ID.

type typeName

string

param typeName

[REQUIRED]

The resolver type name.

type fieldName

string

param fieldName

[REQUIRED]

The resolver field name.

rtype

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 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. A UNIT resolver enables you to execute a GraphQL query against a single data source.

        • PIPELINE : A PIPELINE resolver type. A PIPELINE resolver enables you to execute a series of Function in a serial manner. You can use a pipeline resolver to execute 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 datasource.

        • conflictHandler (string) --

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

          • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions do not match the latest version at the server.

          • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.

          • LAMBDA : Resolve conflicts with a 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 executing this resolver.

        • lambdaConflictHandlerConfig (dict) --

          The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

          • lambdaConflictHandlerArn (string) --

            The 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 enabled.

          Valid values are between 1 and 3600 seconds.

        • cachingKeys (list) --

          The caching keys for a resolver that has caching enabled.

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

          • (string) --

ListDataSources (updated) Link ¶
Changes (response)
{'dataSources': {'dynamodbConfig': {'deltaSyncConfig': {'baseTableTTL': 'long',
                                                        'deltaSyncTableName': 'string',
                                                        'deltaSyncTableTTL': 'long'},
                                    'versioned': 'boolean'}}}

Lists the data sources for a given API.

See also: AWS API Documentation

Request Syntax

client.list_data_sources(
    apiId='string',
    nextToken='string',
    maxResults=123
)
type apiId

string

param apiId

[REQUIRED]

The API ID.

type nextToken

string

param nextToken

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

type maxResults

integer

param maxResults

The maximum number of results you want the request to return.

rtype

dict

returns

Response Syntax

{
    'dataSources': [
        {
            'dataSourceArn': 'string',
            'name': 'string',
            'description': 'string',
            'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP'|'RELATIONAL_DATABASE',
            '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'
            },
            '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 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.

          • AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table.

          • AMAZON_ELASTICSEARCH : The data source is an Amazon Elasticsearch Service domain.

          • AWS_LAMBDA : The data source is an AWS Lambda function.

          • NONE : There is no data source. This type is used when you wish to invoke a GraphQL operation without connecting to a data source, such as performing data transformation with resolvers or triggering a subscription to be invoked from a mutation.

          • HTTP : The data source is an HTTP endpoint.

          • RELATIONAL_DATABASE : The data source is a relational database.

        • serviceRoleArn (string) --

          The AWS IAM service role ARN for the data source. The system assumes this role when accessing the data source.

        • dynamodbConfig (dict) --

          Amazon DynamoDB settings.

          • tableName (string) --

            The table name.

          • awsRegion (string) --

            The AWS Region.

          • useCallerCredentials (boolean) --

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

          • deltaSyncConfig (dict) --

            The DeltaSyncConfig for a versioned datasource.

            • baseTableTTL (integer) --

              The number of minutes an Item is stored in the datasource.

            • deltaSyncTableName (string) --

              The Delta Sync table name.

            • deltaSyncTableTTL (integer) --

              The number of minutes 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) --

          AWS Lambda settings.

          • lambdaFunctionArn (string) --

            The ARN for the Lambda function.

        • elasticsearchConfig (dict) --

          Amazon Elasticsearch Service settings.

          • endpoint (string) --

            The endpoint.

          • awsRegion (string) --

            The AWS Region.

        • httpConfig (dict) --

          HTTP endpoint settings.

          • endpoint (string) --

            The HTTP URL endpoint. You can either specify the domain name or IP, and port combination, and the URL scheme must be HTTP or HTTPS. If the port is not specified, AWS AppSync uses the default port 80 for the HTTP endpoint and port 443 for HTTPS endpoints.

          • authorizationConfig (dict) --

            The authorization config in case the HTTP endpoint requires authorization.

            • authorizationType (string) --

              The authorization type required by the HTTP endpoint.

              • AWS_IAM : The authorization type is Sigv4.

            • awsIamConfig (dict) --

              The AWS IAM settings.

              • signingRegion (string) --

                The signing region for AWS IAM authorization.

              • signingServiceName (string) --

                The signing service name for AWS 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 RDS HTTP endpoint.

          • rdsHttpEndpointConfig (dict) --

            Amazon RDS HTTP endpoint settings.

            • awsRegion (string) --

              AWS Region for RDS HTTP endpoint.

            • dbClusterIdentifier (string) --

              Amazon RDS cluster identifier.

            • databaseName (string) --

              Logical database name.

            • schema (string) --

              Logical schema name.

            • awsSecretStoreArn (string) --

              AWS secret store ARN for database credentials.

    • nextToken (string) --

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

ListResolvers (updated) Link ¶
Changes (response)
{'resolvers': {'cachingConfig': {'cachingKeys': ['string'], 'ttl': 'long'},
               'syncConfig': {'conflictDetection': 'VERSION | NONE',
                              'conflictHandler': 'OPTIMISTIC_CONCURRENCY | '
                                                 'LAMBDA | AUTOMERGE | NONE',
                              'lambdaConflictHandlerConfig': {'lambdaConflictHandlerArn': 'string'}}}}

Lists the resolvers for a given API and type.

See also: AWS API Documentation

Request Syntax

client.list_resolvers(
    apiId='string',
    typeName='string',
    nextToken='string',
    maxResults=123
)
type apiId

string

param apiId

[REQUIRED]

The API ID.

type typeName

string

param typeName

[REQUIRED]

The type name.

type nextToken

string

param nextToken

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

type maxResults

integer

param maxResults

The maximum number of results you want the request to return.

rtype

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 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. A UNIT resolver enables you to execute a GraphQL query against a single data source.

          • PIPELINE : A PIPELINE resolver type. A PIPELINE resolver enables you to execute a series of Function in a serial manner. You can use a pipeline resolver to execute 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 datasource.

          • conflictHandler (string) --

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

            • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions do not match the latest version at the server.

            • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.

            • LAMBDA : Resolve conflicts with a 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 executing this resolver.

          • lambdaConflictHandlerConfig (dict) --

            The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

            • lambdaConflictHandlerArn (string) --

              The 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 enabled.

            Valid values are between 1 and 3600 seconds.

          • cachingKeys (list) --

            The caching keys for a resolver that has caching enabled.

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

            • (string) --

    • nextToken (string) --

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

ListResolversByFunction (updated) Link ¶
Changes (response)
{'resolvers': {'cachingConfig': {'cachingKeys': ['string'], 'ttl': 'long'},
               'syncConfig': {'conflictDetection': 'VERSION | NONE',
                              'conflictHandler': 'OPTIMISTIC_CONCURRENCY | '
                                                 'LAMBDA | AUTOMERGE | NONE',
                              'lambdaConflictHandlerConfig': {'lambdaConflictHandlerArn': 'string'}}}}

List the resolvers that are associated with a specific function.

See also: AWS API Documentation

Request Syntax

client.list_resolvers_by_function(
    apiId='string',
    functionId='string',
    nextToken='string',
    maxResults=123
)
type apiId

string

param apiId

[REQUIRED]

The API ID.

type functionId

string

param functionId

[REQUIRED]

The Function ID.

type nextToken

string

param nextToken

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.

type maxResults

integer

param maxResults

The maximum number of results you want the request to return.

rtype

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 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. A UNIT resolver enables you to execute a GraphQL query against a single data source.

          • PIPELINE : A PIPELINE resolver type. A PIPELINE resolver enables you to execute a series of Function in a serial manner. You can use a pipeline resolver to execute 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 datasource.

          • conflictHandler (string) --

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

            • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions do not match the latest version at the server.

            • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.

            • LAMBDA : Resolve conflicts with a 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 executing this resolver.

          • lambdaConflictHandlerConfig (dict) --

            The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

            • lambdaConflictHandlerArn (string) --

              The 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 enabled.

            Valid values are between 1 and 3600 seconds.

          • cachingKeys (list) --

            The caching keys for a resolver that has caching enabled.

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

            • (string) --

    • nextToken (string) --

      An identifier that can be used to return the next set of items in the list.

UpdateDataSource (updated) Link ¶
Changes (request, response)
Request
{'dynamodbConfig': {'deltaSyncConfig': {'baseTableTTL': 'long',
                                        'deltaSyncTableName': 'string',
                                        'deltaSyncTableTTL': 'long'},
                    'versioned': 'boolean'}}
Response
{'dataSource': {'dynamodbConfig': {'deltaSyncConfig': {'baseTableTTL': 'long',
                                                       'deltaSyncTableName': 'string',
                                                       'deltaSyncTableTTL': 'long'},
                                   'versioned': 'boolean'}}}

Updates a DataSource object.

See also: AWS API Documentation

Request Syntax

client.update_data_source(
    apiId='string',
    name='string',
    description='string',
    type='AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP'|'RELATIONAL_DATABASE',
    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'
    },
    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'
        }
    }
)
type apiId

string

param apiId

[REQUIRED]

The API ID.

type name

string

param name

[REQUIRED]

The new name for the data source.

type description

string

param description

The new description for the data source.

type type

string

param type

[REQUIRED]

The new data source type.

type serviceRoleArn

string

param serviceRoleArn

The new service role ARN for the data source.

type dynamodbConfig

dict

param dynamodbConfig

The new Amazon DynamoDB configuration.

  • tableName (string) -- [REQUIRED]

    The table name.

  • awsRegion (string) -- [REQUIRED]

    The AWS Region.

  • useCallerCredentials (boolean) --

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

  • deltaSyncConfig (dict) --

    The DeltaSyncConfig for a versioned datasource.

    • baseTableTTL (integer) --

      The number of minutes an Item is stored in the datasource.

    • deltaSyncTableName (string) --

      The Delta Sync table name.

    • deltaSyncTableTTL (integer) --

      The number of minutes 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.

type lambdaConfig

dict

param lambdaConfig

The new AWS Lambda configuration.

  • lambdaFunctionArn (string) -- [REQUIRED]

    The ARN for the Lambda function.

type elasticsearchConfig

dict

param elasticsearchConfig

The new Elasticsearch Service configuration.

  • endpoint (string) -- [REQUIRED]

    The endpoint.

  • awsRegion (string) -- [REQUIRED]

    The AWS Region.

type httpConfig

dict

param httpConfig

The new HTTP endpoint configuration.

  • endpoint (string) --

    The HTTP URL endpoint. You can either specify the domain name or IP, and port combination, and the URL scheme must be HTTP or HTTPS. If the port is not specified, AWS AppSync uses the default port 80 for the HTTP endpoint and port 443 for HTTPS endpoints.

  • authorizationConfig (dict) --

    The authorization config in case the HTTP endpoint requires authorization.

    • authorizationType (string) -- [REQUIRED]

      The authorization type required by the HTTP endpoint.

      • AWS_IAM : The authorization type is Sigv4.

    • awsIamConfig (dict) --

      The AWS IAM settings.

      • signingRegion (string) --

        The signing region for AWS IAM authorization.

      • signingServiceName (string) --

        The signing service name for AWS IAM authorization.

type relationalDatabaseConfig

dict

param relationalDatabaseConfig

The new relational database configuration.

  • relationalDatabaseSourceType (string) --

    Source type for the relational database.

    • RDS_HTTP_ENDPOINT : The relational database source type is an Amazon RDS HTTP endpoint.

  • rdsHttpEndpointConfig (dict) --

    Amazon RDS HTTP endpoint settings.

    • awsRegion (string) --

      AWS Region for RDS HTTP endpoint.

    • dbClusterIdentifier (string) --

      Amazon RDS cluster identifier.

    • databaseName (string) --

      Logical database name.

    • schema (string) --

      Logical schema name.

    • awsSecretStoreArn (string) --

      AWS secret store ARN for database credentials.

rtype

dict

returns

Response Syntax

{
    'dataSource': {
        'dataSourceArn': 'string',
        'name': 'string',
        'description': 'string',
        'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP'|'RELATIONAL_DATABASE',
        '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'
        },
        '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 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.

        • AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table.

        • AMAZON_ELASTICSEARCH : The data source is an Amazon Elasticsearch Service domain.

        • AWS_LAMBDA : The data source is an AWS Lambda function.

        • NONE : There is no data source. This type is used when you wish to invoke a GraphQL operation without connecting to a data source, such as performing data transformation with resolvers or triggering a subscription to be invoked from a mutation.

        • HTTP : The data source is an HTTP endpoint.

        • RELATIONAL_DATABASE : The data source is a relational database.

      • serviceRoleArn (string) --

        The AWS IAM service role ARN for the data source. The system assumes this role when accessing the data source.

      • dynamodbConfig (dict) --

        Amazon DynamoDB settings.

        • tableName (string) --

          The table name.

        • awsRegion (string) --

          The AWS Region.

        • useCallerCredentials (boolean) --

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

        • deltaSyncConfig (dict) --

          The DeltaSyncConfig for a versioned datasource.

          • baseTableTTL (integer) --

            The number of minutes an Item is stored in the datasource.

          • deltaSyncTableName (string) --

            The Delta Sync table name.

          • deltaSyncTableTTL (integer) --

            The number of minutes 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) --

        AWS Lambda settings.

        • lambdaFunctionArn (string) --

          The ARN for the Lambda function.

      • elasticsearchConfig (dict) --

        Amazon Elasticsearch Service settings.

        • endpoint (string) --

          The endpoint.

        • awsRegion (string) --

          The AWS Region.

      • httpConfig (dict) --

        HTTP endpoint settings.

        • endpoint (string) --

          The HTTP URL endpoint. You can either specify the domain name or IP, and port combination, and the URL scheme must be HTTP or HTTPS. If the port is not specified, AWS AppSync uses the default port 80 for the HTTP endpoint and port 443 for HTTPS endpoints.

        • authorizationConfig (dict) --

          The authorization config in case the HTTP endpoint requires authorization.

          • authorizationType (string) --

            The authorization type required by the HTTP endpoint.

            • AWS_IAM : The authorization type is Sigv4.

          • awsIamConfig (dict) --

            The AWS IAM settings.

            • signingRegion (string) --

              The signing region for AWS IAM authorization.

            • signingServiceName (string) --

              The signing service name for AWS 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 RDS HTTP endpoint.

        • rdsHttpEndpointConfig (dict) --

          Amazon RDS HTTP endpoint settings.

          • awsRegion (string) --

            AWS Region for RDS HTTP endpoint.

          • dbClusterIdentifier (string) --

            Amazon RDS cluster identifier.

          • databaseName (string) --

            Logical database name.

          • schema (string) --

            Logical schema name.

          • awsSecretStoreArn (string) --

            AWS secret store ARN for database credentials.

UpdateResolver (updated) Link ¶
Changes (request, response)
Request
{'cachingConfig': {'cachingKeys': ['string'], 'ttl': 'long'},
 'syncConfig': {'conflictDetection': 'VERSION | NONE',
                'conflictHandler': 'OPTIMISTIC_CONCURRENCY | LAMBDA | '
                                   'AUTOMERGE | NONE',
                'lambdaConflictHandlerConfig': {'lambdaConflictHandlerArn': 'string'}}}
Response
{'resolver': {'cachingConfig': {'cachingKeys': ['string'], 'ttl': 'long'},
              'syncConfig': {'conflictDetection': 'VERSION | NONE',
                             'conflictHandler': 'OPTIMISTIC_CONCURRENCY | '
                                                'LAMBDA | AUTOMERGE | NONE',
                             'lambdaConflictHandlerConfig': {'lambdaConflictHandlerArn': 'string'}}}}

Updates a Resolver object.

See also: AWS API Documentation

Request Syntax

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',
        ]
    }
)
type apiId

string

param apiId

[REQUIRED]

The API ID.

type typeName

string

param typeName

[REQUIRED]

The new type name.

type fieldName

string

param fieldName

[REQUIRED]

The new field name.

type dataSourceName

string

param dataSourceName

The new data source name.

type requestMappingTemplate

string

param requestMappingTemplate

[REQUIRED]

The new request mapping template.

type responseMappingTemplate

string

param responseMappingTemplate

The new response mapping template.

type kind

string

param kind

The resolver type.

  • UNIT : A UNIT resolver type. A UNIT resolver is the default resolver type. A UNIT resolver enables you to execute a GraphQL query against a single data source.

  • PIPELINE : A PIPELINE resolver type. A PIPELINE resolver enables you to execute a series of Function in a serial manner. You can use a pipeline resolver to execute a GraphQL query against multiple data sources.

type pipelineConfig

dict

param pipelineConfig

The PipelineConfig .

  • functions (list) --

    A list of Function objects.

    • (string) --

type syncConfig

dict

param syncConfig

The SyncConfig for a resolver attached to a versioned datasource.

  • conflictHandler (string) --

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

    • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions do not match the latest version at the server.

    • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.

    • LAMBDA : Resolve conflicts with a 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 executing this resolver.

  • lambdaConflictHandlerConfig (dict) --

    The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

    • lambdaConflictHandlerArn (string) --

      The Arn for the Lambda function to use as the Conflict Handler.

type cachingConfig

dict

param cachingConfig

The caching configuration for the resolver.

  • ttl (integer) --

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

    Valid values are between 1 and 3600 seconds.

  • cachingKeys (list) --

    The caching keys for a resolver that has caching enabled.

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

    • (string) --

rtype

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 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. A UNIT resolver enables you to execute a GraphQL query against a single data source.

        • PIPELINE : A PIPELINE resolver type. A PIPELINE resolver enables you to execute a series of Function in a serial manner. You can use a pipeline resolver to execute 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 datasource.

        • conflictHandler (string) --

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

          • OPTIMISTIC_CONCURRENCY : Resolve conflicts by rejecting mutations when versions do not match the latest version at the server.

          • AUTOMERGE : Resolve conflicts with the Automerge conflict resolution strategy.

          • LAMBDA : Resolve conflicts with a 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 executing this resolver.

        • lambdaConflictHandlerConfig (dict) --

          The LambdaConflictHandlerConfig when configuring LAMBDA as the Conflict Handler.

          • lambdaConflictHandlerArn (string) --

            The 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 enabled.

          Valid values are between 1 and 3600 seconds.

        • cachingKeys (list) --

          The caching keys for a resolver that has caching enabled.

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

          • (string) --