airflow.providers.amazon.aws.operators.step_function

Module Contents

Classes

StepFunctionStartExecutionOperator

An Operator that begins execution of an AWS Step Function State Machine.

StepFunctionGetExecutionOutputOperator

An Operator that returns the output of an AWS Step Function State Machine execution.

class airflow.providers.amazon.aws.operators.step_function.StepFunctionStartExecutionOperator(*, state_machine_arn, name=None, state_machine_input=None, aws_conn_id='aws_default', region_name=None, waiter_max_attempts=30, waiter_delay=60, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]

Bases: airflow.models.BaseOperator

An Operator that begins execution of an AWS Step Function State Machine.

Additional arguments may be specified and are passed down to the underlying BaseOperator.

See also

For more information on how to use this operator, take a look at the guide: Start an AWS Step Functions state machine execution

Parameters
  • state_machine_arn (str) – ARN of the Step Function State Machine

  • name (str | None) – The name of the execution.

  • state_machine_input (dict | str | None) – JSON data input to pass to the State Machine

  • aws_conn_id (str) – aws connection to uses

  • do_xcom_push – if True, execution_arn is pushed to XCom with key execution_arn.

  • waiter_max_attempts (int) – Maximum number of attempts to poll the execution.

  • waiter_delay (int) – Number of seconds between polling the state of the execution.

  • deferrable (bool) – If True, the operator will wait asynchronously for the job to complete. This implies waiting for completion. This mode requires aiobotocore module to be installed. (default: False, but can be overridden in config file by setting default_deferrable to True)

template_fields: Sequence[str] = ('state_machine_arn', 'name', 'input')[source]
template_ext: Sequence[str] = ()[source]
ui_color = '#f9c915'[source]
execute(context)[source]

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.

execute_complete(context, event=None)[source]
class airflow.providers.amazon.aws.operators.step_function.StepFunctionGetExecutionOutputOperator(*, execution_arn, aws_conn_id='aws_default', region_name=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

An Operator that returns the output of an AWS Step Function State Machine execution.

Additional arguments may be specified and are passed down to the underlying BaseOperator.

See also

For more information on how to use this operator, take a look at the guide: Get an AWS Step Functions execution output

Parameters
  • execution_arn (str) – ARN of the Step Function State Machine Execution

  • aws_conn_id (str) – aws connection to use, defaults to ‘aws_default’

template_fields: Sequence[str] = ('execution_arn',)[source]
template_ext: Sequence[str] = ()[source]
ui_color = '#f9c915'[source]
execute(context)[source]

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.

Was this entry helpful?