Class GlobalSecondaryIndexProps.Builder
java.lang.Object
software.amazon.awscdk.services.dynamodb.GlobalSecondaryIndexProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GlobalSecondaryIndexProps>
- Enclosing interface:
GlobalSecondaryIndexProps
@Stability(Stable)
public static final class GlobalSecondaryIndexProps.Builder
extends Object
implements software.amazon.jsii.Builder<GlobalSecondaryIndexProps>
A builder for
GlobalSecondaryIndexProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.contributorInsightsEnabled(Boolean contributorInsightsEnabled) Sets the value ofGlobalSecondaryIndexProps.getContributorInsightsEnabled()Sets the value ofSecondaryIndexProps.getIndexName()maxReadRequestUnits(Number maxReadRequestUnits) Sets the value ofGlobalSecondaryIndexProps.getMaxReadRequestUnits()maxWriteRequestUnits(Number maxWriteRequestUnits) Sets the value ofGlobalSecondaryIndexProps.getMaxWriteRequestUnits()nonKeyAttributes(List<String> nonKeyAttributes) Sets the value ofSecondaryIndexProps.getNonKeyAttributes()partitionKey(Attribute partitionKey) Sets the value ofSchemaOptions.getPartitionKey()projectionType(ProjectionType projectionType) Sets the value ofSecondaryIndexProps.getProjectionType()readCapacity(Number readCapacity) Sets the value ofGlobalSecondaryIndexProps.getReadCapacity()Sets the value ofSchemaOptions.getSortKey()warmThroughput(WarmThroughput warmThroughput) Sets the value ofGlobalSecondaryIndexProps.getWarmThroughput()writeCapacity(Number writeCapacity) Sets the value ofGlobalSecondaryIndexProps.getWriteCapacity()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
contributorInsightsEnabled
@Stability(Stable) public GlobalSecondaryIndexProps.Builder contributorInsightsEnabled(Boolean contributorInsightsEnabled) Sets the value ofGlobalSecondaryIndexProps.getContributorInsightsEnabled()- Parameters:
contributorInsightsEnabled- Whether CloudWatch contributor insights is enabled for the specified global secondary index.- Returns:
this
-
maxReadRequestUnits
@Stability(Stable) public GlobalSecondaryIndexProps.Builder maxReadRequestUnits(Number maxReadRequestUnits) Sets the value ofGlobalSecondaryIndexProps.getMaxReadRequestUnits()- Parameters:
maxReadRequestUnits- The maximum read request units for the global secondary index. Can only be provided if table billingMode is PAY_PER_REQUEST.- Returns:
this
-
maxWriteRequestUnits
@Stability(Stable) public GlobalSecondaryIndexProps.Builder maxWriteRequestUnits(Number maxWriteRequestUnits) Sets the value ofGlobalSecondaryIndexProps.getMaxWriteRequestUnits()- Parameters:
maxWriteRequestUnits- The maximum write request units for the global secondary index. Can only be provided if table billingMode is PAY_PER_REQUEST.- Returns:
this
-
readCapacity
Sets the value ofGlobalSecondaryIndexProps.getReadCapacity()- Parameters:
readCapacity- The read capacity for the global secondary index. Can only be provided if table billingMode is Provisioned or undefined.- Returns:
this
-
warmThroughput
@Stability(Stable) public GlobalSecondaryIndexProps.Builder warmThroughput(WarmThroughput warmThroughput) Sets the value ofGlobalSecondaryIndexProps.getWarmThroughput()- Parameters:
warmThroughput- The warm throughput configuration for the global secondary index.- Returns:
this
-
writeCapacity
Sets the value ofGlobalSecondaryIndexProps.getWriteCapacity()- Parameters:
writeCapacity- The write capacity for the global secondary index. Can only be provided if table billingMode is Provisioned or undefined.- Returns:
this
-
indexName
Sets the value ofSecondaryIndexProps.getIndexName()- Parameters:
indexName- The name of the secondary index. This parameter is required.- Returns:
this
-
nonKeyAttributes
@Stability(Stable) public GlobalSecondaryIndexProps.Builder nonKeyAttributes(List<String> nonKeyAttributes) Sets the value ofSecondaryIndexProps.getNonKeyAttributes()- Parameters:
nonKeyAttributes- The non-key attributes that are projected into the secondary index.- Returns:
this
-
projectionType
@Stability(Stable) public GlobalSecondaryIndexProps.Builder projectionType(ProjectionType projectionType) Sets the value ofSecondaryIndexProps.getProjectionType()- Parameters:
projectionType- The set of attributes that are projected into the secondary index.- Returns:
this
-
partitionKey
Sets the value ofSchemaOptions.getPartitionKey()- Parameters:
partitionKey- Partition key attribute definition. This parameter is required.- Returns:
this
-
sortKey
Sets the value ofSchemaOptions.getSortKey()- Parameters:
sortKey- Sort key attribute definition.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<GlobalSecondaryIndexProps>- Returns:
- a new instance of
GlobalSecondaryIndexProps - Throws:
NullPointerException- if any required attribute was not provided
-