Skip to content
v2.278.0

DatastoreStorageProperty Struct ​

Where data store data is stored.

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 serviceManagedS3: any;
const datastoreStorageProperty: iotanalytics.CfnDatastore.DatastoreStorageProperty = {
  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,
};
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_iotanalytics as iotanalytics

# service_managed_s3: Any

datastore_storage_property = 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
)
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 serviceManagedS3;

DatastoreStorageProperty datastoreStorageProperty = 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();
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 serviceManagedS3;

var datastoreStorageProperty = 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
};
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 serviceManagedS3 interface{}

datastoreStorageProperty := &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,
}

Properties ​

customerManagedS3optionalIResolvable | CfnDatastore.CustomerManagedS3Propertycustomer_managed_s3optionaltyping.Union[IResolvable, CustomerManagedS3Property]customerManagedS3optionalIResolvableCustomerManagedS3optionalIResolvableCustomerManagedS3optionalinterface{} #
Use this to store data store data in an S3 bucket that you manage.

The choice of service-managed or customer-managed S3 storage cannot be changed after creation of the data store.

iotSiteWiseMultiLayerStorageoptionalIResolvable | CfnDatastore.IotSiteWiseMultiLayerStoragePropertyiot_site_wise_multi_layer_storageoptionaltyping.Union[IResolvable, IotSiteWiseMultiLayerStorageProperty]iotSiteWiseMultiLayerStorageoptionalIResolvableIotSiteWiseMultiLayerStorageoptionalIResolvableIotSiteWiseMultiLayerStorageoptionalinterface{} #
Use this to store data used by AWS IoT SiteWise in an Amazon S3 bucket that you manage.

You can't change the choice of Amazon S3 storage after your data store is created.

serviceManagedS3optionalanyservice_managed_s3optionalAnyserviceManagedS3optionalObjectServiceManagedS3optionalobjectServiceManagedS3optionalinterface{} #
Use this to store data store data in an S3 bucket managed by the service.

The choice of service-managed or customer-managed S3 storage cannot be changed after creation of the data store.