airflow.providers.amazon.aws.operators.kinesis_analytics

KinesisAnalyticsV2CreateApplicationOperator

建立一個 AWS Managed Service for Apache Flink 應用。

KinesisAnalyticsV2StartApplicationOperator

啟動一個 AWS Managed Service for Apache Flink 應用。

KinesisAnalyticsV2StopApplicationOperator

停止一個 AWS Managed Service for Apache Flink 應用。

模組內容

class airflow.providers.amazon.aws.operators.kinesis_analytics.KinesisAnalyticsV2CreateApplicationOperator(application_name, runtime_environment, service_execution_role, create_application_kwargs=None, application_description='Managed Service for Apache Flink application created from Airflow', **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.kinesis_analytics.KinesisAnalyticsV2Hook]

建立一個 AWS Managed Service for Apache Flink 應用。

另請參閱

有關如何使用此 operator 的更多資訊,請參閱以下指南:建立 Amazon Managed Service for Apache Flink 應用

引數:
  • application_name (str) – 應用的名稱。(templated)

  • runtime_environment (str) – 應用執行時環境。(templated)

  • service_execution_role (str) – 應用用於訪問服務的 IAM 角色。(templated)

  • create_application_kwargs (dict[str, Any] | None) – 建立應用的額外屬性。(templated)

  • application_description (str) – 應用的摘要描述。(templated)

  • aws_conn_id – 用於 AWS 憑據的 Airflow 連線。如果此引數為 None 或為空,則使用預設的 boto3 行為。如果以分散式方式執行 Airflow 且 aws_conn_id 為 None 或為空,則將使用預設的 boto3 配置(並且必須在每個 worker 節點上維護)。

  • 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[source]
ui_color = '#44b5e2'[source]
template_fields: collections.abc.Sequence[str][source]
template_fields_renderers: ClassVar[dict][source]
application_name[source]
runtime_environment[source]
service_execution_role[source]
create_application_kwargs[source]
application_description = 'Managed Service for Apache Flink application created from Airflow'[source]
execute(context)[source]

建立 operator 時派生。

Context 與渲染 jinja 模板時使用的字典相同。

有關更多 context,請參閱 get_template_context。

class airflow.providers.amazon.aws.operators.kinesis_analytics.KinesisAnalyticsV2StartApplicationOperator(application_name, run_configuration=None, wait_for_completion=True, waiter_delay=60, waiter_max_attempts=20, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.kinesis_analytics.KinesisAnalyticsV2Hook]

啟動一個 AWS Managed Service for Apache Flink 應用。

另請參閱

有關如何使用此 operator 的更多資訊,請參閱以下指南:啟動 Amazon Managed Service for Apache Flink 應用

引數:
  • application_name (str) – 應用的名稱。(templated)

  • run_configuration (dict[str, Any] | None) – 啟動 Apache Flink 作業的應用屬性。(templated)

  • wait_for_completion (bool) – 是否等待作業停止。(預設值: True)

  • waiter_delay (int) – 檢查狀態之間的等待時間(秒)。(預設值: 60)

  • waiter_max_attempts (int) – 檢查作業完成狀態的最大嘗試次數。(預設值: 20)

  • deferrable (bool) – 如果為 True,則 operator 將非同步等待作業停止。這意味著等待完成。此模式需要安裝 aiobotocore 模組。(預設值: False)

  • aws_conn_id – 用於 AWS 憑據的 Airflow 連線。如果此引數為 None 或為空,則使用預設的 boto3 行為。如果以分散式方式執行 Airflow 且 aws_conn_id 為 None 或為空,則將使用預設的 boto3 配置(並且必須在每個 worker 節點上維護)。

  • 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[source]
ui_color = '#44b5e2'[source]
template_fields: collections.abc.Sequence[str][source]
template_fields_renderers: ClassVar[dict][source]
application_name[source]
run_configuration[source]
wait_for_completion = True[source]
waiter_delay = 60[source]
waiter_max_attempts = 20[source]
deferrable = True[source]
execute(context)[source]

建立 operator 時派生。

Context 與渲染 jinja 模板時使用的字典相同。

有關更多 context,請參閱 get_template_context。

execute_complete(context, event=None)[source]
class airflow.providers.amazon.aws.operators.kinesis_analytics.KinesisAnalyticsV2StopApplicationOperator(application_name, force=False, wait_for_completion=True, waiter_delay=60, waiter_max_attempts=20, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.kinesis_analytics.KinesisAnalyticsV2Hook]

停止一個 AWS Managed Service for Apache Flink 應用。

另請參閱

有關如何使用此 operator 的更多資訊,請參閱以下指南:停止 Amazon Managed Service for Apache Flink 應用

引數:
  • application_name (str) – 您的應用的名稱。(templated)

  • force (bool) – 設定為 true 可強制停止應用。如果將 Force 設定為 true,Managed Service for Apache Flink 將在不建立快照的情況下停止應用。(templated)

  • wait_for_completion (bool) – 是否等待作業停止。(預設值: True)

  • waiter_delay (int) – 檢查狀態之間的等待時間(秒)。(預設值: 60)

  • waiter_max_attempts (int) – 檢查作業完成狀態的最大嘗試次數。(預設值: 20)

  • deferrable (bool) – 如果為 True,則 operator 將非同步等待作業停止。這意味著等待完成。此模式需要安裝 aiobotocore 模組。(預設值: False)

  • aws_conn_id – 用於 AWS 憑據的 Airflow 連線。如果此引數為 None 或為空,則使用預設的 boto3 行為。如果以分散式方式執行 Airflow 且 aws_conn_id 為 None 或為空,則將使用預設的 boto3 配置(並且必須在每個 worker 節點上維護)。

  • 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[source]
ui_color = '#44b5e2'[source]
template_fields: collections.abc.Sequence[str][source]
application_name[source]
force = False[source]
wait_for_completion = True[source]
waiter_delay = 60[source]
waiter_max_attempts = 20[source]
deferrable = True[source]
execute(context)[source]

建立 operator 時派生。

Context 與渲染 jinja 模板時使用的字典相同。

有關更多 context,請參閱 get_template_context。

execute_complete(context, event=None)[source]

此條目是否有幫助?