Amazon-SQS-Client

 view release on metacpan or  search on metacpan

lib/Amazon/SQS/Client.pm  view on Meta::CPAN


  my $actionNameaddPermissionRequestList = $request->getActionName();

  for my $actionNameaddPermissionRequestIndex ( 0 .. $#{$actionNameaddPermissionRequestList} ) {
    my $actionNameaddPermissionRequest
      = $actionNameaddPermissionRequestList->[$actionNameaddPermissionRequestIndex];
    $parameters->{ 'ActionName.' . ( $actionNameaddPermissionRequestIndex + 1 ) }
      = $actionNameaddPermissionRequest;
  }

  return $parameters;
}

#
# Convert RemovePermissionRequest to name value pairs
#
sub _convertRemovePermission() {
  my ( $self, $request ) = @_;

  my $parameters = {};
  $parameters->{Action} = 'RemovePermission';
  if ( $request->isSetQueueUrl() ) {
    $parameters->{QueueUrl} = $request->getQueueUrl();
  }
  if ( $request->isSetLabel() ) {
    $parameters->{Label} = $request->getLabel();
  }

  return $parameters;
}

1;

## no critic (RequirePodSections)

__END__

=pod

=head1 NAME

Amazon::SQS::Client - client interface to Amazon Simple Queue Service

=head1 SYNOPSIS

 # create an HTTP client
 my $client = Amazon::SQS::Client->new( $AWS_ACCESS_KEY_ID, $AWS_SECRET_ACCESS_KEY );

 # send a message
 my $response = $client->sendMessage(
   { QueueUrl    => $AWS_QUEUE_URL,
     MessageBody => $message
   }
 );

=head1 DESCRIPTION

L<Amazon::SQS::Client> is the implementation of a service API to
AmazonE<039>s Simple Queue Service.

I<NOTE: The classes that implement the SQS Perl framework were
originally provided by AWS back in the day when Perl was an important
part of the AWS development stack. Fast forward to 2024 and Perl is no
longer a supported language in the AWS SDK ecosystem. These modules
"work" and provide a fairly simple toolset for working with SQS. There
are more popular and perhaps more supported packages available for
interacting with SQS. See L</SEE ALSO> for recommended alternatives.
You may however find this implementation lighter in weight than other
implementations.>

=head1 DETAILS

Amazon Simple Queue Service (Amazon SQS) offers a reliable, highly
scalable hosted queue for storing messages as they travel between
computers.

By using Amazon SQS, developers can simply move data between
distributed application components performing different tasks, without
losing messages or requiring each component to be always available.
Amazon SQS works by exposing Amazon's web-scale messaging
infrastructure as a web service. Any computer on the Internet can add
or read messages without any installed software or special firewall
configurations. Components of applications using Amazon SQS can run
independently, and do not need to be on the same network, developed
with the same technologies, or running at the same time.

=head1 METHODS AND SUBROUTINES

=head2 new 

 new( aws-access-key-id, aws-secret-access-key, [token], [options] )

=over 5

=item aws-access-key-id

The AWS I<access key> your were given when you signed up for AWS services.

You can create a new account by visiting L</http://aws.amazon.com/>.

=item aws-secret-access-key

The AWS I<secret access key> you were given when you signed up for AWS services.

=item token

Pass the session token as the third argument on as SecurityToken in
the options hash described below.

=item options

C<options> is an optional hash reference containing the options listed
below.

=over 5

=item * ServiceURL

default: C<https://queue.amazonaws.com>

Set the ServiceUrl when you want to use a mocking service like



( run in 0.645 second using v1.01-cache-2.11-cpan-e1769b4cff6 )