Class TableAttributesV2.Builder
java.lang.Object
software.amazon.awscdk.services.dynamodb.TableAttributesV2.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<TableAttributesV2>
- Enclosing interface:
TableAttributesV2
@Stability(Stable)
public static final class TableAttributesV2.Builder
extends Object
implements software.amazon.jsii.Builder<TableAttributesV2>
A builder for
TableAttributesV2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.encryptionKey
(IKey encryptionKey) Sets the value ofTableAttributesV2.getEncryptionKey()
globalIndexes
(List<String> globalIndexes) Sets the value ofTableAttributesV2.getGlobalIndexes()
grantIndexPermissions
(Boolean grantIndexPermissions) Sets the value ofTableAttributesV2.getGrantIndexPermissions()
localIndexes
(List<String> localIndexes) Sets the value ofTableAttributesV2.getLocalIndexes()
Sets the value ofTableAttributesV2.getTableArn()
Sets the value ofTableAttributesV2.getTableId()
Sets the value ofTableAttributesV2.getTableName()
tableStreamArn
(String tableStreamArn) Sets the value ofTableAttributesV2.getTableStreamArn()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
encryptionKey
Sets the value ofTableAttributesV2.getEncryptionKey()
- Parameters:
encryptionKey
- KMS encryption key for the table.- Returns:
this
-
globalIndexes
Sets the value ofTableAttributesV2.getGlobalIndexes()
- Parameters:
globalIndexes
- The name of the global indexes set for the table. Note: You must set either this property orlocalIndexes
if you want permissions to be granted for indexes as well as the table itself.- Returns:
this
-
grantIndexPermissions
@Stability(Stable) public TableAttributesV2.Builder grantIndexPermissions(Boolean grantIndexPermissions) Sets the value ofTableAttributesV2.getGrantIndexPermissions()
- Parameters:
grantIndexPermissions
- Whether or not to grant permissions for all indexes of the table. Note: If false, permissions will only be granted to indexes whenglobalIndexes
orlocalIndexes
is specified.- Returns:
this
-
localIndexes
Sets the value ofTableAttributesV2.getLocalIndexes()
- Parameters:
localIndexes
- The name of the local indexes set for the table. Note: You must set either this property orglobalIndexes
if you want permissions to be granted for indexes as well as the table itself.- Returns:
this
-
tableArn
Sets the value ofTableAttributesV2.getTableArn()
- Parameters:
tableArn
- The ARN of the table. Note: You must specify this or thetableName
.- Returns:
this
-
tableId
Sets the value ofTableAttributesV2.getTableId()
- Parameters:
tableId
- The ID of the table.- Returns:
this
-
tableName
Sets the value ofTableAttributesV2.getTableName()
- Parameters:
tableName
- The name of the table. Note: You must specify this or thetableArn
.- Returns:
this
-
tableStreamArn
Sets the value ofTableAttributesV2.getTableStreamArn()
- Parameters:
tableStreamArn
- The stream ARN of the table.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<TableAttributesV2>
- Returns:
- a new instance of
TableAttributesV2
- Throws:
NullPointerException
- if any required attribute was not provided
-