NAME

Net::Amazon::SQS::Lite - Amazon SQS client

SYNOPSIS

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};

DESCRIPTION

Net::Amazon::SQS::Lite is simple Amazon SQS simple client.

THIS IS A DEVELOPMENT RELEASE. API MAY CHANGE WITHOUT NOTICE.

METHODS

add_permission

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"
});

change_message_visibility

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
});

change_message_visibility_bacth

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_queue

Create a new queue, or returns the URL of an existing one.

$sqs->create_queue({
    QueueName => "test_queue"
});

delete_message

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
});

delete_message_batch

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},
});

delete_queue

Deletes the queue specified by the queue URL.

$sqs->delete_queue({
    QueueUrl => "http://localhost:9324/queue/test_queue"
});

get_queue_attributes

Gets attributes for the specified queue.

$sqs->get_queue_attributes({
    QueueUrl => "http://localhost:9324/queue/test_queue",
    "AttributeName.1" => "VisibilityTimeout",
});

get_queue_url

Returns the URL of an existing queue.

$sqs->get_queue_url({
    QueueName => "test_queue",
});

list_dead_letter_source_queues

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",
});

list_queues

Returns a list of you queues.

$sqs->list_queues;

purge_queue

Deletes the messages in a queue specified by the queue URL.

$sqs->purge_queue({
    QueueUrl => "http://localhost:9324/queue/test_queue",
});

receive_message

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",
});

remove_permission

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",
});

send_message

Delivers a message to the specified queue.

$sqs->send_message({
    QueueUrl => "http://localhost:9324/queue/test_queue",
    MessageBody => "Hello!"
});

send_message_batch

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",
});

set_queue_attributes

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,
});

LICENSE

Copyright (C) Kazuhiro Shibuya.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Kazuhiro Shibuya <stevenlabs@gmail.com>