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

AWS::SQS::Simple - This module is used to access amazon simple queue services.

VERSION

Version 0.01

SYNOPSIS

This module is used to access amazon simple queue services.

#sqs.us-east-1.amazonaws.com

Example :

    use AWS::SQS::Simple ;

    my $ob = AWS::SQS::Simple->new(
                ACCESS_KEY        => '..'  , 
                SECRET_ACCESS_KEY => '..'  , 

                AWS_ACCOUNT_ID    => '..'  , 

                END_POINT         => '..'  , 

              );

	$ob->create_queue( \%params_hash    ) ;
	$ob->send_message( \%params_hash    ) ;
	$ob->receive_message( \%params_hash ) ;

FUNCTIONS

new

Usage:                                                                                      

  my $ob = AWS::SQS::Simple->new(
              ACCESS_KEY        => '..'  , 
              SECRET_ACCESS_KEY => '..'  , 

              AWS_ACCOUNT_ID    => '..'  , 

              END_POINT         => '..'  , 

            );

create_queue

This function creates a new queue.

Usage :

my %params_hash = (

     QUEUE_NAME              => QUEUE Name        ,

     'AttributeName.1.Name'  => Attribute Name    , 
     'AttributeName.1.Value' => Attribute Value   , [ Required if there is a corresponding Name Attribute.n.name parameter ]

     'AttributeName.2.Name'  => Attribute Name    , 
     'AttributeName.2.Value' => Attribute Value   , [ Required if there is a corresponding Name Attribute.n.name parameter ]

   .....

    );

$ob->create_queue->( \%params_hash )

send_message

This function sends a message to the queue.

Usage :

my %params_hash = (

     QUEUE_NAME              => QUEUE Name        ,

     'MessageBody'           => Message to send   , 
     'DelaySeconds'          => The number of seconds to delay a specific message , [ OPTIONAL ]

    );

$ob->send_message->( \%params_hash )

receive_message

This function returns mesaages already in the queue specified.

Usage :

my %params_hash = (

     QUEUE_NAME            => QUEUE Name        ,

   'AttributeName.n'       => The attribute you want to get. Valid values: All | SenderId | SentTimestamp | ApproximateReceiveCount | ApproximateFirstReceiveTimestamp   ,  [ OPTIONAL ]
     'MaxNumberOfMessages' => Maximum number of messages to return. Default - 1 , [ OPTIONAL ]
     'VisibilityTimeout'   => The duration in seconds that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request. Default - The visibility timeout for the queue , [ OPTIONAL ]
     'WaitTimeSeconds'     => Long poll support (integer from 1 to 20 , [ OPTIONAL ]

    );

$ob->receive_message->( \%params_hash )

delete_message

This function deletes a message from the queue.

Usage :

my %params_hash = (

     QUEUE_NAME            => QUEUE Name        ,

    'ReceiptHandle'       => The receipt handle associated with the message you want to delete ,
    );

$ob->delete_message->( \%params_hash )

get_queue_attributes

This function returns queue attributes.

Usage :

my %params_hash = (

     QUEUE_NAME            => QUEUE Name                    ,

    'AttributeName.n'      => The attribute you want to get ,
    );

$ob->get_queue_attributes->( \%params_hash )

_get_url

This function creates and returns url as per the parameters passed.

_generate_signatue

This function generate signature using HMACSHA256 method and version 2.

_get_signed_query

This function utf8 encodes and uri escapes the parameters passed to generate the signed string.

escape

URI escape only the characters that should be escaped, according to RFC 3986

_generate_timestamp

Calculate current TimeStamp 

_make_request

AUTHOR

Ankita, <sankita.11 at gmail.com>

COPYRIGHT & LICENSE

Copyright 2014 Ankita Singhal, all rights reserved.

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