# AppSyncDataSourceOptions

Optional configuration for data sources.

Used as argument in: [IEventApi.addDynamoDbDataSource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.IEventApi.html#adddynamodbdatasource), IEventApi.addEventBridgeDataSource, IEventApi.addLambdaDataSource, IEventApi.addOpenSearchDataSource, IEventApi.addRdsDataSource

- Source: [`aws-appsync/lib/data-source-common.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-appsync/lib/data-source-common.ts#L294)
- Type last changed: v2.193.0 · 30 Apr 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_appsync as appsync } from 'aws-cdk-lib';
const appSyncDataSourceOptions: appsync.AppSyncDataSourceOptions = {
  description: 'description',
  name: 'name',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

app_sync_data_source_options = appsync.AppSyncDataSourceOptions(
    description="description",
    name="name"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.appsync.*;

AppSyncDataSourceOptions appSyncDataSourceOptions = AppSyncDataSourceOptions.builder()
        .description("description")
        .name("name")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;

var appSyncDataSourceOptions = new AppSyncDataSourceOptions {
    Description = "description",
    Name = "name"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

appSyncDataSourceOptions := &AppSyncDataSourceOptions{
	Description: jsii.String("description"),
	Name: jsii.String("name"),
}
```

## Properties

- `description`: string — The description of the data source.

  **Default:** No description

- `name`: string — The name of the data source, overrides the id given by CDK.

  **Default:** generated by CDK given the id
