Class ReplicaTableProps.Builder
java.lang.Object
software.amazon.awscdk.services.dynamodb.ReplicaTableProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ReplicaTableProps>
- Enclosing interface:
ReplicaTableProps
@Stability(Stable)
public static final class ReplicaTableProps.Builder
extends Object
implements software.amazon.jsii.Builder<ReplicaTableProps>
A builder for
ReplicaTableProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.contributorInsights
(Boolean contributorInsights) Sets the value ofTableOptionsV2.getContributorInsights()
deletionProtection
(Boolean deletionProtection) Sets the value ofTableOptionsV2.getDeletionProtection()
globalSecondaryIndexOptions
(Map<String, ? extends ReplicaGlobalSecondaryIndexOptions> globalSecondaryIndexOptions) Sets the value ofReplicaTableProps.getGlobalSecondaryIndexOptions()
kinesisStream
(IStream kinesisStream) Sets the value ofTableOptionsV2.getKinesisStream()
maxReadRequestUnits
(Number maxReadRequestUnits) Sets the value ofReplicaTableProps.getMaxReadRequestUnits()
pointInTimeRecovery
(Boolean pointInTimeRecovery) Deprecated.use `pointInTimeRecoverySpecification` insteadpointInTimeRecoverySpecification
(PointInTimeRecoverySpecification pointInTimeRecoverySpecification) Sets the value ofTableOptionsV2.getPointInTimeRecoverySpecification()
readCapacity
(Capacity readCapacity) Sets the value ofReplicaTableProps.getReadCapacity()
Sets the value ofReplicaTableProps.getRegion()
resourcePolicy
(PolicyDocument resourcePolicy) Sets the value ofTableOptionsV2.getResourcePolicy()
tableClass
(TableClass tableClass) Sets the value ofTableOptionsV2.getTableClass()
Sets the value ofTableOptionsV2.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
region
Sets the value ofReplicaTableProps.getRegion()
- Parameters:
region
- The region that the replica table will be created in. This parameter is required.- Returns:
this
-
globalSecondaryIndexOptions
@Stability(Stable) public ReplicaTableProps.Builder globalSecondaryIndexOptions(Map<String, ? extends ReplicaGlobalSecondaryIndexOptions> globalSecondaryIndexOptions) Sets the value ofReplicaTableProps.getGlobalSecondaryIndexOptions()
- Parameters:
globalSecondaryIndexOptions
- Options used to configure global secondary index properties.- Returns:
this
-
maxReadRequestUnits
Sets the value ofReplicaTableProps.getMaxReadRequestUnits()
- Parameters:
maxReadRequestUnits
- The maximum read request units. Note: This can only be configured if the primary table billing is PAY_PER_REQUEST.- Returns:
this
-
readCapacity
Sets the value ofReplicaTableProps.getReadCapacity()
- Parameters:
readCapacity
- The read capacity. Note: This can only be configured if the primary table billing is provisioned.- Returns:
this
-
contributorInsights
@Stability(Stable) public ReplicaTableProps.Builder contributorInsights(Boolean contributorInsights) Sets the value ofTableOptionsV2.getContributorInsights()
- Parameters:
contributorInsights
- Whether CloudWatch contributor insights is enabled.- Returns:
this
-
deletionProtection
Sets the value ofTableOptionsV2.getDeletionProtection()
- Parameters:
deletionProtection
- Whether deletion protection is enabled.- Returns:
this
-
kinesisStream
Sets the value ofTableOptionsV2.getKinesisStream()
- Parameters:
kinesisStream
- Kinesis Data Stream to capture item level changes.- Returns:
this
-
pointInTimeRecovery
@Stability(Deprecated) @Deprecated public ReplicaTableProps.Builder pointInTimeRecovery(Boolean pointInTimeRecovery) Deprecated.use `pointInTimeRecoverySpecification` insteadSets the value ofTableOptionsV2.getPointInTimeRecovery()
- Parameters:
pointInTimeRecovery
- Whether point-in-time recovery is enabled.- Returns:
this
-
pointInTimeRecoverySpecification
@Stability(Stable) public ReplicaTableProps.Builder pointInTimeRecoverySpecification(PointInTimeRecoverySpecification pointInTimeRecoverySpecification) Sets the value ofTableOptionsV2.getPointInTimeRecoverySpecification()
- Parameters:
pointInTimeRecoverySpecification
- Whether point-in-time recovery is enabled and recoveryPeriodInDays is set.- Returns:
this
-
resourcePolicy
Sets the value ofTableOptionsV2.getResourcePolicy()
- Parameters:
resourcePolicy
- Resource policy to assign to DynamoDB Table.- Returns:
this
-
tableClass
Sets the value ofTableOptionsV2.getTableClass()
- Parameters:
tableClass
- The table class.- Returns:
this
-
tags
Sets the value ofTableOptionsV2.getTags()
- Parameters:
tags
- Tags to be applied to the primary table (default replica table).- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ReplicaTableProps>
- Returns:
- a new instance of
ReplicaTableProps
- Throws:
NullPointerException
- if any required attribute was not provided
-