Skip to content
v2.278.0

CfnDatastoreProps Struct ​

Properties for defining a CfnDatastore.

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',
  }],
};
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_iotanalytics as iotanalytics

# json_configuration: Any
# service_managed_s3: Any

cfn_datastore_props = iotanalytics.CfnDatastoreProps(
    datastore_name="datastoreName",
    datastore_partitions=iotanalytics.CfnDatastore.DatastorePartitionsProperty(
        partitions=[iotanalytics.CfnDatastore.DatastorePartitionProperty(
            partition=iotanalytics.CfnDatastore.PartitionProperty(
                attribute_name="attributeName"
            ),
            timestamp_partition=iotanalytics.CfnDatastore.TimestampPartitionProperty(
                attribute_name="attributeName",

                # the properties below are optional
                timestamp_format="timestampFormat"
            )
        )]
    ),
    datastore_storage=iotanalytics.CfnDatastore.DatastoreStorageProperty(
        customer_managed_s3=iotanalytics.CfnDatastore.CustomerManagedS3Property(
            bucket="bucket",
            role_arn="roleArn",

            # the properties below are optional
            key_prefix="keyPrefix"
        ),
        iot_site_wise_multi_layer_storage=iotanalytics.CfnDatastore.IotSiteWiseMultiLayerStorageProperty(
            customer_managed_s3_storage=iotanalytics.CfnDatastore.CustomerManagedS3StorageProperty(
                bucket="bucket",

                # the properties below are optional
                key_prefix="keyPrefix"
            )
        ),
        service_managed_s3=service_managed_s3
    ),
    file_format_configuration=iotanalytics.CfnDatastore.FileFormatConfigurationProperty(
        json_configuration=json_configuration,
        parquet_configuration=iotanalytics.CfnDatastore.ParquetConfigurationProperty(
            schema_definition=iotanalytics.CfnDatastore.SchemaDefinitionProperty(
                columns=[iotanalytics.CfnDatastore.ColumnProperty(
                    name="name",
                    type="type"
                )]
            )
        )
    ),
    retention_period=iotanalytics.CfnDatastore.RetentionPeriodProperty(
        number_of_days=123,
        unlimited=False
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
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.iotanalytics.*;

Object jsonConfiguration;
Object serviceManagedS3;

CfnDatastoreProps cfnDatastoreProps = CfnDatastoreProps.builder()
        .datastoreName("datastoreName")
        .datastorePartitions(DatastorePartitionsProperty.builder()
                .partitions(List.of(DatastorePartitionProperty.builder()
                        .partition(PartitionProperty.builder()
                                .attributeName("attributeName")
                                .build())
                        .timestampPartition(TimestampPartitionProperty.builder()
                                .attributeName("attributeName")

                                // the properties below are optional
                                .timestampFormat("timestampFormat")
                                .build())
                        .build()))
                .build())
        .datastoreStorage(DatastoreStorageProperty.builder()
                .customerManagedS3(CustomerManagedS3Property.builder()
                        .bucket("bucket")
                        .roleArn("roleArn")

                        // the properties below are optional
                        .keyPrefix("keyPrefix")
                        .build())
                .iotSiteWiseMultiLayerStorage(IotSiteWiseMultiLayerStorageProperty.builder()
                        .customerManagedS3Storage(CustomerManagedS3StorageProperty.builder()
                                .bucket("bucket")

                                // the properties below are optional
                                .keyPrefix("keyPrefix")
                                .build())
                        .build())
                .serviceManagedS3(serviceManagedS3)
                .build())
        .fileFormatConfiguration(FileFormatConfigurationProperty.builder()
                .jsonConfiguration(jsonConfiguration)
                .parquetConfiguration(ParquetConfigurationProperty.builder()
                        .schemaDefinition(SchemaDefinitionProperty.builder()
                                .columns(List.of(ColumnProperty.builder()
                                        .name("name")
                                        .type("type")
                                        .build()))
                                .build())
                        .build())
                .build())
        .retentionPeriod(RetentionPeriodProperty.builder()
                .numberOfDays(123)
                .unlimited(false)
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
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.IoTAnalytics;

var jsonConfiguration;
var serviceManagedS3;

var cfnDatastoreProps = new CfnDatastoreProps {
    DatastoreName = "datastoreName",
    DatastorePartitions = new DatastorePartitionsProperty {
        Partitions = new [] { new DatastorePartitionProperty {
            Partition = new PartitionProperty {
                AttributeName = "attributeName"
            },
            TimestampPartition = new TimestampPartitionProperty {
                AttributeName = "attributeName",

                // the properties below are optional
                TimestampFormat = "timestampFormat"
            }
        } }
    },
    DatastoreStorage = new DatastoreStorageProperty {
        CustomerManagedS3 = new CustomerManagedS3Property {
            Bucket = "bucket",
            RoleArn = "roleArn",

            // the properties below are optional
            KeyPrefix = "keyPrefix"
        },
        IotSiteWiseMultiLayerStorage = new IotSiteWiseMultiLayerStorageProperty {
            CustomerManagedS3Storage = new CustomerManagedS3StorageProperty {
                Bucket = "bucket",

                // the properties below are optional
                KeyPrefix = "keyPrefix"
            }
        },
        ServiceManagedS3 = serviceManagedS3
    },
    FileFormatConfiguration = new FileFormatConfigurationProperty {
        JsonConfiguration = jsonConfiguration,
        ParquetConfiguration = new ParquetConfigurationProperty {
            SchemaDefinition = new SchemaDefinitionProperty {
                Columns = new [] { new ColumnProperty {
                    Name = "name",
                    Type = "type"
                } }
            }
        }
    },
    RetentionPeriod = new RetentionPeriodProperty {
        NumberOfDays = 123,
        Unlimited = false
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
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 jsonConfiguration interface{}
var serviceManagedS3 interface{}

cfnDatastoreProps := &CfnDatastoreProps{
	DatastoreName: jsii.String("datastoreName"),
	DatastorePartitions: &DatastorePartitionsProperty{
		Partitions: []interface{}{
			&DatastorePartitionProperty{
				Partition: &PartitionProperty{
					AttributeName: jsii.String("attributeName"),
				},
				TimestampPartition: &TimestampPartitionProperty{
					AttributeName: jsii.String("attributeName"),

					// the properties below are optional
					TimestampFormat: jsii.String("timestampFormat"),
				},
			},
		},
	},
	DatastoreStorage: &DatastoreStorageProperty{
		CustomerManagedS3: &CustomerManagedS3Property{
			Bucket: jsii.String("bucket"),
			RoleArn: jsii.String("roleArn"),

			// the properties below are optional
			KeyPrefix: jsii.String("keyPrefix"),
		},
		IotSiteWiseMultiLayerStorage: &IotSiteWiseMultiLayerStorageProperty{
			CustomerManagedS3Storage: &CustomerManagedS3StorageProperty{
				Bucket: jsii.String("bucket"),

				// the properties below are optional
				KeyPrefix: jsii.String("keyPrefix"),
			},
		},
		ServiceManagedS3: serviceManagedS3,
	},
	FileFormatConfiguration: &FileFormatConfigurationProperty{
		JsonConfiguration: jsonConfiguration,
		ParquetConfiguration: &ParquetConfigurationProperty{
			SchemaDefinition: &SchemaDefinitionProperty{
				Columns: []interface{}{
					&ColumnProperty{
						Name: jsii.String("name"),
						Type: jsii.String("type"),
					},
				},
			},
		},
	},
	RetentionPeriod: &RetentionPeriodProperty{
		NumberOfDays: jsii.Number(123),
		Unlimited: jsii.Boolean(false),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

datastoreNameoptionalstringdatastore_nameoptionalstrdatastoreNameoptionalStringDatastoreNameoptionalstringDatastoreNameoptional*string #
The name of the data store.
datastorePartitionsoptionalIResolvable | CfnDatastore.DatastorePartitionsPropertydatastore_partitionsoptionaltyping.Union[IResolvable, DatastorePartitionsProperty]datastorePartitionsoptionalIResolvableDatastorePartitionsoptionalIResolvableDatastorePartitionsoptionalinterface{} #
Information about the partition dimensions in a data store.
datastoreStorageoptionalIResolvable | CfnDatastore.DatastoreStoragePropertydatastore_storageoptionaltyping.Union[IResolvable, DatastoreStorageProperty]datastoreStorageoptionalIResolvableDatastoreStorageoptionalIResolvableDatastoreStorageoptionalinterface{} #
Where data store data is stored.
fileFormatConfigurationoptionalIResolvable | CfnDatastore.FileFormatConfigurationPropertyfile_format_configurationoptionaltyping.Union[IResolvable, FileFormatConfigurationProperty]fileFormatConfigurationoptionalIResolvableFileFormatConfigurationoptionalIResolvableFileFormatConfigurationoptionalinterface{} #
Contains the configuration information of file formats. ITA data stores support JSON and Parquet .

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.

retentionPeriodoptionalIResolvable | CfnDatastore.RetentionPeriodPropertyretention_periodoptionaltyping.Union[IResolvable, RetentionPeriodProperty]retentionPeriodoptionalIResolvableRetentionPeriodoptionalIResolvableRetentionPeriodoptionalinterface{} #
How long, in days, message data is kept for the data store.

When customerManagedS3 storage is selected, this parameter is ignored.

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
Metadata which can be used to manage the data store.

For more information, see Tag .