Skip to content

botcity.plugins.aws.sqs.plugin.BotAWSSQSPlugin

sqs_client property readonly

Returns the aws client instance.

Returns:

Type Description
sqs_instance

The aws client instance.

__init__(self, region_name='us-east-1', use_credentials_file=True, access_key_id=None, secret_access_key=None, queue_name=None, queue_url=None, **kwargs) special

BotAWSSQSPlugin

Parameters:

Name Type Description Default
region_name str

Default region when creating new connections.

'us-east-1'
use_credentials_file bool

If set to True will make authentication via AWS credentials file.

True
access_key_id str

AWS access key ID.

None
secret_access_key str

AWS secret access key.

None

create_queue(self, queue_name, **kwargs)

Creates a new standard or FIFO queue.

Parameters:

Name Type Description Default
queue_name str

The name of the new queue.

required

Returns:

Type Description
dict

Returns the QueueUrl attribute of the created queue.

delete_message(self, receipt_handle, queue_url=None, **kwargs)

Deletes the specified message from the specified queue.

Parameters:

Name Type Description Default
receipt_handle str

The receipt handle associated with the message to delete.

required
queue_url str

The URL of the Amazon SQS queue from which messages are deleted.

None

delete_queue(self, queue_url=None, **kwargs)

Deletes the queue specified by the QueueUrl , regardless of the queue's contents.

Parameters:

Name Type Description Default
queue_url str

The URL of the Amazon SQS queue to delete.

None

get_queue_url(self, queue_name=None, **kwargs)

Returns the URL of an existing Amazon SQS queue.

Parameters:

Name Type Description Default
queue_name str

The name of the queue whose URL must be fetched. Maximum 80 characters. Valid values: alphanumeric characters, hyphens (-), and underscores (_).

None

Returns:

Type Description
str

The URL of the given queue.

list_queues(self, **kwargs)

Returns a list of your queues in the current region.

Returns:

Type Description
list

A list of queues.

receive_message(self, queue_url=None, **kwargs)

Retrieves one or more messages (up to 10), from the specified queue.

Parameters:

Name Type Description Default
queue_url str

The URL of the Amazon SQS queue from which messages are received.

None

Returns:

Type Description
messages

A list of messages.

send_message(self, message_body, queue_url=None, **kwargs)

Delivers a message to the specified queue.

Parameters:

Name Type Description Default
queue_url str

The URL of the Amazon SQS queue to which a message is sent.

None
message_body str or dict

The message to send. The minimum size is one character. The maximum size is 256 KB.

required

Returns:

Type Description
dict

The response from the boto3.send_sessage service method, as returned by SQS.