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.
Retrieves an ApiCache object.
See also: AWS API Documentation
Request Syntax
client.get_api_cache( apiId='string' )
string
[REQUIRED]
The API ID.
dict
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.
Flushes an ApiCache object.
See also: AWS API Documentation
Request Syntax
client.flush_api_cache( apiId='string' )
string
[REQUIRED]
The API ID.
dict
Response Syntax
{}
Response Structure
(dict) --
Represents the output of a FlushApiCache operation.
Deletes an ApiCache object.
See also: AWS API Documentation
Request Syntax
client.delete_api_cache( apiId='string' )
string
[REQUIRED]
The API ID.
dict
Response Syntax
{}
Response Structure
(dict) --
Represents the output of a DeleteApiCache operation.
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' )
string
[REQUIRED]
The GraphQL API Id.
integer
[REQUIRED]
TTL in seconds for cache entries.
Valid values are between 1 and 3600 seconds.
string
[REQUIRED]
Caching behavior.
FULL_REQUEST_CACHING : All requests are fully cached.
PER_RESOLVER_CACHING : Individual resovlers that you specify are cached.
string
[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.
dict
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.
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' )
string
[REQUIRED]
The GraphQL API Id.
integer
[REQUIRED]
TTL in seconds for cache entries.
Valid values are between 1 and 3600 seconds.
boolean
Transit encryption flag when connecting to cache. This setting cannot be updated after creation.
boolean
At rest encryption flag for cache. This setting cannot be updated after creation.
string
[REQUIRED]
Caching behavior.
FULL_REQUEST_CACHING : All requests are fully cached.
PER_RESOLVER_CACHING : Individual resovlers that you specify are cached.
string
[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.
dict
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.
{'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' } } )
string
[REQUIRED]
The API ID for the GraphQL API for the DataSource .
string
[REQUIRED]
A user-supplied name for the DataSource .
string
A description of the DataSource .
string
[REQUIRED]
The type of the DataSource .
string
The AWS IAM service role ARN for the data source. The system assumes this role when accessing the data source.
dict
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.
dict
AWS Lambda settings.
lambdaFunctionArn (string) -- [REQUIRED]
The ARN for the Lambda function.
dict
Amazon Elasticsearch Service settings.
endpoint (string) -- [REQUIRED]
The endpoint.
awsRegion (string) -- [REQUIRED]
The AWS Region.
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) -- [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.
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.
dict
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.
{'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', ] } )
string
[REQUIRED]
The ID for the GraphQL API for which the resolver is being created.
string
[REQUIRED]
The name of the Type .
string
[REQUIRED]
The name of the field to attach the resolver to.
string
The name of the data source for which the resolver is being created.
string
[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).
string
The mapping template to be used for responses from the data source.
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.
dict
The PipelineConfig .
functions (list) --
A list of Function objects.
(string) --
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.
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) --
dict
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) --
{'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' )
string
[REQUIRED]
The API ID.
string
[REQUIRED]
The name of the data source.
dict
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.
{'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' )
string
[REQUIRED]
The API ID.
string
[REQUIRED]
The resolver type name.
string
[REQUIRED]
The resolver field name.
dict
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) --
{'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 )
string
[REQUIRED]
The API ID.
string
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.
integer
The maximum number of results you want the request to return.
dict
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.
{'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 )
string
[REQUIRED]
The API ID.
string
[REQUIRED]
The type name.
string
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.
integer
The maximum number of results you want the request to return.
dict
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.
{'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 )
string
[REQUIRED]
The API ID.
string
[REQUIRED]
The Function ID.
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.
integer
The maximum number of results you want the request to return.
dict
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.
{'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' } } )
string
[REQUIRED]
The API ID.
string
[REQUIRED]
The new name for the data source.
string
The new description for the data source.
string
[REQUIRED]
The new data source type.
string
The new service role ARN for the data source.
dict
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.
dict
The new AWS Lambda configuration.
lambdaFunctionArn (string) -- [REQUIRED]
The ARN for the Lambda function.
dict
The new Elasticsearch Service configuration.
endpoint (string) -- [REQUIRED]
The endpoint.
awsRegion (string) -- [REQUIRED]
The AWS Region.
dict
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.
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 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.
dict
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.
{'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', ] } )
string
[REQUIRED]
The API ID.
string
[REQUIRED]
The new type name.
string
[REQUIRED]
The new field name.
string
The new data source name.
string
[REQUIRED]
The new request mapping template.
string
The new response mapping template.
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.
dict
The PipelineConfig .
functions (list) --
A list of Function objects.
(string) --
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.
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) --
dict
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) --