com.amazonaws.services.dynamodbv2.model
Class CreateTableRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.dynamodbv2.model.CreateTableRequest
All Implemented Interfaces:
java.io.Serializable

public class CreateTableRequest
extends AmazonWebServiceRequest
implements java.io.Serializable

Container for the parameters to the CreateTable operation.

The CreateTable operation adds a new table to your account. In an AWS account, table names must be unique within each region. That is, you can have two tables with same name if you create the tables in different regions.

CreateTable is an asynchronous operation. Upon receiving a CreateTable request, DynamoDB immediately returns a response with a TableStatus of CREATING . After the table is created, DynamoDB sets the TableStatus to ACTIVE . You can perform read and write operations only on an ACTIVE table.

If you want to create multiple tables with secondary indexes on them, you must create them sequentially. Only one table with secondary indexes can be in the CREATING state at any given time.

You can use the DescribeTable API to check the table status.

See Also:
AmazonDynamoDB.createTable(CreateTableRequest), Serialized Form

Constructor Summary
CreateTableRequest()
          Default constructor for a new CreateTableRequest object.
CreateTableRequest(java.util.List<AttributeDefinition> attributeDefinitions, java.lang.String tableName, java.util.List<KeySchemaElement> keySchema, ProvisionedThroughput provisionedThroughput)
          Constructs a new CreateTableRequest object.
CreateTableRequest(java.lang.String tableName, java.util.List<KeySchemaElement> keySchema)
          Constructs a new CreateTableRequest object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.List<AttributeDefinition> getAttributeDefinitions()
          An array of attributes that describe the key schema for the table and indexes.
 java.util.List<GlobalSecondaryIndex> getGlobalSecondaryIndexes()
          One or more global secondary indexes (the maximum is five) to be created on the table.
 java.util.List<KeySchemaElement> getKeySchema()
          Specifies the attributes that make up the primary key for a table or an index.
 java.util.List<LocalSecondaryIndex> getLocalSecondaryIndexes()
          One or more local secondary indexes (the maximum is five) to be created on the table.
 ProvisionedThroughput getProvisionedThroughput()
          Represents the provisioned throughput settings for a specified table or index.
 java.lang.String getTableName()
          The name of the table to create.
 int hashCode()
           
 void setAttributeDefinitions(java.util.Collection<AttributeDefinition> attributeDefinitions)
          An array of attributes that describe the key schema for the table and indexes.
 void setGlobalSecondaryIndexes(java.util.Collection<GlobalSecondaryIndex> globalSecondaryIndexes)
          One or more global secondary indexes (the maximum is five) to be created on the table.
 void setKeySchema(java.util.Collection<KeySchemaElement> keySchema)
          Specifies the attributes that make up the primary key for a table or an index.
 void setLocalSecondaryIndexes(java.util.Collection<LocalSecondaryIndex> localSecondaryIndexes)
          One or more local secondary indexes (the maximum is five) to be created on the table.
 void setProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
          Represents the provisioned throughput settings for a specified table or index.
 void setTableName(java.lang.String tableName)
          The name of the table to create.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreateTableRequest withAttributeDefinitions(AttributeDefinition... attributeDefinitions)
          An array of attributes that describe the key schema for the table and indexes.
 CreateTableRequest withAttributeDefinitions(java.util.Collection<AttributeDefinition> attributeDefinitions)
          An array of attributes that describe the key schema for the table and indexes.
 CreateTableRequest withGlobalSecondaryIndexes(java.util.Collection<GlobalSecondaryIndex> globalSecondaryIndexes)
          One or more global secondary indexes (the maximum is five) to be created on the table.
 CreateTableRequest withGlobalSecondaryIndexes(GlobalSecondaryIndex... globalSecondaryIndexes)
          One or more global secondary indexes (the maximum is five) to be created on the table.
 CreateTableRequest withKeySchema(java.util.Collection<KeySchemaElement> keySchema)
          Specifies the attributes that make up the primary key for a table or an index.
 CreateTableRequest withKeySchema(KeySchemaElement... keySchema)
          Specifies the attributes that make up the primary key for a table or an index.
 CreateTableRequest withLocalSecondaryIndexes(java.util.Collection<LocalSecondaryIndex> localSecondaryIndexes)
          One or more local secondary indexes (the maximum is five) to be created on the table.
 CreateTableRequest withLocalSecondaryIndexes(LocalSecondaryIndex... localSecondaryIndexes)
          One or more local secondary indexes (the maximum is five) to be created on the table.
 CreateTableRequest withProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
          Represents the provisioned throughput settings for a specified table or index.
 CreateTableRequest withTableName(java.lang.String tableName)
          The name of the table to create.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreateTableRequest

public CreateTableRequest()
Default constructor for a new CreateTableRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


CreateTableRequest

public CreateTableRequest(java.lang.String tableName,
                          java.util.List<KeySchemaElement> keySchema)
Constructs a new CreateTableRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
tableName - The name of the table to create.
keySchema - Specifies the attributes that make up the primary key for a table or an index. The attributes in KeySchema must also be defined in the AttributeDefinitions array. For more information, see Data Model in the Amazon DynamoDB Developer Guide.

Each KeySchemaElement in the array is composed of:

  • AttributeName - The name of this key attribute.

  • KeyType - Determines whether the key attribute is HASH or RANGE.

For a primary key that consists of a hash attribute, you must specify exactly one element with a KeyType of HASH.

For a primary key that consists of hash and range attributes, you must specify exactly two elements, in this order: The first element must have a KeyType of HASH, and the second element must have a KeyType of RANGE.

For more information, see Specifying the Primary Key in the Amazon DynamoDB Developer Guide.


CreateTableRequest

public CreateTableRequest(java.util.List<AttributeDefinition> attributeDefinitions,
                          java.lang.String tableName,
                          java.util.List<KeySchemaElement> keySchema,
                          ProvisionedThroughput provisionedThroughput)
Constructs a new CreateTableRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
attributeDefinitions - An array of attributes that describe the key schema for the table and indexes.
tableName - The name of the table to create.
keySchema - Specifies the attributes that make up the primary key for a table or an index. The attributes in KeySchema must also be defined in the AttributeDefinitions array. For more information, see Data Model in the Amazon DynamoDB Developer Guide.

Each KeySchemaElement in the array is composed of:

  • AttributeName - The name of this key attribute.

  • KeyType - Determines whether the key attribute is HASH or RANGE.

For a primary key that consists of a hash attribute, you must specify exactly one element with a KeyType of HASH.

For a primary key that consists of hash and range attributes, you must specify exactly two elements, in this order: The first element must have a KeyType of HASH, and the second element must have a KeyType of RANGE.

For more information, see Specifying the Primary Key in the Amazon DynamoDB Developer Guide.

provisionedThroughput - Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.

Method Detail

getAttributeDefinitions

public java.util.List<AttributeDefinition> getAttributeDefinitions()
An array of attributes that describe the key schema for the table and indexes.

Returns:
An array of attributes that describe the key schema for the table and indexes.

setAttributeDefinitions

public void setAttributeDefinitions(java.util.Collection<AttributeDefinition> attributeDefinitions)
An array of attributes that describe the key schema for the table and indexes.

Parameters:
attributeDefinitions - An array of attributes that describe the key schema for the table and indexes.

withAttributeDefinitions

public CreateTableRequest withAttributeDefinitions(AttributeDefinition... attributeDefinitions)
An array of attributes that describe the key schema for the table and indexes.

Returns a reference to this object so that method calls can be chained together.

Parameters:
attributeDefinitions - An array of attributes that describe the key schema for the table and indexes.
Returns:
A reference to this updated object so that method calls can be chained together.

withAttributeDefinitions

public CreateTableRequest withAttributeDefinitions(java.util.Collection<AttributeDefinition> attributeDefinitions)
An array of attributes that describe the key schema for the table and indexes.

Returns a reference to this object so that method calls can be chained together.

Parameters:
attributeDefinitions - An array of attributes that describe the key schema for the table and indexes.
Returns:
A reference to this updated object so that method calls can be chained together.

getTableName

public java.lang.String getTableName()
The name of the table to create.

Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+

Returns:
The name of the table to create.

setTableName

public void setTableName(java.lang.String tableName)
The name of the table to create.

Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+

Parameters:
tableName - The name of the table to create.

withTableName

public CreateTableRequest withTableName(java.lang.String tableName)
The name of the table to create.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+

Parameters:
tableName - The name of the table to create.
Returns:
A reference to this updated object so that method calls can be chained together.

getKeySchema

public java.util.List<KeySchemaElement> getKeySchema()
Specifies the attributes that make up the primary key for a table or an index. The attributes in KeySchema must also be defined in the AttributeDefinitions array. For more information, see Data Model in the Amazon DynamoDB Developer Guide.

Each KeySchemaElement in the array is composed of:

For a primary key that consists of a hash attribute, you must specify exactly one element with a KeyType of HASH.

For a primary key that consists of hash and range attributes, you must specify exactly two elements, in this order: The first element must have a KeyType of HASH, and the second element must have a KeyType of RANGE.

For more information, see Specifying the Primary Key in the Amazon DynamoDB Developer Guide.

Constraints:
Length: 1 - 2

Returns:
Specifies the attributes that make up the primary key for a table or an index. The attributes in KeySchema must also be defined in the AttributeDefinitions array. For more information, see Data Model in the Amazon DynamoDB Developer Guide.

Each KeySchemaElement in the array is composed of:

  • AttributeName - The name of this key attribute.

  • KeyType - Determines whether the key attribute is HASH or RANGE.

For a primary key that consists of a hash attribute, you must specify exactly one element with a KeyType of HASH.

For a primary key that consists of hash and range attributes, you must specify exactly two elements, in this order: The first element must have a KeyType of HASH, and the second element must have a KeyType of RANGE.

For more information, see Specifying the Primary Key in the Amazon DynamoDB Developer Guide.


setKeySchema

public void setKeySchema(java.util.Collection<KeySchemaElement> keySchema)
Specifies the attributes that make up the primary key for a table or an index. The attributes in KeySchema must also be defined in the AttributeDefinitions array. For more information, see Data Model in the Amazon DynamoDB Developer Guide.

Each KeySchemaElement in the array is composed of:

For a primary key that consists of a hash attribute, you must specify exactly one element with a KeyType of HASH.

For a primary key that consists of hash and range attributes, you must specify exactly two elements, in this order: The first element must have a KeyType of HASH, and the second element must have a KeyType of RANGE.

For more information, see Specifying the Primary Key in the Amazon DynamoDB Developer Guide.

Constraints:
Length: 1 - 2

Parameters:
keySchema - Specifies the attributes that make up the primary key for a table or an index. The attributes in KeySchema must also be defined in the AttributeDefinitions array. For more information, see Data Model in the Amazon DynamoDB Developer Guide.

Each KeySchemaElement in the array is composed of:

  • AttributeName - The name of this key attribute.

  • KeyType - Determines whether the key attribute is HASH or RANGE.

For a primary key that consists of a hash attribute, you must specify exactly one element with a KeyType of HASH.

For a primary key that consists of hash and range attributes, you must specify exactly two elements, in this order: The first element must have a KeyType of HASH, and the second element must have a KeyType of RANGE.

For more information, see Specifying the Primary Key in the Amazon DynamoDB Developer Guide.


withKeySchema

public CreateTableRequest withKeySchema(KeySchemaElement... keySchema)
Specifies the attributes that make up the primary key for a table or an index. The attributes in KeySchema must also be defined in the AttributeDefinitions array. For more information, see Data Model in the Amazon DynamoDB Developer Guide.

Each KeySchemaElement in the array is composed of:

For a primary key that consists of a hash attribute, you must specify exactly one element with a KeyType of HASH.

For a primary key that consists of hash and range attributes, you must specify exactly two elements, in this order: The first element must have a KeyType of HASH, and the second element must have a KeyType of RANGE.

For more information, see Specifying the Primary Key in the Amazon DynamoDB Developer Guide.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 2

Parameters:
keySchema - Specifies the attributes that make up the primary key for a table or an index. The attributes in KeySchema must also be defined in the AttributeDefinitions array. For more information, see Data Model in the Amazon DynamoDB Developer Guide.

Each KeySchemaElement in the array is composed of:

  • AttributeName - The name of this key attribute.

  • KeyType - Determines whether the key attribute is HASH or RANGE.

For a primary key that consists of a hash attribute, you must specify exactly one element with a KeyType of HASH.

For a primary key that consists of hash and range attributes, you must specify exactly two elements, in this order: The first element must have a KeyType of HASH, and the second element must have a KeyType of RANGE.

For more information, see Specifying the Primary Key in the Amazon DynamoDB Developer Guide.

Returns:
A reference to this updated object so that method calls can be chained together.

withKeySchema

public CreateTableRequest withKeySchema(java.util.Collection<KeySchemaElement> keySchema)
Specifies the attributes that make up the primary key for a table or an index. The attributes in KeySchema must also be defined in the AttributeDefinitions array. For more information, see Data Model in the Amazon DynamoDB Developer Guide.

Each KeySchemaElement in the array is composed of:

For a primary key that consists of a hash attribute, you must specify exactly one element with a KeyType of HASH.

For a primary key that consists of hash and range attributes, you must specify exactly two elements, in this order: The first element must have a KeyType of HASH, and the second element must have a KeyType of RANGE.

For more information, see Specifying the Primary Key in the Amazon DynamoDB Developer Guide.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 2

Parameters:
keySchema - Specifies the attributes that make up the primary key for a table or an index. The attributes in KeySchema must also be defined in the AttributeDefinitions array. For more information, see Data Model in the Amazon DynamoDB Developer Guide.

Each KeySchemaElement in the array is composed of:

  • AttributeName - The name of this key attribute.

  • KeyType - Determines whether the key attribute is HASH or RANGE.

For a primary key that consists of a hash attribute, you must specify exactly one element with a KeyType of HASH.

For a primary key that consists of hash and range attributes, you must specify exactly two elements, in this order: The first element must have a KeyType of HASH, and the second element must have a KeyType of RANGE.

For more information, see Specifying the Primary Key in the Amazon DynamoDB Developer Guide.

Returns:
A reference to this updated object so that method calls can be chained together.

getLocalSecondaryIndexes

public java.util.List<LocalSecondaryIndex> getLocalSecondaryIndexes()
One or more local secondary indexes (the maximum is five) to be created on the table. Each index is scoped to a given hash key value. There is a 10 GB size limit per hash key; otherwise, the size of a local secondary index is unconstrained.

Each local secondary index in the array includes the following:

Returns:
One or more local secondary indexes (the maximum is five) to be created on the table. Each index is scoped to a given hash key value. There is a 10 GB size limit per hash key; otherwise, the size of a local secondary index is unconstrained.

Each local secondary index in the array includes the following:

  • IndexName - The name of the local secondary index. Must be unique only for this table.

  • KeySchema - Specifies the key schema for the local secondary index. The key schema must begin with the same hash key attribute as the table.

  • Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:

    • ProjectionType - One of the following:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

    • NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes specified in NonKeyAttributes, summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.


setLocalSecondaryIndexes

public void setLocalSecondaryIndexes(java.util.Collection<LocalSecondaryIndex> localSecondaryIndexes)
One or more local secondary indexes (the maximum is five) to be created on the table. Each index is scoped to a given hash key value. There is a 10 GB size limit per hash key; otherwise, the size of a local secondary index is unconstrained.

Each local secondary index in the array includes the following:

Parameters:
localSecondaryIndexes - One or more local secondary indexes (the maximum is five) to be created on the table. Each index is scoped to a given hash key value. There is a 10 GB size limit per hash key; otherwise, the size of a local secondary index is unconstrained.

Each local secondary index in the array includes the following:

  • IndexName - The name of the local secondary index. Must be unique only for this table.

  • KeySchema - Specifies the key schema for the local secondary index. The key schema must begin with the same hash key attribute as the table.

  • Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:

    • ProjectionType - One of the following:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

    • NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes specified in NonKeyAttributes, summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.


withLocalSecondaryIndexes

public CreateTableRequest withLocalSecondaryIndexes(LocalSecondaryIndex... localSecondaryIndexes)
One or more local secondary indexes (the maximum is five) to be created on the table. Each index is scoped to a given hash key value. There is a 10 GB size limit per hash key; otherwise, the size of a local secondary index is unconstrained.

Each local secondary index in the array includes the following:

Returns a reference to this object so that method calls can be chained together.

Parameters:
localSecondaryIndexes - One or more local secondary indexes (the maximum is five) to be created on the table. Each index is scoped to a given hash key value. There is a 10 GB size limit per hash key; otherwise, the size of a local secondary index is unconstrained.

Each local secondary index in the array includes the following:

  • IndexName - The name of the local secondary index. Must be unique only for this table.

  • KeySchema - Specifies the key schema for the local secondary index. The key schema must begin with the same hash key attribute as the table.

  • Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:

    • ProjectionType - One of the following:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

    • NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes specified in NonKeyAttributes, summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

Returns:
A reference to this updated object so that method calls can be chained together.

withLocalSecondaryIndexes

public CreateTableRequest withLocalSecondaryIndexes(java.util.Collection<LocalSecondaryIndex> localSecondaryIndexes)
One or more local secondary indexes (the maximum is five) to be created on the table. Each index is scoped to a given hash key value. There is a 10 GB size limit per hash key; otherwise, the size of a local secondary index is unconstrained.

Each local secondary index in the array includes the following:

Returns a reference to this object so that method calls can be chained together.

Parameters:
localSecondaryIndexes - One or more local secondary indexes (the maximum is five) to be created on the table. Each index is scoped to a given hash key value. There is a 10 GB size limit per hash key; otherwise, the size of a local secondary index is unconstrained.

Each local secondary index in the array includes the following:

  • IndexName - The name of the local secondary index. Must be unique only for this table.

  • KeySchema - Specifies the key schema for the local secondary index. The key schema must begin with the same hash key attribute as the table.

  • Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:

    • ProjectionType - One of the following:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

    • NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes specified in NonKeyAttributes, summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

Returns:
A reference to this updated object so that method calls can be chained together.

getGlobalSecondaryIndexes

public java.util.List<GlobalSecondaryIndex> getGlobalSecondaryIndexes()
One or more global secondary indexes (the maximum is five) to be created on the table. Each global secondary index in the array includes the following:

Returns:
One or more global secondary indexes (the maximum is five) to be created on the table. Each global secondary index in the array includes the following:
  • IndexName - The name of the global secondary index. Must be unique only for this table.

  • KeySchema - Specifies the key schema for the global secondary index.

  • Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:

    • ProjectionType - One of the following:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

    • NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes specified in NonKeyAttributes, summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

  • ProvisionedThroughput - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.


setGlobalSecondaryIndexes

public void setGlobalSecondaryIndexes(java.util.Collection<GlobalSecondaryIndex> globalSecondaryIndexes)
One or more global secondary indexes (the maximum is five) to be created on the table. Each global secondary index in the array includes the following:

Parameters:
globalSecondaryIndexes - One or more global secondary indexes (the maximum is five) to be created on the table. Each global secondary index in the array includes the following:
  • IndexName - The name of the global secondary index. Must be unique only for this table.

  • KeySchema - Specifies the key schema for the global secondary index.

  • Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:

    • ProjectionType - One of the following:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

    • NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes specified in NonKeyAttributes, summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

  • ProvisionedThroughput - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.


withGlobalSecondaryIndexes

public CreateTableRequest withGlobalSecondaryIndexes(GlobalSecondaryIndex... globalSecondaryIndexes)
One or more global secondary indexes (the maximum is five) to be created on the table. Each global secondary index in the array includes the following:

Returns a reference to this object so that method calls can be chained together.

Parameters:
globalSecondaryIndexes - One or more global secondary indexes (the maximum is five) to be created on the table. Each global secondary index in the array includes the following:
  • IndexName - The name of the global secondary index. Must be unique only for this table.

  • KeySchema - Specifies the key schema for the global secondary index.

  • Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:

    • ProjectionType - One of the following:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

    • NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes specified in NonKeyAttributes, summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

  • ProvisionedThroughput - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.

Returns:
A reference to this updated object so that method calls can be chained together.

withGlobalSecondaryIndexes

public CreateTableRequest withGlobalSecondaryIndexes(java.util.Collection<GlobalSecondaryIndex> globalSecondaryIndexes)
One or more global secondary indexes (the maximum is five) to be created on the table. Each global secondary index in the array includes the following:

Returns a reference to this object so that method calls can be chained together.

Parameters:
globalSecondaryIndexes - One or more global secondary indexes (the maximum is five) to be created on the table. Each global secondary index in the array includes the following:
  • IndexName - The name of the global secondary index. Must be unique only for this table.

  • KeySchema - Specifies the key schema for the global secondary index.

  • Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:

    • ProjectionType - One of the following:

      • KEYS_ONLY - Only the index and primary keys are projected into the index.

      • INCLUDE - Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.

      • ALL - All of the table attributes are projected into the index.

    • NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes specified in NonKeyAttributes, summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.

  • ProvisionedThroughput - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units.

Returns:
A reference to this updated object so that method calls can be chained together.

getProvisionedThroughput

public ProvisionedThroughput getProvisionedThroughput()
Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.

Returns:
Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.


setProvisionedThroughput

public void setProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.

Parameters:
provisionedThroughput - Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.


withProvisionedThroughput

public CreateTableRequest withProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.

Returns a reference to this object so that method calls can be chained together.

Parameters:
provisionedThroughput - Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.

Returns:
A reference to this updated object so that method calls can be chained together.

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.