airflow.providers.amazon.aws.sensors.opensearch_serverless

Module Contents

Classes

OpenSearchServerlessCollectionActiveSensor

Poll the state of the Collection until it reaches a terminal state; fails if the query fails.

class airflow.providers.amazon.aws.sensors.opensearch_serverless.OpenSearchServerlessCollectionActiveSensor(*, collection_id=None, collection_name=None, poke_interval=10, max_retries=60, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]

Bases: airflow.providers.amazon.aws.sensors.base_aws.AwsBaseSensor[airflow.providers.amazon.aws.hooks.opensearch_serverless.OpenSearchServerlessHook]

Poll the state of the Collection until it reaches a terminal state; fails if the query fails.

See also

For more information on how to use this sensor, take a look at the guide: Wait for an Amazon OpenSearch Serverless Collection to become active

Parameters
  • collection_id (str | None) – A collection ID. You can’t provide a name and an ID in the same request.

  • collection_name (str | None) – A collection name. You can’t provide a name and an ID in the same request.

  • deferrable (bool) – If True, the sensor will operate in deferrable more. This mode requires aiobotocore module to be installed. (default: False, but can be overridden in config file by setting default_deferrable to True)

  • poke_interval (int) – Polling period in seconds to check for the status of the job. (default: 10)

  • max_retries (int) – Number of times before returning the current state (default: 60)

  • aws_conn_id – The Airflow connection used for AWS credentials. If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then default boto3 configuration would be used (and must be maintained on each worker node).

  • region_name – AWS region_name. If not specified then the default boto3 behaviour is used.

  • verify – Whether or not to verify SSL certificates. See: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html

  • botocore_config – Configuration dictionary (key-values) for botocore client. See: https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

INTERMEDIATE_STATES = ('CREATING',)[source]
FAILURE_STATES = ('DELETING', 'FAILED')[source]
SUCCESS_STATES = ('ACTIVE',)[source]
FAILURE_MESSAGE = 'OpenSearch Serverless Collection sensor failed'[source]
aws_hook_class[source]
template_fields: collections.abc.Sequence[str][source]
ui_color = '#66c3ff'[source]
poke(context, **kwargs)[source]

Override when deriving this class.

execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

Was this entry helpful?