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 以獲取更多上下文資訊。

此條目是否有幫助?