Table of Contents
A low-level client representing AWS AppSync:
client = session.create_client('appsync')
These are the available methods:
Check if an operation can be paginated.
Creates a unique key that you can distribute to clients who are executing your API.
See also: AWS API Documentation
Request Syntax
response = client.create_api_key(
apiId='string',
description='string',
expires=123
)
[REQUIRED]
The ID for your GraphQL API.
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.
Creates a DataSource object.
See also: AWS API Documentation
Request Syntax
response = 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'
}
)
[REQUIRED]
The API ID for the GraphQL API for the DataSource .
[REQUIRED]
A user-supplied name for the DataSource .
[REQUIRED]
The type of the DataSource .
DynamoDB settings.
The table name.
The AWS region.
Set to TRUE to use Amazon Cognito credentials with this data source.
AWS Lambda settings.
The ARN for the Lambda function.
Amazon Elasticsearch settings.
The endpoint.
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.
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.
Creates a GraphqlApi object.
See also: AWS API Documentation
Request Syntax
response = client.create_graphql_api(
name='string',
logConfig={
'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
'cloudWatchLogsRoleArn': 'string'
},
authenticationType='API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT',
userPoolConfig={
'userPoolId': 'string',
'awsRegion': 'string',
'defaultAction': 'ALLOW'|'DENY',
'appIdClientRegex': 'string'
},
openIDConnectConfig={
'issuer': 'string',
'clientId': 'string',
'iatTTL': 123,
'authTTL': 123
}
)
[REQUIRED]
A user-supplied name for the GraphqlApi .
The Amazon CloudWatch logs configuration.
The field logging level. Values can be NONE, ERROR, ALL.
The service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account.
[REQUIRED]
The authentication type: API key, IAM, or Amazon Cognito User Pools.
The Amazon Cognito User Pool configuration.
The user pool ID.
The AWS region in which the user pool was created.
The action that you want your GraphQL API to take when a request that uses Amazon Cognito User Pool authentication doesn't match the Amazon Cognito User Pool configuration.
A regular expression for validating the incoming Amazon Cognito User Pool app client ID.
The Open Id Connect configuration configuration.
The issuer for the open id connect configuration. The issuer returned by discovery MUST exactly match the value of iss in the ID Token.
The client identifier of the Relying party at the OpenID Provider. This identifier is typically obtained when the Relying party is registered with the OpenID Provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time
The number of milliseconds a token is valid after being issued to a user.
The number of milliseconds a token is valid after being authenticated.
dict
Response Syntax
{
'graphqlApi': {
'name': 'string',
'apiId': 'string',
'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT',
'logConfig': {
'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
'cloudWatchLogsRoleArn': 'string'
},
'userPoolConfig': {
'userPoolId': 'string',
'awsRegion': 'string',
'defaultAction': 'ALLOW'|'DENY',
'appIdClientRegex': 'string'
},
'openIDConnectConfig': {
'issuer': 'string',
'clientId': 'string',
'iatTTL': 123,
'authTTL': 123
},
'arn': 'string',
'uris': {
'string': 'string'
}
}
}
Response Structure
(dict) --
graphqlApi (dict) --
The GraphqlApi .
name (string) --
The API name.
apiId (string) --
The API ID.
authenticationType (string) --
The authentication type.
logConfig (dict) --
The Amazon CloudWatch Logs configuration.
fieldLogLevel (string) --
The field logging level. Values can be NONE, ERROR, ALL.
cloudWatchLogsRoleArn (string) --
The service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account.
userPoolConfig (dict) --
The Amazon Cognito User Pool configuration.
userPoolId (string) --
The user pool ID.
awsRegion (string) --
The AWS region in which the user pool was created.
defaultAction (string) --
The action that you want your GraphQL API to take when a request that uses Amazon Cognito User Pool authentication doesn't match the Amazon Cognito User Pool configuration.
appIdClientRegex (string) --
A regular expression for validating the incoming Amazon Cognito User Pool app client ID.
openIDConnectConfig (dict) --
The Open Id Connect configuration.
issuer (string) --
The issuer for the open id connect configuration. The issuer returned by discovery MUST exactly match the value of iss in the ID Token.
clientId (string) --
The client identifier of the Relying party at the OpenID Provider. This identifier is typically obtained when the Relying party is registered with the OpenID Provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time
iatTTL (integer) --
The number of milliseconds a token is valid after being issued to a user.
authTTL (integer) --
The number of milliseconds a token is valid after being authenticated.
arn (string) --
The ARN.
uris (dict) --
The URIs.
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
response = client.create_resolver(
apiId='string',
typeName='string',
fieldName='string',
dataSourceName='string',
requestMappingTemplate='string',
responseMappingTemplate='string'
)
[REQUIRED]
The ID for the GraphQL API for which the resolver is being created.
[REQUIRED]
The name of the Type .
[REQUIRED]
The name of the field to attach the resolver to.
[REQUIRED]
The name of the data source for which the resolver is being created.
[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).
dict
Response Syntax
{
'resolver': {
'typeName': 'string',
'fieldName': 'string',
'dataSourceName': 'string',
'resolverArn': 'string',
'requestMappingTemplate': 'string',
'responseMappingTemplate': '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.
Creates a Type object.
See also: AWS API Documentation
Request Syntax
response = client.create_type(
apiId='string',
definition='string',
format='SDL'|'JSON'
)
[REQUIRED]
The API ID.
[REQUIRED]
The type definition, in GraphQL Schema Definition Language (SDL) format.
For more information, see the GraphQL SDL documentation .
[REQUIRED]
The type format: SDL or JSON.
dict
Response Syntax
{
'type': {
'name': 'string',
'description': 'string',
'arn': 'string',
'definition': 'string',
'format': 'SDL'|'JSON'
}
}
Response Structure
(dict) --
type (dict) --
The Type object.
name (string) --
The type name.
description (string) --
The type description.
arn (string) --
The type ARN.
definition (string) --
The type definition.
format (string) --
The type format: SDL or JSON.
Deletes an API key.
See also: AWS API Documentation
Request Syntax
response = client.delete_api_key(
apiId='string',
id='string'
)
[REQUIRED]
The API ID.
[REQUIRED]
The ID for the API key.
dict
Response Syntax
{}
Response Structure
Deletes a DataSource object.
See also: AWS API Documentation
Request Syntax
response = client.delete_data_source(
apiId='string',
name='string'
)
[REQUIRED]
The API ID.
[REQUIRED]
The name of the data source.
dict
Response Syntax
{}
Response Structure
Deletes a GraphqlApi object.
See also: AWS API Documentation
Request Syntax
response = client.delete_graphql_api(
apiId='string'
)
[REQUIRED]
The API ID.
{}
Response Structure
Deletes a Resolver object.
See also: AWS API Documentation
Request Syntax
response = client.delete_resolver(
apiId='string',
typeName='string',
fieldName='string'
)
[REQUIRED]
The API ID.
[REQUIRED]
The name of the resolver type.
[REQUIRED]
The resolver field name.
dict
Response Syntax
{}
Response Structure
Deletes a Type object.
See also: AWS API Documentation
Request Syntax
response = client.delete_type(
apiId='string',
typeName='string'
)
[REQUIRED]
The API ID.
[REQUIRED]
The type name.
dict
Response Syntax
{}
Response Structure
Generate a presigned url given a client, its method, and arguments
The presigned url
Retrieves a DataSource object.
See also: AWS API Documentation
Request Syntax
response = client.get_data_source(
apiId='string',
name='string'
)
[REQUIRED]
The API ID.
[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.
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.
Retrieves a GraphqlApi object.
See also: AWS API Documentation
Request Syntax
response = client.get_graphql_api(
apiId='string'
)
[REQUIRED]
The API ID for the GraphQL API.
{
'graphqlApi': {
'name': 'string',
'apiId': 'string',
'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT',
'logConfig': {
'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
'cloudWatchLogsRoleArn': 'string'
},
'userPoolConfig': {
'userPoolId': 'string',
'awsRegion': 'string',
'defaultAction': 'ALLOW'|'DENY',
'appIdClientRegex': 'string'
},
'openIDConnectConfig': {
'issuer': 'string',
'clientId': 'string',
'iatTTL': 123,
'authTTL': 123
},
'arn': 'string',
'uris': {
'string': 'string'
}
}
}
Response Structure
The GraphqlApi object.
The API name.
The API ID.
The authentication type.
The Amazon CloudWatch Logs configuration.
The field logging level. Values can be NONE, ERROR, ALL.
The service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account.
The Amazon Cognito User Pool configuration.
The user pool ID.
The AWS region in which the user pool was created.
The action that you want your GraphQL API to take when a request that uses Amazon Cognito User Pool authentication doesn't match the Amazon Cognito User Pool configuration.
A regular expression for validating the incoming Amazon Cognito User Pool app client ID.
The Open Id Connect configuration.
The issuer for the open id connect configuration. The issuer returned by discovery MUST exactly match the value of iss in the ID Token.
The client identifier of the Relying party at the OpenID Provider. This identifier is typically obtained when the Relying party is registered with the OpenID Provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time
The number of milliseconds a token is valid after being issued to a user.
The number of milliseconds a token is valid after being authenticated.
The ARN.
The URIs.
Retrieves the introspection schema for a GraphQL API.
See also: AWS API Documentation
Request Syntax
response = client.get_introspection_schema(
apiId='string',
format='SDL'|'JSON'
)
[REQUIRED]
The API ID.
[REQUIRED]
The schema format: SDL or JSON.
dict
Response Syntax
{
'schema': StreamingBody()
}
Response Structure
(dict) --
schema (StreamingBody) --
The schema, in GraphQL Schema Definition Language (SDL) format.
For more information, see the GraphQL SDL documentation .
Create a paginator for an operation.
Retrieves a Resolver object.
See also: AWS API Documentation
Request Syntax
response = client.get_resolver(
apiId='string',
typeName='string',
fieldName='string'
)
[REQUIRED]
The API ID.
[REQUIRED]
The resolver type name.
[REQUIRED]
The resolver field name.
dict
Response Syntax
{
'resolver': {
'typeName': 'string',
'fieldName': 'string',
'dataSourceName': 'string',
'resolverArn': 'string',
'requestMappingTemplate': 'string',
'responseMappingTemplate': '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.
Retrieves the current status of a schema creation operation.
See also: AWS API Documentation
Request Syntax
response = client.get_schema_creation_status(
apiId='string'
)
[REQUIRED]
The API ID.
{
'status': 'PROCESSING'|'ACTIVE'|'DELETING',
'details': 'string'
}
Response Structure
The current state of the schema (PROCESSING, ACTIVE, or DELETING). Once the schema is in the ACTIVE state, you can add data.
Detailed information about the status of the schema creation operation.
Retrieves a Type object.
See also: AWS API Documentation
Request Syntax
response = client.get_type(
apiId='string',
typeName='string',
format='SDL'|'JSON'
)
[REQUIRED]
The API ID.
[REQUIRED]
The type name.
[REQUIRED]
The type format: SDL or JSON.
dict
Response Syntax
{
'type': {
'name': 'string',
'description': 'string',
'arn': 'string',
'definition': 'string',
'format': 'SDL'|'JSON'
}
}
Response Structure
(dict) --
type (dict) --
The Type object.
name (string) --
The type name.
description (string) --
The type description.
arn (string) --
The type ARN.
definition (string) --
The type definition.
format (string) --
The type format: SDL or JSON.
Returns an object that can wait for some condition.
Lists the API keys for a given API.
Note
API keys are deleted automatically sometime after they expire. However, they may still be included in the response until they have actually been deleted. You can safely call DeleteApiKey to manually delete a key before it's automatically deleted.
See also: AWS API Documentation
Request Syntax
response = client.list_api_keys(
apiId='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
The API ID.
dict
Response Syntax
{
'apiKeys': [
{
'id': 'string',
'description': 'string',
'expires': 123
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
apiKeys (list) --
The ApiKey objects.
(dict) --
Describes an API key.
Customers invoke AWS AppSync GraphQL APIs with API keys as an identity mechanism. There are two key versions:
da1 : This version was introduced at launch in November 2017. These keys always expire after 7 days. Key expiration is managed by DynamoDB TTL. The keys will cease to be valid after Feb 21, 2018 and should not be used after that date.
da2 : This version was introduced in February 2018 when AppSync added support to extend key expiration.
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.
nextToken (string) --
An identifier to be passed in the next request to this operation to return the next set of items in the list.
Lists the data sources for a given API.
See also: AWS API Documentation
Request Syntax
response = client.list_data_sources(
apiId='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
The API ID.
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.
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.
Lists your GraphQL APIs.
See also: AWS API Documentation
Request Syntax
response = client.list_graphql_apis(
nextToken='string',
maxResults=123
)
dict
Response Syntax
{
'graphqlApis': [
{
'name': 'string',
'apiId': 'string',
'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT',
'logConfig': {
'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
'cloudWatchLogsRoleArn': 'string'
},
'userPoolConfig': {
'userPoolId': 'string',
'awsRegion': 'string',
'defaultAction': 'ALLOW'|'DENY',
'appIdClientRegex': 'string'
},
'openIDConnectConfig': {
'issuer': 'string',
'clientId': 'string',
'iatTTL': 123,
'authTTL': 123
},
'arn': 'string',
'uris': {
'string': 'string'
}
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
graphqlApis (list) --
The GraphqlApi objects.
(dict) --
Describes a GraphQL API.
name (string) --
The API name.
apiId (string) --
The API ID.
authenticationType (string) --
The authentication type.
logConfig (dict) --
The Amazon CloudWatch Logs configuration.
fieldLogLevel (string) --
The field logging level. Values can be NONE, ERROR, ALL.
cloudWatchLogsRoleArn (string) --
The service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account.
userPoolConfig (dict) --
The Amazon Cognito User Pool configuration.
userPoolId (string) --
The user pool ID.
awsRegion (string) --
The AWS region in which the user pool was created.
defaultAction (string) --
The action that you want your GraphQL API to take when a request that uses Amazon Cognito User Pool authentication doesn't match the Amazon Cognito User Pool configuration.
appIdClientRegex (string) --
A regular expression for validating the incoming Amazon Cognito User Pool app client ID.
openIDConnectConfig (dict) --
The Open Id Connect configuration.
issuer (string) --
The issuer for the open id connect configuration. The issuer returned by discovery MUST exactly match the value of iss in the ID Token.
clientId (string) --
The client identifier of the Relying party at the OpenID Provider. This identifier is typically obtained when the Relying party is registered with the OpenID Provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time
iatTTL (integer) --
The number of milliseconds a token is valid after being issued to a user.
authTTL (integer) --
The number of milliseconds a token is valid after being authenticated.
arn (string) --
The ARN.
uris (dict) --
The URIs.
nextToken (string) --
An identifier to be passed in the next request to this operation to return the next set of items in the list.
Lists the resolvers for a given API and type.
See also: AWS API Documentation
Request Syntax
response = client.list_resolvers(
apiId='string',
typeName='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
The API ID.
[REQUIRED]
The type name.
dict
Response Syntax
{
'resolvers': [
{
'typeName': 'string',
'fieldName': 'string',
'dataSourceName': 'string',
'resolverArn': 'string',
'requestMappingTemplate': 'string',
'responseMappingTemplate': '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.
nextToken (string) --
An identifier to be passed in the next request to this operation to return the next set of items in the list.
Lists the types for a given API.
See also: AWS API Documentation
Request Syntax
response = client.list_types(
apiId='string',
format='SDL'|'JSON',
nextToken='string',
maxResults=123
)
[REQUIRED]
The API ID.
[REQUIRED]
The type format: SDL or JSON.
dict
Response Syntax
{
'types': [
{
'name': 'string',
'description': 'string',
'arn': 'string',
'definition': 'string',
'format': 'SDL'|'JSON'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
types (list) --
The Type objects.
(dict) --
Describes a type.
name (string) --
The type name.
description (string) --
The type description.
arn (string) --
The type ARN.
definition (string) --
The type definition.
format (string) --
The type format: SDL or JSON.
nextToken (string) --
An identifier to be passed in the next request to this operation to return the next set of items in the list.
Adds a new schema to your GraphQL API.
This operation is asynchronous. Use to determine when it has completed.
See also: AWS API Documentation
Request Syntax
response = client.start_schema_creation(
apiId='string',
definition=b'bytes'
)
[REQUIRED]
The API ID.
[REQUIRED]
The schema definition, in GraphQL schema language format.
dict
Response Syntax
{
'status': 'PROCESSING'|'ACTIVE'|'DELETING'
}
Response Structure
(dict) --
status (string) --
The current state of the schema (PROCESSING, ACTIVE, or DELETING). Once the schema is in the ACTIVE state, you can add data.
Updates an API key.
See also: AWS API Documentation
Request Syntax
response = client.update_api_key(
apiId='string',
id='string',
description='string',
expires=123
)
[REQUIRED]
The ID for the GraphQL API
[REQUIRED]
The API key ID.
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.
Updates a DataSource object.
See also: AWS API Documentation
Request Syntax
response = 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'
}
)
[REQUIRED]
The API ID.
[REQUIRED]
The new name for the data source.
[REQUIRED]
The new data source type.
The new DynamoDB configuration.
The table name.
The AWS region.
Set to TRUE to use Amazon Cognito credentials with this data source.
The new Lambda configuration.
The ARN for the Lambda function.
The new Elasticsearch configuration.
The endpoint.
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.
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.
Updates a GraphqlApi object.
See also: AWS API Documentation
Request Syntax
response = client.update_graphql_api(
apiId='string',
name='string',
logConfig={
'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
'cloudWatchLogsRoleArn': 'string'
},
authenticationType='API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT',
userPoolConfig={
'userPoolId': 'string',
'awsRegion': 'string',
'defaultAction': 'ALLOW'|'DENY',
'appIdClientRegex': 'string'
},
openIDConnectConfig={
'issuer': 'string',
'clientId': 'string',
'iatTTL': 123,
'authTTL': 123
}
)
[REQUIRED]
The API ID.
[REQUIRED]
The new name for the GraphqlApi object.
The Amazon CloudWatch logs configuration for the GraphqlApi object.
The field logging level. Values can be NONE, ERROR, ALL.
The service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account.
The new Amazon Cognito User Pool configuration for the GraphqlApi object.
The user pool ID.
The AWS region in which the user pool was created.
The action that you want your GraphQL API to take when a request that uses Amazon Cognito User Pool authentication doesn't match the Amazon Cognito User Pool configuration.
A regular expression for validating the incoming Amazon Cognito User Pool app client ID.
The Open Id Connect configuration configuration for the GraphqlApi object.
The issuer for the open id connect configuration. The issuer returned by discovery MUST exactly match the value of iss in the ID Token.
The client identifier of the Relying party at the OpenID Provider. This identifier is typically obtained when the Relying party is registered with the OpenID Provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time
The number of milliseconds a token is valid after being issued to a user.
The number of milliseconds a token is valid after being authenticated.
dict
Response Syntax
{
'graphqlApi': {
'name': 'string',
'apiId': 'string',
'authenticationType': 'API_KEY'|'AWS_IAM'|'AMAZON_COGNITO_USER_POOLS'|'OPENID_CONNECT',
'logConfig': {
'fieldLogLevel': 'NONE'|'ERROR'|'ALL',
'cloudWatchLogsRoleArn': 'string'
},
'userPoolConfig': {
'userPoolId': 'string',
'awsRegion': 'string',
'defaultAction': 'ALLOW'|'DENY',
'appIdClientRegex': 'string'
},
'openIDConnectConfig': {
'issuer': 'string',
'clientId': 'string',
'iatTTL': 123,
'authTTL': 123
},
'arn': 'string',
'uris': {
'string': 'string'
}
}
}
Response Structure
(dict) --
graphqlApi (dict) --
The updated GraphqlApi object.
name (string) --
The API name.
apiId (string) --
The API ID.
authenticationType (string) --
The authentication type.
logConfig (dict) --
The Amazon CloudWatch Logs configuration.
fieldLogLevel (string) --
The field logging level. Values can be NONE, ERROR, ALL.
cloudWatchLogsRoleArn (string) --
The service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account.
userPoolConfig (dict) --
The Amazon Cognito User Pool configuration.
userPoolId (string) --
The user pool ID.
awsRegion (string) --
The AWS region in which the user pool was created.
defaultAction (string) --
The action that you want your GraphQL API to take when a request that uses Amazon Cognito User Pool authentication doesn't match the Amazon Cognito User Pool configuration.
appIdClientRegex (string) --
A regular expression for validating the incoming Amazon Cognito User Pool app client ID.
openIDConnectConfig (dict) --
The Open Id Connect configuration.
issuer (string) --
The issuer for the open id connect configuration. The issuer returned by discovery MUST exactly match the value of iss in the ID Token.
clientId (string) --
The client identifier of the Relying party at the OpenID Provider. This identifier is typically obtained when the Relying party is registered with the OpenID Provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time
iatTTL (integer) --
The number of milliseconds a token is valid after being issued to a user.
authTTL (integer) --
The number of milliseconds a token is valid after being authenticated.
arn (string) --
The ARN.
uris (dict) --
The URIs.
Updates a Resolver object.
See also: AWS API Documentation
Request Syntax
response = client.update_resolver(
apiId='string',
typeName='string',
fieldName='string',
dataSourceName='string',
requestMappingTemplate='string',
responseMappingTemplate='string'
)
[REQUIRED]
The API ID.
[REQUIRED]
The new type name.
[REQUIRED]
The new field name.
[REQUIRED]
The new data source name.
[REQUIRED]
The new request mapping template.
dict
Response Syntax
{
'resolver': {
'typeName': 'string',
'fieldName': 'string',
'dataSourceName': 'string',
'resolverArn': 'string',
'requestMappingTemplate': 'string',
'responseMappingTemplate': '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.
Updates a Type object.
See also: AWS API Documentation
Request Syntax
response = client.update_type(
apiId='string',
typeName='string',
definition='string',
format='SDL'|'JSON'
)
[REQUIRED]
The API ID.
[REQUIRED]
The new type name.
[REQUIRED]
The new type format: SDL or JSON.
dict
Response Syntax
{
'type': {
'name': 'string',
'description': 'string',
'arn': 'string',
'definition': 'string',
'format': 'SDL'|'JSON'
}
}
Response Structure
(dict) --
type (dict) --
The updated Type object.
name (string) --
The type name.
description (string) --
The type description.
arn (string) --
The type ARN.
definition (string) --
The type definition.
format (string) --
The type format: SDL or JSON.
The available paginators are: