Class GlobalSecondaryIndexProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<GlobalSecondaryIndexProps>
- Enclosing interface:
GlobalSecondaryIndexProps
GlobalSecondaryIndexProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.contributorInsightsEnabled(Boolean contributorInsightsEnabled) Deprecated.use `contributorInsightsSpecification` insteadcontributorInsightsSpecification(ContributorInsightsSpecification contributorInsightsSpecification) Sets the value ofGlobalSecondaryIndexProps.getContributorInsightsSpecification()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()partitionKeys(List<? extends Attribute> partitionKeys) Sets the value ofGlobalSecondaryIndexProps.getPartitionKeys()projectionType(ProjectionType projectionType) Sets the value ofSecondaryIndexProps.getProjectionType()readCapacity(Number readCapacity) Sets the value ofGlobalSecondaryIndexProps.getReadCapacity()Sets the value ofSchemaOptions.getSortKey()Sets the value ofGlobalSecondaryIndexProps.getSortKeys()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(Deprecated) @Deprecated public GlobalSecondaryIndexProps.Builder contributorInsightsEnabled(Boolean contributorInsightsEnabled) Deprecated.use `contributorInsightsSpecification` insteadSets the value ofGlobalSecondaryIndexProps.getContributorInsightsEnabled()- Parameters:
contributorInsightsEnabled- Whether CloudWatch contributor insights is enabled for the specified global secondary index.- Returns:
this
-
contributorInsightsSpecification
@Stability(Stable) public GlobalSecondaryIndexProps.Builder contributorInsightsSpecification(ContributorInsightsSpecification contributorInsightsSpecification) Sets the value ofGlobalSecondaryIndexProps.getContributorInsightsSpecification()- Parameters:
contributorInsightsSpecification- Whether CloudWatch contributor insights is enabled and what mode is selected.- 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
-
partitionKeys
@Stability(Stable) public GlobalSecondaryIndexProps.Builder partitionKeys(List<? extends Attribute> partitionKeys) Sets the value ofGlobalSecondaryIndexProps.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 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
-
sortKeys
@Stability(Stable) public GlobalSecondaryIndexProps.Builder sortKeys(List<? extends Attribute> sortKeys) Sets the value ofGlobalSecondaryIndexProps.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 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. 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
-
sortKey
Sets the value ofSchemaOptions.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
-
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
-