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

Microsoft.Batch BatchAccounts 2024-02-01

Bicep 资源定义

可以使用目标操作部署 batchAccounts 资源类型:

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

资源格式

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

resource symbolicname 'Microsoft.Batch/batchAccounts@2024-02-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

名字 描述 价值
名字 资源名称 string (必需)

字符限制:3-24

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

BatchAccountIdentity

名字 描述 价值
类型 用于 Batch 帐户的标识类型。 “None”
“SystemAssigned”
“UserAssigned”(必需)
userAssignedIdentities 与 Batch 帐户关联的用户标识列表。 BatchAccountIdentityUserAssignedIdentities

BatchAccountIdentityUserAssignedIdentities

名字 描述 价值
{自定义属性} 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”
“Enabled”

AutoStorageBasePropertiesOrAutoStorageProperties

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

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

名字 描述 价值
id 与 Batch 帐户关联的 Azure 密钥保管库的资源 ID。 string (必需)
url 与 Batch 帐户关联的 Azure 密钥保管库的 URL。 string (必需)

NetworkProfile

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

EndpointAccessProfile

名字 描述 价值
defaultAction 终结点访问的默认操作。 仅当启用了 publicNetworkAccess 时,它才适用。 “允许”
“拒绝”(必需)
ipRules 要筛选客户端 IP 地址的 IP 范围的数组。 IPRule[]

IPRule

名字 描述 价值
行动 匹配客户端 IP 地址时的操作。 “允许”(必需)
价值 采用 CIDR 格式的 IPv4 地址或 IPv4 地址范围。 string (必需)

快速入门模板

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

模板 描述
不带公共 IP 地址的 Azure Batch 池

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

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

ARM 模板资源定义

可以使用目标操作部署 batchAccounts 资源类型:

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

资源格式

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

{
  "type": "Microsoft.Batch/batchAccounts",
  "apiVersion": "2024-02-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

名字 描述 价值
类型 资源类型 “Microsoft.Batch/batchAccounts”
apiVersion 资源 API 版本 '2024-02-01'
名字 资源名称 string (必需)

字符限制:3-24

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

BatchAccountIdentity

名字 描述 价值
类型 用于 Batch 帐户的标识类型。 “None”
“SystemAssigned”
“UserAssigned”(必需)
userAssignedIdentities 与 Batch 帐户关联的用户标识列表。 BatchAccountIdentityUserAssignedIdentities

BatchAccountIdentityUserAssignedIdentities

名字 描述 价值
{自定义属性} 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”
“Enabled”

AutoStorageBasePropertiesOrAutoStorageProperties

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

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

名字 描述 价值
id 与 Batch 帐户关联的 Azure 密钥保管库的资源 ID。 string (必需)
url 与 Batch 帐户关联的 Azure 密钥保管库的 URL。 string (必需)

NetworkProfile

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

EndpointAccessProfile

名字 描述 价值
defaultAction 终结点访问的默认操作。 仅当启用了 publicNetworkAccess 时,它才适用。 “允许”
“拒绝”(必需)
ipRules 要筛选客户端 IP 地址的 IP 范围的数组。 IPRule[]

IPRule

名字 描述 价值
行动 匹配客户端 IP 地址时的操作。 “允许”(必需)
价值 采用 CIDR 格式的 IPv4 地址或 IPv4 地址范围。 string (必需)

快速入门模板

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

模板 描述
不带公共 IP 地址的 Azure Batch 池

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

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

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

可以使用目标操作部署 batchAccounts 资源类型:

  • 资源组

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

资源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Batch/batchAccounts@2024-02-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

名字 描述 价值
类型 资源类型 “Microsoft.Batch/batchAccounts@2024-02-01”
名字 资源名称 string (必需)

字符限制:3-24

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

BatchAccountIdentity

名字 描述 价值
类型 用于 Batch 帐户的标识类型。 “SystemAssigned”
“UserAssigned”(必需)
identity_ids 与 Batch 帐户关联的用户标识列表。 用户标识 ID 的数组。

BatchAccountIdentityUserAssignedIdentities

名字 描述 价值
{自定义属性} 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。 string (必需)

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

名字 描述 价值
id 与 Batch 帐户关联的 Azure 密钥保管库的资源 ID。 string (必需)
url 与 Batch 帐户关联的 Azure 密钥保管库的 URL。 string (必需)

NetworkProfile

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

EndpointAccessProfile

名字 描述 价值
defaultAction 终结点访问的默认操作。 仅当启用了 publicNetworkAccess 时,它才适用。 “允许”
“拒绝”(必需)
ipRules 要筛选客户端 IP 地址的 IP 范围的数组。 IPRule[]

IPRule

名字 描述 价值
行动 匹配客户端 IP 地址时的操作。 “允许”(必需)
价值 采用 CIDR 格式的 IPv4 地址或 IPv4 地址范围。 string (必需)