airflow.providers.amazon.aws.operators.step_function

类 (Classes)

StepFunctionStartExecutionOperator

一个启动 AWS Step Functions State Machine 执行的操作符。

StepFunctionGetExecutionOutputOperator

一个返回 AWS Step Functions State Machine 执行输出的操作符。

模块内容 (Module Contents)

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

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.step_function.StepFunctionHook]

一个启动 AWS Step Functions State Machine 执行的操作符。

可以指定其他参数,这些参数将传递给底层的 BaseOperator。

另请参阅

有关如何使用此操作符的更多信息,请参阅指南: 启动 AWS Step Functions 状态机执行

参数
  • state_machine_arn (str) – Step Function State Machine 的 ARN

  • name (str | None) – 执行的名称。

  • is_redrive_execution (bool) – 重新启动在过去 14 天内未成功完成的标准工作流的失败执行。

  • state_machine_input (dict | str | None) – 要传递给 State Machine 的 JSON 数据输入

  • aws_conn_id – 用于 AWS 凭据的 Airflow 连接。如果此参数为 None 或空字符串,则使用默认的 boto3 行为。如果以分布式方式运行 Airflow 且 aws_conn_id 为 None 或空字符串,则将使用默认的 boto3 配置(并且必须在每个工作节点上维护此配置)。

  • do_xcom_push – 如果为 True,则执行 ARN 将以键 execution_arn 推送到 XCom。

  • waiter_max_attempts (int) – 轮询执行状态的最大尝试次数。

  • waiter_delay (int) – 轮询执行状态之间的秒数。

  • deferrable (bool) – 如果为 True,操作符将异步等待作业完成。这意味着等待完成。此模式需要安装 aiobotocore 模块。(默认为 False,但可以通过在配置文件中将 default_deferrable 设置为 True 来覆盖)

  • aws_conn_id – 用于 AWS 凭据的 Airflow 连接。如果此参数为 None 或空字符串,则使用默认的 boto3 行为。如果以分布式方式运行 Airflow 且 aws_conn_id 为 None 或空字符串,则将使用默认的 boto3 配置(并且必须在每个工作节点上维护此配置)。

  • region_name – AWS region_name。如果未指定,则使用默认的 boto3 行为。

  • verify – 是否验证 SSL 证书。参阅: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html

  • botocore_config – botocore 客户端的配置字典(键值对)。参阅: https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

aws_hook_class[源代码]
template_fields: collections.abc.Sequence[str][源代码]
ui_color = '#f9c915'[源代码]
state_machine_arn[源代码]
name = None[源代码]
is_redrive_execution = False[源代码]
input = None[源代码]
waiter_delay = 60[源代码]
waiter_max_attempts = 30[源代码]
deferrable = True[源代码]
execute(context)[源代码]

创建操作符时从此派生。

Context 是与渲染 jinja 模板时使用的字典相同。

请参阅 get_template_context 以获取更多上下文信息。

execute_complete(context, event=None)[源代码]
class airflow.providers.amazon.aws.operators.step_function.StepFunctionGetExecutionOutputOperator(*, execution_arn, **kwargs)[源代码]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.step_function.StepFunctionHook]

一个返回 AWS Step Functions State Machine 执行输出的操作符。

可以指定其他参数,这些参数将传递给底层的 BaseOperator。

另请参阅

有关如何使用此操作符的更多信息,请参阅指南: 获取 AWS Step Functions 执行输出

参数
aws_hook_class[源代码]
template_fields: collections.abc.Sequence[str][源代码]
ui_color = '#f9c915'[源代码]
execution_arn[源代码]
execute(context)[源代码]

创建操作符时从此派生。

Context 是与渲染 jinja 模板时使用的字典相同。

请参阅 get_template_context 以获取更多上下文信息。

此条目是否有帮助?