SchemaProperty Struct
A Schema specifies the expected data model of the table.
| Source | |
|---|---|
| Type last changed |
Example
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 schemaProperty: timestream.CfnTable.SchemaProperty = {
compositePartitionKey: [{
type: 'type',
// the properties below are optional
enforcementInRecord: 'enforcementInRecord',
name: 'name',
}],
};
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
schema_property = timestream.CfnTable.SchemaProperty(
composite_partition_key=[timestream.CfnTable.PartitionKeyProperty(
type="type",
# the properties below are optional
enforcement_in_record="enforcementInRecord",
name="name"
)]
)
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.*;
SchemaProperty schemaProperty = SchemaProperty.builder()
.compositePartitionKey(List.of(PartitionKeyProperty.builder()
.type("type")
// the properties below are optional
.enforcementInRecord("enforcementInRecord")
.name("name")
.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.Timestream;
var schemaProperty = new SchemaProperty {
CompositePartitionKey = new [] { new PartitionKeyProperty {
Type = "type",
// the properties below are optional
EnforcementInRecord = "enforcementInRecord",
Name = "name"
} }
};
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"
schemaProperty := &SchemaProperty{
CompositePartitionKey: []interface{}{
&PartitionKeyProperty{
Type: jsii.String("type"),
// the properties below are optional
EnforcementInRecord: jsii.String("enforcementInRecord"),
Name: jsii.String("name"),
},
},
}
Properties
compositePartitionKeyoptionalIResolvable | IResolvable | CfnTable.PartitionKeyProperty[]composite_partition_keyoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, PartitionKeyProperty]]]compositePartitionKeyoptionalIResolvableCompositePartitionKeyoptionalIResolvableCompositePartitionKeyoptionalinterface{} #A non-empty list of partition keys defining the attributes used to partition the table data.
notes
The order of the list determines the partition hierarchy. The name and type of each partition key as well as the partition key order cannot be changed after the table is created. However, the enforcement level of each partition key can be changed.