airflow.providers.google.cloud.operators.workflows
¶
Module Contents¶
Classes¶
Creates a new workflow. |
|
Updates an existing workflow. |
|
Delete a workflow with the specified name and all running executions of the workflow. |
|
Lists Workflows in a given project and location; the default order is not specified. |
|
Gets details of a single Workflow. |
|
Creates a new execution using the latest revision of the given workflow. |
|
Cancels an execution using the given |
|
Returns a list of executions which belong to the workflow with the given name. |
|
Returns an execution for the given |
- class airflow.providers.google.cloud.operators.workflows.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)[source]¶
Bases:
airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator
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.
See also
For more information on how to use this operator, take a look at the guide: Create workflow
- Parameters
workflow (dict) – Required. Workflow to be created.
workflow_id (str) – Required. The ID of the workflow to be created.
project_id (str | None) – Required. The ID of the Google Cloud project the cluster belongs to.
location (str) – Required. The GCP region in which to handle the request.
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – A retry object used to retry requests. If
None
is specified, requests will not be retried.timeout (float | None) – 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.metadata (Sequence[tuple[str, str]]) – Additional metadata that is provided to the method.
- class airflow.providers.google.cloud.operators.workflows.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)[source]¶
Bases:
airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator
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.
See also
For more information on how to use this operator, take a look at the guide: Update workflow
- Parameters
workflow_id (str) – Required. The ID of the workflow to be updated.
location (str) – Required. The GCP region in which to handle the request.
project_id (str | None) – Required. The ID of the Google Cloud project the cluster belongs to.
update_mask (google.protobuf.field_mask_pb2.FieldMask | None) – List of fields to be updated. If not present, the entire workflow will be updated.
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – A retry object used to retry requests. If
None
is specified, requests will not be retried.timeout (float | None) – 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.metadata (Sequence[tuple[str, str]]) – Additional metadata that is provided to the method.
- class airflow.providers.google.cloud.operators.workflows.WorkflowsDeleteWorkflowOperator(*, workflow_id, location, project_id=None, retry=DEFAULT, timeout=None, metadata=(), gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator
Delete a workflow with the specified name and all running executions of the workflow.
See also
For more information on how to use this operator, take a look at the guide: Delete workflow
- Parameters
workflow_id (str) – Required. The ID of the workflow to be created.
project_id (str | None) – Required. The ID of the Google Cloud project the cluster belongs to.
location (str) – Required. The GCP region in which to handle the request.
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – A retry object used to retry requests. If
None
is specified, requests will not be retried.timeout (float | None) – 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.metadata (Sequence[tuple[str, str]]) – Additional metadata that is provided to the method.
- class airflow.providers.google.cloud.operators.workflows.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)[source]¶
Bases:
airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator
Lists Workflows in a given project and location; the default order is not specified.
See also
For more information on how to use this operator, take a look at the guide: List workflows
- Parameters
filter – Filter to restrict results to specific workflows.
order_by (str | None) – 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.
project_id (str | None) – Required. The ID of the Google Cloud project the cluster belongs to.
location (str) – Required. The GCP region in which to handle the request.
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – A retry object used to retry requests. If
None
is specified, requests will not be retried.timeout (float | None) – 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.metadata (Sequence[tuple[str, str]]) – Additional metadata that is provided to the method.
- class airflow.providers.google.cloud.operators.workflows.WorkflowsGetWorkflowOperator(*, workflow_id, location, project_id=None, retry=DEFAULT, timeout=None, metadata=(), gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator
Gets details of a single Workflow.
See also
For more information on how to use this operator, take a look at the guide: Get workflow
- Parameters
workflow_id (str) – Required. The ID of the workflow to be created.
project_id (str | None) – Required. The ID of the Google Cloud project the cluster belongs to.
location (str) – Required. The GCP region in which to handle the request.
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – A retry object used to retry requests. If
None
is specified, requests will not be retried.timeout (float | None) – 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.metadata (Sequence[tuple[str, str]]) – Additional metadata that is provided to the method.
- class airflow.providers.google.cloud.operators.workflows.WorkflowsCreateExecutionOperator(*, workflow_id, execution, location, project_id=None, retry=DEFAULT, timeout=None, metadata=(), gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator
Creates a new execution using the latest revision of the given workflow.
See also
For more information on how to use this operator, take a look at the guide: Create execution
- Parameters
execution (dict) – Required. Execution to be created.
workflow_id (str) – Required. The ID of the workflow.
project_id (str | None) – Required. The ID of the Google Cloud project the cluster belongs to.
location (str) – Required. The GCP region in which to handle the request.
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – A retry object used to retry requests. If
None
is specified, requests will not be retried.timeout (float | None) – 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.metadata (Sequence[tuple[str, str]]) – Additional metadata that is provided to the method.
- class airflow.providers.google.cloud.operators.workflows.WorkflowsCancelExecutionOperator(*, workflow_id, execution_id, location, project_id=None, retry=DEFAULT, timeout=None, metadata=(), gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator
Cancels an execution using the given
workflow_id
andexecution_id
.See also
For more information on how to use this operator, take a look at the guide: Cancel execution
- Parameters
workflow_id (str) – Required. The ID of the workflow.
execution_id (str) – Required. The ID of the execution.
project_id (str | None) – Required. The ID of the Google Cloud project the cluster belongs to.
location (str) – Required. The GCP region in which to handle the request.
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – A retry object used to retry requests. If
None
is specified, requests will not be retried.timeout (float | None) – 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.metadata (Sequence[tuple[str, str]]) – Additional metadata that is provided to the method.
- class airflow.providers.google.cloud.operators.workflows.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)[source]¶
Bases:
airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator
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).
See also
For more information on how to use this operator, take a look at the guide: List executions
- Parameters
workflow_id (str) – Required. The ID of the workflow to be created.
start_date_filter (datetime.datetime | None) – If passed only executions older that this date will be returned. By default, operators return executions from last 60 minutes. Note that datetime object must specify a time zone, e.g.
datetime.timezone.utc
.project_id (str | None) – Required. The ID of the Google Cloud project the cluster belongs to.
location (str) – Required. The GCP region in which to handle the request.
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – A retry object used to retry requests. If
None
is specified, requests will not be retried.timeout (float | None) – 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.metadata (Sequence[tuple[str, str]]) – Additional metadata that is provided to the method.
- class airflow.providers.google.cloud.operators.workflows.WorkflowsGetExecutionOperator(*, workflow_id, execution_id, location, project_id=None, retry=DEFAULT, timeout=None, metadata=(), gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator
Returns an execution for the given
workflow_id
andexecution_id
.See also
For more information on how to use this operator, take a look at the guide: Get execution
- Parameters
workflow_id (str) – Required. The ID of the workflow.
execution_id (str) – Required. The ID of the execution.
project_id (str | None) – Required. The ID of the Google Cloud project the cluster belongs to.
location (str) – Required. The GCP region in which to handle the request.
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – A retry object used to retry requests. If
None
is specified, requests will not be retried.timeout (float | None) – 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.metadata (Sequence[tuple[str, str]]) – Additional metadata that is provided to the method.