Class CfnGlobalTable.GlobalSecondaryIndexProperty.Builder
java.lang.Object
software.amazon.awscdk.services.dynamodb.CfnGlobalTable.GlobalSecondaryIndexProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnGlobalTable.GlobalSecondaryIndexProperty>
- Enclosing interface:
CfnGlobalTable.GlobalSecondaryIndexProperty
@Stability(Stable)
public static final class CfnGlobalTable.GlobalSecondaryIndexProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnGlobalTable.GlobalSecondaryIndexProperty>
A builder for
CfnGlobalTable.GlobalSecondaryIndexProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnGlobalTable.GlobalSecondaryIndexProperty.getIndexName()
Sets the value ofCfnGlobalTable.GlobalSecondaryIndexProperty.getKeySchema()
keySchema
(IResolvable keySchema) Sets the value ofCfnGlobalTable.GlobalSecondaryIndexProperty.getKeySchema()
projection
(IResolvable projection) Sets the value ofCfnGlobalTable.GlobalSecondaryIndexProperty.getProjection()
projection
(CfnGlobalTable.ProjectionProperty projection) Sets the value ofCfnGlobalTable.GlobalSecondaryIndexProperty.getProjection()
writeOnDemandThroughputSettings
(IResolvable writeOnDemandThroughputSettings) writeOnDemandThroughputSettings
(CfnGlobalTable.WriteOnDemandThroughputSettingsProperty writeOnDemandThroughputSettings) writeProvisionedThroughputSettings
(IResolvable writeProvisionedThroughputSettings) writeProvisionedThroughputSettings
(CfnGlobalTable.WriteProvisionedThroughputSettingsProperty writeProvisionedThroughputSettings)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
indexName
@Stability(Stable) public CfnGlobalTable.GlobalSecondaryIndexProperty.Builder indexName(String indexName) Sets the value ofCfnGlobalTable.GlobalSecondaryIndexProperty.getIndexName()
- Parameters:
indexName
- The name of the global secondary index. This parameter is required. The name must be unique among all other indexes on this table.- Returns:
this
-
keySchema
@Stability(Stable) public CfnGlobalTable.GlobalSecondaryIndexProperty.Builder keySchema(IResolvable keySchema) Sets the value ofCfnGlobalTable.GlobalSecondaryIndexProperty.getKeySchema()
- Parameters:
keySchema
- The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types: -HASH
- partition key -RANGE
- sort key > The partition key of an item is also known as its hash attribute . This parameter is required. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
- Returns:
this
-
keySchema
@Stability(Stable) public CfnGlobalTable.GlobalSecondaryIndexProperty.Builder keySchema(List<? extends Object> keySchema) Sets the value ofCfnGlobalTable.GlobalSecondaryIndexProperty.getKeySchema()
- Parameters:
keySchema
- The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types: -HASH
- partition key -RANGE
- sort key > The partition key of an item is also known as its hash attribute . This parameter is required. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.The sort key of an item is also known as its range attribute . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
- Returns:
this
-
projection
@Stability(Stable) public CfnGlobalTable.GlobalSecondaryIndexProperty.Builder projection(IResolvable projection) Sets the value ofCfnGlobalTable.GlobalSecondaryIndexProperty.getProjection()
- Parameters:
projection
- Represents attributes that are copied (projected) from the table into the global secondary index. This parameter is required. These are in addition to the primary key attributes and index key attributes, which are automatically projected.- Returns:
this
-
projection
@Stability(Stable) public CfnGlobalTable.GlobalSecondaryIndexProperty.Builder projection(CfnGlobalTable.ProjectionProperty projection) Sets the value ofCfnGlobalTable.GlobalSecondaryIndexProperty.getProjection()
- Parameters:
projection
- Represents attributes that are copied (projected) from the table into the global secondary index. This parameter is required. These are in addition to the primary key attributes and index key attributes, which are automatically projected.- Returns:
this
-
writeOnDemandThroughputSettings
@Stability(Stable) public CfnGlobalTable.GlobalSecondaryIndexProperty.Builder writeOnDemandThroughputSettings(IResolvable writeOnDemandThroughputSettings) - Parameters:
writeOnDemandThroughputSettings
- Sets the write request settings for a global table or a global secondary index. You must specify this setting if you set theBillingMode
toPAY_PER_REQUEST
.- Returns:
this
-
writeOnDemandThroughputSettings
@Stability(Stable) public CfnGlobalTable.GlobalSecondaryIndexProperty.Builder writeOnDemandThroughputSettings(CfnGlobalTable.WriteOnDemandThroughputSettingsProperty writeOnDemandThroughputSettings) - Parameters:
writeOnDemandThroughputSettings
- Sets the write request settings for a global table or a global secondary index. You must specify this setting if you set theBillingMode
toPAY_PER_REQUEST
.- Returns:
this
-
writeProvisionedThroughputSettings
@Stability(Stable) public CfnGlobalTable.GlobalSecondaryIndexProperty.Builder writeProvisionedThroughputSettings(IResolvable writeProvisionedThroughputSettings) Sets the value ofCfnGlobalTable.GlobalSecondaryIndexProperty.getWriteProvisionedThroughputSettings()
- Parameters:
writeProvisionedThroughputSettings
- Defines write capacity settings for the global secondary index. You must specify a value for this property if the table'sBillingMode
isPROVISIONED
. All replicas will have the same write capacity settings for this global secondary index.- Returns:
this
-
writeProvisionedThroughputSettings
@Stability(Stable) public CfnGlobalTable.GlobalSecondaryIndexProperty.Builder writeProvisionedThroughputSettings(CfnGlobalTable.WriteProvisionedThroughputSettingsProperty writeProvisionedThroughputSettings) Sets the value ofCfnGlobalTable.GlobalSecondaryIndexProperty.getWriteProvisionedThroughputSettings()
- Parameters:
writeProvisionedThroughputSettings
- Defines write capacity settings for the global secondary index. You must specify a value for this property if the table'sBillingMode
isPROVISIONED
. All replicas will have the same write capacity settings for this global secondary index.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnGlobalTable.GlobalSecondaryIndexProperty>
- Returns:
- a new instance of
CfnGlobalTable.GlobalSecondaryIndexProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-