2018/07/12 - AWS AppSync - 4 updated api methods
Changes Update appsync client to latest version
{'httpConfig': {'endpoint': 'string'}, 'type': {'HTTP'}}Response
{'dataSource': {'httpConfig': {'endpoint': 'string'}, 'type': {'HTTP'}}}
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', serviceRoleArn='string', dynamodbConfig={ 'tableName': 'string', 'awsRegion': 'string', 'useCallerCredentials': True|False }, lambdaConfig={ 'lambdaFunctionArn': 'string' }, elasticsearchConfig={ 'endpoint': 'string', 'awsRegion': 'string' }, httpConfig={ 'endpoint': '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 IAM service role ARN for the data source. The system assumes this role when accessing the data source.
dict
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 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(s). If the port is not specified, AWS AppSync will use the default port 80 for http endpoint and port 443 for https endpoints.
dict
Response Syntax
{ 'dataSource': { 'dataSourceArn': 'string', 'name': 'string', 'description': 'string', 'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP', 'serviceRoleArn': 'string', 'dynamodbConfig': { 'tableName': 'string', 'awsRegion': 'string', 'useCallerCredentials': True|False }, 'lambdaConfig': { 'lambdaFunctionArn': 'string' }, 'elasticsearchConfig': { 'endpoint': 'string', 'awsRegion': 'string' }, 'httpConfig': { 'endpoint': '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 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.
serviceRoleArn (string) --
The IAM service role ARN for the data source. The system assumes this role when accessing the data source.
dynamodbConfig (dict) --
DynamoDB settings.
tableName (string) --
The table name.
awsRegion (string) --
The AWS region.
useCallerCredentials (boolean) --
Set to TRUE to use Amazon Cognito credentials with this data source.
lambdaConfig (dict) --
Lambda settings.
lambdaFunctionArn (string) --
The ARN for the Lambda function.
elasticsearchConfig (dict) --
Amazon Elasticsearch 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(s). If the port is not specified, AWS AppSync will use the default port 80 for http endpoint and port 443 for https endpoints.
{'dataSource': {'httpConfig': {'endpoint': 'string'}, 'type': {'HTTP'}}}
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', 'serviceRoleArn': 'string', 'dynamodbConfig': { 'tableName': 'string', 'awsRegion': 'string', 'useCallerCredentials': True|False }, 'lambdaConfig': { 'lambdaFunctionArn': 'string' }, 'elasticsearchConfig': { 'endpoint': 'string', 'awsRegion': 'string' }, 'httpConfig': { 'endpoint': '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 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.
serviceRoleArn (string) --
The IAM service role ARN for the data source. The system assumes this role when accessing the data source.
dynamodbConfig (dict) --
DynamoDB settings.
tableName (string) --
The table name.
awsRegion (string) --
The AWS region.
useCallerCredentials (boolean) --
Set to TRUE to use Amazon Cognito credentials with this data source.
lambdaConfig (dict) --
Lambda settings.
lambdaFunctionArn (string) --
The ARN for the Lambda function.
elasticsearchConfig (dict) --
Amazon Elasticsearch 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(s). If the port is not specified, AWS AppSync will use the default port 80 for http endpoint and port 443 for https endpoints.
{'dataSources': {'httpConfig': {'endpoint': 'string'}, 'type': {'HTTP'}}}
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', 'serviceRoleArn': 'string', 'dynamodbConfig': { 'tableName': 'string', 'awsRegion': 'string', 'useCallerCredentials': True|False }, 'lambdaConfig': { 'lambdaFunctionArn': 'string' }, 'elasticsearchConfig': { 'endpoint': 'string', 'awsRegion': 'string' }, 'httpConfig': { 'endpoint': '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 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.
serviceRoleArn (string) --
The IAM service role ARN for the data source. The system assumes this role when accessing the data source.
dynamodbConfig (dict) --
DynamoDB settings.
tableName (string) --
The table name.
awsRegion (string) --
The AWS region.
useCallerCredentials (boolean) --
Set to TRUE to use Amazon Cognito credentials with this data source.
lambdaConfig (dict) --
Lambda settings.
lambdaFunctionArn (string) --
The ARN for the Lambda function.
elasticsearchConfig (dict) --
Amazon Elasticsearch 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(s). If the port is not specified, AWS AppSync will use the default port 80 for http endpoint and port 443 for https endpoints.
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': {'endpoint': 'string'}, 'type': {'HTTP'}}Response
{'dataSource': {'httpConfig': {'endpoint': 'string'}, 'type': {'HTTP'}}}
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', serviceRoleArn='string', dynamodbConfig={ 'tableName': 'string', 'awsRegion': 'string', 'useCallerCredentials': True|False }, lambdaConfig={ 'lambdaFunctionArn': 'string' }, elasticsearchConfig={ 'endpoint': 'string', 'awsRegion': 'string' }, httpConfig={ 'endpoint': '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 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 Lambda configuration.
lambdaFunctionArn (string) -- [REQUIRED]
The ARN for the Lambda function.
dict
The new Elasticsearch 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(s). If the port is not specified, AWS AppSync will use the default port 80 for http endpoint and port 443 for https endpoints.
dict
Response Syntax
{ 'dataSource': { 'dataSourceArn': 'string', 'name': 'string', 'description': 'string', 'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE'|'HTTP', 'serviceRoleArn': 'string', 'dynamodbConfig': { 'tableName': 'string', 'awsRegion': 'string', 'useCallerCredentials': True|False }, 'lambdaConfig': { 'lambdaFunctionArn': 'string' }, 'elasticsearchConfig': { 'endpoint': 'string', 'awsRegion': 'string' }, 'httpConfig': { 'endpoint': '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 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.
serviceRoleArn (string) --
The IAM service role ARN for the data source. The system assumes this role when accessing the data source.
dynamodbConfig (dict) --
DynamoDB settings.
tableName (string) --
The table name.
awsRegion (string) --
The AWS region.
useCallerCredentials (boolean) --
Set to TRUE to use Amazon Cognito credentials with this data source.
lambdaConfig (dict) --
Lambda settings.
lambdaFunctionArn (string) --
The ARN for the Lambda function.
elasticsearchConfig (dict) --
Amazon Elasticsearch 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(s). If the port is not specified, AWS AppSync will use the default port 80 for http endpoint and port 443 for https endpoints.