...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
bgColor | #000000 |
---|
...
Table of Contents | ||||
---|---|---|---|---|
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
<amazondynamodb.createTable> <attributeDefinitions>{$ctx:attributeDefinitions}</attributeDefinitions> <tableName>{$ctx:tableName}</tableName> <keySchema>{$ctx:keySchema}</keySchema> <localSecondaryIndexes>{$ctx:localSecondaryIndexes}</localSecondaryIndexes> <provisionedThroughput>{$ctx:provisionedThroughput}</provisionedThroughput> <StreamSpecification>{$ctx:StreamSpecification}</StreamSpecification> <globalSecondaryIndexes>{$ctx:globalSecondaryIndexes}</globalSecondaryIndexes> </amazondynamodb.createTable> |
Properties
tableName:
Required - The name of the table to create.(Minimum length of 3. Maximum length of 255.)attributeDefinitions:
Required - An array of attributes that describe the key schema for the table and indexes.keySchema:
Required - Specifies the attributes that make up the primary key for a table or an index. The attributes inkeySchema
must also be defined in theattributeDefinitions
array. Each KeySchemaElement in the array is composed of:AttributeName
- The name of this key attribute.
HASH - partition keyKeyType
- The role that the key attribute will assume:
RANGE - sort key
Note that the partition key of an item is also known as its hash attribute and the sort key of an item is also known as its range attribute. For a simple primary key (partition key), you must provide exactly one element with a KeyType of HASH. For a composite primary key(partition key and sort key), you must provide 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.
localSecondaryIndexes:
Optional - One or more local secondary indexes (the maximum is five) to be created on the table. Each index is scoped to a given partition key value. There is a 10 GB size limit per partition key value; 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 partition key 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 provided in NonKeyAttributes, summed across all of the secondary indexes, must not exceed 20.
provisionedThroughput:
Required - Represents the provisioned throughput settings for a specified table or index.StreamSpecification:
Optional - The settings for DynamoDB Streams on the table. These settings consist of:StreamEnabled
- Indicates whether Streams is to be enabled (true) or disabled (false).StreamViewType
- When an item in the table is modified, StreamViewType determines what information is written to the table's stream. Valid values for StreamViewType are:KEYS_ONLY
- Only the key attributes of the modified item are written to the stream.NEW_IMAGE - The entire item, as it appears after it was modified, is written to the stream.
OLD_IMAGE - The entire item, as it appeared before it was modified, is written to the stream.
NEW_AND_OLD_IMAGES - Both the new and the old item images of the item are written to the stream.
globalSecondaryIndexes:
Optional - 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 provided in NonKeyAttributes, summed across all of the secondary indexes, must not exceed 20.
ProvisionedThroughput
- Specifies the key schema for the global secondary index.
Anchorrequest request
Sample request
request | |
request |
Following is a sample REST request that can be handled by the createTable
operation.
...
Anchor | ||||
---|---|---|---|---|
|
The deleteTable
operation deletes a table and all of its items.
Code Block | ||||
---|---|---|---|---|
| ||||
<amazondynamodb.deleteTable> <tableName>{$ctx:tableName}</tableName> </amazondynamodb.deleteTable> |
Properties
tableName:
Required - The name of the table to delete.(Minimum length of 3. Maximum length of 255.)
...
Sample request
Following is a sample REST request that can be handled by the deleteTable
operation.
...
Anchor | ||||
---|---|---|---|---|
|
The describeTable
operation returns information about the table, including the current status of the table, when it was created, the primary key schema, and any indexes on the table.
Code Block | ||||
---|---|---|---|---|
| ||||
<amazondynamodb.describeTable> <tableName>{$ctx:tableName}</tableName> </amazondynamodb.describeTable> |
Properties
tableName:
Required - The name of the table to describe.(Minimum length of 3. Maximum length of 255.)
...
Sample request
Following is a sample REST request that can be handled by the describeTable
operation.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "accessKeyId":"AKIAxxxxxxxxxxxx", "secretAccessKey":"id4qxxxxxxxx", "region":"us-east-1", "blocking":"false", "tableName": "TestTable" } |
...
Anchor | ||||
---|---|---|---|---|
|
The listTables
operation returns an array of table names. The output from listTables
is paginated, with each page returning a maximum of 100 table names.
Code Block | ||||
---|---|---|---|---|
| ||||
<amazondynamodb.listTables> <exclusiveStartTableName>{$ctx:exclusiveStartTableName}</exclusiveStartTableName> <limit>{$ctx:limit}</limit> </amazondynamodb.listTables> |
Properties
exclusiveStartTableName:
Optional - The first table name that this operation will evaluate. Use the value that was returned forLastEvaluatedTableName
in a previous operation, so that you can obtain the next page of results.limit:
Optional - A maximum number of table names to return. If this parameter is not specified, the limit is 100.
Anchor
Following is a sample REST request that can be handled by the describeTable
operation.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "accessKeyId":"AKIAxxxxxxxxxxxx", "secretAccessKey":"id4qxxxxxxxx", "region":"us-east-1", "blocking":"false", "exclusiveStartTableName":"Music", "limit":4 } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
<amazondynamodb.updateTable> <tableName>{$ctx:tableName}</tableName> <attributeDefinitions>{$ctx:attributeDefinitions}</attributeDefinitions> <globalSecondaryIndexUpdates>{$ctx:globalSecondaryIndexUpdates}</globalSecondaryIndexUpdates> <StreamSpecification>{$ctx:StreamSpecification}</StreamSpecification> <provisionedThroughput>{$ctx:provisionedThroughput}</provisionedThroughput> </amazondynamodb.updateTable> |
Properties
tableName:
Required - The name of the table to be updated.(Minimum length of 3. Maximum length of 255.)attributeDefinitions:
Optional - An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table,AttributeDefinitions
must include the key element(s) of the new index.globalSecondaryIndexUpdates:
Optional - An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:Create - add a new global secondary index to the table.
Update - modify the provisioned throughput settings of an existing global secondary index.
Delete - remove a global secondary index from the table.
StreamSpecification:
Optional - Represents the DynamoDB Streams configuration for the table.provisionedThroughput:
Optional - The new provisioned throughput settings for the specified table or index.
...
...
Sample request
Following is a sample REST request that can be handled by the updateTable
operation.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "accessKeyId":"AKIAxxxxxxxxxxxx", "secretAccessKey":"id4qxxxxxxxx", "region":"us-east-1", "blocking":"false", "tableName":"Thread", "provisionedThroughput":{ "ReadCapacityUnits":12, "WriteCapacityUnits":12 } } |
...
http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html
Anchor describeLimits describeLimits
Retrieving the current provisioned-capacity limits
describeLimits | |
describeLimits |
The describeLimits
operation returns the current provisioned-capacity limits.
Code Block | ||||
---|---|---|---|---|
| ||||
<amazondynamodb.describeLimits/> |
...
Sample request
Following is a sample REST request that can be handled by the describeLimits
operation.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "accessKeyId":"AKIAxxxxxxxxxxxx", "secretAccessKey":"id4qxxxxxxxx", "region":"us-east-1", "blocking":"false" } |
...