AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Module: Aws::SQS

Defined in:
aws-sdk-resources/lib/aws-sdk-resources/services/sqs.rb,
aws-sdk-resources/lib/aws-sdk-resources/services/sqs/queue_poller.rb

Overview

This module provides a client for making API requests to Amazon Simple Queue Service.

Aws::SQS::Client

The Client class provides one-to-one mapping for each API operation.

sqs = Aws::SQS::Client.new(region: 'us-east-1')
sqs.operation_names
#=> [:add_permission, :change_message_visibility, :change_message_visibility_batch, :create_queue, ...]

Each API operation method accepts a hash of request parameters and returns a response object.

resp = sqs.add_permission(params)

See Client for more information.

Aws::SQS::Errors

Errors returned from Amazon Simple Queue Service are defined in the Errors module and extend Errors::ServiceError.

begin
  # do stuff
rescue Aws::SQS::Errors::ServiceError
  # rescues all errors returned by Amazon Simple Queue Service
end

See Errors for more information.

Defined Under Namespace

Modules: Errors, Types Classes: Client, Message, Queue, QueuePoller, Resource