WebService::Amazon::DynamoDB::20120810 - interact with DynamoDB using API version 20120810
version 0.005
Instantiates the API object.
Expects the following named parameters:
implementation - the object which provides a Future-returning request method, see WebService::Amazon::DynamoDB::NaHTTP for example.
request
uri - the base URI for constructing requests
security - 'iam' or 'key'
access_key - the access key for signing requests (only for security=key)
secret_key - the secret key for signing requests (only for security=key)
role - the role to use for requests (only for security=iam, usually autodetected from EC2 instance metadata)
algorithm - which signing algorithm to use, default AWS4-HMAC-SHA256
Creates a new table. It may take some time before the table is marked as active - use "wait_for_table" to poll until the status changes.
Named parameters:
table - the table name
read_capacity - expected read capacity units (optional, default 5)
write_capacity - expected write capacity units (optional, default 5)
fields - an arrayref specifying the fields, in pairs of (name, type), where type is N for numeric, S for string, SS for string sequence, B for binary etc.
primary - the primary keys as an arrayref of pairs indicating (name, type), default type is hash so ['pkey'] would create a single HASH primary key
Describes the given table.
Takes a single named parameter:
and returns the table spec.
Delete a table entirely.
Waits for the given table to be marked as active.
Run code for all current tables.
Takes a coderef as the first parameter, will call this for each table found.
Returns a Future which will resolve with a list of all tables.
Takes no parameters.
$ddb->list_tables->on_done(sub { my @tbl = @_; print "Table: $_\n" for @tbl; });
Writes a single item to the table.
Takes the following named parameters:
fields - the field spec, as a { key => value } hashref
Updates a single item in the table.
item - the item to update, as a{ key => value } hashref
Deletes a single item from the table.
item - the item to delete, as a { key => value } hashref
Retrieve a batch of items from one or more tables.
Takes a coderef which will be called for each found item, followed by these named parameters:
items - the search spec, as { table => { attribute => 'value', ... }, ... }
Scan a table for values with an optional filter expression.
The following methods are intended for internal use and are documented purely for completeness - for normal operations see "METHODS" instead.
Returns an appropriate type (N, S, SS etc.) for the given value.
Rules are similar to JSON - if you want numeric, numify (0+$value), otherwise you'll get a string.
Returns a pair of (type, value), using "type_for_value".
cached_iam_credentials, credentials, find_iam_role, iam, make_request, retrieve_iam_credentials, security, uri
Tom Molesworth <cpan@perlsite.co.uk>
Copyright Tom Molesworth 2013-2015. Licensed under the same terms as Perl itself.
To install WebService::Amazon::DynamoDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Amazon::DynamoDB
CPAN shell
perl -MCPAN -e shell install WebService::Amazon::DynamoDB
For more information on module installation, please visit the detailed CPAN module installation guide.