airflow.providers.google.cloud.sensors.cloud_composer

This module contains a Cloud Composer sensor.

Module Contents

Classes

CloudComposerEnvironmentSensor

Check the status of the Cloud Composer Environment task.

class airflow.providers.google.cloud.sensors.cloud_composer.CloudComposerEnvironmentSensor(*, project_id, region, operation_name, gcp_conn_id='google_cloud_default', impersonation_chain=None, pooling_period_seconds=30, **kwargs)[source]

Bases: airflow.sensors.base.BaseSensorOperator

Check the status of the Cloud Composer Environment task.

This Sensor is deprecated. You can achieve the same functionality by using Cloud Composer Operators CloudComposerCreateEnvironmentOperator, CloudComposerDeleteEnvironmentOperator and CloudComposerUpdateEnvironmentOperator in deferrable or non-deferrable mode, since every operator gives user a possibility to wait (asynchronously or synchronously) until Operation will be finished.

Parameters
  • project_id (str) – Required. The ID of the Google Cloud project that the service belongs to.

  • region (str) – Required. The ID of the Google Cloud region that the service belongs to.

  • operation_name (str) – The name of the operation resource

  • gcp_conn_id (str) – The connection ID to use when fetching connection info.

  • impersonation_chain (str | Sequence[str] | None) – 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).

  • pooling_period_seconds (int) – Optional: Control the rate of the poll for the result of deferrable run.

execute(context)[source]

Airflow runs this method on the worker and defers using the trigger.

execute_complete(context, event=None)[source]

Callback for when the trigger fires - returns immediately.

Relies on trigger to throw an exception, otherwise it assumes execution was successful.

Was this entry helpful?