2018/02/14 - AWS AppSync - 1 new5 updated api methods
Changes Update appsync client to latest version
Updates an API key.
See also: AWS API Documentation
Request Syntax
client.update_api_key( apiId='string', id='string', description='string', expires=123 )
string
[REQUIRED]
The ID for the GraphQL API
string
[REQUIRED]
The API key ID.
string
A description of the purpose of the API key.
integer
The time after which the API key expires. The date is represented as seconds since the epoch.
dict
Response Syntax
{ 'apiKey': { 'id': 'string', 'description': 'string', 'expires': 123 } }
Response Structure
(dict) --
apiKey (dict) --
The API key.
id (string) --
The API key ID.
description (string) --
A description of the purpose of the API key.
expires (integer) --
The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.
{'expires': 'long'}
Creates a unique key that you can distribute to clients who are executing your API.
See also: AWS API Documentation
Request Syntax
client.create_api_key( apiId='string', description='string', expires=123 )
string
[REQUIRED]
The ID for your GraphQL API.
string
A description of the purpose of the API key.
integer
The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour. The default value for this parameter is 7 days from creation time.
dict
Response Syntax
{ 'apiKey': { 'id': 'string', 'description': 'string', 'expires': 123 } }
Response Structure
(dict) --
apiKey (dict) --
The API key.
id (string) --
The API key ID.
description (string) --
A description of the purpose of the API key.
expires (integer) --
The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.
{'type': {'NONE'}}Response
{'dataSource': {'type': {'NONE'}}}
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', serviceRoleArn='string', dynamodbConfig={ 'tableName': 'string', 'awsRegion': 'string', 'useCallerCredentials': True|False }, lambdaConfig={ 'lambdaFunctionArn': 'string' }, elasticsearchConfig={ 'endpoint': 'string', 'awsRegion': '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
Response Syntax
{ 'dataSource': { 'dataSourceArn': 'string', 'name': 'string', 'description': 'string', 'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE', 'serviceRoleArn': 'string', 'dynamodbConfig': { 'tableName': 'string', 'awsRegion': 'string', 'useCallerCredentials': True|False }, 'lambdaConfig': { 'lambdaFunctionArn': 'string' }, 'elasticsearchConfig': { 'endpoint': 'string', 'awsRegion': '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 the required information can be computed on the fly without connecting to a back-end data source.
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.
{'dataSource': {'type': {'NONE'}}}
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', 'serviceRoleArn': 'string', 'dynamodbConfig': { 'tableName': 'string', 'awsRegion': 'string', 'useCallerCredentials': True|False }, 'lambdaConfig': { 'lambdaFunctionArn': 'string' }, 'elasticsearchConfig': { 'endpoint': 'string', 'awsRegion': '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 the required information can be computed on the fly without connecting to a back-end data source.
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.
{'dataSources': {'type': {'NONE'}}}
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', 'serviceRoleArn': 'string', 'dynamodbConfig': { 'tableName': 'string', 'awsRegion': 'string', 'useCallerCredentials': True|False }, 'lambdaConfig': { 'lambdaFunctionArn': 'string' }, 'elasticsearchConfig': { 'endpoint': 'string', 'awsRegion': '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 the required information can be computed on the fly without connecting to a back-end data source.
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.
nextToken (string) --
An identifier to be passed in the next request to this operation to return the next set of items in the list.
{'type': {'NONE'}}Response
{'dataSource': {'type': {'NONE'}}}
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', serviceRoleArn='string', dynamodbConfig={ 'tableName': 'string', 'awsRegion': 'string', 'useCallerCredentials': True|False }, lambdaConfig={ 'lambdaFunctionArn': 'string' }, elasticsearchConfig={ 'endpoint': 'string', 'awsRegion': '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
Response Syntax
{ 'dataSource': { 'dataSourceArn': 'string', 'name': 'string', 'description': 'string', 'type': 'AWS_LAMBDA'|'AMAZON_DYNAMODB'|'AMAZON_ELASTICSEARCH'|'NONE', 'serviceRoleArn': 'string', 'dynamodbConfig': { 'tableName': 'string', 'awsRegion': 'string', 'useCallerCredentials': True|False }, 'lambdaConfig': { 'lambdaFunctionArn': 'string' }, 'elasticsearchConfig': { 'endpoint': 'string', 'awsRegion': '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 the required information can be computed on the fly without connecting to a back-end data source.
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.