DynamoTable

From Ocean Framework Documentation Wiki
Jump to: navigation, search

The DynamoTable resource has two public URLs. (For information about the difference between Public and Internal URLs and HATEOAS conventions, please see API Structure and Conventions.) The main URI is the following:

/v1/dynamo_tables

There is also the following one, used with DELETE to prune away DynamoDB test tables in the current environment:

/v1/dynamo_tables/test_tables

Structure

All attributes are read only.

name
(String) The name of the DynamoDB table. E.g. "prod_authentications".
table_arn
(String) The Amazon Resource Name (ARN) that uniquely identifies the table. E.g. "arn:aws:dynamodb:eu-west-1:939005974917:table/authentications_master".
attribute_definitions
(Array) The table's attributes. E.g.
[{:attribute_name=>"created_at", :attribute_type=>"N"}, {:attribute_name=>"expires_at", :attribute_type=>"N"}, {:attribute_name=>"token", :attribute_type=>"S"}, {:attribute_name=>"username", :attribute_type=>"S"}].
key_schema
(Array) The primary key structure for the table. E.g.
[{:attribute_name=>"username", :key_type=>"HASH"}, {:attribute_name=>"expires_at", :key_type=>"RANGE"}].
global_secondary_indexes
(Array) The global secondary indexes, if any, on the table. E.g.
[{:index_name=>"token_created_at_global", :key_schema=>[{:attribute_name=>"token", :key_type=>"HASH"}, {:attribute_name=>"created_at", :key_type=>"RANGE"}], :projection=>{:projection_type=>"ALL"}, :index_status=>"ACTIVE", :provisioned_throughput=>{:last_increase_date_time=>"2015-11-17T20:15:17Z", :last_decrease_date_time=>"2015-11-17T20:16:29Z", :number_of_decreases_today=>0, :read_capacity_units=>20, :write_capacity_units=>10}, :index_size_bytes=>1858, :item_count=>12, :index_arn=>"arn:aws:dynamodb:eu-west-1:939005974917:table/authentications_master/index/token_created_at_global"}].
local_secondary_indexes
(Array) Represents one or more local secondary indexes on the table. E.g. null.
provisioned_throughput
(Object) The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases. E.g.
{:last_increase_date_time=>"2015-11-17T20:15:17Z", :last_decrease_date_time=>"2015-11-17T20:16:29Z", :number_of_decreases_today=>0, :read_capacity_units=>20, :write_capacity_units=>10}.
table_status
(String) The current state of the table. E.g. "ACTIVE".
item_count
(Integer) The number of items in the specified table. Updated every 6 hours.
table_size_bytes
(Integer) The total size of the specified table, in bytes. Updated every 6 hours.
stream_specification
(Object) The current DynamoDB Streams configuration for the table.
latest_stream_arn
(String) The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.
latest_stream_label
(String) A timestamp, in ISO 8601 format, for this stream.
created_at
(String) A datetime string in GMT. E.g. "2014-08-09T11:11:32Z".

Hyperlinks

The following hyperlink names are used in the following subsections. To retrieve the URL and Content-Type to use, use the _links hash. Note that the URI may change, and thus you should make no inference on how to construct similar URIs from any previous URI. For more information, refer to Hyperlink URIs are Opaque. You may store hyperlink URIs in permanent storage for later use.

The hyperlinks for a DynamoTable resource are:

self
as always, the self hyperlink can be used to perform CRUD actions on the DynamoTable resource.


GET self

Retrieves a DynamoTable resource.

200
The operation was successful.

DELETE self

Deletes a DynamoTable resource.

204
The delete operation was successful.

GET /v1/dynamo_tables

Returns the collection of DynamoTables.

200
The operation was successful. The collection is returned as a JSON array in the response body.

DELETE /v1/dynamo_tables/test_tables

Deletes DynamoDB tables created for test purposes.

204
The operation was successful. No body was returned.