# CfnDataSourceProps

Properties for defining a `CfnDataSource`.

Used as props by: [CfnDataSource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearch.CfnDataSource.html)

- Source: Generated at build time
- Type last changed: v2.268.0 · 2 Sep 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_opensearch as opensearch } from 'aws-cdk-lib';
const cfnDataSourceProps: opensearch.CfnDataSourceProps = {
  dataSourceType: {
    s3GlueDataCatalog: {
      roleArn: 'roleArn',
    },
  },
  domainName: 'domainName',
  name: 'name',

  // the properties below are optional
  description: 'description',
};
```

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_opensearch as opensearch

cfn_data_source_props = opensearch.CfnDataSourceProps(
    data_source_type=opensearch.CfnDataSource.DataSourceTypeProperty(
        s3_glue_data_catalog=opensearch.CfnDataSource.S3GlueDataCatalogProperty(
            role_arn="roleArn"
        )
    ),
    domain_name="domainName",
    name="name",

    # the properties below are optional
    description="description"
)
```

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.opensearch.*;

CfnDataSourceProps cfnDataSourceProps = CfnDataSourceProps.builder()
        .dataSourceType(DataSourceTypeProperty.builder()
                .s3GlueDataCatalog(S3GlueDataCatalogProperty.builder()
                        .roleArn("roleArn")
                        .build())
                .build())
        .domainName("domainName")
        .name("name")

        // the properties below are optional
        .description("description")
        .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.OpenSearch;

var cfnDataSourceProps = new CfnDataSourceProps {
    DataSourceType = new DataSourceTypeProperty {
        S3GlueDataCatalog = new S3GlueDataCatalogProperty {
            RoleArn = "roleArn"
        }
    },
    DomainName = "domainName",
    Name = "name",

    // the properties below are optional
    Description = "description"
};
```

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"

cfnDataSourceProps := &CfnDataSourceProps{
	DataSourceType: &DataSourceTypeProperty{
		S3GlueDataCatalog: &S3GlueDataCatalogProperty{
			RoleArn: jsii.String("roleArn"),
		},
	},
	DomainName: jsii.String("domainName"),
	Name: jsii.String("name"),

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

## Properties

- `dataSourceType`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDataSource.DataSourceTypeProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearch.CfnDataSource.DataSourceTypeProperty.html) (required) — The type of data source.

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

- `domainName`: string (required) — The name of the OpenSearch Service domain.

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