Skip to content
v2.278.0

CfnKeyspaceProps Struct ​

Properties for defining a CfnKeyspace.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cassandra as cassandra } from 'aws-cdk-lib';
const cfnKeyspaceProps: cassandra.CfnKeyspaceProps = {
  clientSideTimestampsEnabled: false,
  keyspaceName: 'keyspaceName',
  replicationSpecification: {
    regionList: ['regionList'],
    replicationStrategy: 'replicationStrategy',
  },
  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_cassandra as cassandra

cfn_keyspace_props = cassandra.CfnKeyspaceProps(
    client_side_timestamps_enabled=False,
    keyspace_name="keyspaceName",
    replication_specification=cassandra.CfnKeyspace.ReplicationSpecificationProperty(
        region_list=["regionList"],
        replication_strategy="replicationStrategy"
    ),
    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.cassandra.*;

CfnKeyspaceProps cfnKeyspaceProps = CfnKeyspaceProps.builder()
        .clientSideTimestampsEnabled(false)
        .keyspaceName("keyspaceName")
        .replicationSpecification(ReplicationSpecificationProperty.builder()
                .regionList(List.of("regionList"))
                .replicationStrategy("replicationStrategy")
                .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.Cassandra;

var cfnKeyspaceProps = new CfnKeyspaceProps {
    ClientSideTimestampsEnabled = false,
    KeyspaceName = "keyspaceName",
    ReplicationSpecification = new ReplicationSpecificationProperty {
        RegionList = new [] { "regionList" },
        ReplicationStrategy = "replicationStrategy"
    },
    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"

cfnKeyspaceProps := &CfnKeyspaceProps{
	ClientSideTimestampsEnabled: jsii.Boolean(false),
	KeyspaceName: jsii.String("keyspaceName"),
	ReplicationSpecification: &ReplicationSpecificationProperty{
		RegionList: []*string{
			jsii.String("regionList"),
		},
		ReplicationStrategy: jsii.String("replicationStrategy"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

clientSideTimestampsEnabledoptionalboolean | IResolvableclient_side_timestamps_enabledoptionaltyping.Union[bool, IResolvable]clientSideTimestampsEnabledoptionalBooleanClientSideTimestampsEnabledoptionalboolClientSideTimestampsEnabledoptionalinterface{} #
Indicates whether client-side timestamps are enabled (true) or disabled (false) for all tables in the keyspace.

To add a Region to a single-Region keyspace with at least one table, the value must be set to true. After you've enabled client-side timestamps for a table, you can’t disable it again.

keyspaceNameoptionalstringkeyspace_nameoptionalstrkeyspaceNameoptionalStringKeyspaceNameoptionalstringKeyspaceNameoptional*string #
The name of the keyspace to be created.
notes

The keyspace name is case sensitive. If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the keyspace name. For more information, see Name type .

Length constraints: Minimum length of 1. Maximum length of 48.

replicationSpecificationoptionalIResolvable | CfnKeyspace.ReplicationSpecificationPropertyreplication_specificationoptionaltyping.Union[IResolvable, ReplicationSpecificationProperty]replicationSpecificationoptionalIResolvableReplicationSpecificationoptionalIResolvableReplicationSpecificationoptionalinterface{} #
Specifies the `ReplicationStrategy` of a keyspace. The options are:.
notes
  • SINGLE_REGION for a single Region keyspace (optional) or
  • MULTI_REGION for a multi-Region keyspace

If no ReplicationStrategy is provided, the default is SINGLE_REGION . If you choose MULTI_REGION , you must also provide a RegionList with the AWS Regions that the keyspace is replicated in.

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
An array of key-value pairs to apply to this resource.

For more information, see Tag .