Class GlobalSecondaryIndexPropsV2.Builder
java.lang.Object
software.amazon.awscdk.services.dynamodb.GlobalSecondaryIndexPropsV2.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GlobalSecondaryIndexPropsV2>
- Enclosing interface:
GlobalSecondaryIndexPropsV2
@Stability(Stable)
public static final class GlobalSecondaryIndexPropsV2.Builder
extends Object
implements software.amazon.jsii.Builder<GlobalSecondaryIndexPropsV2>
A builder for
GlobalSecondaryIndexPropsV2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofSecondaryIndexProps.getIndexName()
maxReadRequestUnits
(Number maxReadRequestUnits) Sets the value ofGlobalSecondaryIndexPropsV2.getMaxReadRequestUnits()
maxWriteRequestUnits
(Number maxWriteRequestUnits) Sets the value ofGlobalSecondaryIndexPropsV2.getMaxWriteRequestUnits()
nonKeyAttributes
(List<String> nonKeyAttributes) Sets the value ofSecondaryIndexProps.getNonKeyAttributes()
partitionKey
(Attribute partitionKey) Sets the value ofGlobalSecondaryIndexPropsV2.getPartitionKey()
projectionType
(ProjectionType projectionType) Sets the value ofSecondaryIndexProps.getProjectionType()
readCapacity
(Capacity readCapacity) Sets the value ofGlobalSecondaryIndexPropsV2.getReadCapacity()
Sets the value ofGlobalSecondaryIndexPropsV2.getSortKey()
writeCapacity
(Capacity writeCapacity) Sets the value ofGlobalSecondaryIndexPropsV2.getWriteCapacity()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
partitionKey
Sets the value ofGlobalSecondaryIndexPropsV2.getPartitionKey()
- Parameters:
partitionKey
- Partition key attribute definition. This parameter is required.- Returns:
this
-
maxReadRequestUnits
@Stability(Stable) public GlobalSecondaryIndexPropsV2.Builder maxReadRequestUnits(Number maxReadRequestUnits) Sets the value ofGlobalSecondaryIndexPropsV2.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
-
maxWriteRequestUnits
@Stability(Stable) public GlobalSecondaryIndexPropsV2.Builder maxWriteRequestUnits(Number maxWriteRequestUnits) Sets the value ofGlobalSecondaryIndexPropsV2.getMaxWriteRequestUnits()
- Parameters:
maxWriteRequestUnits
- The maximum write request units. Note: This can only be configured if the primary table billing is PAY_PER_REQUEST.- Returns:
this
-
readCapacity
Sets the value ofGlobalSecondaryIndexPropsV2.getReadCapacity()
- Parameters:
readCapacity
- The read capacity. Note: This can only be configured if the primary table billing is provisioned.- Returns:
this
-
sortKey
Sets the value ofGlobalSecondaryIndexPropsV2.getSortKey()
- Parameters:
sortKey
- Sort key attribute definition.- Returns:
this
-
writeCapacity
Sets the value ofGlobalSecondaryIndexPropsV2.getWriteCapacity()
- Parameters:
writeCapacity
- The write capacity. Note: This can only be configured if the primary table billing is provisioned.- 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 GlobalSecondaryIndexPropsV2.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 GlobalSecondaryIndexPropsV2.Builder projectionType(ProjectionType projectionType) Sets the value ofSecondaryIndexProps.getProjectionType()
- Parameters:
projectionType
- The set of attributes that are projected into the secondary index.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<GlobalSecondaryIndexPropsV2>
- Returns:
- a new instance of
GlobalSecondaryIndexPropsV2
- Throws:
NullPointerException
- if any required attribute was not provided
-