2021/02/12 - AWS AppSync - 4 updated api methods
Changes Update appsync client to latest version
{'syncConfig': {'conflictDetection': 'VERSION | NONE', 'conflictHandler': 'OPTIMISTIC_CONCURRENCY | LAMBDA | ' 'AUTOMERGE | NONE', 'lambdaConflictHandlerConfig': {'lambdaConflictHandlerArn': 'string'}}}Response
{'functionConfiguration': {'syncConfig': {'conflictDetection': 'VERSION | NONE', 'conflictHandler': 'OPTIMISTIC_CONCURRENCY ' '| LAMBDA | ' 'AUTOMERGE | NONE', 'lambdaConflictHandlerConfig': {'lambdaConflictHandlerArn': 'string'}}}}
Creates a Function object.
A function is a reusable entity. Multiple functions can be used to compose the resolver logic.
See also: AWS API Documentation
Request Syntax
client.create_function( apiId='string', name='string', description='string', dataSourceName='string', requestMappingTemplate='string', responseMappingTemplate='string', functionVersion='string', syncConfig={ 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } } )
string
[REQUIRED]
The GraphQL API ID.
string
[REQUIRED]
The Function name. The function name does not have to be unique.
string
The Function description.
string
[REQUIRED]
The Function DataSource name.
string
The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
string
The Function response mapping template.
string
[REQUIRED]
The version of the request mapping template. Currently the supported value is 2018-05-29.
dict
Describes a Sync configuration for a resolver.
Contains information on which Conflict Detection as well as Resolution strategy should be performed when the resolver is invoked.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions 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
Response Syntax
{ 'functionConfiguration': { 'functionId': 'string', 'functionArn': 'string', 'name': 'string', 'description': 'string', 'dataSourceName': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'functionVersion': 'string', 'syncConfig': { 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } } } }
Response Structure
(dict) --
functionConfiguration (dict) --
The Function object.
functionId (string) --
A unique ID representing the Function object.
functionArn (string) --
The ARN of the Function object.
name (string) --
The name of the Function object.
description (string) --
The Function description.
dataSourceName (string) --
The name of the DataSource.
requestMappingTemplate (string) --
The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
responseMappingTemplate (string) --
The Function response mapping template.
functionVersion (string) --
The version of the request mapping template. Currently only the 2018-05-29 version of the template is supported.
syncConfig (dict) --
Describes a Sync configuration for a resolver.
Contains information on which Conflict Detection as well as Resolution strategy should be performed when the resolver is invoked.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions 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.
{'functionConfiguration': {'syncConfig': {'conflictDetection': 'VERSION | NONE', 'conflictHandler': 'OPTIMISTIC_CONCURRENCY ' '| LAMBDA | ' 'AUTOMERGE | NONE', 'lambdaConflictHandlerConfig': {'lambdaConflictHandlerArn': 'string'}}}}
Get a Function.
See also: AWS API Documentation
Request Syntax
client.get_function( apiId='string', functionId='string' )
string
[REQUIRED]
The GraphQL API ID.
string
[REQUIRED]
The Function ID.
dict
Response Syntax
{ 'functionConfiguration': { 'functionId': 'string', 'functionArn': 'string', 'name': 'string', 'description': 'string', 'dataSourceName': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'functionVersion': 'string', 'syncConfig': { 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } } } }
Response Structure
(dict) --
functionConfiguration (dict) --
The Function object.
functionId (string) --
A unique ID representing the Function object.
functionArn (string) --
The ARN of the Function object.
name (string) --
The name of the Function object.
description (string) --
The Function description.
dataSourceName (string) --
The name of the DataSource.
requestMappingTemplate (string) --
The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
responseMappingTemplate (string) --
The Function response mapping template.
functionVersion (string) --
The version of the request mapping template. Currently only the 2018-05-29 version of the template is supported.
syncConfig (dict) --
Describes a Sync configuration for a resolver.
Contains information on which Conflict Detection as well as Resolution strategy should be performed when the resolver is invoked.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions 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.
{'functions': {'syncConfig': {'conflictDetection': 'VERSION | NONE', 'conflictHandler': 'OPTIMISTIC_CONCURRENCY | ' 'LAMBDA | AUTOMERGE | NONE', 'lambdaConflictHandlerConfig': {'lambdaConflictHandlerArn': 'string'}}}}
List multiple functions.
See also: AWS API Documentation
Request Syntax
client.list_functions( apiId='string', nextToken='string', maxResults=123 )
string
[REQUIRED]
The GraphQL 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
{ 'functions': [ { 'functionId': 'string', 'functionArn': 'string', 'name': 'string', 'description': 'string', 'dataSourceName': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'functionVersion': 'string', 'syncConfig': { 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } } }, ], 'nextToken': 'string' }
Response Structure
(dict) --
functions (list) --
A list of Function objects.
(dict) --
A function is a reusable entity. Multiple functions can be used to compose the resolver logic.
functionId (string) --
A unique ID representing the Function object.
functionArn (string) --
The ARN of the Function object.
name (string) --
The name of the Function object.
description (string) --
The Function description.
dataSourceName (string) --
The name of the DataSource.
requestMappingTemplate (string) --
The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
responseMappingTemplate (string) --
The Function response mapping template.
functionVersion (string) --
The version of the request mapping template. Currently only the 2018-05-29 version of the template is supported.
syncConfig (dict) --
Describes a Sync configuration for a resolver.
Contains information on which Conflict Detection as well as Resolution strategy should be performed when the resolver is invoked.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions 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.
nextToken (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.
{'syncConfig': {'conflictDetection': 'VERSION | NONE', 'conflictHandler': 'OPTIMISTIC_CONCURRENCY | LAMBDA | ' 'AUTOMERGE | NONE', 'lambdaConflictHandlerConfig': {'lambdaConflictHandlerArn': 'string'}}}Response
{'functionConfiguration': {'syncConfig': {'conflictDetection': 'VERSION | NONE', 'conflictHandler': 'OPTIMISTIC_CONCURRENCY ' '| LAMBDA | ' 'AUTOMERGE | NONE', 'lambdaConflictHandlerConfig': {'lambdaConflictHandlerArn': 'string'}}}}
Updates a Function object.
See also: AWS API Documentation
Request Syntax
client.update_function( apiId='string', name='string', description='string', functionId='string', dataSourceName='string', requestMappingTemplate='string', responseMappingTemplate='string', functionVersion='string', syncConfig={ 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } } )
string
[REQUIRED]
The GraphQL API ID.
string
[REQUIRED]
The Function name.
string
The Function description.
string
[REQUIRED]
The function ID.
string
[REQUIRED]
The Function DataSource name.
string
The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
string
The Function request mapping template.
string
[REQUIRED]
The version of the request mapping template. Currently the supported value is 2018-05-29.
dict
Describes a Sync configuration for a resolver.
Contains information on which Conflict Detection as well as Resolution strategy should be performed when the resolver is invoked.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions 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
Response Syntax
{ 'functionConfiguration': { 'functionId': 'string', 'functionArn': 'string', 'name': 'string', 'description': 'string', 'dataSourceName': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'functionVersion': 'string', 'syncConfig': { 'conflictHandler': 'OPTIMISTIC_CONCURRENCY'|'LAMBDA'|'AUTOMERGE'|'NONE', 'conflictDetection': 'VERSION'|'NONE', 'lambdaConflictHandlerConfig': { 'lambdaConflictHandlerArn': 'string' } } } }
Response Structure
(dict) --
functionConfiguration (dict) --
The Function object.
functionId (string) --
A unique ID representing the Function object.
functionArn (string) --
The ARN of the Function object.
name (string) --
The name of the Function object.
description (string) --
The Function description.
dataSourceName (string) --
The name of the DataSource.
requestMappingTemplate (string) --
The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template.
responseMappingTemplate (string) --
The Function response mapping template.
functionVersion (string) --
The version of the request mapping template. Currently only the 2018-05-29 version of the template is supported.
syncConfig (dict) --
Describes a Sync configuration for a resolver.
Contains information on which Conflict Detection as well as Resolution strategy should be performed when the resolver is invoked.
conflictHandler (string) --
The Conflict Resolution strategy to perform in the event of a conflict.
OPTIMISTIC_CONCURRENCY: Resolve conflicts by rejecting mutations when versions 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.