# CfnDatasetProps

Struct · External

Properties for defining a `CfnDataset`.

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

- Source: Generated at build time
- Type last changed: v2.258.0 · 4 Jun 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_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';

declare const examples: any;
const cfnDatasetProps: bedrockagentcore.CfnDatasetProps = {
  datasetName: 'datasetName',
  schemaType: 'schemaType',

  // the properties below are optional
  description: 'description',
  kmsKeyArn: 'kmsKeyArn',
  source: {
    inlineExamples: {
      examples: [examples],
    },
    s3Source: {
      s3Uri: 's3Uri',
    },
  },
  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_bedrockagentcore as bedrockagentcore

# examples: Any

cfn_dataset_props = bedrockagentcore.CfnDatasetProps(
    dataset_name="datasetName",
    schema_type="schemaType",

    # the properties below are optional
    description="description",
    kms_key_arn="kmsKeyArn",
    source=bedrockagentcore.CfnDataset.DataSourceTypeProperty(
        inline_examples=bedrockagentcore.CfnDataset.InlineExamplesSourceProperty(
            examples=[examples]
        ),
        s3_source=bedrockagentcore.CfnDataset.S3SourceProperty(
            s3_uri="s3Uri"
        )
    ),
    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.bedrockagentcore.*;

Object examples;

CfnDatasetProps cfnDatasetProps = CfnDatasetProps.builder()
        .datasetName("datasetName")
        .schemaType("schemaType")

        // the properties below are optional
        .description("description")
        .kmsKeyArn("kmsKeyArn")
        .source(DataSourceTypeProperty.builder()
                .inlineExamples(InlineExamplesSourceProperty.builder()
                        .examples(List.of(examples))
                        .build())
                .s3Source(S3SourceProperty.builder()
                        .s3Uri("s3Uri")
                        .build())
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C#:

```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.BedrockAgentCore;

var examples;

var cfnDatasetProps = new CfnDatasetProps {
    DatasetName = "datasetName",
    SchemaType = "schemaType",

    // the properties below are optional
    Description = "description",
    KmsKeyArn = "kmsKeyArn",
    Source = new DataSourceTypeProperty {
        InlineExamples = new InlineExamplesSourceProperty {
            Examples = new [] { examples }
        },
        S3Source = new S3SourceProperty {
            S3Uri = "s3Uri"
        }
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

Go:

```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 examples interface{}

cfnDatasetProps := &CfnDatasetProps{
	DatasetName: jsii.String("datasetName"),
	SchemaType: jsii.String("schemaType"),

	// the properties below are optional
	Description: jsii.String("description"),
	KmsKeyArn: jsii.String("kmsKeyArn"),
	Source: &DataSourceTypeProperty{
		InlineExamples: &InlineExamplesSourceProperty{
			Examples: []interface{}{
				examples,
			},
		},
		S3Source: &S3SourceProperty{
			S3Uri: jsii.String("s3Uri"),
		},
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `datasetName`: string (required) — Human-readable name for the dataset.

  Unique within the account (case-insensitive). Immutable after creation.

- `description`: string — A description of the dataset.

- `kmsKeyArn`: string — Optional AWS KMS key ARN for SSE-KMS on service S3 writes.

- `schemaType`: string (required) — Versioned schema type governing the structure of examples.

  Immutable after creation.

- `source`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDataset.DataSourceTypeProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.CfnDataset.DataSourceTypeProperty.html) — Source of initial examples.

  Provide either inline examples or an S3 URI pointing to a JSONL file.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A list of tags to assign to the dataset.
