blob: aa3c1ba9e79ef1cb9b7468f9e78104ace2813b60 [file] [log] [blame]
:py:mod:`airflow.providers.microsoft.azure.operators.asb`
=========================================================
.. py:module:: airflow.providers.microsoft.azure.operators.asb
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.providers.microsoft.azure.operators.asb.AzureServiceBusCreateQueueOperator
airflow.providers.microsoft.azure.operators.asb.AzureServiceBusSendMessageOperator
airflow.providers.microsoft.azure.operators.asb.AzureServiceBusReceiveMessageOperator
airflow.providers.microsoft.azure.operators.asb.AzureServiceBusDeleteQueueOperator
airflow.providers.microsoft.azure.operators.asb.AzureServiceBusSubscriptionCreateOperator
airflow.providers.microsoft.azure.operators.asb.AzureServiceBusUpdateSubscriptionOperator
airflow.providers.microsoft.azure.operators.asb.ASBReceiveSubscriptionMessageOperator
airflow.providers.microsoft.azure.operators.asb.AzureServiceBusSubscriptionDeleteOperator
.. py:class:: AzureServiceBusCreateQueueOperator(*, queue_name, max_delivery_count = 10, dead_lettering_on_message_expiration = True, enable_batched_operations = True, azure_service_bus_conn_id = 'azure_service_bus_default', **kwargs)
Bases: :py:obj:`airflow.models.BaseOperator`
Creates a Azure Service Bus queue under a Service Bus Namespace by using ServiceBusAdministrationClient
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:AzureServiceBusCreateQueueOperator`
:param queue_name: The name of the queue. should be unique.
:param max_delivery_count: The maximum delivery count. A message is automatically
dead lettered after this number of deliveries. Default value is 10..
:param dead_lettering_on_message_expiration: A value that indicates whether this subscription has
dead letter support when a message expires.
:param enable_batched_operations: Value that indicates whether server-side batched
operations are enabled.
:param azure_service_bus_conn_id: Reference to the
:ref:`Azure Service Bus connection<howto/connection:azure_service_bus>`.
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['queue_name']
.. py:attribute:: ui_color
:annotation: = #e4f0e8
.. py:method:: execute(context)
Creates Queue in Azure Service Bus namespace, by connecting to Service Bus Admin client in hook
.. py:class:: AzureServiceBusSendMessageOperator(*, queue_name, message, batch = False, azure_service_bus_conn_id = 'azure_service_bus_default', **kwargs)
Bases: :py:obj:`airflow.models.BaseOperator`
Send Message or batch message to the Service Bus queue
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:AzureServiceBusSendMessageOperator`
:param queue_name: The name of the queue. should be unique.
:param message: Message which needs to be sent to the queue. It can be string or list of string.
:param batch: Its boolean flag by default it is set to False, if the message needs to be sent
as batch message it can be set to True.
:param azure_service_bus_conn_id: Reference to the
:ref: `Azure Service Bus connection<howto/connection:azure_service_bus>`.
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['queue_name']
.. py:attribute:: ui_color
:annotation: = #e4f0e8
.. py:method:: execute(context)
Sends Message to the specific queue in Service Bus namespace, by
connecting to Service Bus client
.. py:class:: AzureServiceBusReceiveMessageOperator(*, queue_name, azure_service_bus_conn_id = 'azure_service_bus_default', max_message_count = 10, max_wait_time = 5, **kwargs)
Bases: :py:obj:`airflow.models.BaseOperator`
Receive a batch of messages at once in a specified Queue name
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:AzureServiceBusReceiveMessageOperator`
:param queue_name: The name of the queue name or a QueueProperties with name.
:param max_message_count: Maximum number of messages in the batch.
:param max_wait_time: Maximum time to wait in seconds for the first message to arrive.
:param azure_service_bus_conn_id: Reference to the
:ref: `Azure Service Bus connection <howto/connection:azure_service_bus>`.
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['queue_name']
.. py:attribute:: ui_color
:annotation: = #e4f0e8
.. py:method:: execute(context)
Receive Message in specific queue in Service Bus namespace,
by connecting to Service Bus client
.. py:class:: AzureServiceBusDeleteQueueOperator(*, queue_name, azure_service_bus_conn_id = 'azure_service_bus_default', **kwargs)
Bases: :py:obj:`airflow.models.BaseOperator`
Deletes the Queue in the Azure Service Bus namespace
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:AzureServiceBusDeleteQueueOperator`
:param queue_name: The name of the queue in Service Bus namespace.
:param azure_service_bus_conn_id: Reference to the
:ref: `Azure Service Bus connection <howto/connection:azure_service_bus>`.
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['queue_name']
.. py:attribute:: ui_color
:annotation: = #e4f0e8
.. py:method:: execute(context)
Delete Queue in Service Bus namespace, by connecting to Service Bus Admin client
.. py:class:: AzureServiceBusSubscriptionCreateOperator(*, topic_name, subscription_name, azure_service_bus_conn_id = 'azure_service_bus_default', lock_duration = None, requires_session = None, default_message_time_to_live = None, dead_lettering_on_message_expiration = True, dead_lettering_on_filter_evaluation_exceptions = None, max_delivery_count = 10, enable_batched_operations = True, forward_to = None, user_metadata = None, forward_dead_lettered_messages_to = None, auto_delete_on_idle = None, **kwargs)
Bases: :py:obj:`airflow.models.BaseOperator`
Create an Azure Service Bus Topic Subscription under a Service Bus Namespace
by using ServiceBusAdministrationClient
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:AzureServiceBusSubscriptionCreateOperator`
:param topic_name: The topic that will own the to-be-created subscription.
:param subscription_name: Name of the subscription that need to be created
:param lock_duration: ISO 8601 time span duration of a peek-lock; that is, the amount of time that
the message is locked for other receivers. The maximum value for LockDuration is 5 minutes; the
default value is 1 minute. Input value of either type ~datetime.timedelta or string in ISO 8601
duration format like "PT300S" is accepted.
:param requires_session: A value that indicates whether the queue supports the concept of sessions.
:param default_message_time_to_live: ISO 8601 default message time span to live value. This is the
duration after which the message expires, starting from when the message is sent to
Service Bus. This is the default value used when TimeToLive is not set on a message itself.
Input value of either type ~datetime.timedelta or string in ISO 8601 duration
format like "PT300S" is accepted.
:param dead_lettering_on_message_expiration: A value that indicates whether this subscription has
dead letter support when a message expires.
:param dead_lettering_on_filter_evaluation_exceptions: A value that indicates whether this
subscription has dead letter support when a message expires.
:param max_delivery_count: The maximum delivery count. A message is automatically dead lettered
after this number of deliveries. Default value is 10.
:param enable_batched_operations: Value that indicates whether server-side batched
operations are enabled.
:param forward_to: The name of the recipient entity to which all the messages sent to the
subscription are forwarded to.
:param user_metadata: Metadata associated with the subscription. Maximum number of characters is 1024.
:param forward_dead_lettered_messages_to: The name of the recipient entity to which all the
messages sent to the subscription are forwarded to.
:param auto_delete_on_idle: ISO 8601 time Span idle interval after which the subscription is
automatically deleted. The minimum duration is 5 minutes. Input value of either
type ~datetime.timedelta or string in ISO 8601 duration format like "PT300S" is accepted.
:param azure_service_bus_conn_id: Reference to the
:ref:`Azure Service Bus connection<howto/connection:azure_service_bus>`.
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['topic_name', 'subscription_name']
.. py:attribute:: ui_color
:annotation: = #e4f0e8
.. py:method:: execute(context)
Creates Subscription in Service Bus namespace, by connecting to Service Bus Admin client
.. py:class:: AzureServiceBusUpdateSubscriptionOperator(*, topic_name, subscription_name, max_delivery_count = None, dead_lettering_on_message_expiration = None, enable_batched_operations = None, azure_service_bus_conn_id = 'azure_service_bus_default', **kwargs)
Bases: :py:obj:`airflow.models.BaseOperator`
Update an Azure ServiceBus Topic Subscription under a ServiceBus Namespace
by using ServiceBusAdministrationClient
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:AzureServiceBusUpdateSubscriptionOperator`
:param topic_name: The topic that will own the to-be-created subscription.
:param subscription_name: Name of the subscription that need to be created.
:param max_delivery_count: The maximum delivery count. A message is automatically dead lettered
after this number of deliveries. Default value is 10.
:param dead_lettering_on_message_expiration: A value that indicates whether this subscription
has dead letter support when a message expires.
:param enable_batched_operations: Value that indicates whether server-side batched
operations are enabled.
:param azure_service_bus_conn_id: Reference to the
:ref:`Azure Service Bus connection<howto/connection:azure_service_bus>`.
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['topic_name', 'subscription_name']
.. py:attribute:: ui_color
:annotation: = #e4f0e8
.. py:method:: execute(context)
Updates Subscription properties, by connecting to Service Bus Admin client
.. py:class:: ASBReceiveSubscriptionMessageOperator(*, topic_name, subscription_name, max_message_count = 1, max_wait_time = 5, azure_service_bus_conn_id = 'azure_service_bus_default', **kwargs)
Bases: :py:obj:`airflow.models.BaseOperator`
Receive a Batch messages from a Service Bus Subscription under specific Topic.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:ASBReceiveSubscriptionMessageOperator`
:param subscription_name: The subscription name that will own the rule in topic
:param topic_name: The topic that will own the subscription rule.
:param max_message_count: Maximum number of messages in the batch.
Actual number returned will depend on prefetch_count and incoming stream rate.
Setting to None will fully depend on the prefetch config. The default value is 1.
:param max_wait_time: Maximum time to wait in seconds for the first message to arrive. If no
messages arrive, and no timeout is specified, this call will not return until the
connection is closed. If specified, an no messages arrive within the timeout period,
an empty list will be returned.
:param azure_service_bus_conn_id: Reference to the
:ref:`Azure Service Bus connection <howto/connection:azure_service_bus>`.
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['topic_name', 'subscription_name']
.. py:attribute:: ui_color
:annotation: = #e4f0e8
.. py:method:: execute(context)
Receive Message in specific queue in Service Bus namespace,
by connecting to Service Bus client
.. py:class:: AzureServiceBusSubscriptionDeleteOperator(*, topic_name, subscription_name, azure_service_bus_conn_id = 'azure_service_bus_default', **kwargs)
Bases: :py:obj:`airflow.models.BaseOperator`
Deletes the topic subscription in the Azure ServiceBus namespace
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:AzureServiceBusSubscriptionDeleteOperator`
:param topic_name: The topic that will own the to-be-created subscription.
:param subscription_name: Name of the subscription that need to be created
:param azure_service_bus_conn_id: Reference to the
:ref:`Azure Service Bus connection <howto/connection:azure_service_bus>`.
.. py:attribute:: template_fields
:annotation: :Sequence[str] = ['topic_name', 'subscription_name']
.. py:attribute:: ui_color
:annotation: = #e4f0e8
.. py:method:: execute(context)
Delete topic subscription in Service Bus namespace, by connecting to Service Bus Admin client