airflow.contrib.hooks.aws_sqs_hook

This module contains AWS SQS hook

Module Contents

class airflow.contrib.hooks.aws_sqs_hook.SQSHook[source]

Bases: airflow.contrib.hooks.aws_hook.AwsHook

Get the SQS client using boto3 library

Returns

SQS client

Return type

botocore.client.SQS

get_conn(self)[source]
create_queue(self, queue_name, attributes=None)[source]

Create queue using connection object

Parameters
  • queue_name (str) – name of the queue.

  • attributes (dict) – additional attributes for the queue (default: None) For details of the attributes parameter see botocore.client.SQS.create_queue()

Returns

dict with the information about the queue For details of the returned value see botocore.client.SQS.create_queue()

Return type

dict

send_message(self, queue_url, message_body, delay_seconds=0, message_attributes=None)[source]

Send message to the queue

Parameters
  • queue_url (str) – queue url

  • message_body (str) – the contents of the message

  • delay_seconds (int) – seconds to delay the message

  • message_attributes (dict) – additional attributes for the message (default: None) For details of the attributes parameter see botocore.client.SQS.send_message()

Returns

dict with the information about the message sent For details of the returned value see botocore.client.SQS.send_message()

Return type

dict

Was this entry helpful?