Net::Amazon::SQS::Lite - Amazon SQS client
use Net::Amazon::SQS::Lite;
my $sqs = Net::Amazon::SQS::Lite->new(
access_key => "XXXXX",
secret_key => "YYYYY",
region => "ap-northeast-1",
);
my %queue = $sqs->list_queues->{ListQueueResult};
Net::Amazon::SQS::Lite is simple Amazon SQS simple client.
THIS IS A DEVELOPMENT RELEASE. API MAY CHANGE WITHOUT NOTICE.
Adds a permission to a queue for a specific principal.
$sqs->add_permission({
"AWSAccountId.1" => "12345678",
"ActionName.1" => "SendMessage",
QueueUrl => "http://localhost:9324/queue/test_queue",
Label => "testLabel"
});
- SEE http://docs.aws.amazon.com/ja_jp/AWSSimpleQueueService/latest/APIReference/API_AddPermission.html
Changes the visibility timeout of a specified message in a queue to a new value.
$sqs->change_message_visibility({
QueueUrl => "http://localhost:9324/queue/test_queue",
ReceiptHandle => $res->{ReceiveMessageResult}->{Message}->{ReceiptHandle},
VisibilityTimeout => 60
});
Changes the visibility timeout of multiple messages.
$sqs->change_message_visibility_batch({
"ChangeMessageVisibilityBatchRequestEntry.1.Id" => "change_visibility_msg_2",
"ChangeMessageVisibilityBatchRequestEntry.1.ReceiptHandle" => "gfk0T0R0waama4fVFffkjKzmhMCymjQvfTFk2LxT33G4ms5subrE0deLKWSscPU1oD3J9zgeS4PQQ3U30qOumIE6AdAv3w%2F%2Fa1IXW6AqaWhGsEPaLm3Vf6IiWqdM8u5imB%2BNTwj3tQRzOWdTOePjOjPcTpRxBtXix%2BEvwJOZUma9wabv%2BSw6ZHjwmNcVDx8dZXJhVp16Bksiox%2FGrUvrVTCJRTWTLc59oHLLF8sEkKzRmGNzTDGTiV%2BYjHfQj60FD3rVaXmzTsoNxRhKJ72uIHVMGVQiAGgBX6HGv9LDmYhPXw4hy%2FNgIg%3D%3D",
"ChangeMessageVisibilityBatchRequestEntry.1.VisibilityTimeout" => 45,
QueueUrl => "http://localhost:9324/queue/test_queue",
});
Create a new queue, or returns the URL of an existing one.
$sqs->create_queue({
QueueName => "test_queue"
});
Deletes the specified message from the specified queue.
$sqs->delete_message({
QueueUrl => "http://localhost:9324/queue/test_queue",
ReceiptHandle => $res->{ReceiveMessageResult}->{Message}->{ReceiptHandle},
VisibilityTimeout => 60
});
- SEE http://docs.aws.amazon.com/ja_jp/AWSSimpleQueueService/latest/APIReference/API_DeleteMessage.html
Deletes up to ten messages from the specified queue.
$sqs->delete_message_batch({
QueueUrl => "http://localhost:9324/queue/test_queue",
"DeleteMessageBatchRequestEntry.1.Id" => "msg1",
"DeleteMessageBatchRequestEntry.1.ReceiptHandle" => $res->{ReceiveMessageResult}->{Message}->{ReceiptHandle},
});
Deletes the queue specified by the queue URL.
$sqs->delete_queue({
QueueUrl => "http://localhost:9324/queue/test_queue"
});
Gets attributes for the specified queue.
$sqs->get_queue_attributes({
QueueUrl => "http://localhost:9324/queue/test_queue",
"AttributeName.1" => "VisibilityTimeout",
});
Returns the URL of an existing queue.
$sqs->get_queue_url({
QueueName => "test_queue",
});
Returns a list of your queues that have the Redrive Policy queue attribute configured with a dead letter queue.
$sqs->list_dead_letter_source_queues({
QueueUrl => "http://localhost:9324/queue/test_queue",
});
Returns a list of you queues.
$sqs->list_queues;
Deletes the messages in a queue specified by the queue URL.
$sqs->purge_queue({
QueueUrl => "http://localhost:9324/queue/test_queue",
});
Retrieves one or more messages, with a maximum limit of 10 messages, from the specified queue.
$sqs->receive_message({
QueueUrl => "http://localhost:9324/queue/test_queue",
});
- SEE http://docs.aws.amazon.com/ja_jp/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessage.html
Revokes any permissions in the queue policy that matches the specified Lable parameter.
$sqs->remove_permission({
Label => "testLabel"
QueueUrl => "http://localhost:9324/queue/test_queue",
});
- SEE http://docs.aws.amazon.com/ja_jp/AWSSimpleQueueService/latest/APIReference/API_RemovePermission.html
Delivers a message to the specified queue.
$sqs->send_message({
QueueUrl => "http://localhost:9324/queue/test_queue",
MessageBody => "Hello!"
});
Delivers up to ten messages to the specified queue.
$sqs->send_message_batch({
"SendMessageBatchRequestEntry.1.Id" => "msg1",
"SendMessageBatchRequestEntry.1.MessageBody" => "Hello!",
QueueUrl => "http://localhost:9324/queue/test_queue",
});
- SEE http://docs.aws.amazon.com/ja_jp/AWSSimpleQueueService/latest/APIReference/API_SendMessageBatch.html
Sets the value of one or more queue attributes.
$sqs->set_queue_attributes({
QueueUrl => "http://localhost:9324/queue/test_queue",
"Attribute.Name" => "VisibilityTimeout",
"Attribute.Value" => 40,
});
Copyright (C) Kazuhiro Shibuya.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Kazuhiro Shibuya stevenlabs@gmail.com