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
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofSecondaryIndexProps.getIndexName()
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()
writeCapacity
(Number writeCapacity) Sets the value ofGlobalSecondaryIndexProps.getWriteCapacity()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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
-
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:
build
in interfacesoftware.amazon.jsii.Builder<GlobalSecondaryIndexProps>
- Returns:
- a new instance of
GlobalSecondaryIndexProps
- Throws:
NullPointerException
- if any required attribute was not provided
-