# CfnDatasetProps

Properties for defining a `CfnDataset`.

Used as props by: [CfnDataset](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_personalize.CfnDataset.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_personalize as personalize } from 'aws-cdk-lib';

declare const dataSource: any;
const cfnDatasetProps: personalize.CfnDatasetProps = {
  datasetGroupArn: 'datasetGroupArn',
  datasetType: 'datasetType',
  name: 'name',
  schemaArn: 'schemaArn',

  // the properties below are optional
  datasetImportJob: {
    datasetArn: 'datasetArn',
    datasetImportJobArn: 'datasetImportJobArn',
    dataSource: dataSource,
    jobName: 'jobName',
    roleArn: 'roleArn',
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

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

# data_source: Any

cfn_dataset_props = personalize.CfnDatasetProps(
    dataset_group_arn="datasetGroupArn",
    dataset_type="datasetType",
    name="name",
    schema_arn="schemaArn",

    # the properties below are optional
    dataset_import_job=personalize.CfnDataset.DatasetImportJobProperty(
        dataset_arn="datasetArn",
        dataset_import_job_arn="datasetImportJobArn",
        data_source=data_source,
        job_name="jobName",
        role_arn="roleArn"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

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

Object dataSource;

CfnDatasetProps cfnDatasetProps = CfnDatasetProps.builder()
        .datasetGroupArn("datasetGroupArn")
        .datasetType("datasetType")
        .name("name")
        .schemaArn("schemaArn")

        // the properties below are optional
        .datasetImportJob(DatasetImportJobProperty.builder()
                .datasetArn("datasetArn")
                .datasetImportJobArn("datasetImportJobArn")
                .dataSource(dataSource)
                .jobName("jobName")
                .roleArn("roleArn")
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .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.Personalize;

var dataSource;

var cfnDatasetProps = new CfnDatasetProps {
    DatasetGroupArn = "datasetGroupArn",
    DatasetType = "datasetType",
    Name = "name",
    SchemaArn = "schemaArn",

    // the properties below are optional
    DatasetImportJob = new DatasetImportJobProperty {
        DatasetArn = "datasetArn",
        DatasetImportJobArn = "datasetImportJobArn",
        DataSource = dataSource,
        JobName = "jobName",
        RoleArn = "roleArn"
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

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"

var dataSource interface{}

cfnDatasetProps := &CfnDatasetProps{
	DatasetGroupArn: jsii.String("datasetGroupArn"),
	DatasetType: jsii.String("datasetType"),
	Name: jsii.String("name"),
	SchemaArn: jsii.String("schemaArn"),

	// the properties below are optional
	DatasetImportJob: &DatasetImportJobProperty{
		DatasetArn: jsii.String("datasetArn"),
		DatasetImportJobArn: jsii.String("datasetImportJobArn"),
		DataSource: dataSource,
		JobName: jsii.String("jobName"),
		RoleArn: jsii.String("roleArn"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `datasetGroupArn`: string (required) — The Amazon Resource Name (ARN) of the dataset group.

- `datasetImportJob`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDataset.DatasetImportJobProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_personalize.CfnDataset.DatasetImportJobProperty.html) — Describes a job that imports training data from a data source (Amazon S3 bucket) to an Amazon Personalize dataset.

  If you specify a dataset import job as part of a dataset, all dataset import job fields are required.

- `datasetType`: string (required) — One of the following values:.

  - Interactions
  - Items
  - Users

  > You can't use CloudFormation to create an Action Interactions or Actions dataset.

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

- `schemaArn`: string (required) — The ARN of the associated schema.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The tags used to organize, track, or control access for this resource.
