# DatastorePartitionProperty

A single dimension to partition a data store.

The dimension must be an `AttributePartition` or a `TimestampPartition` .

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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';
const datastorePartitionProperty: iotanalytics.CfnDatastore.DatastorePartitionProperty = {
  partition: {
    attributeName: 'attributeName',
  },
  timestampPartition: {
    attributeName: 'attributeName',

    // the properties below are optional
    timestampFormat: 'timestampFormat',
  },
};
```

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_iotanalytics as iotanalytics

datastore_partition_property = 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"
    )
)
```

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.iotanalytics.*;

DatastorePartitionProperty datastorePartitionProperty = DatastorePartitionProperty.builder()
        .partition(PartitionProperty.builder()
                .attributeName("attributeName")
                .build())
        .timestampPartition(TimestampPartitionProperty.builder()
                .attributeName("attributeName")

                // the properties below are optional
                .timestampFormat("timestampFormat")
                .build())
        .build();
```

C# / .NET:

```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 datastorePartitionProperty = new DatastorePartitionProperty {
    Partition = new PartitionProperty {
        AttributeName = "attributeName"
    },
    TimestampPartition = new TimestampPartitionProperty {
        AttributeName = "attributeName",

        // the properties below are optional
        TimestampFormat = "timestampFormat"
    }
};
```

Golang:

```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"

datastorePartitionProperty := &DatastorePartitionProperty{
	Partition: &PartitionProperty{
		AttributeName: jsii.String("attributeName"),
	},
	TimestampPartition: &TimestampPartitionProperty{
		AttributeName: jsii.String("attributeName"),

		// the properties below are optional
		TimestampFormat: jsii.String("timestampFormat"),
	},
}
```

## Properties

- `partition`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDatastore.PartitionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iotanalytics.CfnDatastore.PartitionProperty.html) — A partition dimension defined by an attribute.

- `timestampPartition`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDatastore.TimestampPartitionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iotanalytics.CfnDatastore.TimestampPartitionProperty.html) — A partition dimension defined by a timestamp attribute.
