你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Microsoft.Batch batchAccounts

Bicep 资源定义

batchAccounts 资源类型可以通过针对以下操作进行部署:

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Batch/batchAccounts 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.Batch/batchAccounts@2023-11-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  identity: {
    type: 'string'
    userAssignedIdentities: {
      {customized property}: {}
    }
  }
  properties: {
    allowedAuthenticationModes: [
      'string'
    ]
    autoStorage: {
      authenticationMode: 'string'
      nodeIdentityReference: {
        resourceId: 'string'
      }
      storageAccountId: 'string'
    }
    encryption: {
      keySource: 'string'
      keyVaultProperties: {
        keyIdentifier: 'string'
      }
    }
    keyVaultReference: {
      id: 'string'
      url: 'string'
    }
    networkProfile: {
      accountAccess: {
        defaultAction: 'string'
        ipRules: [
          {
            action: 'Allow'
            value: 'string'
          }
        ]
      }
      nodeManagementAccess: {
        defaultAction: 'string'
        ipRules: [
          {
            action: 'Allow'
            value: 'string'
          }
        ]
      }
    }
    poolAllocationMode: 'string'
    publicNetworkAccess: 'string'
  }
}

属性值

batchAccounts

名称 说明
name 资源名称 字符串 (必需)

字符限制:3-24

有效字符:
小写字母和数字。
location 要在其中创建帐户的区域。 字符串 (必需)
标记 与帐户关联的用户指定的标记。 标记名称和值的字典。 请参阅 模板中的标记
标识 Batch 帐户的标识。 BatchAccountIdentity
properties Batch 帐户的属性。 BatchAccountCreatePropertiesOrBatchAccountProperties

BatchAccountIdentity

名称 说明 Value
type 用于 Batch 帐户的标识类型。 “None”
“SystemAssigned”
“UserAssigned” (必需)
userAssignedIdentities 与 Batch 帐户关联的用户标识列表。 BatchAccountIdentityUserAssignedIdentities

BatchAccountIdentityUserAssignedIdentities

名称 说明
{customized property} UserAssignedIdentities

UserAssignedIdentities

此对象不包含在部署期间要设置的任何属性。 所有属性均为 ReadOnly。

BatchAccountCreatePropertiesOrBatchAccountProperties

名称 说明
allowedAuthenticationModes Batch 帐户允许的身份验证模式列表,这些模式可用于对数据平面进行身份验证。 这不会影响控制平面的身份验证。 包含任意项的字符串数组:
“AAD”
“SharedKey”
“TaskAuthenticationToken”
autoStorage 与自动存储帐户相关的属性。 AutoStorageBasePropertiesOrAutoStorageProperties
加密 配置如何在 Batch 帐户中加密客户数据。 默认情况下,使用 Microsoft 托管密钥对帐户进行加密。 为了进行额外的控制,可以改用客户管理的密钥。 EncryptionProperties
keyVaultReference 对与 Batch 帐户关联的 Azure 密钥保管库的引用。 KeyVaultReference
networkProfile 网络配置文件仅在启用 publicNetworkAccess 时生效。 NetworkProfile
poolAllocationMode 池分配模式还影响客户端向 Batch 服务 API 进行身份验证的方式。 如果模式为 BatchService,则客户端可以使用访问密钥或Microsoft Entra ID进行身份验证。 如果模式为 UserSubscription,则客户端必须使用 Microsoft Entra ID。 默认值为 BatchService。 “BatchService”
“UserSubscription”
publicNetworkAccess 如果未指定,则默认值为“enabled”。 “Disabled”
“已启用”

AutoStorageBasePropertiesOrAutoStorageProperties

名称 说明
authenticationMode Batch 服务将用于管理自动存储帐户的身份验证模式。 “BatchAccountManagedIdentity”
“StorageKeys”
nodeIdentityReference 此处引用的标识必须分配给具有需要访问自动存储的计算节点的池。 ComputeNodeIdentityReference
storageAccountId 要用于自动存储帐户的存储帐户的资源 ID。 字符串 (必需)

ComputeNodeIdentityReference

名称 说明
ResourceId 用户分配的标识的 ARM 资源 ID。 字符串

EncryptionProperties

名称 说明
keySource 密钥源的类型。 “Microsoft.Batch”
“Microsoft.KeyVault”
keyVaultProperties 使用 Microsoft.KeyVault 时的其他详细信息 KeyVaultProperties

KeyVaultProperties

名称 说明
keyIdentifier 包含或不带版本的机密的完整路径。 示例 https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053。 或 https://mykeyvault.vault.azure.net/keys/testkey。 若要使用,必须满足以下先决条件:

Batch 帐户具有系统分配的标识
帐户标识已被授予密钥/获取、密钥/取消包装和密钥/包装权限
KeyVault 已启用软删除和清除保护
字符串

KeyVaultReference

名称 说明 Value
id 与 Batch 帐户关联的 Azure Key Vault 的资源 ID。 字符串 (必需)
url 与 Batch 帐户关联的 Azure Key Vault 的 URL。 字符串 (必需)

NetworkProfile

名称 说明
accountAccess batchAccount 终结点的网络访问配置文件 (Batch 帐户数据平面 API) 。 EndpointAccessProfile
nodeManagementAccess nodeManagement 终结点的网络访问配置文件 (Batch 服务管理 Batch 池的计算节点) 。 EndpointAccessProfile

EndpointAccessProfile

名称 说明
defaultAction 终结点访问的默认操作。 它仅在启用 publicNetworkAccess 时才适用。 “允许”
“拒绝” (必需)
ipRules 用于筛选客户端 IP 地址的 IP 范围的数组。 IPRule[]

IPRule

名称 说明
action 匹配客户端 IP 地址时的操作。 “允许” (必需)
value IPv4 地址或 CIDR 格式的 IPv4 地址范围。 字符串 (必需)

快速入门模板

以下快速入门模板部署此资源类型。

模板 说明
没有公共 IP 地址的Azure Batch池

部署到 Azure
此模板创建Azure Batch简化的节点通信池,而无需公共 IP 地址。
使用模板创建 Batch 帐户

部署到 Azure
此模板创建 Batch 帐户和存储帐户。

ARM 模板资源定义

batchAccounts 资源类型可以通过针对以下操作进行部署:

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Batch/batchAccounts 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.Batch/batchAccounts",
  "apiVersion": "2023-11-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "identity": {
    "type": "string",
    "userAssignedIdentities": {
      "{customized property}": {}
    }
  },
  "properties": {
    "allowedAuthenticationModes": [ "string" ],
    "autoStorage": {
      "authenticationMode": "string",
      "nodeIdentityReference": {
        "resourceId": "string"
      },
      "storageAccountId": "string"
    },
    "encryption": {
      "keySource": "string",
      "keyVaultProperties": {
        "keyIdentifier": "string"
      }
    },
    "keyVaultReference": {
      "id": "string",
      "url": "string"
    },
    "networkProfile": {
      "accountAccess": {
        "defaultAction": "string",
        "ipRules": [
          {
            "action": "Allow",
            "value": "string"
          }
        ]
      },
      "nodeManagementAccess": {
        "defaultAction": "string",
        "ipRules": [
          {
            "action": "Allow",
            "value": "string"
          }
        ]
      }
    },
    "poolAllocationMode": "string",
    "publicNetworkAccess": "string"
  }
}

属性值

batchAccounts

名称 说明 Value
type 资源类型 “Microsoft.Batch/batchAccounts”
apiVersion 资源 API 版本 '2023-11-01'
name 资源名称 字符串 (必需)

字符限制:3-24

有效字符:
小写字母和数字。
location 要在其中创建帐户的区域。 字符串 (必需)
标记 与帐户关联的用户指定的标记。 标记名称和值的字典。 请参阅 模板中的标记
标识 Batch 帐户的标识。 BatchAccountIdentity
properties Batch 帐户的属性。 BatchAccountCreatePropertiesOrBatchAccountProperties

BatchAccountIdentity

名称 说明 Value
type 用于 Batch 帐户的标识类型。 “None”
“SystemAssigned”
“UserAssigned” (必需)
userAssignedIdentities 与 Batch 帐户关联的用户标识列表。 BatchAccountIdentityUserAssignedIdentities

BatchAccountIdentityUserAssignedIdentities

名称 说明
{customized property} UserAssignedIdentities

UserAssignedIdentities

此对象不包含在部署期间要设置的任何属性。 所有属性均为 ReadOnly。

BatchAccountCreatePropertiesOrBatchAccountProperties

名称 说明
allowedAuthenticationModes Batch 帐户允许的身份验证模式列表,这些模式可用于对数据平面进行身份验证。 这不会影响控制平面的身份验证。 包含任意项的字符串数组:
“AAD”
“SharedKey”
“TaskAuthenticationToken”
autoStorage 与自动存储帐户相关的属性。 AutoStorageBasePropertiesOrAutoStorageProperties
加密 配置如何在 Batch 帐户中加密客户数据。 默认情况下,使用 Microsoft 托管密钥对帐户进行加密。 为了进行额外的控制,可以改用客户管理的密钥。 EncryptionProperties
keyVaultReference 对与 Batch 帐户关联的 Azure 密钥保管库的引用。 KeyVaultReference
networkProfile 网络配置文件仅在启用 publicNetworkAccess 时生效。 NetworkProfile
poolAllocationMode 池分配模式还影响客户端向 Batch 服务 API 进行身份验证的方式。 如果模式为 BatchService,则客户端可以使用访问密钥或Microsoft Entra ID进行身份验证。 如果模式为 UserSubscription,则客户端必须使用 Microsoft Entra ID。 默认值为 BatchService。 “BatchService”
“UserSubscription”
publicNetworkAccess 如果未指定,则默认值为“enabled”。 “Disabled”
“已启用”

AutoStorageBasePropertiesOrAutoStorageProperties

名称 说明
authenticationMode Batch 服务将用于管理自动存储帐户的身份验证模式。 “BatchAccountManagedIdentity”
“StorageKeys”
nodeIdentityReference 此处引用的标识必须分配给具有需要访问自动存储的计算节点的池。 ComputeNodeIdentityReference
storageAccountId 要用于自动存储帐户的存储帐户的资源 ID。 字符串 (必需)

ComputeNodeIdentityReference

名称 说明
ResourceId 用户分配的标识的 ARM 资源 ID。 字符串

EncryptionProperties

名称 说明
keySource 密钥源的类型。 'Microsoft.Batch'
'Microsoft.KeyVault'
keyVaultProperties 使用 Microsoft.KeyVault 时的其他详细信息 KeyVaultProperties

KeyVaultProperties

名称 说明
keyIdentifier 包含或不包含版本的机密的完整路径。 示例 https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053。 或 https://mykeyvault.vault.azure.net/keys/testkey。 若要使用,必须满足以下先决条件:

Batch 帐户具有系统分配的标识
帐户标识已被授予密钥/获取、密钥/解包和密钥/包装权限
KeyVault 已启用软删除和清除保护
字符串

KeyVaultReference

名称 说明 Value
id 与 Batch 帐户关联的 Azure Key Vault 的资源 ID。 字符串 (必需)
url 与 Batch 帐户关联的 Azure Key Vault 的 URL。 字符串 (必需)

NetworkProfile

名称 说明
accountAccess batchAccount 终结点的网络访问配置文件 (Batch 帐户数据平面 API) 。 EndpointAccessProfile
nodeManagementAccess nodeManagement 终结点的网络访问配置文件 (Batch 服务管理 Batch 池) 计算节点。 EndpointAccessProfile

EndpointAccessProfile

名称 说明
defaultAction 终结点访问的默认操作。 它仅在启用 publicNetworkAccess 时适用。 “允许”
需要“拒绝” ()
ipRules 用于筛选客户端 IP 地址的 IP 范围的数组。 IPRule[]

IPRule

名称 说明
action 匹配客户端 IP 地址时的操作。 “允许” (必需)
value IPv4 地址或 CIDR 格式的 IPv4 地址范围。 字符串 (必需)

快速入门模板

以下快速入门模板部署此资源类型。

模板 说明
没有公共 IP 地址的Azure Batch池

部署到 Azure
此模板创建Azure Batch没有公共 IP 地址的简化节点通信池。
使用模板创建 Batch 帐户

部署到 Azure
此模板创建 Batch 帐户和存储帐户。

Terraform (AzAPI 提供程序) 资源定义

batchAccounts 资源类型可以使用面向以下对象的操作进行部署:

  • 资源组

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.Batch/batchAccounts 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Batch/batchAccounts@2023-11-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  identity {
    type = "string"
    identity_ids = []
  }
  body = jsonencode({
    properties = {
      allowedAuthenticationModes = [
        "string"
      ]
      autoStorage = {
        authenticationMode = "string"
        nodeIdentityReference = {
          resourceId = "string"
        }
        storageAccountId = "string"
      }
      encryption = {
        keySource = "string"
        keyVaultProperties = {
          keyIdentifier = "string"
        }
      }
      keyVaultReference = {
        id = "string"
        url = "string"
      }
      networkProfile = {
        accountAccess = {
          defaultAction = "string"
          ipRules = [
            {
              action = "Allow"
              value = "string"
            }
          ]
        }
        nodeManagementAccess = {
          defaultAction = "string"
          ipRules = [
            {
              action = "Allow"
              value = "string"
            }
          ]
        }
      }
      poolAllocationMode = "string"
      publicNetworkAccess = "string"
    }
  })
}

属性值

batchAccounts

名称 说明 Value
type 资源类型 “Microsoft.Batch/batchAccounts@2023-11-01”
name 资源名称 字符串 (必需)

字符限制:3-24

有效字符:
小写字母和数字。
location 要在其中创建帐户的区域。 字符串 (必需)
parent_id 若要部署到资源组,请使用该资源组的 ID。 字符串 (必需)
标记 与帐户关联的用户指定的标记。 标记名称和值的字典。
标识 Batch 帐户的标识。 BatchAccountIdentity
properties Batch 帐户的属性。 BatchAccountCreatePropertiesOrBatchAccountProperties

BatchAccountIdentity

名称 说明 Value
type 用于 Batch 帐户的标识类型。 “SystemAssigned”
“UserAssigned” (必需)
identity_ids 与 Batch 帐户关联的用户标识列表。 用户标识 ID 数组。

BatchAccountIdentityUserAssignedIdentities

名称 说明
{customized property} UserAssignedIdentities

UserAssignedIdentities

此对象不包含在部署期间要设置的任何属性。 所有属性均为 ReadOnly。

BatchAccountCreatePropertiesOrBatchAccountProperties

名称 说明
allowedAuthenticationModes Batch 帐户允许的身份验证模式列表,这些模式可用于对数据平面进行身份验证。 这不会影响控制平面的身份验证。 包含任意项的字符串数组:
“AAD”
“SharedKey”
“TaskAuthenticationToken”
autoStorage 与自动存储帐户相关的属性。 AutoStorageBasePropertiesOrAutoStorageProperties
加密 配置如何在 Batch 帐户中加密客户数据。 默认情况下,使用 Microsoft 托管密钥对帐户进行加密。 为了进行额外的控制,可以改用客户管理的密钥。 EncryptionProperties
keyVaultReference 对与 Batch 帐户关联的 Azure 密钥保管库的引用。 KeyVaultReference
networkProfile 网络配置文件仅在启用 publicNetworkAccess 时生效。 NetworkProfile
poolAllocationMode 池分配模式还影响客户端向 Batch 服务 API 进行身份验证的方式。 如果模式为 BatchService,则客户端可以使用访问密钥或Microsoft Entra ID进行身份验证。 如果模式为 UserSubscription,则客户端必须使用 Microsoft Entra ID。 默认值为 BatchService。 “BatchService”
“UserSubscription”
publicNetworkAccess 如果未指定,则默认值为“enabled”。 “Disabled”
“已启用”

AutoStorageBasePropertiesOrAutoStorageProperties

名称 说明
authenticationMode Batch 服务将用于管理自动存储帐户的身份验证模式。 “BatchAccountManagedIdentity”
“StorageKeys”
nodeIdentityReference 此处引用的标识必须分配给具有需要访问自动存储的计算节点的池。 ComputeNodeIdentityReference
storageAccountId 要用于自动存储帐户的存储帐户的资源 ID。 字符串 (必需)

ComputeNodeIdentityReference

名称 说明
ResourceId 用户分配的标识的 ARM 资源 ID。 字符串

EncryptionProperties

名称 说明
keySource 密钥源的类型。 “Microsoft.Batch”
“Microsoft.KeyVault”
keyVaultProperties 使用 Microsoft.KeyVault 时的其他详细信息 KeyVaultProperties

KeyVaultProperties

名称 说明
keyIdentifier 包含或不带版本的机密的完整路径。 示例 https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053。 或 https://mykeyvault.vault.azure.net/keys/testkey。 若要使用,必须满足以下先决条件:

Batch 帐户具有系统分配的标识
帐户标识已被授予密钥/获取、密钥/取消包装和密钥/包装权限
KeyVault 已启用软删除和清除保护
字符串

KeyVaultReference

名称 说明 Value
id 与 Batch 帐户关联的 Azure Key Vault 的资源 ID。 字符串 (必需)
url 与 Batch 帐户关联的 Azure Key Vault 的 URL。 字符串 (必需)

NetworkProfile

名称 说明
accountAccess batchAccount 终结点的网络访问配置文件 (Batch 帐户数据平面 API) 。 EndpointAccessProfile
nodeManagementAccess nodeManagement 终结点的网络访问配置文件 (Batch 服务管理 Batch 池的计算节点) 。 EndpointAccessProfile

EndpointAccessProfile

名称 说明
defaultAction 终结点访问的默认操作。 它仅在启用 publicNetworkAccess 时才适用。 “允许”
需要“拒绝” ()
ipRules 用于筛选客户端 IP 地址的 IP 范围的数组。 IPRule[]

IPRule

名称 说明
action 匹配客户端 IP 地址时的操作。 “允许” (必需)
value IPv4 地址或 CIDR 格式的 IPv4 地址范围。 字符串 (必需)