The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Amazon::SimpleBD::Item - A class representing a domain in SimpleDB

DESCRIPTION

This is code is in the early stages of development. Do not consider it stable. Feedback and patches welcome.

METHODS

Amazon::SimpleDB::Item->new($args)

Constructor for a domain. Takes a required HASHREF with three required keys:

account

An Amazon::SimpleDB account object the item is to be associated.

domain

The domain the object is to be associated.

name

The name of the item for the constructed object.

Typically this method will not be called directly by a developer, but rather other parts of the Amazon::SimpleDB package.

This method does not check if an item exists and is accessible.

$item->account

Returns a reference to the Amazon::SimpleDB account object.

$item->domain

$item->name

Returns the domain name of the object.

$item->get_attributes([$name])

NOTE: Suspect this is broken and that this should support something between 1 or all.

$item->put_attributes($args)

Take a required HASHREF of attributes to create. Multiple values should be stored as an ARRAY reference.

This method will return an error response if any of attributes already exist.

$item->post_attributes($args)

Take a required HASHREF of attributes to modify. Multiple values should be stored as an ARRAY reference.

Unlike put_attributes this method will overwrite any existing attributes and their values without complaint. If an attribute doesn't exist this method won't complain either.

$item->delete_attributes([\%attributes|\@attributes])

Takes an optional HASHREF or ARRAYREF that define the attributes to delete. If nothing is passed, the default is to delete all attributes for the item are deleted. (Items are automatically deleted when they no longer have any attributes.)

Using an HASHREF will only delete attributes (defined by the HASH's keys) with a matching value. Multiple values should be stored as an ARRAYREF.

SEE ALSO

Amazon::SimpleDB, Amazon::SimpleDB::QueryResponse

AUTHOR & COPYRIGHT

Please see the Amazon::SimpleDB manpage for author, copyright, and license information.