# AppSyncBaseDataSourceProps

Base properties for an AppSync datasource.

- Source: [`aws-appsync/lib/data-source-common.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-appsync/lib/data-source-common.ts#L87)
- Type last changed: v2.234.0 · 8 Jan 2026

## 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';
import { aws_appsync as interfaces_appsync } from 'aws-cdk-lib/interfaces';

declare const apiRef: interfaces_appsync.IApiRef;
const appSyncBaseDataSourceProps: appsync.AppSyncBaseDataSourceProps = {
  api: apiRef,

  // the properties below are optional
  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
from aws_cdk.interfaces import aws_appsync as interfaces_appsync

# api_ref: interfaces_appsync.IApiRef

app_sync_base_data_source_props = appsync.AppSyncBaseDataSourceProps(
    api=api_ref,

    # the properties below are optional
    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.*;
import software.amazon.awscdk.interfaces.appsync.*;

IApiRef apiRef;

AppSyncBaseDataSourceProps appSyncBaseDataSourceProps = AppSyncBaseDataSourceProps.builder()
        .api(apiRef)

        // the properties below are optional
        .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;
using Amazon.CDK.Interfaces.AppSync;

IApiRef apiRef;

var appSyncBaseDataSourceProps = new AppSyncBaseDataSourceProps {
    Api = apiRef,

    // the properties below are optional
    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"
import "github.com/aws/aws-cdk-go/awscdk"

var apiRef IApiRef

appSyncBaseDataSourceProps := &AppSyncBaseDataSourceProps{
	Api: apiRef,

	// the properties below are optional
	Description: jsii.String("description"),
	Name: jsii.String("name"),
}
```

## Properties

- `api`: [IApiRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_appsync.IApiRef.html) (required) — The API to attach this data source to.

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

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

  **Default:** id of data source

  The only allowed pattern is: {[_A-Za-z][_0-9A-Za-z]*}.
  Any invalid characters will be automatically removed.
