Class CfnTableProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnTableProps>
- Enclosing interface:
CfnTableProps
CfnTableProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionattributeDefinitions
(List<? extends Object> attributeDefinitions) Sets the value ofCfnTableProps.getAttributeDefinitions()
attributeDefinitions
(IResolvable attributeDefinitions) Sets the value ofCfnTableProps.getAttributeDefinitions()
billingMode
(String billingMode) Sets the value ofCfnTableProps.getBillingMode()
build()
Builds the configured instance.contributorInsightsSpecification
(IResolvable contributorInsightsSpecification) Sets the value ofCfnTableProps.getContributorInsightsSpecification()
contributorInsightsSpecification
(CfnTable.ContributorInsightsSpecificationProperty contributorInsightsSpecification) Sets the value ofCfnTableProps.getContributorInsightsSpecification()
deletionProtectionEnabled
(Boolean deletionProtectionEnabled) Sets the value ofCfnTableProps.getDeletionProtectionEnabled()
deletionProtectionEnabled
(IResolvable deletionProtectionEnabled) Sets the value ofCfnTableProps.getDeletionProtectionEnabled()
globalSecondaryIndexes
(List<? extends Object> globalSecondaryIndexes) Sets the value ofCfnTableProps.getGlobalSecondaryIndexes()
globalSecondaryIndexes
(IResolvable globalSecondaryIndexes) Sets the value ofCfnTableProps.getGlobalSecondaryIndexes()
importSourceSpecification
(IResolvable importSourceSpecification) Sets the value ofCfnTableProps.getImportSourceSpecification()
importSourceSpecification
(CfnTable.ImportSourceSpecificationProperty importSourceSpecification) Sets the value ofCfnTableProps.getImportSourceSpecification()
Sets the value ofCfnTableProps.getKeySchema()
keySchema
(IResolvable keySchema) Sets the value ofCfnTableProps.getKeySchema()
kinesisStreamSpecification
(IResolvable kinesisStreamSpecification) Sets the value ofCfnTableProps.getKinesisStreamSpecification()
kinesisStreamSpecification
(CfnTable.KinesisStreamSpecificationProperty kinesisStreamSpecification) Sets the value ofCfnTableProps.getKinesisStreamSpecification()
localSecondaryIndexes
(List<? extends Object> localSecondaryIndexes) Sets the value ofCfnTableProps.getLocalSecondaryIndexes()
localSecondaryIndexes
(IResolvable localSecondaryIndexes) Sets the value ofCfnTableProps.getLocalSecondaryIndexes()
onDemandThroughput
(IResolvable onDemandThroughput) Sets the value ofCfnTableProps.getOnDemandThroughput()
onDemandThroughput
(CfnTable.OnDemandThroughputProperty onDemandThroughput) Sets the value ofCfnTableProps.getOnDemandThroughput()
pointInTimeRecoverySpecification
(IResolvable pointInTimeRecoverySpecification) Sets the value ofCfnTableProps.getPointInTimeRecoverySpecification()
pointInTimeRecoverySpecification
(CfnTable.PointInTimeRecoverySpecificationProperty pointInTimeRecoverySpecification) Sets the value ofCfnTableProps.getPointInTimeRecoverySpecification()
provisionedThroughput
(IResolvable provisionedThroughput) Sets the value ofCfnTableProps.getProvisionedThroughput()
provisionedThroughput
(CfnTable.ProvisionedThroughputProperty provisionedThroughput) Sets the value ofCfnTableProps.getProvisionedThroughput()
resourcePolicy
(IResolvable resourcePolicy) Sets the value ofCfnTableProps.getResourcePolicy()
resourcePolicy
(CfnTable.ResourcePolicyProperty resourcePolicy) Sets the value ofCfnTableProps.getResourcePolicy()
sseSpecification
(IResolvable sseSpecification) Sets the value ofCfnTableProps.getSseSpecification()
sseSpecification
(CfnTable.SSESpecificationProperty sseSpecification) Sets the value ofCfnTableProps.getSseSpecification()
streamSpecification
(IResolvable streamSpecification) Sets the value ofCfnTableProps.getStreamSpecification()
streamSpecification
(CfnTable.StreamSpecificationProperty streamSpecification) Sets the value ofCfnTableProps.getStreamSpecification()
tableClass
(String tableClass) Sets the value ofCfnTableProps.getTableClass()
Sets the value ofCfnTableProps.getTableName()
Sets the value ofCfnTableProps.getTags()
timeToLiveSpecification
(IResolvable timeToLiveSpecification) Sets the value ofCfnTableProps.getTimeToLiveSpecification()
timeToLiveSpecification
(CfnTable.TimeToLiveSpecificationProperty timeToLiveSpecification) Sets the value ofCfnTableProps.getTimeToLiveSpecification()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
keySchema
Sets the value ofCfnTableProps.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 ofCfnTableProps.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
-
attributeDefinitions
@Stability(Stable) public CfnTableProps.Builder attributeDefinitions(IResolvable attributeDefinitions) Sets the value ofCfnTableProps.getAttributeDefinitions()
- Parameters:
attributeDefinitions
- A list of attributes that describe the key schema for the table and indexes. This property is required to create a DynamoDB table.Update requires: Some interruptions . Replacement if you edit an existing AttributeDefinition.
- Returns:
this
-
attributeDefinitions
@Stability(Stable) public CfnTableProps.Builder attributeDefinitions(List<? extends Object> attributeDefinitions) Sets the value ofCfnTableProps.getAttributeDefinitions()
- Parameters:
attributeDefinitions
- A list of attributes that describe the key schema for the table and indexes. This property is required to create a DynamoDB table.Update requires: Some interruptions . Replacement if you edit an existing AttributeDefinition.
- Returns:
this
-
billingMode
Sets the value ofCfnTableProps.getBillingMode()
- Parameters:
billingMode
- Specify how you are charged for read and write throughput and how you manage capacity. Valid values include:PROVISIONED
- We recommend usingPROVISIONED
for predictable workloads.PROVISIONED
sets the billing mode to Provisioned Mode .PAY_PER_REQUEST
- We recommend usingPAY_PER_REQUEST
for unpredictable workloads.PAY_PER_REQUEST
sets the billing mode to On-Demand Mode .
If not specified, the default is
PROVISIONED
.- Returns:
this
-
contributorInsightsSpecification
@Stability(Stable) public CfnTableProps.Builder contributorInsightsSpecification(IResolvable contributorInsightsSpecification) Sets the value ofCfnTableProps.getContributorInsightsSpecification()
- Parameters:
contributorInsightsSpecification
- The settings used to enable or disable CloudWatch Contributor Insights for the specified table.- Returns:
this
-
contributorInsightsSpecification
@Stability(Stable) public CfnTableProps.Builder contributorInsightsSpecification(CfnTable.ContributorInsightsSpecificationProperty contributorInsightsSpecification) Sets the value ofCfnTableProps.getContributorInsightsSpecification()
- Parameters:
contributorInsightsSpecification
- The settings used to enable or disable CloudWatch Contributor Insights for the specified table.- Returns:
this
-
deletionProtectionEnabled
@Stability(Stable) public CfnTableProps.Builder deletionProtectionEnabled(Boolean deletionProtectionEnabled) Sets the value ofCfnTableProps.getDeletionProtectionEnabled()
- Parameters:
deletionProtectionEnabled
- Determines if a table is protected from deletion. When enabled, the table cannot be deleted by any user or process. This setting is disabled by default. For more information, see Using deletion protection in the Amazon DynamoDB Developer Guide .- Returns:
this
-
deletionProtectionEnabled
@Stability(Stable) public CfnTableProps.Builder deletionProtectionEnabled(IResolvable deletionProtectionEnabled) Sets the value ofCfnTableProps.getDeletionProtectionEnabled()
- Parameters:
deletionProtectionEnabled
- Determines if a table is protected from deletion. When enabled, the table cannot be deleted by any user or process. This setting is disabled by default. For more information, see Using deletion protection in the Amazon DynamoDB Developer Guide .- Returns:
this
-
globalSecondaryIndexes
@Stability(Stable) public CfnTableProps.Builder globalSecondaryIndexes(IResolvable globalSecondaryIndexes) Sets the value ofCfnTableProps.getGlobalSecondaryIndexes()
- Parameters:
globalSecondaryIndexes
- Global secondary indexes to be created on the table. You can create up to 20 global secondary indexes.If you update a table to include a new global secondary index, AWS CloudFormation initiates the index creation and then proceeds with the stack update. AWS CloudFormation doesn't wait for the index to complete creation because the backfilling phase can take a long time, depending on the size of the table. You can't use the index or update the table until the index's status is
ACTIVE
. You can track its status by using the DynamoDB DescribeTable command.If you add or delete an index 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 index, you must manually delete the index.
Updates are not supported. The following are exceptions:
- If you update either the contributor insights specification or the provisioned throughput values of global secondary indexes, you can update the table without interruption.
- You can delete or add one global secondary index without interruption. If you do both in the same update (for example, by changing the index's logical ID), the update fails.
- Returns:
this
-
globalSecondaryIndexes
@Stability(Stable) public CfnTableProps.Builder globalSecondaryIndexes(List<? extends Object> globalSecondaryIndexes) Sets the value ofCfnTableProps.getGlobalSecondaryIndexes()
- Parameters:
globalSecondaryIndexes
- Global secondary indexes to be created on the table. You can create up to 20 global secondary indexes.If you update a table to include a new global secondary index, AWS CloudFormation initiates the index creation and then proceeds with the stack update. AWS CloudFormation doesn't wait for the index to complete creation because the backfilling phase can take a long time, depending on the size of the table. You can't use the index or update the table until the index's status is
ACTIVE
. You can track its status by using the DynamoDB DescribeTable command.If you add or delete an index 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 index, you must manually delete the index.
Updates are not supported. The following are exceptions:
- If you update either the contributor insights specification or the provisioned throughput values of global secondary indexes, you can update the table without interruption.
- You can delete or add one global secondary index without interruption. If you do both in the same update (for example, by changing the index's logical ID), the update fails.
- Returns:
this
-
importSourceSpecification
@Stability(Stable) public CfnTableProps.Builder importSourceSpecification(IResolvable importSourceSpecification) Sets the value ofCfnTableProps.getImportSourceSpecification()
- Parameters:
importSourceSpecification
- Specifies the properties of data being imported from the S3 bucket source to the table.If you specify the
ImportSourceSpecification
property, and also specify either theStreamSpecification
, theTableClass
property, or theDeletionProtectionEnabled
property, the IAM entity creating/updating stack must haveUpdateTable
permission.- Returns:
this
-
importSourceSpecification
@Stability(Stable) public CfnTableProps.Builder importSourceSpecification(CfnTable.ImportSourceSpecificationProperty importSourceSpecification) Sets the value ofCfnTableProps.getImportSourceSpecification()
- Parameters:
importSourceSpecification
- Specifies the properties of data being imported from the S3 bucket source to the table.If you specify the
ImportSourceSpecification
property, and also specify either theStreamSpecification
, theTableClass
property, or theDeletionProtectionEnabled
property, the IAM entity creating/updating stack must haveUpdateTable
permission.- Returns:
this
-
kinesisStreamSpecification
@Stability(Stable) public CfnTableProps.Builder kinesisStreamSpecification(IResolvable kinesisStreamSpecification) Sets the value ofCfnTableProps.getKinesisStreamSpecification()
- Parameters:
kinesisStreamSpecification
- The Kinesis Data Streams configuration for the specified table.- Returns:
this
-
kinesisStreamSpecification
@Stability(Stable) public CfnTableProps.Builder kinesisStreamSpecification(CfnTable.KinesisStreamSpecificationProperty kinesisStreamSpecification) Sets the value ofCfnTableProps.getKinesisStreamSpecification()
- Parameters:
kinesisStreamSpecification
- The Kinesis Data Streams configuration for the specified table.- Returns:
this
-
localSecondaryIndexes
@Stability(Stable) public CfnTableProps.Builder localSecondaryIndexes(IResolvable localSecondaryIndexes) Sets the value ofCfnTableProps.getLocalSecondaryIndexes()
- Parameters:
localSecondaryIndexes
- Local secondary indexes to be created on the table. You can create up to 5 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.- Returns:
this
-
localSecondaryIndexes
@Stability(Stable) public CfnTableProps.Builder localSecondaryIndexes(List<? extends Object> localSecondaryIndexes) Sets the value ofCfnTableProps.getLocalSecondaryIndexes()
- Parameters:
localSecondaryIndexes
- Local secondary indexes to be created on the table. You can create up to 5 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.- Returns:
this
-
onDemandThroughput
Sets the value ofCfnTableProps.getOnDemandThroughput()
- Parameters:
onDemandThroughput
- Sets the maximum number of read and write units for the specified on-demand table. If you use this property, you must specifyMaxReadRequestUnits
,MaxWriteRequestUnits
, or both.- Returns:
this
-
onDemandThroughput
@Stability(Stable) public CfnTableProps.Builder onDemandThroughput(CfnTable.OnDemandThroughputProperty onDemandThroughput) Sets the value ofCfnTableProps.getOnDemandThroughput()
- Parameters:
onDemandThroughput
- Sets the maximum number of read and write units for the specified on-demand table. If you use this property, you must specifyMaxReadRequestUnits
,MaxWriteRequestUnits
, or both.- Returns:
this
-
pointInTimeRecoverySpecification
@Stability(Stable) public CfnTableProps.Builder pointInTimeRecoverySpecification(IResolvable pointInTimeRecoverySpecification) Sets the value ofCfnTableProps.getPointInTimeRecoverySpecification()
- Parameters:
pointInTimeRecoverySpecification
- The settings used to enable point in time recovery.- Returns:
this
-
pointInTimeRecoverySpecification
@Stability(Stable) public CfnTableProps.Builder pointInTimeRecoverySpecification(CfnTable.PointInTimeRecoverySpecificationProperty pointInTimeRecoverySpecification) Sets the value ofCfnTableProps.getPointInTimeRecoverySpecification()
- Parameters:
pointInTimeRecoverySpecification
- The settings used to enable point in time recovery.- Returns:
this
-
provisionedThroughput
@Stability(Stable) public CfnTableProps.Builder provisionedThroughput(IResolvable provisionedThroughput) Sets the value ofCfnTableProps.getProvisionedThroughput()
- Parameters:
provisionedThroughput
- Throughput for the specified table, which consists of values forReadCapacityUnits
andWriteCapacityUnits
. For more information about the contents of a provisioned throughput structure, see Amazon DynamoDB Table ProvisionedThroughput .If you set
BillingMode
asPROVISIONED
, you must specify this property. If you setBillingMode
asPAY_PER_REQUEST
, you cannot specify this property.- Returns:
this
-
provisionedThroughput
@Stability(Stable) public CfnTableProps.Builder provisionedThroughput(CfnTable.ProvisionedThroughputProperty provisionedThroughput) Sets the value ofCfnTableProps.getProvisionedThroughput()
- Parameters:
provisionedThroughput
- Throughput for the specified table, which consists of values forReadCapacityUnits
andWriteCapacityUnits
. For more information about the contents of a provisioned throughput structure, see Amazon DynamoDB Table ProvisionedThroughput .If you set
BillingMode
asPROVISIONED
, you must specify this property. If you setBillingMode
asPAY_PER_REQUEST
, you cannot specify this property.- Returns:
this
-
resourcePolicy
Sets the value ofCfnTableProps.getResourcePolicy()
- Parameters:
resourcePolicy
- A resource-based policy document that contains permissions to add to the specified table. In a CloudFormation template, you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to DynamoDB . For more information about resource-based policies, see Using resource-based policies for DynamoDB and Resource-based policy examples .When you attach a resource-based policy while creating a table, the policy creation is strongly consistent . For information about the considerations that you should keep in mind while attaching a resource-based policy, see Resource-based policy considerations .
- Returns:
this
-
resourcePolicy
@Stability(Stable) public CfnTableProps.Builder resourcePolicy(CfnTable.ResourcePolicyProperty resourcePolicy) Sets the value ofCfnTableProps.getResourcePolicy()
- Parameters:
resourcePolicy
- A resource-based policy document that contains permissions to add to the specified table. In a CloudFormation template, you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to DynamoDB . For more information about resource-based policies, see Using resource-based policies for DynamoDB and Resource-based policy examples .When you attach a resource-based policy while creating a table, the policy creation is strongly consistent . For information about the considerations that you should keep in mind while attaching a resource-based policy, see Resource-based policy considerations .
- Returns:
this
-
sseSpecification
Sets the value ofCfnTableProps.getSseSpecification()
- Parameters:
sseSpecification
- Specifies the settings to enable server-side encryption.- Returns:
this
-
sseSpecification
@Stability(Stable) public CfnTableProps.Builder sseSpecification(CfnTable.SSESpecificationProperty sseSpecification) Sets the value ofCfnTableProps.getSseSpecification()
- Parameters:
sseSpecification
- Specifies the settings to enable server-side encryption.- Returns:
this
-
streamSpecification
@Stability(Stable) public CfnTableProps.Builder streamSpecification(IResolvable streamSpecification) Sets the value ofCfnTableProps.getStreamSpecification()
- Parameters:
streamSpecification
- The settings for the DynamoDB table stream, which capture changes to items stored in the table.- Returns:
this
-
streamSpecification
@Stability(Stable) public CfnTableProps.Builder streamSpecification(CfnTable.StreamSpecificationProperty streamSpecification) Sets the value ofCfnTableProps.getStreamSpecification()
- Parameters:
streamSpecification
- The settings for the DynamoDB table stream, which capture changes to items stored in the table.- Returns:
this
-
tableClass
Sets the value ofCfnTableProps.getTableClass()
- Parameters:
tableClass
- The table class of the new table. Valid values areSTANDARD
andSTANDARD_INFREQUENT_ACCESS
.- Returns:
this
-
tableName
Sets the value ofCfnTableProps.getTableName()
- Parameters:
tableName
- A name for the table. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for 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
-
tags
Sets the value ofCfnTableProps.getTags()
- Parameters:
tags
- An array of key-value pairs to apply to this resource. For more information, see Tag .- Returns:
this
-
timeToLiveSpecification
@Stability(Stable) public CfnTableProps.Builder timeToLiveSpecification(IResolvable timeToLiveSpecification) Sets the value ofCfnTableProps.getTimeToLiveSpecification()
- Parameters:
timeToLiveSpecification
- Specifies the Time to Live (TTL) settings for the table.For detailed information about the limits in DynamoDB, see Limits in Amazon DynamoDB in the Amazon DynamoDB Developer Guide.
- Returns:
this
-
timeToLiveSpecification
@Stability(Stable) public CfnTableProps.Builder timeToLiveSpecification(CfnTable.TimeToLiveSpecificationProperty timeToLiveSpecification) Sets the value ofCfnTableProps.getTimeToLiveSpecification()
- Parameters:
timeToLiveSpecification
- Specifies the Time to Live (TTL) settings for the table.For detailed information about the limits in DynamoDB, see Limits in Amazon DynamoDB in the Amazon DynamoDB Developer Guide.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnTableProps>
- Returns:
- a new instance of
CfnTableProps
- Throws:
NullPointerException
- if any required attribute was not provided
-