The AWS AppSync API contains several data types that various actions use. This section describes each data type in detail.
Note
The order of each element in a data type structure is not guaranteed. Applications should not assume a particular order.
The following data types are supported:
• AdditionalAuthenticationProvider (p. 147)
• ApiAssociation (p. 148)
• ApiCache (p. 149)
• ApiKey (p. 151)
• AuthorizationConfig (p. 153)
• AwsIamConfig (p. 154)
• CachingConfig (p. 155)
• CognitoUserPoolConfig (p. 156)
• DataSource (p. 157)
• DeltaSyncConfig (p. 159)
• DomainNameConfig (p. 160)
• DynamodbDataSourceConfig (p. 162)
• ElasticsearchDataSourceConfig (p. 163)
• FunctionConfiguration (p. 164)
• GraphqlApi (p. 166)
• HttpDataSourceConfig (p. 169)
• LambdaAuthorizerConfig (p. 170)
• LambdaConflictHandlerConfig (p. 171)
• LambdaDataSourceConfig (p. 172)
• LogConfig (p. 173)
• OpenIDConnectConfig (p. 174)
• OpenSearchServiceDataSourceConfig (p. 175)
• PipelineConfig (p. 176)
• RdsHttpEndpointConfig (p. 177)
• RelationalDatabaseDataSourceConfig (p. 178)
• Resolver (p. 179)
• SyncConfig (p. 182)
• Type (p. 183)
• UserPoolConfig (p. 185)
AdditionalAuthenticationProvider
Describes an additional authentication provider.
Contents
authenticationType
The authentication type: API key, AWS Identity and Access Management (IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or AWS Lambda.
Type: String
Valid Values: API_KEY | AWS_IAM | AMAZON_COGNITO_USER_POOLS | OPENID_CONNECT | AWS_LAMBDA
Required: No
lambdaAuthorizerConfig
Configuration for Lambda function authorization.
Type: LambdaAuthorizerConfig (p. 170) object Required: No
openIDConnectConfig The OIDC configuration.
Type: OpenIDConnectConfig (p. 174) object Required: No
userPoolConfig
The Amazon Cognito user pool configuration.
Type: CognitoUserPoolConfig (p. 156) object Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
API Version 2017-07-25 147
ApiAssociation
ApiAssociation
Describes an ApiAssociation object.
Contents
apiId
The API ID.
Type: String Required: No associationStatus
Identifies the status of an association.
• PROCESSING: The API association is being created. You cannot modify association requests during processing.
• SUCCESS: The API association was successful. You can modify associations after success.
• FAILED: The API association has failed. You can modify associations after failure.
Type: String
Valid Values: PROCESSING | FAILED | SUCCESS Required: No
deploymentDetail
Details about the last deployment status.
Type: String Required: No domainName
The domain name.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 253.
Pattern: ^(\*[\w\d-]*\.)?([\w\d-]+\.)+[\w\d-]+$
Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
ApiCache
The ApiCache object.
Contents
apiCachingBehavior Caching behavior.
• FULL_REQUEST_CACHING: All requests are fully cached.
• PER_RESOLVER_CACHING: Individual resolvers that you specify are cached.
Type: String
Valid Values: FULL_REQUEST_CACHING | PER_RESOLVER_CACHING Required: No
atRestEncryptionEnabled
At-rest encryption flag for cache. You cannot update this setting after creation.
Type: Boolean Required: No status
The cache instance status.
• AVAILABLE: The instance is available for use.
• CREATING: The instance is currently creating.
• DELETING: The instance is currently deleting.
• MODIFYING: The instance is currently modifying.
• FAILED: The instance has failed creation.
Type: String
Valid Values: AVAILABLE | CREATING | DELETING | MODIFYING | FAILED Required: No
transitEncryptionEnabled
Transit encryption flag when connecting to cache. You cannot update this setting after creation.
Type: Boolean Required: No ttl
TTL in seconds for cache entries.
Valid values are 1–3,600 seconds.
Type: Long Required: No type
The cache instance type. Valid values are
API Version 2017-07-25 149
See Also
• SMALL
• MEDIUM
• LARGE
• XLARGE
• LARGE_2X
• LARGE_4X
• LARGE_8X (not available in all regions)
• LARGE_12X
Historically, instance types were identified by an EC2-style value. As of July 2020, this is deprecated, and the generic identifiers above should be used.
The following legacy instance types are available, but their use is discouraged:
• T2_SMALL: A t2.small instance type.
• T2_MEDIUM: A t2.medium instance type.
• R4_LARGE: A r4.large instance type.
• R4_XLARGE: A r4.xlarge instance type.
• R4_2XLARGE: A r4.2xlarge instance type.
• R4_4XLARGE: A r4.4xlarge instance type.
• R4_8XLARGE: A r4.8xlarge instance type.
Type: String
Valid Values: T2_SMALL | T2_MEDIUM | R4_LARGE | R4_XLARGE | R4_2XLARGE | R4_4XLARGE | R4_8XLARGE | SMALL | MEDIUM | LARGE | XLARGE | LARGE_2X | LARGE_4X | LARGE_8X | LARGE_12X
Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
ApiKey
Describes an API key.
Customers invoke AWS AppSync GraphQL API operations with API keys as an identity mechanism. There are two key versions:
da1: We introduced this version at launch in November 2017. These keys always expire after 7 days.
Amazon DynamoDB TTL manages key expiration. These keys ceased to be valid after February 21, 2018, and they should no longer be used.
• ListApiKeys returns the expiration time in milliseconds.
• CreateApiKey returns the expiration time in milliseconds.
• UpdateApiKey is not available for this key version.
• DeleteApiKey deletes the item from the table.
• Expiration is stored in DynamoDB as milliseconds. This results in a bug where keys are not automatically deleted because DynamoDB expects the TTL to be stored in seconds. As a one-time action, we deleted these keys from the table on February 21, 2018.
da2: We introduced this version in February 2018 when AWS AppSync added support to extend key expiration.
• ListApiKeys returns the expiration time and deletion time in seconds.
• CreateApiKey returns the expiration time and deletion time in seconds and accepts a user-provided expiration time in seconds.
• UpdateApiKey returns the expiration time and and deletion time in seconds and accepts a user-provided expiration time in seconds. Expired API keys are kept for 60 days after the expiration time.
You can update the key expiration time as long as the key isn't deleted.
• DeleteApiKey deletes the item from the table.
• Expiration is stored in DynamoDB as seconds. After the expiration time, using the key to authenticate will fail. However, you can reinstate the key before deletion.
• Deletion is stored in DynamoDB as seconds. The key is deleted after deletion time.
Contents
deletes
The time after which the API key is deleted. The date is represented as seconds since the epoch, rounded down to the nearest hour.
Type: Long Required: No description
A description of the purpose of the API key.
Type: String Required: No expires
The time after which the API key expires. The date is represented as seconds since the epoch, rounded down to the nearest hour.
API Version 2017-07-25 151
See Also
Type: Long Required: No id
The API key ID.
Type: String Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
AuthorizationConfig
The authorization configuration in case the HTTP endpoint requires authorization.
Contents
authorizationType
The authorization type that the HTTP endpoint requires.
• AWS_IAM: The authorization type is Signature Version 4 (SigV4).
Type: String
Valid Values: AWS_IAM Required: Yes
awsIamConfig
The AWS Identity and Access Management (IAM) settings.
Type: AwsIamConfig (p. 154) object Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
API Version 2017-07-25 153
AwsIamConfig
AwsIamConfig
The AWS Identity and Access Management (IAM) configuration.
Contents
signingRegion
The signing AWS Region for IAM authorization.
Type: String Required: No signingServiceName
The signing service name for IAM authorization.
Type: String Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
CachingConfig
The caching configuration for a resolver that has caching activated.
Contents
cachingKeys
The caching keys for a resolver that has caching activated.
Valid values are entries from the $context.arguments, $context.source, and
$context.identity maps.
Type: Array of strings Required: No
ttl
The TTL in seconds for a resolver that has caching activated.
Valid values are 1–3,600 seconds.
Type: Long Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
API Version 2017-07-25 155
CognitoUserPoolConfig
CognitoUserPoolConfig
Describes an Amazon Cognito user pool configuration.
Contents
appIdClientRegex
A regular expression for validating the incoming Amazon Cognito user pool app client ID.
Type: String Required: No awsRegion
The AWS Region in which the user pool was created.
Type: String Required: Yes userPoolId
The user pool ID.
Type: String Required: Yes
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
DataSource
Describes a data source.
Contents
dataSourceArn
The data source Amazon Resource Name (ARN).
Type: String Required: No description
The description of the data source.
Type: String Required: No dynamodbConfig
DynamoDB settings.
Type: DynamodbDataSourceConfig (p. 162) object Required: No
elasticsearchConfig
Amazon OpenSearch Service settings.
Type: ElasticsearchDataSourceConfig (p. 163) object Required: No
httpConfig
HTTP endpoint settings.
Type: HttpDataSourceConfig (p. 169) object Required: No
lambdaConfig Lambda settings.
Type: LambdaDataSourceConfig (p. 172) object Required: No
name
The name of the data source.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 65536.
Pattern: [_A-Za-z][_0-9A-Za-z]*
API Version 2017-07-25 157
See Also
Required: No
openSearchServiceConfig
Amazon OpenSearch Service settings.
Type: OpenSearchServiceDataSourceConfig (p. 175) object Required: No
relationalDatabaseConfig Relational database settings.
Type: RelationalDatabaseDataSourceConfig (p. 178) object Required: No
serviceRoleArn
The AWS Identity and Access Management (IAM) service role Amazon Resource Name (ARN) for the data source. The system assumes this role when accessing the data source.
Type: String Required: No type
The type of the data source.
• AWS_LAMBDA: The data source is an AWS Lambda function.
• AMAZON_DYNAMODB: The data source is an Amazon DynamoDB table.
• AMAZON_ELASTICSEARCH: The data source is an Amazon OpenSearch Service domain.
• AMAZON_OPENSEARCH_SERVICE: The data source is an Amazon OpenSearch Service domain.
• NONE: There is no data source. Use this type when you want to invoke a GraphQL operation without connecting to a data source, such as when you're performing data transformation with resolvers or invoking a subscription from a mutation.
• HTTP: The data source is an HTTP endpoint.
• RELATIONAL_DATABASE: The data source is a relational database.
Type: String
Valid Values: AWS_LAMBDA | AMAZON_DYNAMODB | AMAZON_ELASTICSEARCH | NONE | HTTP
| RELATIONAL_DATABASE | AMAZON_OPENSEARCH_SERVICE Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
DeltaSyncConfig
Describes a Delta Sync configuration.
Contents
baseTableTTL
The number of minutes that an Item is stored in the data source.
Type: Long Required: No deltaSyncTableName
The Delta Sync table name.
Type: String Required: No deltaSyncTableTTL
The number of minutes that a Delta Sync log entry is stored in the Delta Sync table.
Type: Long Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
API Version 2017-07-25 159
DomainNameConfig
DomainNameConfig
Describes a configuration for a custom domain.
Contents
appsyncDomainName
The domain name that AWS AppSync provides.
Type: String Required: No certificateArn
The Amazon Resource Name (ARN) of the certificate. This can be an AWS Certificate Manager (ACM) certificate or an AWS Identity and Access Management (IAM) server certificate.
Type: String
Length Constraints: Minimum length of 20. Maximum length of 2048.
Pattern: ^arn:[a-z-]*:(acm|iam):[a-z0-9-]*:\d{12}:(certificate|server-certificate)/[0-9A-Za-z_/-]*$
Required: No description
A description of the DomainName configuration.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 255.
Pattern: ^.*$
Required: No domainName
The domain name.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 253.
Pattern: ^(\*[\w\d-]*\.)?([\w\d-]+\.)+[\w\d-]+$
Required: No hostedZoneId
The ID of your Amazon Route 53 hosted zone.
Type: String Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
API Version 2017-07-25 161
DynamodbDataSourceConfig
DynamodbDataSourceConfig
Describes an Amazon DynamoDB data source configuration.
Contents
awsRegion
The AWS Region.
Type: String Required: Yes deltaSyncConfig
The DeltaSyncConfig for a versioned data source.
Type: DeltaSyncConfig (p. 159) object Required: No
tableName
The table name.
Type: String Required: Yes useCallerCredentials
Set to TRUE to use Amazon Cognito credentials with this data source.
Type: Boolean Required: No versioned
Set to TRUE to use Conflict Detection and Resolution with this data source.
Type: Boolean Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
ElasticsearchDataSourceConfig
Describes an OpenSearch data source configuration.
As of September 2021, Amazon Elasticsearch service is Amazon OpenSearch Service. This configuration is deprecated. For new data sources, use OpenSearchServiceDataSourceConfig (p. 175) to specify an OpenSearch data source.
Contents
awsRegion
The AWS Region.
Type: String Required: Yes endpoint
The endpoint.
Type: String Required: Yes
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for Ruby V3
API Version 2017-07-25 163