Class CfnGlobalTableProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnGlobalTableProps>
- Enclosing interface:
CfnGlobalTableProps
CfnGlobalTableProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionattributeDefinitions
(List<? extends Object> attributeDefinitions) Sets the value ofCfnGlobalTableProps.getAttributeDefinitions()
attributeDefinitions
(IResolvable attributeDefinitions) Sets the value ofCfnGlobalTableProps.getAttributeDefinitions()
billingMode
(String billingMode) Sets the value ofCfnGlobalTableProps.getBillingMode()
build()
Builds the configured instance.globalSecondaryIndexes
(List<? extends Object> globalSecondaryIndexes) Sets the value ofCfnGlobalTableProps.getGlobalSecondaryIndexes()
globalSecondaryIndexes
(IResolvable globalSecondaryIndexes) Sets the value ofCfnGlobalTableProps.getGlobalSecondaryIndexes()
Sets the value ofCfnGlobalTableProps.getKeySchema()
keySchema
(IResolvable keySchema) Sets the value ofCfnGlobalTableProps.getKeySchema()
localSecondaryIndexes
(List<? extends Object> localSecondaryIndexes) Sets the value ofCfnGlobalTableProps.getLocalSecondaryIndexes()
localSecondaryIndexes
(IResolvable localSecondaryIndexes) Sets the value ofCfnGlobalTableProps.getLocalSecondaryIndexes()
Sets the value ofCfnGlobalTableProps.getReplicas()
replicas
(IResolvable replicas) Sets the value ofCfnGlobalTableProps.getReplicas()
sseSpecification
(IResolvable sseSpecification) Sets the value ofCfnGlobalTableProps.getSseSpecification()
sseSpecification
(CfnGlobalTable.SSESpecificationProperty sseSpecification) Sets the value ofCfnGlobalTableProps.getSseSpecification()
streamSpecification
(IResolvable streamSpecification) Sets the value ofCfnGlobalTableProps.getStreamSpecification()
streamSpecification
(CfnGlobalTable.StreamSpecificationProperty streamSpecification) Sets the value ofCfnGlobalTableProps.getStreamSpecification()
Sets the value ofCfnGlobalTableProps.getTableName()
timeToLiveSpecification
(IResolvable timeToLiveSpecification) Sets the value ofCfnGlobalTableProps.getTimeToLiveSpecification()
timeToLiveSpecification
(CfnGlobalTable.TimeToLiveSpecificationProperty timeToLiveSpecification) Sets the value ofCfnGlobalTableProps.getTimeToLiveSpecification()
writeOnDemandThroughputSettings
(IResolvable writeOnDemandThroughputSettings) Sets the value ofCfnGlobalTableProps.getWriteOnDemandThroughputSettings()
writeOnDemandThroughputSettings
(CfnGlobalTable.WriteOnDemandThroughputSettingsProperty writeOnDemandThroughputSettings) Sets the value ofCfnGlobalTableProps.getWriteOnDemandThroughputSettings()
writeProvisionedThroughputSettings
(IResolvable writeProvisionedThroughputSettings) Sets the value ofCfnGlobalTableProps.getWriteProvisionedThroughputSettings()
writeProvisionedThroughputSettings
(CfnGlobalTable.WriteProvisionedThroughputSettingsProperty writeProvisionedThroughputSettings) Sets the value ofCfnGlobalTableProps.getWriteProvisionedThroughputSettings()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
attributeDefinitions
@Stability(Stable) public CfnGlobalTableProps.Builder attributeDefinitions(IResolvable attributeDefinitions) Sets the value ofCfnGlobalTableProps.getAttributeDefinitions()
- Parameters:
attributeDefinitions
- A list of attributes that describe the key schema for the global table and indexes. This parameter is required.- Returns:
this
-
attributeDefinitions
@Stability(Stable) public CfnGlobalTableProps.Builder attributeDefinitions(List<? extends Object> attributeDefinitions) Sets the value ofCfnGlobalTableProps.getAttributeDefinitions()
- Parameters:
attributeDefinitions
- A list of attributes that describe the key schema for the global table and indexes. This parameter is required.- Returns:
this
-
keySchema
Sets the value ofCfnGlobalTableProps.getKeySchema()
- Parameters:
keySchema
- Specifies the attributes that make up the primary key for the table. This parameter is required. The attributes in theKeySchema
property must also be defined in theAttributeDefinitions
property.- Returns:
this
-
keySchema
Sets the value ofCfnGlobalTableProps.getKeySchema()
- Parameters:
keySchema
- Specifies the attributes that make up the primary key for the table. This parameter is required. The attributes in theKeySchema
property must also be defined in theAttributeDefinitions
property.- Returns:
this
-
replicas
Sets the value ofCfnGlobalTableProps.getReplicas()
- Parameters:
replicas
- Specifies the list of replicas for your global table. This parameter is required. The list must contain at least one element, the region where the stack defining the global table is deployed. For example, if you define your table in a stack deployed to us-east-1, you must have an entry inReplicas
with the region us-east-1. You cannot remove the replica in the stack region.Adding a replica might take a few minutes for an empty table, or up to several hours for large tables. If you want to add or remove a replica, we recommend submitting an
UpdateStack
operation containing only that change.If you add or delete a replica during an update, we recommend that you don't update any other resources. If your stack fails to update and is rolled back while adding a new replica, you might need to manually delete the replica.
You can create a new global table with as many replicas as needed. You can add or remove replicas after table creation, but you can only add or remove a single replica in each update.
- Returns:
this
-
replicas
Sets the value ofCfnGlobalTableProps.getReplicas()
- Parameters:
replicas
- Specifies the list of replicas for your global table. This parameter is required. The list must contain at least one element, the region where the stack defining the global table is deployed. For example, if you define your table in a stack deployed to us-east-1, you must have an entry inReplicas
with the region us-east-1. You cannot remove the replica in the stack region.Adding a replica might take a few minutes for an empty table, or up to several hours for large tables. If you want to add or remove a replica, we recommend submitting an
UpdateStack
operation containing only that change.If you add or delete a replica during an update, we recommend that you don't update any other resources. If your stack fails to update and is rolled back while adding a new replica, you might need to manually delete the replica.
You can create a new global table with as many replicas as needed. You can add or remove replicas after table creation, but you can only add or remove a single replica in each update.
- Returns:
this
-
billingMode
Sets the value ofCfnGlobalTableProps.getBillingMode()
- Parameters:
billingMode
- Specifies how you are charged for read and write throughput and how you manage capacity. Valid values are:.PAY_PER_REQUEST
PROVISIONED
All replicas in your global table will have the same billing mode. If you use
PROVISIONED
billing mode, you must provide an auto scaling configuration via theWriteProvisionedThroughputSettings
property. The default value of this property isPROVISIONED
.- Returns:
this
-
globalSecondaryIndexes
@Stability(Stable) public CfnGlobalTableProps.Builder globalSecondaryIndexes(IResolvable globalSecondaryIndexes) Sets the value ofCfnGlobalTableProps.getGlobalSecondaryIndexes()
- Parameters:
globalSecondaryIndexes
- Global secondary indexes to be created on the global table. You can create up to 20 global secondary indexes. Each replica in your global table will have the same global secondary index settings. You can only create or delete one global secondary index in a single stack operation.Since the backfilling of an index could take a long time, CloudFormation does not wait for the index to become active. If a stack operation rolls back, CloudFormation might not delete an index that has been added. In that case, you will need to delete the index manually.
- Returns:
this
-
globalSecondaryIndexes
@Stability(Stable) public CfnGlobalTableProps.Builder globalSecondaryIndexes(List<? extends Object> globalSecondaryIndexes) Sets the value ofCfnGlobalTableProps.getGlobalSecondaryIndexes()
- Parameters:
globalSecondaryIndexes
- Global secondary indexes to be created on the global table. You can create up to 20 global secondary indexes. Each replica in your global table will have the same global secondary index settings. You can only create or delete one global secondary index in a single stack operation.Since the backfilling of an index could take a long time, CloudFormation does not wait for the index to become active. If a stack operation rolls back, CloudFormation might not delete an index that has been added. In that case, you will need to delete the index manually.
- Returns:
this
-
localSecondaryIndexes
@Stability(Stable) public CfnGlobalTableProps.Builder localSecondaryIndexes(IResolvable localSecondaryIndexes) Sets the value ofCfnGlobalTableProps.getLocalSecondaryIndexes()
- Parameters:
localSecondaryIndexes
- Local secondary indexes to be created on the table. You can create up to five local secondary indexes. Each index is scoped to a given hash key value. The size of each hash key can be up to 10 gigabytes. Each replica in your global table will have the same local secondary index settings.- Returns:
this
-
localSecondaryIndexes
@Stability(Stable) public CfnGlobalTableProps.Builder localSecondaryIndexes(List<? extends Object> localSecondaryIndexes) Sets the value ofCfnGlobalTableProps.getLocalSecondaryIndexes()
- Parameters:
localSecondaryIndexes
- Local secondary indexes to be created on the table. You can create up to five local secondary indexes. Each index is scoped to a given hash key value. The size of each hash key can be up to 10 gigabytes. Each replica in your global table will have the same local secondary index settings.- Returns:
this
-
sseSpecification
@Stability(Stable) public CfnGlobalTableProps.Builder sseSpecification(IResolvable sseSpecification) Sets the value ofCfnGlobalTableProps.getSseSpecification()
- Parameters:
sseSpecification
- Specifies the settings to enable server-side encryption. These settings will be applied to all replicas. If you plan to use customer-managed KMS keys, you must provide a key for each replica using theReplicaSpecification.ReplicaSSESpecification
property.- Returns:
this
-
sseSpecification
@Stability(Stable) public CfnGlobalTableProps.Builder sseSpecification(CfnGlobalTable.SSESpecificationProperty sseSpecification) Sets the value ofCfnGlobalTableProps.getSseSpecification()
- Parameters:
sseSpecification
- Specifies the settings to enable server-side encryption. These settings will be applied to all replicas. If you plan to use customer-managed KMS keys, you must provide a key for each replica using theReplicaSpecification.ReplicaSSESpecification
property.- Returns:
this
-
streamSpecification
@Stability(Stable) public CfnGlobalTableProps.Builder streamSpecification(IResolvable streamSpecification) Sets the value ofCfnGlobalTableProps.getStreamSpecification()
- Parameters:
streamSpecification
- Specifies the streams settings on your global table. You must provide a value for this property if your global table contains more than one replica. You can only change the streams settings if your global table has only one replica.- Returns:
this
-
streamSpecification
@Stability(Stable) public CfnGlobalTableProps.Builder streamSpecification(CfnGlobalTable.StreamSpecificationProperty streamSpecification) Sets the value ofCfnGlobalTableProps.getStreamSpecification()
- Parameters:
streamSpecification
- Specifies the streams settings on your global table. You must provide a value for this property if your global table contains more than one replica. You can only change the streams settings if your global table has only one replica.- Returns:
this
-
tableName
Sets the value ofCfnGlobalTableProps.getTableName()
- Parameters:
tableName
- A name for the global table. If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID as the table name. For more information, see Name type .If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
- Returns:
this
-
timeToLiveSpecification
@Stability(Stable) public CfnGlobalTableProps.Builder timeToLiveSpecification(IResolvable timeToLiveSpecification) Sets the value ofCfnGlobalTableProps.getTimeToLiveSpecification()
- Parameters:
timeToLiveSpecification
- Specifies the time to live (TTL) settings for the table. This setting will be applied to all replicas.- Returns:
this
-
timeToLiveSpecification
@Stability(Stable) public CfnGlobalTableProps.Builder timeToLiveSpecification(CfnGlobalTable.TimeToLiveSpecificationProperty timeToLiveSpecification) Sets the value ofCfnGlobalTableProps.getTimeToLiveSpecification()
- Parameters:
timeToLiveSpecification
- Specifies the time to live (TTL) settings for the table. This setting will be applied to all replicas.- Returns:
this
-
writeOnDemandThroughputSettings
@Stability(Stable) public CfnGlobalTableProps.Builder writeOnDemandThroughputSettings(IResolvable writeOnDemandThroughputSettings) Sets the value ofCfnGlobalTableProps.getWriteOnDemandThroughputSettings()
- 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 CfnGlobalTableProps.Builder writeOnDemandThroughputSettings(CfnGlobalTable.WriteOnDemandThroughputSettingsProperty writeOnDemandThroughputSettings) Sets the value ofCfnGlobalTableProps.getWriteOnDemandThroughputSettings()
- 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 CfnGlobalTableProps.Builder writeProvisionedThroughputSettings(IResolvable writeProvisionedThroughputSettings) Sets the value ofCfnGlobalTableProps.getWriteProvisionedThroughputSettings()
- Parameters:
writeProvisionedThroughputSettings
- Specifies an auto scaling policy for write capacity. This policy will be applied to all replicas. This setting must be specified ifBillingMode
is set toPROVISIONED
.- Returns:
this
-
writeProvisionedThroughputSettings
@Stability(Stable) public CfnGlobalTableProps.Builder writeProvisionedThroughputSettings(CfnGlobalTable.WriteProvisionedThroughputSettingsProperty writeProvisionedThroughputSettings) Sets the value ofCfnGlobalTableProps.getWriteProvisionedThroughputSettings()
- Parameters:
writeProvisionedThroughputSettings
- Specifies an auto scaling policy for write capacity. This policy will be applied to all replicas. This setting must be specified ifBillingMode
is set toPROVISIONED
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnGlobalTableProps>
- Returns:
- a new instance of
CfnGlobalTableProps
- Throws:
NullPointerException
- if any required attribute was not provided
-