# 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_forecast.CfnDataset.html)

- Source: Generated at build time
- Type last changed: v2.56.1 · 23 Dec 2022

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_forecast as forecast } from 'aws-cdk-lib';

declare const encryptionConfig: any;
declare const schema: any;
const cfnDatasetProps: forecast.CfnDatasetProps = {
  datasetName: 'datasetName',
  datasetType: 'datasetType',
  domain: 'domain',
  schema: schema,

  // the properties below are optional
  dataFrequency: 'dataFrequency',
  encryptionConfig: encryptionConfig,
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

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_forecast as forecast

# encryption_config: Any
# schema: Any

cfn_dataset_props = forecast.CfnDatasetProps(
    dataset_name="datasetName",
    dataset_type="datasetType",
    domain="domain",
    schema=schema,

    # the properties below are optional
    data_frequency="dataFrequency",
    encryption_config=encryption_config,
    tags=[forecast.CfnDataset.TagsItemsProperty(
        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.forecast.*;

Object encryptionConfig;
Object schema;

CfnDatasetProps cfnDatasetProps = CfnDatasetProps.builder()
        .datasetName("datasetName")
        .datasetType("datasetType")
        .domain("domain")
        .schema(schema)

        // the properties below are optional
        .dataFrequency("dataFrequency")
        .encryptionConfig(encryptionConfig)
        .tags(List.of(TagsItemsProperty.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.Forecast;

var encryptionConfig;
var schema;

var cfnDatasetProps = new CfnDatasetProps {
    DatasetName = "datasetName",
    DatasetType = "datasetType",
    Domain = "domain",
    Schema = schema,

    // the properties below are optional
    DataFrequency = "dataFrequency",
    EncryptionConfig = encryptionConfig,
    Tags = new [] { new TagsItemsProperty {
        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 encryptionConfig interface{}
var schema interface{}

cfnDatasetProps := &CfnDatasetProps{
	DatasetName: jsii.String("datasetName"),
	DatasetType: jsii.String("datasetType"),
	Domain: jsii.String("domain"),
	Schema: schema,

	// the properties below are optional
	DataFrequency: jsii.String("dataFrequency"),
	EncryptionConfig: encryptionConfig,
	Tags: []TagsItemsProperty{
		&TagsItemsProperty{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `dataFrequency`: string — The frequency of data collection. This parameter is required for RELATED_TIME_SERIES datasets.

  Valid intervals are an integer followed by Y (Year), M (Month), W (Week), D (Day), H (Hour), and min (Minute). For example, "1D" indicates every day and "15min" indicates every 15 minutes. You cannot specify a value that would overlap with the next larger frequency. That means, for example, you cannot specify a frequency of 60 minutes, because that is equivalent to 1 hour. The valid values for each frequency are the following:

  - Minute - 1-59
  - Hour - 1-23
  - Day - 1-6
  - Week - 1-4
  - Month - 1-11
  - Year - 1

  Thus, if you want every other week forecasts, specify "2W". Or, if you want quarterly forecasts, you specify "3M".

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

- `datasetType`: string (required) — The dataset type.

- `domain`: string (required) — The domain associated with the dataset.

- `encryptionConfig`: any — A Key Management Service (KMS) key and the Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.

- `schema`: any (required) — The schema for the dataset.

  The schema attributes and their order must match the fields in your data. The dataset `Domain` and `DatasetType` that you choose determine the minimum required fields in your training data. For information about the required fields for a specific dataset domain and type, see [Dataset Domains and Dataset Types](https://docs.aws.amazon.com/forecast/latest/dg/howitworks-domains-ds-types.html) .

- `tags`: [CfnDataset.TagsItemsProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_forecast.CfnDataset.TagsItemsProperty.html)[] — An array of key-value pairs to apply to this resource.

  For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .
