# CfnDatastoreProps

Properties for defining a `CfnDatastore`.

Extends: CfnDatastoreProps
Used as props by: CfnDatastore

- Source: Generated code

## Example

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

declare const jsonConfiguration: any;
declare const serviceManagedS3: any;
const cfnDatastoreProps: iotanalytics.CfnDatastoreProps = {
  datastoreName: 'datastoreName',
  datastorePartitions: {
    partitions: [{
      partition: {
        attributeName: 'attributeName',
      },
      timestampPartition: {
        attributeName: 'attributeName',

        // the properties below are optional
        timestampFormat: 'timestampFormat',
      },
    }],
  },
  datastoreStorage: {
    customerManagedS3: {
      bucket: 'bucket',
      roleArn: 'roleArn',

      // the properties below are optional
      keyPrefix: 'keyPrefix',
    },
    iotSiteWiseMultiLayerStorage: {
      customerManagedS3Storage: {
        bucket: 'bucket',

        // the properties below are optional
        keyPrefix: 'keyPrefix',
      },
    },
    serviceManagedS3: serviceManagedS3,
  },
  fileFormatConfiguration: {
    jsonConfiguration: jsonConfiguration,
    parquetConfiguration: {
      schemaDefinition: {
        columns: [{
          name: 'name',
          type: 'type',
        }],
      },
    },
  },
  retentionPeriod: {
    numberOfDays: 123,
    unlimited: false,
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

## Properties

- `datastoreName`: string — The name of the data store.

- `datastorePartitions`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDatastore.DatastorePartitionsProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_iotanalytics.CfnDatastore.DatastorePartitionsProperty.html) — Information about the partition dimensions in a data store.

- `datastoreStorage`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDatastore.DatastoreStorageProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_iotanalytics.CfnDatastore.DatastoreStorageProperty.html) — Where data store data is stored.

- `fileFormatConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDatastore.FileFormatConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_iotanalytics.CfnDatastore.FileFormatConfigurationProperty.html) — Contains the configuration information of file formats. ITA data stores support JSON and [Parquet](https://docs.aws.amazon.com/https://parquet.apache.org/) .

  The default file format is JSON. You can specify only one format.

  You can't change the file format after you create the data store.

- `retentionPeriod`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDatastore.RetentionPeriodProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_iotanalytics.CfnDatastore.RetentionPeriodProperty.html) — How long, in days, message data is kept for the data store.

  When `customerManagedS3` storage is selected, this parameter is ignored.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Metadata which can be used to manage the data store.

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