create_api_key
Creates a unique key that you can distribute to clients who are executing your API.
Parameters
apiId (required)
The ID for your GraphQL API.
Type: string
$body
Type: object
{
"expires" : "The time from creation 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. For more information, see .",
"description" : "A description of the purpose of the API key."
}
create_data_source
Creates a DataSource object.
Parameters
apiId (required)
The API ID for the GraphQL API for the DataSource.
Type: string
$body
Type: object
{
"dynamodbConfig" : {
"useCallerCredentials" : "Set to TRUE to use Amazon Cognito credentials with this data source.",
"awsRegion" : "The AWS Region.",
"tableName" : "The table name."
},
"elasticsearchConfig" : {
"endpoint" : "The endpoint.",
"awsRegion" : "The AWS Region."
},
"httpConfig" : {
"endpoint" : "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" : {
"awsIamConfig" : {
"signingRegion" : "The signing region for AWS IAM authorization.",
"signingServiceName" : "The signing service name for AWS IAM authorization."
},
"authorizationType" : "The authorization type required by the HTTP endpoint. \n AWS_IAM: The authorization type is Sigv4. "
}
},
"relationalDatabaseConfig" : {
"relationalDatabaseSourceType" : "Source type for the relational database. \n RDS_HTTP_ENDPOINT: The relational database source type is an Amazon RDS HTTP endpoint. ",
"rdsHttpEndpointConfig" : {
"dbClusterIdentifier" : "Amazon RDS cluster identifier.",
"schema" : "Logical schema name.",
"awsRegion" : "AWS Region for RDS HTTP endpoint.",
"databaseName" : "Logical database name.",
"awsSecretStoreArn" : "AWS secret store ARN for database credentials."
}
},
"name" : "A user-supplied name for the DataSource.",
"description" : "A description of the DataSource.",
"type" : "The type of the DataSource.",
"serviceRoleArn" : "The AWS IAM service role ARN for the data source. The system assumes this role when accessing the data source.",
"lambdaConfig" : {
"lambdaFunctionArn" : "The ARN for the Lambda function."
}
}
create_function
Creates a Function object. A function is a reusable entity. Multiple functions can be used to compose the resolver logic.
Parameters
apiId (required)
The GraphQL API ID.
Type: string
$body
Type: object
{
"responseMappingTemplate" : "The Function response mapping template. ",
"functionVersion" : "The version of the request mapping template. Currently the supported value is 2018-05-29. ",
"name" : "The Function name. The function name does not have to be unique.",
"description" : "The Function description.",
"dataSourceName" : "The Function DataSource name.",
"requestMappingTemplate" : "The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template."
}
create_graphql_api
Creates a GraphqlApi object.
Parameters
$body
Type: object
{
"additionalAuthenticationProviders" : [ {
"openIDConnectConfig" : {
"authTTL" : "The number of milliseconds a token is valid after being authenticated.",
"clientId" : "The client identifier of the Relying party at the OpenID identity provider. This identifier is typically obtained when the Relying party is registered with the OpenID identity provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time.",
"iatTTL" : "The number of milliseconds a token is valid after being issued to a user.",
"issuer" : "The issuer for the OpenID Connect configuration. The issuer returned by discovery must exactly match the value of iss in the ID token."
},
"userPoolConfig" : {
"awsRegion" : "The AWS Region in which the user pool was created.",
"userPoolId" : "The user pool ID.",
"appIdClientRegex" : "A regular expression for validating the incoming Amazon Cognito user pool app client ID."
},
"authenticationType" : "The authentication type: API key, AWS IAM, OIDC, or Amazon Cognito user pools."
} ],
"logConfig" : {
"cloudWatchLogsRoleArn" : "The service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account. ",
"fieldLogLevel" : "The field logging level. Values can be NONE, ERROR, or ALL. \n NONE: No field-level logs are captured. \n ERROR: Logs the following information only for the fields that are in error: The error section in the server response. Field-level errors. The generated request/response functions that got resolved for error fields. \n ALL: The following information is logged for all fields in the query: Field-level tracing information. The generated request/response functions that got resolved for each field. ",
"excludeVerboseContent" : "Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level."
},
"userPoolConfig" : {
"awsRegion" : "The AWS Region in which the user pool was created.",
"defaultAction" : "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.",
"userPoolId" : "The user pool ID.",
"appIdClientRegex" : "A regular expression for validating the incoming Amazon Cognito user pool app client ID."
},
"openIDConnectConfig" : {
"authTTL" : "The number of milliseconds a token is valid after being authenticated.",
"clientId" : "The client identifier of the Relying party at the OpenID identity provider. This identifier is typically obtained when the Relying party is registered with the OpenID identity provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time.",
"iatTTL" : "The number of milliseconds a token is valid after being issued to a user.",
"issuer" : "The issuer for the OpenID Connect configuration. The issuer returned by discovery must exactly match the value of iss in the ID token."
},
"name" : "A user-supplied name for the GraphqlApi.",
"authenticationType" : "The authentication type: API key, AWS IAM, OIDC, or Amazon Cognito user pools.",
"tags" : "A TagMap object."
}
create_resolver
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.
Parameters
apiId (required)
The ID for the GraphQL API for which the resolver is being created.
Type: string
typeName (required)
The name of the Type.
Type: string
$body
Type: object
{
"responseMappingTemplate" : "The mapping template to be used for responses from the data source.",
"fieldName" : "The name of the field to attach the resolver to.",
"pipelineConfig" : {
"functions" : [ "string" ]
},
"kind" : "The resolver type. \n 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. \n 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. ",
"dataSourceName" : "The name of the data source for which the resolver is being created.",
"requestMappingTemplate" : "The mapping template to be used for requests. \nA 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)."
}
create_type
Creates a Type object.
Parameters
apiId (required)
The API ID.
Type: string
$body
Type: object
{
"format" : "The type format: SDL or JSON.",
"definition" : "The type definition, in GraphQL Schema Definition Language (SDL) format. \nFor more information, see the GraphQL SDL documentation."
}
delete_api_key
Deletes an API key.
Parameters
apiId (required)
The API ID.
Type: string
id (required)
The ID for the API key.
Type: string
delete_data_source
Deletes a DataSource object.
Parameters
apiId (required)
The API ID.
Type: string
name (required)
The name of the data source.
Type: string
delete_function
Deletes a Function.
Parameters
apiId (required)
The GraphQL API ID.
Type: string
functionId (required)
The Function ID.
Type: string
delete_graphql_api
Deletes a GraphqlApi object.
Parameters
apiId (required)
The API ID.
Type: string
delete_resolver
Deletes a Resolver object.
Parameters
apiId (required)
The API ID.
Type: string
fieldName (required)
The resolver field name.
Type: string
typeName (required)
The name of the resolver type.
Type: string
delete_type
Deletes a Type object.
Parameters
apiId (required)
The API ID.
Type: string
typeName (required)
The type name.
Type: string
get_data_source
Retrieves a DataSource object.
Parameters
apiId (required)
The API ID.
Type: string
name (required)
The name of the data source.
Type: string
get_function
Get a Function.
Parameters
apiId (required)
The GraphQL API ID.
Type: string
functionId (required)
The Function ID.
Type: string
get_graphql_api
Retrieves a GraphqlApi object.
Parameters
apiId (required)
The API ID for the GraphQL API.
Type: string
get_introspection_schema
Retrieves the introspection schema for a GraphQL API.
Parameters
apiId (required)
The API ID.
Type: string
format (required)
The schema format: SDL or JSON.
Type: string
Potential values: SDL, JSON
includeDirectives
A flag that specifies whether the schema introspection should contain directives.
Type: boolean
get_resolver
Retrieves a Resolver object.
Parameters
apiId (required)
The API ID.
Type: string
fieldName (required)
The resolver field name.
Type: string
typeName (required)
The resolver type name.
Type: string
get_schema_creation_status
Retrieves the current status of a schema creation operation.
Parameters
apiId (required)
The API ID.
Type: string
get_type
Retrieves a Type object.
Parameters
apiId (required)
The API ID.
Type: string
format (required)
The type format: SDL or JSON.
Type: string
Potential values: SDL, JSON
typeName (required)
The type name.
Type: string
list_api_keys
Lists the API keys for a given API.
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.
Parameters
apiId (required)
The API ID.
Type: string
list_data_sources
Lists the data sources for a given API.
Parameters
apiId (required)
The API ID.
Type: string
list_functions
List multiple functions.
Parameters
apiId (required)
The GraphQL API ID.
Type: string
list_graphql_apis
Lists your GraphQL APIs.
This operation has no parameters
list_resolvers
Lists the resolvers for a given API and type.
Parameters
apiId (required)
The API ID.
Type: string
typeName (required)
The type name.
Type: string
list_resolvers_by_function
List the resolvers that are associated with a specific function.
Parameters
apiId (required)
The API ID.
Type: string
functionId (required)
The Function ID.
Type: string
list_tags_for_resource
Lists the tags for a resource.
Parameters
resourceArn (required)
The GraphqlApi ARN.
Type: string
list_types
Lists the types for a given API.
Parameters
apiId (required)
The API ID.
Type: string
format (required)
The type format: SDL or JSON.
Type: string
Potential values: SDL, JSON
start_schema_creation
Adds a new schema to your GraphQL API. This operation is asynchronous. Use to determine when it has completed.
Parameters
apiId (required)
The API ID.
Type: string
$body
Type: object
{
"definition" : "The schema definition, in GraphQL schema language format."
}
tag_resource
Tags a resource with user-supplied tags.
Parameters
resourceArn (required)
The GraphqlApi ARN.
Type: string
$body
Type: object
{
"tags" : "A TagMap object."
}
untag_resource
Untags a resource.
Parameters
resourceArn (required)
The GraphqlApi ARN.
Type: string
tagKeys (required)
A list of TagKey objects.
Type: array
[ "string" ]
update_api_key
Updates an API key.
Parameters
apiId (required)
The ID for the GraphQL API.
Type: string
id (required)
The API key ID.
Type: string
$body
Type: object
{
"expires" : "The time from update time after which the API key expires. The date is represented as seconds since the epoch. For more information, see .",
"description" : "A description of the purpose of the API key."
}
update_data_source
Updates a DataSource object.
Parameters
apiId (required)
The API ID.
Type: string
name (required)
The new name for the data source.
Type: string
$body
Type: object
{
"dynamodbConfig" : {
"useCallerCredentials" : "Set to TRUE to use Amazon Cognito credentials with this data source.",
"awsRegion" : "The AWS Region.",
"tableName" : "The table name."
},
"elasticsearchConfig" : {
"endpoint" : "The endpoint.",
"awsRegion" : "The AWS Region."
},
"httpConfig" : {
"endpoint" : "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" : {
"awsIamConfig" : {
"signingRegion" : "The signing region for AWS IAM authorization.",
"signingServiceName" : "The signing service name for AWS IAM authorization."
},
"authorizationType" : "The authorization type required by the HTTP endpoint. \n AWS_IAM: The authorization type is Sigv4. "
}
},
"relationalDatabaseConfig" : {
"relationalDatabaseSourceType" : "Source type for the relational database. \n RDS_HTTP_ENDPOINT: The relational database source type is an Amazon RDS HTTP endpoint. ",
"rdsHttpEndpointConfig" : {
"dbClusterIdentifier" : "Amazon RDS cluster identifier.",
"schema" : "Logical schema name.",
"awsRegion" : "AWS Region for RDS HTTP endpoint.",
"databaseName" : "Logical database name.",
"awsSecretStoreArn" : "AWS secret store ARN for database credentials."
}
},
"description" : "The new description for the data source.",
"type" : "The new data source type.",
"serviceRoleArn" : "The new service role ARN for the data source.",
"lambdaConfig" : {
"lambdaFunctionArn" : "The ARN for the Lambda function."
}
}
update_function
Updates a Function object.
Parameters
apiId (required)
The GraphQL API ID.
Type: string
functionId (required)
The function ID.
Type: string
$body
Type: object
{
"responseMappingTemplate" : "The Function request mapping template. ",
"functionVersion" : "The version of the request mapping template. Currently the supported value is 2018-05-29. ",
"name" : "The Function name.",
"description" : "The Function description.",
"dataSourceName" : "The Function DataSource name.",
"requestMappingTemplate" : "The Function request mapping template. Functions support only the 2018-05-29 version of the request mapping template."
}
update_graphql_api
Updates a GraphqlApi object.
Parameters
apiId (required)
The API ID.
Type: string
$body
Type: object
{
"additionalAuthenticationProviders" : [ {
"openIDConnectConfig" : {
"authTTL" : "The number of milliseconds a token is valid after being authenticated.",
"clientId" : "The client identifier of the Relying party at the OpenID identity provider. This identifier is typically obtained when the Relying party is registered with the OpenID identity provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time.",
"iatTTL" : "The number of milliseconds a token is valid after being issued to a user.",
"issuer" : "The issuer for the OpenID Connect configuration. The issuer returned by discovery must exactly match the value of iss in the ID token."
},
"userPoolConfig" : {
"awsRegion" : "The AWS Region in which the user pool was created.",
"userPoolId" : "The user pool ID.",
"appIdClientRegex" : "A regular expression for validating the incoming Amazon Cognito user pool app client ID."
},
"authenticationType" : "The authentication type: API key, AWS IAM, OIDC, or Amazon Cognito user pools."
} ],
"logConfig" : {
"cloudWatchLogsRoleArn" : "The service role that AWS AppSync will assume to publish to Amazon CloudWatch logs in your account. ",
"fieldLogLevel" : "The field logging level. Values can be NONE, ERROR, or ALL. \n NONE: No field-level logs are captured. \n ERROR: Logs the following information only for the fields that are in error: The error section in the server response. Field-level errors. The generated request/response functions that got resolved for error fields. \n ALL: The following information is logged for all fields in the query: Field-level tracing information. The generated request/response functions that got resolved for each field. ",
"excludeVerboseContent" : "Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level."
},
"userPoolConfig" : {
"awsRegion" : "The AWS Region in which the user pool was created.",
"defaultAction" : "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.",
"userPoolId" : "The user pool ID.",
"appIdClientRegex" : "A regular expression for validating the incoming Amazon Cognito user pool app client ID."
},
"openIDConnectConfig" : {
"authTTL" : "The number of milliseconds a token is valid after being authenticated.",
"clientId" : "The client identifier of the Relying party at the OpenID identity provider. This identifier is typically obtained when the Relying party is registered with the OpenID identity provider. You can specify a regular expression so the AWS AppSync can validate against multiple client identifiers at a time.",
"iatTTL" : "The number of milliseconds a token is valid after being issued to a user.",
"issuer" : "The issuer for the OpenID Connect configuration. The issuer returned by discovery must exactly match the value of iss in the ID token."
},
"name" : "The new name for the GraphqlApi object.",
"authenticationType" : "The new authentication type for the GraphqlApi object."
}
update_resolver
Updates a Resolver object.
Parameters
apiId (required)
The API ID.
Type: string
fieldName (required)
The new field name.
Type: string
typeName (required)
The new type name.
Type: string
$body
Type: object
{
"responseMappingTemplate" : "The new response mapping template.",
"pipelineConfig" : {
"functions" : [ "string" ]
},
"kind" : "The resolver type. \n 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. \n 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. ",
"dataSourceName" : "The new data source name.",
"requestMappingTemplate" : "The new request mapping template."
}
update_type
Updates a Type object.
Parameters
apiId (required)
The API ID.
Type: string
typeName (required)
The new type name.
Type: string
$body
Type: object
{
"format" : "The new type format: SDL or JSON.",
"definition" : "The new definition."
}