| :py:mod:`airflow.providers.google.cloud.operators.tasks` |
| ======================================================== |
| |
| .. py:module:: airflow.providers.google.cloud.operators.tasks |
| |
| .. autoapi-nested-parse:: |
| |
| This module contains various Google Cloud Tasks operators |
| which allow you to perform basic operations using |
| Cloud Tasks queues/tasks. |
| |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.google.cloud.operators.tasks.CloudTasksQueueCreateOperator |
| airflow.providers.google.cloud.operators.tasks.CloudTasksQueueUpdateOperator |
| airflow.providers.google.cloud.operators.tasks.CloudTasksQueueGetOperator |
| airflow.providers.google.cloud.operators.tasks.CloudTasksQueuesListOperator |
| airflow.providers.google.cloud.operators.tasks.CloudTasksQueueDeleteOperator |
| airflow.providers.google.cloud.operators.tasks.CloudTasksQueuePurgeOperator |
| airflow.providers.google.cloud.operators.tasks.CloudTasksQueuePauseOperator |
| airflow.providers.google.cloud.operators.tasks.CloudTasksQueueResumeOperator |
| airflow.providers.google.cloud.operators.tasks.CloudTasksTaskCreateOperator |
| airflow.providers.google.cloud.operators.tasks.CloudTasksTaskGetOperator |
| airflow.providers.google.cloud.operators.tasks.CloudTasksTasksListOperator |
| airflow.providers.google.cloud.operators.tasks.CloudTasksTaskDeleteOperator |
| airflow.providers.google.cloud.operators.tasks.CloudTasksTaskRunOperator |
| |
| |
| |
| |
| Attributes |
| ~~~~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.google.cloud.operators.tasks.MetaData |
| |
| |
| .. py:data:: MetaData |
| |
| |
| |
| |
| .. py:class:: CloudTasksQueueCreateOperator(*, location, task_queue, project_id = None, queue_name = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Creates a queue in Cloud Tasks. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:CloudTasksQueueCreateOperator` |
| |
| :param location: The location name in which the queue will be created. |
| :param task_queue: The task queue to create. |
| Queue's name cannot be the same as an existing queue. |
| If a dict is provided, it must be of the same form as the protobuf message Queue. |
| :param project_id: (Optional) The ID of the Google Cloud project that owns the Cloud Tasks. |
| If set to None or missing, the default project_id from the Google Cloud connection is used. |
| :param queue_name: (Optional) The queue's name. |
| If provided, it will be used to construct the full queue path. |
| :param retry: (Optional) A retry object used to retry requests. |
| If None is specified, requests will not be retried. |
| :param timeout: (Optional) The amount of time, in seconds, to wait for the request |
| to complete. Note that if retry is specified, the timeout applies to each |
| individual attempt. |
| :param metadata: (Optional) Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| :rtype: google.cloud.tasks_v2.types.Queue |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['task_queue', 'project_id', 'location', 'queue_name', 'gcp_conn_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: CloudTasksQueueUpdateOperator(*, task_queue, project_id = None, location = None, queue_name = None, update_mask = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Updates a queue in Cloud Tasks. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:CloudTasksQueueUpdateOperator` |
| |
| :param task_queue: The task queue to update. |
| This method creates the queue if it does not exist and updates the queue if |
| it does exist. The queue's name must be specified. |
| :param project_id: (Optional) The ID of the Google Cloud project that owns the Cloud Tasks. |
| If set to None or missing, the default project_id from the Google Cloud connection is used. |
| :param location: (Optional) The location name in which the queue will be updated. |
| If provided, it will be used to construct the full queue path. |
| :param queue_name: (Optional) The queue's name. |
| If provided, it will be used to construct the full queue path. |
| :param update_mask: A mast used to specify which fields of the queue are being updated. |
| If empty, then all fields will be updated. |
| If a dict is provided, it must be of the same form as the protobuf message. |
| :param retry: (Optional) A retry object used to retry requests. |
| If None is specified, requests will not be retried. |
| :param timeout: (Optional) The amount of time, in seconds, to wait for the request |
| to complete. Note that if retry is specified, the timeout applies to each |
| individual attempt. |
| :param metadata: (Optional) Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| :rtype: google.cloud.tasks_v2.types.Queue |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['task_queue', 'project_id', 'location', 'queue_name', 'update_mask', 'gcp_conn_id',... |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: CloudTasksQueueGetOperator(*, location, queue_name, project_id = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Gets a queue from Cloud Tasks. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:CloudTasksQueueGetOperator` |
| |
| :param location: The location name in which the queue was created. |
| :param queue_name: The queue's name. |
| :param project_id: (Optional) The ID of the Google Cloud project that owns the Cloud Tasks. |
| If set to None or missing, the default project_id from the Google Cloud connection is used. |
| :param retry: (Optional) A retry object used to retry requests. |
| If None is specified, requests will not be retried. |
| :param timeout: (Optional) The amount of time, in seconds, to wait for the request |
| to complete. Note that if retry is specified, the timeout applies to each |
| individual attempt. |
| :param metadata: (Optional) Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| :rtype: google.cloud.tasks_v2.types.Queue |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'queue_name', 'project_id', 'gcp_conn_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: CloudTasksQueuesListOperator(*, location, project_id = None, results_filter = None, page_size = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Lists queues from Cloud Tasks. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:CloudTasksQueuesListOperator` |
| |
| :param location: The location name in which the queues were created. |
| :param project_id: (Optional) The ID of the Google Cloud project that owns the Cloud Tasks. |
| If set to None or missing, the default project_id from the Google Cloud connection is used. |
| :param results_filter: (Optional) Filter used to specify a subset of queues. |
| :param page_size: (Optional) The maximum number of resources contained in the |
| underlying API response. |
| :param retry: (Optional) A retry object used to retry requests. |
| If None is specified, requests will not be retried. |
| :param timeout: (Optional) The amount of time, in seconds, to wait for the request |
| to complete. Note that if retry is specified, the timeout applies to each |
| individual attempt. |
| :param metadata: (Optional) Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| :rtype: list[google.cloud.tasks_v2.types.Queue] |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'project_id', 'gcp_conn_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: CloudTasksQueueDeleteOperator(*, location, queue_name, project_id = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Deletes a queue from Cloud Tasks, even if it has tasks in it. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:CloudTasksQueueDeleteOperator` |
| |
| :param location: The location name in which the queue will be deleted. |
| :param queue_name: The queue's name. |
| :param project_id: (Optional) The ID of the Google Cloud project that owns the Cloud Tasks. |
| If set to None or missing, the default project_id from the Google Cloud connection is used. |
| :param retry: (Optional) A retry object used to retry requests. |
| If None is specified, requests will not be retried. |
| :param timeout: (Optional) The amount of time, in seconds, to wait for the request |
| to complete. Note that if retry is specified, the timeout applies to each |
| individual attempt. |
| :param metadata: (Optional) Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'queue_name', 'project_id', 'gcp_conn_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:method:: execute(context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: CloudTasksQueuePurgeOperator(*, location, queue_name, project_id = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Purges a queue by deleting all of its tasks from Cloud Tasks. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:CloudTasksQueuePurgeOperator` |
| |
| :param location: The location name in which the queue will be purged. |
| :param queue_name: The queue's name. |
| :param project_id: (Optional) The ID of the Google Cloud project that owns the Cloud Tasks. |
| If set to None or missing, the default project_id from the Google Cloud connection is used. |
| :param retry: (Optional) A retry object used to retry requests. |
| If None is specified, requests will not be retried. |
| :param timeout: (Optional) The amount of time, in seconds, to wait for the request |
| to complete. Note that if retry is specified, the timeout applies to each |
| individual attempt. |
| :param metadata: (Optional) Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| :rtype: list[google.cloud.tasks_v2.types.Queue] |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'queue_name', 'project_id', 'gcp_conn_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: CloudTasksQueuePauseOperator(*, location, queue_name, project_id = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Pauses a queue in Cloud Tasks. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:CloudTasksQueuePauseOperator` |
| |
| :param location: The location name in which the queue will be paused. |
| :param queue_name: The queue's name. |
| :param project_id: (Optional) The ID of the Google Cloud project that owns the Cloud Tasks. |
| If set to None or missing, the default project_id from the Google Cloud connection is used. |
| :param retry: (Optional) A retry object used to retry requests. |
| If None is specified, requests will not be retried. |
| :param timeout: (Optional) The amount of time, in seconds, to wait for the request |
| to complete. Note that if retry is specified, the timeout applies to each |
| individual attempt. |
| :param metadata: (Optional) Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| :rtype: list[google.cloud.tasks_v2.types.Queue] |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'queue_name', 'project_id', 'gcp_conn_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: CloudTasksQueueResumeOperator(*, location, queue_name, project_id = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Resumes a queue in Cloud Tasks. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:CloudTasksQueueResumeOperator` |
| |
| :param location: The location name in which the queue will be resumed. |
| :param queue_name: The queue's name. |
| :param project_id: (Optional) The ID of the Google Cloud project that owns the Cloud Tasks. |
| If set to None or missing, the default project_id from the Google Cloud connection is used. |
| :param retry: (Optional) A retry object used to retry requests. |
| If None is specified, requests will not be retried. |
| :param timeout: (Optional) The amount of time, in seconds, to wait for the request |
| to complete. Note that if retry is specified, the timeout applies to each |
| individual attempt. |
| :param metadata: (Optional) Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| :rtype: list[google.cloud.tasks_v2.types.Queue] |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'queue_name', 'project_id', 'gcp_conn_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: CloudTasksTaskCreateOperator(*, location, queue_name, task, project_id = None, task_name = None, response_view = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Creates a task in Cloud Tasks. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:CloudTasksTaskCreateOperator` |
| |
| :param location: The location name in which the task will be created. |
| :param queue_name: The queue's name. |
| :param task: The task to add. |
| If a dict is provided, it must be of the same form as the protobuf message Task. |
| :param project_id: (Optional) The ID of the Google Cloud project that owns the Cloud Tasks. |
| If set to None or missing, the default project_id from the Google Cloud connection is used. |
| :param task_name: (Optional) The task's name. |
| If provided, it will be used to construct the full task path. |
| :param response_view: (Optional) This field specifies which subset of the Task will |
| be returned. |
| :param retry: (Optional) A retry object used to retry requests. |
| If None is specified, requests will not be retried. |
| :param timeout: (Optional) The amount of time, in seconds, to wait for the request |
| to complete. Note that if retry is specified, the timeout applies to each |
| individual attempt. |
| :param metadata: (Optional) Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| :rtype: google.cloud.tasks_v2.types.Task |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['task', 'project_id', 'location', 'queue_name', 'task_name', 'gcp_conn_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: CloudTasksTaskGetOperator(*, location, queue_name, task_name, project_id = None, response_view = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Gets a task from Cloud Tasks. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:CloudTasksTaskGetOperator` |
| |
| :param location: The location name in which the task was created. |
| :param queue_name: The queue's name. |
| :param task_name: The task's name. |
| :param project_id: (Optional) The ID of the Google Cloud project that owns the Cloud Tasks. |
| If set to None or missing, the default project_id from the Google Cloud connection is used. |
| :param response_view: (Optional) This field specifies which subset of the Task will |
| be returned. |
| :param retry: (Optional) A retry object used to retry requests. |
| If None is specified, requests will not be retried. |
| :param timeout: (Optional) The amount of time, in seconds, to wait for the request |
| to complete. Note that if retry is specified, the timeout applies to each |
| individual attempt. |
| :param metadata: (Optional) Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| :rtype: google.cloud.tasks_v2.types.Task |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'queue_name', 'task_name', 'project_id', 'gcp_conn_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: CloudTasksTasksListOperator(*, location, queue_name, project_id = None, response_view = None, page_size = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Lists the tasks in Cloud Tasks. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:CloudTasksTasksListOperator` |
| |
| :param location: The location name in which the tasks were created. |
| :param queue_name: The queue's name. |
| :param project_id: (Optional) The ID of the Google Cloud project that owns the Cloud Tasks. |
| If set to None or missing, the default project_id from the Google Cloud connection is used. |
| :param response_view: (Optional) This field specifies which subset of the Task will |
| be returned. |
| :param page_size: (Optional) The maximum number of resources contained in the |
| underlying API response. |
| :param retry: (Optional) A retry object used to retry requests. |
| If None is specified, requests will not be retried. |
| :param timeout: (Optional) The amount of time, in seconds, to wait for the request |
| to complete. Note that if retry is specified, the timeout applies to each |
| individual attempt. |
| :param metadata: (Optional) Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| :rtype: list[google.cloud.tasks_v2.types.Task] |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'queue_name', 'project_id', 'gcp_conn_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: CloudTasksTaskDeleteOperator(*, location, queue_name, task_name, project_id = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Deletes a task from Cloud Tasks. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:CloudTasksTaskDeleteOperator` |
| |
| :param location: The location name in which the task will be deleted. |
| :param queue_name: The queue's name. |
| :param task_name: The task's name. |
| :param project_id: (Optional) The ID of the Google Cloud project that owns the Cloud Tasks. |
| If set to None or missing, the default project_id from the Google Cloud connection is used. |
| :param retry: (Optional) A retry object used to retry requests. |
| If None is specified, requests will not be retried. |
| :param timeout: (Optional) The amount of time, in seconds, to wait for the request |
| to complete. Note that if retry is specified, the timeout applies to each |
| individual attempt. |
| :param metadata: (Optional) Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'queue_name', 'task_name', 'project_id', 'gcp_conn_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:method:: execute(context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: CloudTasksTaskRunOperator(*, location, queue_name, task_name, project_id = None, response_view = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Forces to run a task in Cloud Tasks. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:CloudTasksTaskRunOperator` |
| |
| :param location: The location name in which the task was created. |
| :param queue_name: The queue's name. |
| :param task_name: The task's name. |
| :param project_id: (Optional) The ID of the Google Cloud project that owns the Cloud Tasks. |
| If set to None or missing, the default project_id from the Google Cloud connection is used. |
| :param response_view: (Optional) This field specifies which subset of the Task will |
| be returned. |
| :param retry: (Optional) A retry object used to retry requests. |
| If None is specified, requests will not be retried. |
| :param timeout: (Optional) The amount of time, in seconds, to wait for the request |
| to complete. Note that if retry is specified, the timeout applies to each |
| individual attempt. |
| :param metadata: (Optional) Additional metadata that is provided to the method. |
| :param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| :rtype: google.cloud.tasks_v2.types.Task |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'queue_name', 'task_name', 'project_id', 'gcp_conn_id', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |