Microsoft Azure Batch

Microsoft Azure Batch 连接类型支持 Azure Batch 集成。

Azure Batch 认证

使用 Airflow 连接到 Azure Batch 有几种认证方式。

  1. 使用 Azure 共享密钥凭据,即向 Airflow 连接添加共享密钥凭据。

  2. 通过设置 managed_identity_client_idworkload_identity_tenant_id 来使用托管标识(底层实现使用 DefaultAzureCredential 并传入这些参数)

  3. 回退到 DefaultAzureCredential。这包括尝试不同认证方式的机制:托管系统标识、环境变量、通过 Azure CLI 认证等。

默认连接 ID

所有与 Microsoft Azure Batch 相关的 hooks 和 operators 默认使用 azure_batch_default

配置连接

Batch 账户名称 (可选)

指定用于初始连接的 Azure Batch 账户名称。可以省略此项,以回退到 DefaultAzureCredential

Batch 账户访问密钥 (可选)

指定用于初始连接的访问密钥。可以省略此项,以回退到 DefaultAzureCredential

Batch 账户 URL

指定您要使用的 batch 账户 URL。

托管标识客户端 ID (可选)

用户分配的托管标识的客户端 ID。如果与 workload_identity_tenant_id 一起提供,它们将被传递给 DefaultAzureCredential

工作负载标识租户 ID (可选)

应用程序的 Microsoft Entra 租户 ID。也称为其“目录”ID。如果与 managed_identity_client_id 一起提供,它们将被传递给 DefaultAzureCredential

在环境变量中指定连接时,应使用 URI 语法进行指定。

请注意,URI 的所有组成部分都应进行 URL 编码。

例如

export AIRFLOW_CONN_AZURE_BATCH_DEFAULT='azure-batch://batch%20acount:batch%20key@?account_url=mybatchaccount.com'

本条目是否有帮助?