ReplicaSpecificationProperty Struct
Defines settings specific to a single replica of a global table.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_dynamodb as dynamodb } from 'aws-cdk-lib';
declare const policyDocument: any;
const replicaSpecificationProperty: dynamodb.CfnGlobalTable.ReplicaSpecificationProperty = {
region: 'region',
// the properties below are optional
contributorInsightsSpecification: {
enabled: false,
// the properties below are optional
mode: 'mode',
},
deletionProtectionEnabled: false,
disassociationProtectionEnabled: false,
globalSecondaryIndexes: [{
indexName: 'indexName',
// the properties below are optional
contributorInsightsSpecification: {
enabled: false,
// the properties below are optional
mode: 'mode',
},
readOnDemandThroughputSettings: {
maxReadRequestUnits: 123,
},
readProvisionedThroughputSettings: {
readCapacityAutoScalingSettings: {
maxCapacity: 123,
minCapacity: 123,
targetTrackingScalingPolicyConfiguration: {
targetValue: 123,
// the properties below are optional
disableScaleIn: false,
scaleInCooldown: 123,
scaleOutCooldown: 123,
},
// the properties below are optional
seedCapacity: 123,
},
readCapacityUnits: 123,
},
}],
globalTableSettingsReplicationMode: 'globalTableSettingsReplicationMode',
kinesisStreamSpecification: {
streamArn: 'streamArn',
// the properties below are optional
approximateCreationDateTimePrecision: 'approximateCreationDateTimePrecision',
},
pointInTimeRecoverySpecification: {
pointInTimeRecoveryEnabled: false,
recoveryPeriodInDays: 123,
},
readOnDemandThroughputSettings: {
maxReadRequestUnits: 123,
},
readProvisionedThroughputSettings: {
readCapacityAutoScalingSettings: {
maxCapacity: 123,
minCapacity: 123,
targetTrackingScalingPolicyConfiguration: {
targetValue: 123,
// the properties below are optional
disableScaleIn: false,
scaleInCooldown: 123,
scaleOutCooldown: 123,
},
// the properties below are optional
seedCapacity: 123,
},
readCapacityUnits: 123,
},
replicaStreamSpecification: {
resourcePolicy: {
policyDocument: policyDocument,
},
tags: [{
key: 'key',
value: 'value',
}],
},
resourcePolicy: {
policyDocument: policyDocument,
},
sseSpecification: {
kmsMasterKeyId: 'kmsMasterKeyId',
},
tableClass: 'tableClass',
tags: [{
key: 'key',
value: 'value',
}],
};
from aws_cdk import CfnTag, 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_dynamodb as dynamodb
# policy_document: Any
replica_specification_property = dynamodb.CfnGlobalTable.ReplicaSpecificationProperty(
region="region",
# the properties below are optional
contributor_insights_specification=dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
enabled=False,
# the properties below are optional
mode="mode"
),
deletion_protection_enabled=False,
disassociation_protection_enabled=False,
global_secondary_indexes=[dynamodb.CfnGlobalTable.ReplicaGlobalSecondaryIndexSpecificationProperty(
index_name="indexName",
# the properties below are optional
contributor_insights_specification=dynamodb.CfnGlobalTable.ContributorInsightsSpecificationProperty(
enabled=False,
# the properties below are optional
mode="mode"
),
read_on_demand_throughput_settings=dynamodb.CfnGlobalTable.ReadOnDemandThroughputSettingsProperty(
max_read_request_units=123
),
read_provisioned_throughput_settings=dynamodb.CfnGlobalTable.ReadProvisionedThroughputSettingsProperty(
read_capacity_auto_scaling_settings=dynamodb.CfnGlobalTable.CapacityAutoScalingSettingsProperty(
max_capacity=123,
min_capacity=123,
target_tracking_scaling_policy_configuration=dynamodb.CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty(
target_value=123,
# the properties below are optional
disable_scale_in=False,
scale_in_cooldown=123,
scale_out_cooldown=123
),
# the properties below are optional
seed_capacity=123
),
read_capacity_units=123
)
)],
global_table_settings_replication_mode="globalTableSettingsReplicationMode",
kinesis_stream_specification=dynamodb.CfnGlobalTable.KinesisStreamSpecificationProperty(
stream_arn="streamArn",
# the properties below are optional
approximate_creation_date_time_precision="approximateCreationDateTimePrecision"
),
point_in_time_recovery_specification=dynamodb.CfnGlobalTable.PointInTimeRecoverySpecificationProperty(
point_in_time_recovery_enabled=False,
recovery_period_in_days=123
),
read_on_demand_throughput_settings=dynamodb.CfnGlobalTable.ReadOnDemandThroughputSettingsProperty(
max_read_request_units=123
),
read_provisioned_throughput_settings=dynamodb.CfnGlobalTable.ReadProvisionedThroughputSettingsProperty(
read_capacity_auto_scaling_settings=dynamodb.CfnGlobalTable.CapacityAutoScalingSettingsProperty(
max_capacity=123,
min_capacity=123,
target_tracking_scaling_policy_configuration=dynamodb.CfnGlobalTable.TargetTrackingScalingPolicyConfigurationProperty(
target_value=123,
# the properties below are optional
disable_scale_in=False,
scale_in_cooldown=123,
scale_out_cooldown=123
),
# the properties below are optional
seed_capacity=123
),
read_capacity_units=123
),
replica_stream_specification=dynamodb.CfnGlobalTable.ReplicaStreamSpecificationProperty(
resource_policy=dynamodb.CfnGlobalTable.ResourcePolicyProperty(
policy_document=policy_document
),
tags=[CfnTag(
key="key",
value="value"
)]
),
resource_policy=dynamodb.CfnGlobalTable.ResourcePolicyProperty(
policy_document=policy_document
),
sse_specification=dynamodb.CfnGlobalTable.ReplicaSSESpecificationProperty(
kms_master_key_id="kmsMasterKeyId"
),
table_class="tableClass",
tags=[CfnTag(
key="key",
value="value"
)]
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.dynamodb.*;
Object policyDocument;
ReplicaSpecificationProperty replicaSpecificationProperty = ReplicaSpecificationProperty.builder()
.region("region")
// the properties below are optional
.contributorInsightsSpecification(ContributorInsightsSpecificationProperty.builder()
.enabled(false)
// the properties below are optional
.mode("mode")
.build())
.deletionProtectionEnabled(false)
.disassociationProtectionEnabled(false)
.globalSecondaryIndexes(List.of(ReplicaGlobalSecondaryIndexSpecificationProperty.builder()
.indexName("indexName")
// the properties below are optional
.contributorInsightsSpecification(ContributorInsightsSpecificationProperty.builder()
.enabled(false)
// the properties below are optional
.mode("mode")
.build())
.readOnDemandThroughputSettings(ReadOnDemandThroughputSettingsProperty.builder()
.maxReadRequestUnits(123)
.build())
.readProvisionedThroughputSettings(ReadProvisionedThroughputSettingsProperty.builder()
.readCapacityAutoScalingSettings(CapacityAutoScalingSettingsProperty.builder()
.maxCapacity(123)
.minCapacity(123)
.targetTrackingScalingPolicyConfiguration(TargetTrackingScalingPolicyConfigurationProperty.builder()
.targetValue(123)
// the properties below are optional
.disableScaleIn(false)
.scaleInCooldown(123)
.scaleOutCooldown(123)
.build())
// the properties below are optional
.seedCapacity(123)
.build())
.readCapacityUnits(123)
.build())
.build()))
.globalTableSettingsReplicationMode("globalTableSettingsReplicationMode")
.kinesisStreamSpecification(KinesisStreamSpecificationProperty.builder()
.streamArn("streamArn")
// the properties below are optional
.approximateCreationDateTimePrecision("approximateCreationDateTimePrecision")
.build())
.pointInTimeRecoverySpecification(PointInTimeRecoverySpecificationProperty.builder()
.pointInTimeRecoveryEnabled(false)
.recoveryPeriodInDays(123)
.build())
.readOnDemandThroughputSettings(ReadOnDemandThroughputSettingsProperty.builder()
.maxReadRequestUnits(123)
.build())
.readProvisionedThroughputSettings(ReadProvisionedThroughputSettingsProperty.builder()
.readCapacityAutoScalingSettings(CapacityAutoScalingSettingsProperty.builder()
.maxCapacity(123)
.minCapacity(123)
.targetTrackingScalingPolicyConfiguration(TargetTrackingScalingPolicyConfigurationProperty.builder()
.targetValue(123)
// the properties below are optional
.disableScaleIn(false)
.scaleInCooldown(123)
.scaleOutCooldown(123)
.build())
// the properties below are optional
.seedCapacity(123)
.build())
.readCapacityUnits(123)
.build())
.replicaStreamSpecification(ReplicaStreamSpecificationProperty.builder()
.resourcePolicy(ResourcePolicyProperty.builder()
.policyDocument(policyDocument)
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build())
.resourcePolicy(ResourcePolicyProperty.builder()
.policyDocument(policyDocument)
.build())
.sseSpecification(ReplicaSSESpecificationProperty.builder()
.kmsMasterKeyId("kmsMasterKeyId")
.build())
.tableClass("tableClass")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
// 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.DynamoDB;
var policyDocument;
var replicaSpecificationProperty = new ReplicaSpecificationProperty {
Region = "region",
// the properties below are optional
ContributorInsightsSpecification = new ContributorInsightsSpecificationProperty {
Enabled = false,
// the properties below are optional
Mode = "mode"
},
DeletionProtectionEnabled = false,
DisassociationProtectionEnabled = false,
GlobalSecondaryIndexes = new [] { new ReplicaGlobalSecondaryIndexSpecificationProperty {
IndexName = "indexName",
// the properties below are optional
ContributorInsightsSpecification = new ContributorInsightsSpecificationProperty {
Enabled = false,
// the properties below are optional
Mode = "mode"
},
ReadOnDemandThroughputSettings = new ReadOnDemandThroughputSettingsProperty {
MaxReadRequestUnits = 123
},
ReadProvisionedThroughputSettings = new ReadProvisionedThroughputSettingsProperty {
ReadCapacityAutoScalingSettings = new CapacityAutoScalingSettingsProperty {
MaxCapacity = 123,
MinCapacity = 123,
TargetTrackingScalingPolicyConfiguration = new TargetTrackingScalingPolicyConfigurationProperty {
TargetValue = 123,
// the properties below are optional
DisableScaleIn = false,
ScaleInCooldown = 123,
ScaleOutCooldown = 123
},
// the properties below are optional
SeedCapacity = 123
},
ReadCapacityUnits = 123
}
} },
GlobalTableSettingsReplicationMode = "globalTableSettingsReplicationMode",
KinesisStreamSpecification = new KinesisStreamSpecificationProperty {
StreamArn = "streamArn",
// the properties below are optional
ApproximateCreationDateTimePrecision = "approximateCreationDateTimePrecision"
},
PointInTimeRecoverySpecification = new PointInTimeRecoverySpecificationProperty {
PointInTimeRecoveryEnabled = false,
RecoveryPeriodInDays = 123
},
ReadOnDemandThroughputSettings = new ReadOnDemandThroughputSettingsProperty {
MaxReadRequestUnits = 123
},
ReadProvisionedThroughputSettings = new ReadProvisionedThroughputSettingsProperty {
ReadCapacityAutoScalingSettings = new CapacityAutoScalingSettingsProperty {
MaxCapacity = 123,
MinCapacity = 123,
TargetTrackingScalingPolicyConfiguration = new TargetTrackingScalingPolicyConfigurationProperty {
TargetValue = 123,
// the properties below are optional
DisableScaleIn = false,
ScaleInCooldown = 123,
ScaleOutCooldown = 123
},
// the properties below are optional
SeedCapacity = 123
},
ReadCapacityUnits = 123
},
ReplicaStreamSpecification = new ReplicaStreamSpecificationProperty {
ResourcePolicy = new ResourcePolicyProperty {
PolicyDocument = policyDocument
},
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
},
ResourcePolicy = new ResourcePolicyProperty {
PolicyDocument = policyDocument
},
SseSpecification = new ReplicaSSESpecificationProperty {
KmsMasterKeyId = "kmsMasterKeyId"
},
TableClass = "tableClass",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
// 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 policyDocument interface{}
replicaSpecificationProperty := &ReplicaSpecificationProperty{
Region: jsii.String("region"),
// the properties below are optional
ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
Enabled: jsii.Boolean(false),
// the properties below are optional
Mode: jsii.String("mode"),
},
DeletionProtectionEnabled: jsii.Boolean(false),
DisassociationProtectionEnabled: jsii.Boolean(false),
GlobalSecondaryIndexes: []interface{}{
&ReplicaGlobalSecondaryIndexSpecificationProperty{
IndexName: jsii.String("indexName"),
// the properties below are optional
ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
Enabled: jsii.Boolean(false),
// the properties below are optional
Mode: jsii.String("mode"),
},
ReadOnDemandThroughputSettings: &ReadOnDemandThroughputSettingsProperty{
MaxReadRequestUnits: jsii.Number(123),
},
ReadProvisionedThroughputSettings: &ReadProvisionedThroughputSettingsProperty{
ReadCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
MaxCapacity: jsii.Number(123),
MinCapacity: jsii.Number(123),
TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
TargetValue: jsii.Number(123),
// the properties below are optional
DisableScaleIn: jsii.Boolean(false),
ScaleInCooldown: jsii.Number(123),
ScaleOutCooldown: jsii.Number(123),
},
// the properties below are optional
SeedCapacity: jsii.Number(123),
},
ReadCapacityUnits: jsii.Number(123),
},
},
},
GlobalTableSettingsReplicationMode: jsii.String("globalTableSettingsReplicationMode"),
KinesisStreamSpecification: &KinesisStreamSpecificationProperty{
StreamArn: jsii.String("streamArn"),
// the properties below are optional
ApproximateCreationDateTimePrecision: jsii.String("approximateCreationDateTimePrecision"),
},
PointInTimeRecoverySpecification: &PointInTimeRecoverySpecificationProperty{
PointInTimeRecoveryEnabled: jsii.Boolean(false),
RecoveryPeriodInDays: jsii.Number(123),
},
ReadOnDemandThroughputSettings: &ReadOnDemandThroughputSettingsProperty{
MaxReadRequestUnits: jsii.Number(123),
},
ReadProvisionedThroughputSettings: &ReadProvisionedThroughputSettingsProperty{
ReadCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
MaxCapacity: jsii.Number(123),
MinCapacity: jsii.Number(123),
TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
TargetValue: jsii.Number(123),
// the properties below are optional
DisableScaleIn: jsii.Boolean(false),
ScaleInCooldown: jsii.Number(123),
ScaleOutCooldown: jsii.Number(123),
},
// the properties below are optional
SeedCapacity: jsii.Number(123),
},
ReadCapacityUnits: jsii.Number(123),
},
ReplicaStreamSpecification: &ReplicaStreamSpecificationProperty{
ResourcePolicy: &ResourcePolicyProperty{
PolicyDocument: policyDocument,
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
},
ResourcePolicy: &ResourcePolicyProperty{
PolicyDocument: policyDocument,
},
SseSpecification: &ReplicaSSESpecificationProperty{
KmsMasterKeyId: jsii.String("kmsMasterKeyId"),
},
TableClass: jsii.String("tableClass"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
contributorInsightsSpecificationoptionalIResolvable | CfnGlobalTable.contributor_insights_specificationoptionaltyping.Union[IResolvable, ContributorInsightsSpecificationProperty]contributorInsightsSpecificationoptionalIResolvableContributorInsightsSpecificationoptionalIResolvableContributorInsightsSpecificationoptionalinterface{} #When not specified, defaults to contributor insights disabled for the replica.
deletionProtectionEnabledoptionalboolean | IResolvabledeletion_protection_enabledoptionaltyping.Union[bool, IResolvable]deletionProtectionEnabledoptionalBooleanDeletionProtectionEnabledoptionalboolDeletionProtectionEnabledoptionalinterface{} #notes
When enabled, the table cannot be deleted by any user or process. This setting is disabled by default. For more information, see Using deletion protection in the Amazon DynamoDB Developer Guide .
disassociationProtectionEnabledoptionalboolean | IResolvabledisassociation_protection_enabledoptionaltyping.Union[bool, IResolvable]disassociationProtectionEnabledoptionalBooleanDisassociationProtectionEnabledoptionalboolDisassociationProtectionEnabledoptionalinterface{} #globalSecondaryIndexesoptionalIResolvable | IResolvable | CfnGlobalTable.global_secondary_indexesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ReplicaGlobalSecondaryIndexSpecificationProperty]]]globalSecondaryIndexesoptionalIResolvableGlobalSecondaryIndexesoptionalIResolvableGlobalSecondaryIndexesoptionalinterface{} #globalTableSettingsReplicationModeoptionalstringglobal_table_settings_replication_modeoptionalstrglobalTableSettingsReplicationModeoptionalStringGlobalTableSettingsReplicationModeoptionalstringGlobalTableSettingsReplicationModeoptional*string #kinesisStreamSpecificationoptionalIResolvable | CfnGlobalTable.kinesis_stream_specificationoptionaltyping.Union[IResolvable, KinesisStreamSpecificationProperty]kinesisStreamSpecificationoptionalIResolvableKinesisStreamSpecificationoptionalIResolvableKinesisStreamSpecificationoptionalinterface{} #pointInTimeRecoverySpecificationoptionalIResolvable | CfnGlobalTable.point_in_time_recovery_specificationoptionaltyping.Union[IResolvable, PointInTimeRecoverySpecificationProperty]pointInTimeRecoverySpecificationoptionalIResolvablePointInTimeRecoverySpecificationoptionalIResolvablePointInTimeRecoverySpecificationoptionalinterface{} #When not specified, defaults to point in time recovery disabled for the replica.
readOnDemandThroughputSettingsoptionalIResolvable | CfnGlobalTable.read_on_demand_throughput_settingsoptionaltyping.Union[IResolvable, ReadOnDemandThroughputSettingsProperty]readOnDemandThroughputSettingsoptionalIResolvableReadOnDemandThroughputSettingsoptionalIResolvableReadOnDemandThroughputSettingsoptionalinterface{} #readProvisionedThroughputSettingsoptionalIResolvable | CfnGlobalTable.read_provisioned_throughput_settingsoptionaltyping.Union[IResolvable, ReadProvisionedThroughputSettingsProperty]readProvisionedThroughputSettingsoptionalIResolvableReadProvisionedThroughputSettingsoptionalIResolvableReadProvisionedThroughputSettingsoptionalinterface{} #replicaStreamSpecificationoptionalIResolvable | CfnGlobalTable.replica_stream_specificationoptionaltyping.Union[IResolvable, ReplicaStreamSpecificationProperty]replicaStreamSpecificationoptionalIResolvableReplicaStreamSpecificationoptionalIResolvableReplicaStreamSpecificationoptionalinterface{} #resourcePolicyoptionalIResolvable | CfnGlobalTable.resource_policyoptionaltyping.Union[IResolvable, ResourcePolicyProperty]resourcePolicyoptionalIResolvableResourcePolicyoptionalIResolvableResourcePolicyoptionalinterface{} #notes
Resource-based policies let you define access permissions by specifying who has access to each resource, and the actions they are allowed to perform on each resource.
In a CloudFormation template, you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to DynamoDB . For more information about resource-based policies, see Using resource-based policies for DynamoDB and Resource-based policy examples .
sseSpecificationoptionalIResolvable | CfnGlobalTable.sse_specificationoptionaltyping.Union[IResolvable, ReplicaSSESpecificationProperty]sseSpecificationoptionalIResolvableSseSpecificationoptionalIResolvableSseSpecificationoptionalinterface{} #When using customer-managed keys for server-side encryption, this property must have a value in all replicas.
tableClassoptionalstringtable_classoptionalstrtableClassoptionalStringTableClassoptionalstringTableClassoptional*string #Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS .