Class GlobalSecondaryIndexPropsV2.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GlobalSecondaryIndexPropsV2>
- Enclosing interface:
GlobalSecondaryIndexPropsV2
GlobalSecondaryIndexPropsV2-
Constructor Summary
Constructors -
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()partitionKeys(List<? extends Attribute> partitionKeys) Sets the value ofGlobalSecondaryIndexPropsV2.getPartitionKeys()projectionType(ProjectionType projectionType) Sets the value ofSecondaryIndexProps.getProjectionType()readCapacity(Capacity readCapacity) Sets the value ofGlobalSecondaryIndexPropsV2.getReadCapacity()Sets the value ofGlobalSecondaryIndexPropsV2.getSortKey()Sets the value ofGlobalSecondaryIndexPropsV2.getSortKeys()warmThroughput(WarmThroughput warmThroughput) Sets the value ofGlobalSecondaryIndexPropsV2.getWarmThroughput()writeCapacity(Capacity writeCapacity) Sets the value ofGlobalSecondaryIndexPropsV2.getWriteCapacity()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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
-
partitionKey
Sets the value ofGlobalSecondaryIndexPropsV2.getPartitionKey()- Parameters:
partitionKey- Partition key attribute definition. If a single field forms the partition key, you can use this field. Use thepartitionKeysfield if the partition key is a multi-attribute key (consists of multiple fields).- Returns:
this
-
partitionKeys
@Stability(Stable) public GlobalSecondaryIndexPropsV2.Builder partitionKeys(List<? extends Attribute> partitionKeys) Sets the value ofGlobalSecondaryIndexPropsV2.getPartitionKeys()- Parameters:
partitionKeys- Multi-attribute partition key. If a single field forms the partition key, you can use eitherpartitionKeyorpartitionKeysto specify the partition key. Exactly one of these must be specified.You must use
partitionKeysfield if the partition key is a multi-attribute key (consists of multiple fields).NOTE: although the name of this field makes it sound like it creates multiple keys, it does not. It defines a single key that consists of of multiple fields.
The order of fields is not important.
- 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. If a single field forms the sort key, you can use this field. Use thesortKeysfield if the sort key is a multi-attribute key (consists of multiple fields).- Returns:
this
-
sortKeys
@Stability(Stable) public GlobalSecondaryIndexPropsV2.Builder sortKeys(List<? extends Attribute> sortKeys) Sets the value ofGlobalSecondaryIndexPropsV2.getSortKeys()- Parameters:
sortKeys- Multi-attribute sort key. If a single field forms the sort key, you can use eithersortKeyorsortKeysto specify the sort key. At most one of these may be specified.You must use
sortKeysfield if the sort key is a multi-attribute key (consists of multiple fields).NOTE: although the name of this field makes it sound like it creates multiple keys, it does not. It defines a single key that consists of of multiple fields at the same time.
NOTE: The order of fields is important!
- Returns:
this
-
warmThroughput
@Stability(Stable) public GlobalSecondaryIndexPropsV2.Builder warmThroughput(WarmThroughput warmThroughput) Sets the value ofGlobalSecondaryIndexPropsV2.getWarmThroughput()- Parameters:
warmThroughput- The warm throughput configuration for the global secondary index.- 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:
buildin interfacesoftware.amazon.jsii.Builder<GlobalSecondaryIndexPropsV2>- Returns:
- a new instance of
GlobalSecondaryIndexPropsV2 - Throws:
NullPointerException- if any required attribute was not provided
-