| :py:mod:`airflow.providers.google.cloud.operators.workflows` |
| ============================================================ |
| |
| .. py:module:: airflow.providers.google.cloud.operators.workflows |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.google.cloud.operators.workflows.WorkflowsCreateWorkflowOperator |
| airflow.providers.google.cloud.operators.workflows.WorkflowsUpdateWorkflowOperator |
| airflow.providers.google.cloud.operators.workflows.WorkflowsDeleteWorkflowOperator |
| airflow.providers.google.cloud.operators.workflows.WorkflowsListWorkflowsOperator |
| airflow.providers.google.cloud.operators.workflows.WorkflowsGetWorkflowOperator |
| airflow.providers.google.cloud.operators.workflows.WorkflowsCreateExecutionOperator |
| airflow.providers.google.cloud.operators.workflows.WorkflowsCancelExecutionOperator |
| airflow.providers.google.cloud.operators.workflows.WorkflowsListExecutionsOperator |
| airflow.providers.google.cloud.operators.workflows.WorkflowsGetExecutionOperator |
| |
| |
| |
| |
| .. py:class:: WorkflowsCreateWorkflowOperator(*, workflow, workflow_id, location, project_id = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', force_rerun = False, impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Creates a new workflow. If a workflow with the specified name |
| already exists in the specified project and location, the long |
| running operation will return |
| [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:WorkflowsCreateWorkflowOperator` |
| |
| :param workflow: Required. Workflow to be created. |
| :param workflow_id: Required. The ID of the workflow to be created. |
| :param project_id: Required. The ID of the Google Cloud project the cluster belongs to. |
| :param location: Required. The GCP region in which to handle the request. |
| :param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be |
| retried. |
| :param timeout: 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: Additional metadata that is provided to the method. |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'workflow', 'workflow_id'] |
| |
| |
| |
| .. py:attribute:: template_fields_renderers |
| |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(self, 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:: WorkflowsUpdateWorkflowOperator(*, workflow_id, location, project_id = 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 an existing workflow. |
| Running this method has no impact on already running |
| executions of the workflow. A new revision of the |
| workflow may be created as a result of a successful |
| update operation. In that case, such revision will be |
| used in new workflow executions. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:WorkflowsUpdateWorkflowOperator` |
| |
| :param workflow_id: Required. The ID of the workflow to be updated. |
| :param location: Required. The GCP region in which to handle the request. |
| :param project_id: Required. The ID of the Google Cloud project the cluster belongs to. |
| :param update_mask: List of fields to be updated. If not present, |
| the entire workflow will be updated. |
| :param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be |
| retried. |
| :param timeout: 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: Additional metadata that is provided to the method. |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['workflow_id', 'update_mask'] |
| |
| |
| |
| .. py:attribute:: template_fields_renderers |
| |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(self, 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:: WorkflowsDeleteWorkflowOperator(*, workflow_id, location, 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 workflow with the specified name. |
| This method also cancels and deletes all running |
| executions of the workflow. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:WorkflowsDeleteWorkflowOperator` |
| |
| :param workflow_id: Required. The ID of the workflow to be created. |
| :param project_id: Required. The ID of the Google Cloud project the cluster belongs to. |
| :param location: Required. The GCP region in which to handle the request. |
| :param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be |
| retried. |
| :param timeout: 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: Additional metadata that is provided to the method. |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'workflow_id'] |
| |
| |
| |
| .. py:method:: execute(self, 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:: WorkflowsListWorkflowsOperator(*, location, project_id = None, filter_ = None, order_by = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Lists Workflows in a given project and location. |
| The default order is not specified. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:WorkflowsListWorkflowsOperator` |
| |
| :param filter_: Filter to restrict results to specific workflows. |
| :param order_by: Comma-separated list of fields that |
| specifies the order of the results. Default sorting order for a field is ascending. |
| To specify descending order for a field, append a "desc" suffix. |
| If not specified, the results will be returned in an unspecified order. |
| :param project_id: Required. The ID of the Google Cloud project the cluster belongs to. |
| :param location: Required. The GCP region in which to handle the request. |
| :param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be |
| retried. |
| :param timeout: 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: Additional metadata that is provided to the method. |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'order_by', 'filter_'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(self, 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:: WorkflowsGetWorkflowOperator(*, workflow_id, location, 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 details of a single Workflow. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:WorkflowsGetWorkflowOperator` |
| |
| :param workflow_id: Required. The ID of the workflow to be created. |
| :param project_id: Required. The ID of the Google Cloud project the cluster belongs to. |
| :param location: Required. The GCP region in which to handle the request. |
| :param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be |
| retried. |
| :param timeout: 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: Additional metadata that is provided to the method. |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'workflow_id'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(self, 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:: WorkflowsCreateExecutionOperator(*, workflow_id, execution, location, project_id = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Creates a new execution using the latest revision of |
| the given workflow. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:WorkflowsCreateExecutionOperator` |
| |
| :param execution: Required. Execution to be created. |
| :param workflow_id: Required. The ID of the workflow. |
| :param project_id: Required. The ID of the Google Cloud project the cluster belongs to. |
| :param location: Required. The GCP region in which to handle the request. |
| :param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be |
| retried. |
| :param timeout: 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: Additional metadata that is provided to the method. |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'workflow_id', 'execution'] |
| |
| |
| |
| .. py:attribute:: template_fields_renderers |
| |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(self, 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:: WorkflowsCancelExecutionOperator(*, workflow_id, execution_id, location, project_id = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Cancels an execution using the given ``workflow_id`` and ``execution_id``. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:WorkflowsCancelExecutionOperator` |
| |
| :param workflow_id: Required. The ID of the workflow. |
| :param execution_id: Required. The ID of the execution. |
| :param project_id: Required. The ID of the Google Cloud project the cluster belongs to. |
| :param location: Required. The GCP region in which to handle the request. |
| :param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be |
| retried. |
| :param timeout: 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: Additional metadata that is provided to the method. |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'workflow_id', 'execution_id'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(self, 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:: WorkflowsListExecutionsOperator(*, workflow_id, location, start_date_filter = None, project_id = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Returns a list of executions which belong to the |
| workflow with the given name. The method returns |
| executions of all workflow revisions. Returned |
| executions are ordered by their start time (newest |
| first). |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:WorkflowsListExecutionsOperator` |
| |
| :param workflow_id: Required. The ID of the workflow to be created. |
| :param start_date_filter: If passed only executions older that this date will be returned. |
| By default operators return executions from last 60 minutes |
| :param project_id: Required. The ID of the Google Cloud project the cluster belongs to. |
| :param location: Required. The GCP region in which to handle the request. |
| :param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be |
| retried. |
| :param timeout: 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: Additional metadata that is provided to the method. |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'workflow_id'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(self, 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:: WorkflowsGetExecutionOperator(*, workflow_id, execution_id, location, project_id = None, retry = DEFAULT, timeout = None, metadata = (), gcp_conn_id = 'google_cloud_default', impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Returns an execution for the given ``workflow_id`` and ``execution_id``. |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:WorkflowsGetExecutionOperator` |
| |
| :param workflow_id: Required. The ID of the workflow. |
| :param execution_id: Required. The ID of the execution. |
| :param project_id: Required. The ID of the Google Cloud project the cluster belongs to. |
| :param location: Required. The GCP region in which to handle the request. |
| :param retry: A retry object used to retry requests. If ``None`` is specified, requests will not be |
| retried. |
| :param timeout: 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: Additional metadata that is provided to the method. |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['location', 'workflow_id', 'execution_id'] |
| |
| |
| |
| .. py:attribute:: operator_extra_links |
| |
| |
| |
| |
| .. py:method:: execute(self, 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. |
| |
| |
| |