# PartitionKeyProperty

An attribute used in partitioning data in a table.

A dimension key partitions data using the values of the dimension specified by the dimension-name as partition key, while a measure key partitions data using measure names (values of the 'measure_name' column).

- 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_timestream as timestream } from 'aws-cdk-lib';
const partitionKeyProperty: timestream.CfnTable.PartitionKeyProperty = {
  type: 'type',

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

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_timestream as timestream

partition_key_property = timestream.CfnTable.PartitionKeyProperty(
    type="type",

    # the properties below are optional
    enforcement_in_record="enforcementInRecord",
    name="name"
)
```

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

PartitionKeyProperty partitionKeyProperty = PartitionKeyProperty.builder()
        .type("type")

        // the properties below are optional
        .enforcementInRecord("enforcementInRecord")
        .name("name")
        .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.Timestream;

var partitionKeyProperty = new PartitionKeyProperty {
    Type = "type",

    // the properties below are optional
    EnforcementInRecord = "enforcementInRecord",
    Name = "name"
};
```

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"

partitionKeyProperty := &PartitionKeyProperty{
	Type: jsii.String("type"),

	// the properties below are optional
	EnforcementInRecord: jsii.String("enforcementInRecord"),
	Name: jsii.String("name"),
}
```

## Properties

- `enforcementInRecord`: string — The level of enforcement for the specification of a dimension key in ingested records.

  Options are REQUIRED (dimension key must be specified) and OPTIONAL (dimension key does not have to be specified).

- `name`: string — The name of the attribute used for a dimension key.

- `type`: string (required) — The type of the partition key.

  Options are DIMENSION (dimension key) and MEASURE (measure key).
