com.amazonaws.services.dynamodb.model
Class CreateTableRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.dynamodb.model.CreateTableRequest

public class CreateTableRequest
extends AmazonWebServiceRequest

Container for the parameters to the CreateTable operation.

Adds a new table to your account.

The table name must be unique among those associated with the AWS Account issuing the request, and the AWS Region that receives the request (e.g. us-east-1 ).

The CreateTable operation triggers an asynchronous workflow to begin creating the table. Amazon DynamoDB immediately returns the state of the table ( CREATING ) until the table is in the ACTIVE state. Once the table is in the ACTIVE state, you can perform data plane operations.

See Also:
AmazonDynamoDB.createTable(CreateTableRequest)

Constructor Summary
CreateTableRequest()
          Default constructor for a new CreateTableRequest object.
CreateTableRequest(String tableName, KeySchema keySchema)
          Constructs a new CreateTableRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 KeySchema getKeySchema()
          The KeySchema identifies the primary key as a one attribute primary key (hash) or a composite two attribute (hash-and-range) primary key.
 ProvisionedThroughput getProvisionedThroughput()
          Provisioned throughput reserves the required read and write resources for your table in terms of ReadCapacityUnits and WriteCapacityUnits.
 String getTableName()
          The name of the table you want to create.
 int hashCode()
           
 void setKeySchema(KeySchema keySchema)
          The KeySchema identifies the primary key as a one attribute primary key (hash) or a composite two attribute (hash-and-range) primary key.
 void setProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
          Provisioned throughput reserves the required read and write resources for your table in terms of ReadCapacityUnits and WriteCapacityUnits.
 void setTableName(String tableName)
          The name of the table you want to create.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreateTableRequest withKeySchema(KeySchema keySchema)
          The KeySchema identifies the primary key as a one attribute primary key (hash) or a composite two attribute (hash-and-range) primary key.
 CreateTableRequest withProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
          Provisioned throughput reserves the required read and write resources for your table in terms of ReadCapacityUnits and WriteCapacityUnits.
 CreateTableRequest withTableName(String tableName)
          The name of the table you want to create.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
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(String tableName,
                          KeySchema 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 you want to create. Allowed characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and . (period).
keySchema - The KeySchema identifies the primary key as a one attribute primary key (hash) or a composite two attribute (hash-and-range) primary key. Single attribute primary keys have one index value: a HashKeyElement. A composite hash-and-range primary key contains two attribute values: a HashKeyElement and a RangeKeyElement.
Method Detail

getTableName

public String getTableName()
The name of the table you want to create. Allowed characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and . (period).

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

Returns:
The name of the table you want to create. Allowed characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and . (period).

setTableName

public void setTableName(String tableName)
The name of the table you want to create. Allowed characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and . (period).

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

Parameters:
tableName - The name of the table you want to create. Allowed characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and . (period).

withTableName

public CreateTableRequest withTableName(String tableName)
The name of the table you want to create. Allowed characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and . (period).

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 you want to create. Allowed characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and . (period).
Returns:
A reference to this updated object so that method calls can be chained together.

getKeySchema

public KeySchema getKeySchema()
The KeySchema identifies the primary key as a one attribute primary key (hash) or a composite two attribute (hash-and-range) primary key. Single attribute primary keys have one index value: a HashKeyElement. A composite hash-and-range primary key contains two attribute values: a HashKeyElement and a RangeKeyElement.

Returns:
The KeySchema identifies the primary key as a one attribute primary key (hash) or a composite two attribute (hash-and-range) primary key. Single attribute primary keys have one index value: a HashKeyElement. A composite hash-and-range primary key contains two attribute values: a HashKeyElement and a RangeKeyElement.

setKeySchema

public void setKeySchema(KeySchema keySchema)
The KeySchema identifies the primary key as a one attribute primary key (hash) or a composite two attribute (hash-and-range) primary key. Single attribute primary keys have one index value: a HashKeyElement. A composite hash-and-range primary key contains two attribute values: a HashKeyElement and a RangeKeyElement.

Parameters:
keySchema - The KeySchema identifies the primary key as a one attribute primary key (hash) or a composite two attribute (hash-and-range) primary key. Single attribute primary keys have one index value: a HashKeyElement. A composite hash-and-range primary key contains two attribute values: a HashKeyElement and a RangeKeyElement.

withKeySchema

public CreateTableRequest withKeySchema(KeySchema keySchema)
The KeySchema identifies the primary key as a one attribute primary key (hash) or a composite two attribute (hash-and-range) primary key. Single attribute primary keys have one index value: a HashKeyElement. A composite hash-and-range primary key contains two attribute values: a HashKeyElement and a RangeKeyElement.

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

Parameters:
keySchema - The KeySchema identifies the primary key as a one attribute primary key (hash) or a composite two attribute (hash-and-range) primary key. Single attribute primary keys have one index value: a HashKeyElement. A composite hash-and-range primary key contains two attribute values: a HashKeyElement and a RangeKeyElement.
Returns:
A reference to this updated object so that method calls can be chained together.

getProvisionedThroughput

public ProvisionedThroughput getProvisionedThroughput()
Provisioned throughput reserves the required read and write resources for your table in terms of ReadCapacityUnits and WriteCapacityUnits. Values for provisioned throughput depend upon your expected read/write rates, item size, and consistency. Provide the expected number of read and write operations, assuming an item size of 1k and strictly consistent reads. For 2k item size, double the value. For 3k, triple the value, etc. Eventually-consistent reads consume half the resources of strictly consistent reads.

Returns:
Provisioned throughput reserves the required read and write resources for your table in terms of ReadCapacityUnits and WriteCapacityUnits. Values for provisioned throughput depend upon your expected read/write rates, item size, and consistency. Provide the expected number of read and write operations, assuming an item size of 1k and strictly consistent reads. For 2k item size, double the value. For 3k, triple the value, etc. Eventually-consistent reads consume half the resources of strictly consistent reads.

setProvisionedThroughput

public void setProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
Provisioned throughput reserves the required read and write resources for your table in terms of ReadCapacityUnits and WriteCapacityUnits. Values for provisioned throughput depend upon your expected read/write rates, item size, and consistency. Provide the expected number of read and write operations, assuming an item size of 1k and strictly consistent reads. For 2k item size, double the value. For 3k, triple the value, etc. Eventually-consistent reads consume half the resources of strictly consistent reads.

Parameters:
provisionedThroughput - Provisioned throughput reserves the required read and write resources for your table in terms of ReadCapacityUnits and WriteCapacityUnits. Values for provisioned throughput depend upon your expected read/write rates, item size, and consistency. Provide the expected number of read and write operations, assuming an item size of 1k and strictly consistent reads. For 2k item size, double the value. For 3k, triple the value, etc. Eventually-consistent reads consume half the resources of strictly consistent reads.

withProvisionedThroughput

public CreateTableRequest withProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
Provisioned throughput reserves the required read and write resources for your table in terms of ReadCapacityUnits and WriteCapacityUnits. Values for provisioned throughput depend upon your expected read/write rates, item size, and consistency. Provide the expected number of read and write operations, assuming an item size of 1k and strictly consistent reads. For 2k item size, double the value. For 3k, triple the value, etc. Eventually-consistent reads consume half the resources of strictly consistent reads.

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

Parameters:
provisionedThroughput - Provisioned throughput reserves the required read and write resources for your table in terms of ReadCapacityUnits and WriteCapacityUnits. Values for provisioned throughput depend upon your expected read/write rates, item size, and consistency. Provide the expected number of read and write operations, assuming an item size of 1k and strictly consistent reads. For 2k item size, double the value. For 3k, triple the value, etc. Eventually-consistent reads consume half the resources of strictly consistent reads.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

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

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


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