DataSource - Amazon AppSync
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

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 object

Required: No

elasticsearchConfig

Amazon OpenSearch Service settings.

Type: ElasticsearchDataSourceConfig object

Required: No

eventBridgeConfig

Amazon EventBridge settings.

Type: EventBridgeDataSourceConfig object

Required: No

httpConfig

HTTP endpoint settings.

Type: HttpDataSourceConfig object

Required: No

lambdaConfig

Lambda settings.

Type: LambdaDataSourceConfig object

Required: No

metricsConfig

Enables or disables enhanced data source metrics for specified data sources. Note that metricsConfig won't be used unless the dataSourceLevelMetricsBehavior value is set to PER_DATA_SOURCE_METRICS. If the dataSourceLevelMetricsBehavior is set to FULL_REQUEST_DATA_SOURCE_METRICS instead, metricsConfig will be ignored. However, you can still set its value.

metricsConfig can be ENABLED or DISABLED.

Type: String

Valid Values: ENABLED | DISABLED

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]*

Required: No

openSearchServiceConfig

Amazon OpenSearch Service settings.

Type: OpenSearchServiceDataSourceConfig object

Required: No

relationalDatabaseConfig

Relational database settings.

Type: RelationalDatabaseDataSourceConfig object

Required: No

serviceRoleArn

The Amazon 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 Amazon 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.

  • AMAZON_EVENTBRIDGE: The data source is an Amazon EventBridge configuration.

  • 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 | AMAZON_EVENTBRIDGE

Required: No

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: