Amazon::SQS::Simple(3pm) | User Contributed Perl Documentation | Amazon::SQS::Simple(3pm) |
Amazon::SQS::Simple - OO API for accessing the Amazon Simple Queue Service
use Amazon::SQS::Simple; my $access_key = 'foo'; # Your AWS Access Key ID my $secret_key = 'bar'; # Your AWS Secret Key # Create an SQS object my $sqs = new Amazon::SQS::Simple(AWSAccessKeyId => $access_key, SecretKey => $secret_key); # Create a new queue my $q = $sqs->CreateQueue('queue_name'); # Send a message my $response = $q->SendMessage('Hello world!'); # Send multiple messages my @responses = $q->SendMessageBatch(['Hello world', 'Farewell cruel world']); # Retrieve a message my $msg = $q->ReceiveMessage(); print $msg->MessageBody() # Hello world! # Delete the message $q->DeleteMessage($msg->ReceiptHandle()); # or $q->DeleteMessage($msg); # Delete the queue $q->Delete(); # Purge the queue $q->Purge();
Amazon::SQS::Simple is an OO API for the Amazon Simple Queue Service.
This version of Amazon::SQS::Simple defaults to work against version 2009-02-01 of the SQS API.
Earlier API versions may or may not work.
$access_key is your Amazon Web Services access key. $secret_key is your Amazon Web Services secret key. If you don't have either of these credentials, visit <http://aws.amazon.com/>.
Options for new:
my $sqs = new Amazon::SQS::Simple($access_key, $secret_key, Version => '2008-01-01');
Options for CreateQueue:
Options for ListQueues:
No functions are exported by default; if you want to use them, export them in your use line:
use Amazon::SQS::Simple qw( timestamp );
The following options can be supplied with any of the listed methods.
You generally do not need to supply this option.
You generally do not need to supply this option.
Bill Alford wrote the code to support basic functionality of older API versions in release 0.9. James Neal provided the proxy support code in release 2.0 Roland Walker provided support for the newer signature version in release 2.0 Chris Jones provied the batch message code in release 2.0 Rusty Conover provided the V4 signature support in release 2.05
Copyright 2007-2008 Simon Whitaker <swhitaker@cpan.org> Copyright 2013-2017 Mike (no relation) Whitaker <penfold@cpan.org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2021-01-09 | perl v5.32.0 |