2018/11/20 - AWS AppSync - 6 new 8 updated api methods
Changes AWS AppSync now supports: 1. Pipeline Resolvers - Enables execution of one or more operations against multiple data sources in order, on a single GraphQL field. This allows orchestration of actions by composing code into a single Resolver, or share code across Resolvers. 2. Aurora Serverless Data Source - Built-in resolver for executing GraphQL operations with the new Aurora Serverless Data API, including connection management functionality.
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' )
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
[REQUIRED]
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
Response Syntax
{ 'functionConfiguration': { 'functionId': 'string', 'functionArn': 'string', 'name': 'string', 'description': 'string', 'dataSourceName': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'functionVersion': '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.
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' }, ], '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.
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.
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' )
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
[REQUIRED]
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
Response Syntax
{ 'functionConfiguration': { 'functionId': 'string', 'functionArn': 'string', 'name': 'string', 'description': 'string', 'dataSourceName': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'functionVersion': '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.
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' } }
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.
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', ] } }, ], '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) --
nextToken (string) --
An identifier that can be used to return the next set of items in the list.
Deletes a Function .
See also: AWS API Documentation
Request Syntax
client.delete_function( apiId='string', functionId='string' )
string
[REQUIRED]
The GraphQL API ID.
string
[REQUIRED]
The Function ID.
dict
Response Syntax
{}
Response Structure
(dict) --
{'httpConfig': {'authorizationConfig': {'authorizationType': 'AWS_IAM', 'awsIamConfig': {'signingRegion': 'string', 'signingServiceName': 'string'}}}, 'relationalDatabaseConfig': {'rdsHttpEndpointConfig': {'awsRegion': 'string', 'awsSecretStoreArn': 'string', 'databaseName': 'string', 'dbClusterIdentifier': 'string', 'schema': 'string'}, 'relationalDatabaseSourceType': 'RDS_HTTP_ENDPOINT'}, 'type': ['RELATIONAL_DATABASE']}Response
{'dataSource': {'httpConfig': {'authorizationConfig': {'authorizationType': 'AWS_IAM', 'awsIamConfig': {'signingRegion': 'string', 'signingServiceName': 'string'}}}, 'relationalDatabaseConfig': {'rdsHttpEndpointConfig': {'awsRegion': 'string', 'awsSecretStoreArn': 'string', 'databaseName': 'string', 'dbClusterIdentifier': 'string', 'schema': 'string'}, 'relationalDatabaseSourceType': 'RDS_HTTP_ENDPOINT'}, 'type': ['RELATIONAL_DATABASE']}}
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 }, 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.
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 }, '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.
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.
{'kind': 'UNIT | PIPELINE', 'pipelineConfig': {'functions': ['string']}}Response
{'resolver': {'kind': 'UNIT | PIPELINE', 'pipelineConfig': {'functions': ['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', ] } )
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
Response Syntax
{ 'resolver': { 'typeName': 'string', 'fieldName': 'string', 'dataSourceName': 'string', 'resolverArn': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'kind': 'UNIT'|'PIPELINE', 'pipelineConfig': { 'functions': [ '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) --
{'dataSource': {'httpConfig': {'authorizationConfig': {'authorizationType': 'AWS_IAM', 'awsIamConfig': {'signingRegion': 'string', 'signingServiceName': 'string'}}}, 'relationalDatabaseConfig': {'rdsHttpEndpointConfig': {'awsRegion': 'string', 'awsSecretStoreArn': 'string', 'databaseName': 'string', 'dbClusterIdentifier': 'string', 'schema': 'string'}, 'relationalDatabaseSourceType': 'RDS_HTTP_ENDPOINT'}, 'type': ['RELATIONAL_DATABASE']}}
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 }, '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.
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': {'kind': 'UNIT | PIPELINE', 'pipelineConfig': {'functions': ['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', ] } } }
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) --
{'dataSources': {'httpConfig': {'authorizationConfig': {'authorizationType': 'AWS_IAM', 'awsIamConfig': {'signingRegion': 'string', 'signingServiceName': 'string'}}}, 'relationalDatabaseConfig': {'rdsHttpEndpointConfig': {'awsRegion': 'string', 'awsSecretStoreArn': 'string', 'databaseName': 'string', 'dbClusterIdentifier': 'string', 'schema': 'string'}, 'relationalDatabaseSourceType': 'RDS_HTTP_ENDPOINT'}, 'type': ['RELATIONAL_DATABASE']}}
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 }, '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.
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': {'kind': 'UNIT | PIPELINE', 'pipelineConfig': {'functions': ['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', ] } }, ], '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) --
nextToken (string) --
An identifier to be passed in the next request to this operation to return the next set of items in the list.
{'httpConfig': {'authorizationConfig': {'authorizationType': 'AWS_IAM', 'awsIamConfig': {'signingRegion': 'string', 'signingServiceName': 'string'}}}, 'relationalDatabaseConfig': {'rdsHttpEndpointConfig': {'awsRegion': 'string', 'awsSecretStoreArn': 'string', 'databaseName': 'string', 'dbClusterIdentifier': 'string', 'schema': 'string'}, 'relationalDatabaseSourceType': 'RDS_HTTP_ENDPOINT'}, 'type': ['RELATIONAL_DATABASE']}Response
{'dataSource': {'httpConfig': {'authorizationConfig': {'authorizationType': 'AWS_IAM', 'awsIamConfig': {'signingRegion': 'string', 'signingServiceName': 'string'}}}, 'relationalDatabaseConfig': {'rdsHttpEndpointConfig': {'awsRegion': 'string', 'awsSecretStoreArn': 'string', 'databaseName': 'string', 'dbClusterIdentifier': 'string', 'schema': 'string'}, 'relationalDatabaseSourceType': 'RDS_HTTP_ENDPOINT'}, 'type': ['RELATIONAL_DATABASE']}}
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 }, 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.
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 }, '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.
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.
{'kind': 'UNIT | PIPELINE', 'pipelineConfig': {'functions': ['string']}}Response
{'resolver': {'kind': 'UNIT | PIPELINE', 'pipelineConfig': {'functions': ['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', ] } )
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
Response Syntax
{ 'resolver': { 'typeName': 'string', 'fieldName': 'string', 'dataSourceName': 'string', 'resolverArn': 'string', 'requestMappingTemplate': 'string', 'responseMappingTemplate': 'string', 'kind': 'UNIT'|'PIPELINE', 'pipelineConfig': { 'functions': [ '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) --