共用方式為


Microsoft.Batch batch帳戶

Bicep 資源定義

batchAccounts 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔

資源格式

若要建立 Microsoft.Batch/batchAccounts 資源,請將下列 Bicep 新增至範本。

resource symbolicname 'Microsoft.Batch/batchAccounts@2024-07-01' = {
  scope: resourceSymbolicName or scope
  identity: {
    type: 'string'
    userAssignedIdentities: {
      {customized property}: {}
    }
  }
  location: 'string'
  name: 'string'
  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'
  }
  tags: {
    {customized property}: 'string'
  }
}

屬性值

Microsoft.Batch/batchAccounts

名字 描述 價值
身分識別 Batch 帳戶的身分識別。 BatchAccountIdentity (批量帳戶身份)
位置 要在其中建立帳戶的區域。 字串 (必要)
名字 資源名稱 字串

約束:
最小長度 = 3
最大長度 = 24
模式 = ^[a-z0-9]+$ (必要)
性能 Batch 帳戶的屬性。 BatchAccountCreatePropertiesOrBatchAccountProperties
範圍 在與部署範圍不同的範圍內建立資源時,請使用 。 將此屬性設定為資源的符號名稱,以套用 擴充資源
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤

AutoStorageBasePropertiesOrAutoStorageProperties

名字 描述 價值
authenticationMode 認證 Batch 服務將用來管理自動記憶體帳戶的驗證模式。 “BatchAccountManagedIdentity”
“StorageKeys”
nodeIdentity引用 此處參考的身分識別必須指派給具有需要存取自動記憶體之計算節點的集區。 ComputeNodeIdentity引用
storageAccountId 要用於自動記憶體帳戶之記憶體帳戶的記憶體帳戶的資源識別碼。 字串 (必要)

BatchAccountCreateParameters標籤

名字 描述 價值

BatchAccountCreatePropertiesOrBatchAccountProperties

名字 描述 價值
allowedAuthenticationModes Batch 帳戶允許的驗證模式清單,可用來向數據平面進行驗證。 這不會影響控制平面的驗證。 包含任何的字串數組:
“AAD”
“共用金鑰”
'TaskAuthenticationToken'
autoStorage 與自動記憶體帳戶相關的屬性。 AutoStorageBasePropertiesOrAutoStorageProperties
加密 設定客戶數據在 Batch 帳戶內加密的方式。 根據預設,帳戶會使用Microsoft受控密鑰來加密。 如需其他控制,可以改用客戶管理的密鑰。 EncryptionProperties
keyVault引用 與 Batch 帳戶相關聯的 Azure 金鑰保存庫參考。 KeyVaultReference
網路簡介 只有在啟用 publicNetworkAccess 時,網路配置檔才會生效。 網路簡介
poolAllocationMode (池分配模式) 集區配置模式也會影響用戶端如何向 Batch 服務 API 進行驗證。 如果模式為 BatchService,用戶端可以使用存取金鑰或Microsoft Entra 識別碼進行驗證。 如果模式為 UserSubscription,客戶端必須使用Microsoft Entra ID。 預設值為 BatchService。 “BatchService”
'UserSubscription'
公共網路存取 如果未指定,預設值為 'enabled'。 “已禁用”
“已啟用”
“SecuredByPerimeter”

BatchAccountIdentity (批量帳戶身份)

名字 描述 價值
型別 用於 Batch 帳戶的身分識別類型。 “無”
“系統分配”
'UserAssigned' (必要)
使用者指派的身份 與 Batch 帳戶相關聯的使用者身分識別清單。 BatchAccountIdentityUserAssignedIdentities

BatchAccountIdentityUserAssignedIdentities

名字 描述 價值

ComputeNodeIdentity引用

名字 描述 價值
資源ID 使用者指派身分識別的 ARM 資源識別碼。 字串

EncryptionProperties

名字 描述 價值
keySource (金鑰源) 金鑰來源的類型。 “Microsoft.Batch”
“Microsoft.KeyVault”
keyVaultProperties 使用 Microsoft.KeyVault 時的其他詳細數據 KeyVaultProperties

EndpointAccessProfile

名字 描述 價值
defaultAction 端點存取的預設動作。 只有在啟用 publicNetworkAccess 時才適用。 '允許'
'拒絕' (必要)
ip規則 篩選用戶端 IP 位址的 IP 範圍數位。 IPRule []

IPRule

名字 描述 價值
動作 比對用戶端IP位址時的動作。 '允許' (必要)
價值 IPv4 位址或 CIDR 格式的 IPv4 位址範圍。 字串 (必要)

KeyVaultProperties

名字 描述 價值
keyIdentifier 鍵標識符 具有或不含版本之秘密的完整路徑。 範例 https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053。 或 https://mykeyvault.vault.azure.net/keys/testkey。 若要可供使用,必須符合下列必要條件:

Batch 帳戶具有系統指派的身分識別
帳戶身分識別已獲得金鑰/取得、金鑰/解除包裝和密鑰/包裝許可權
KeyVault 已啟用虛刪除和清除保護
字串

KeyVaultReference

名字 描述 價值
識別碼 與 Batch 帳戶相關聯的 Azure 金鑰保存庫資源識別碼。 字串 (必要)
URL 與 Batch 帳戶相關聯的 Azure 金鑰保存庫 URL。 字串 (必要)

網路簡介

名字 描述 價值
accountAccess 賬戶訪問 batchAccount 端點的網路存取配置檔(Batch 帳戶數據平面 API)。 EndpointAccessProfile
節點管理訪問 nodeManagement 端點的網路存取配置檔(Batch 服務管理 Batch 集區的計算節點)。 EndpointAccessProfile

UserAssignedIdentities

名字 描述 價值

使用範例

Azure 已驗證的模組

下列 Azure 驗證模組 可用來部署此資源類型。

模組 描述
Batch 帳戶 Batch 帳戶的AVM資源模組

Azure 快速入門範例

下列 Azure 快速入門範本 包含用於部署此資源類型的 Bicep 範例。

Bicep 檔案 描述
沒有公用IP位址的 Azure Batch 集區 此範本會建立 Azure Batch 簡化的節點通訊集區,而不需要公用 IP 位址。
使用範本建立 Batch 帳戶 此範本會建立 Batch 帳戶和記憶體帳戶。

ARM 樣本資源定義

batchAccounts 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔

資源格式

若要建立 Microsoft.Batch/batchAccounts 資源,請將下列 JSON 新增至範本。

{
  "type": "Microsoft.Batch/batchAccounts",
  "apiVersion": "2024-07-01",
  "name": "string",
  "identity": {
    "type": "string",
    "userAssignedIdentities": {
      "{customized property}": {
      }
    }
  },
  "location": "string",
  "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"
  },
  "tags": {
    "{customized property}": "string"
  }
}

屬性值

Microsoft.Batch/batchAccounts

名字 描述 價值
apiVersion API 版本 '2024-07-01'
身分識別 Batch 帳戶的身分識別。 BatchAccountIdentity (批量帳戶身份)
位置 要在其中建立帳戶的區域。 字串 (必要)
名字 資源名稱 字串

約束:
最小長度 = 3
最大長度 = 24
模式 = ^[a-z0-9]+$ (必要)
性能 Batch 帳戶的屬性。 BatchAccountCreatePropertiesOrBatchAccountProperties
標籤 資源標籤 標記名稱和值的字典。 請參閱範本中的 標籤
型別 資源類型 “Microsoft.Batch/batchAccounts”

AutoStorageBasePropertiesOrAutoStorageProperties

名字 描述 價值
authenticationMode 認證 Batch 服務將用來管理自動記憶體帳戶的驗證模式。 “BatchAccountManagedIdentity”
“StorageKeys”
nodeIdentity引用 此處參考的身分識別必須指派給具有需要存取自動記憶體之計算節點的集區。 ComputeNodeIdentity引用
storageAccountId 要用於自動記憶體帳戶之記憶體帳戶的記憶體帳戶的資源識別碼。 字串 (必要)

BatchAccountCreateParameters標籤

名字 描述 價值

BatchAccountCreatePropertiesOrBatchAccountProperties

名字 描述 價值
allowedAuthenticationModes Batch 帳戶允許的驗證模式清單,可用來向數據平面進行驗證。 這不會影響控制平面的驗證。 包含任何的字串數組:
“AAD”
“共用金鑰”
'TaskAuthenticationToken'
autoStorage 與自動記憶體帳戶相關的屬性。 AutoStorageBasePropertiesOrAutoStorageProperties
加密 設定客戶數據在 Batch 帳戶內加密的方式。 根據預設,帳戶會使用Microsoft受控密鑰來加密。 如需其他控制,可以改用客戶管理的密鑰。 EncryptionProperties
keyVault引用 與 Batch 帳戶相關聯的 Azure 金鑰保存庫參考。 KeyVaultReference
網路簡介 只有在啟用 publicNetworkAccess 時,網路配置檔才會生效。 網路簡介
poolAllocationMode (池分配模式) 集區配置模式也會影響用戶端如何向 Batch 服務 API 進行驗證。 如果模式為 BatchService,用戶端可以使用存取金鑰或Microsoft Entra 識別碼進行驗證。 如果模式為 UserSubscription,客戶端必須使用Microsoft Entra ID。 預設值為 BatchService。 “BatchService”
'UserSubscription'
公共網路存取 如果未指定,預設值為 'enabled'。 “已禁用”
“已啟用”
“SecuredByPerimeter”

BatchAccountIdentity (批量帳戶身份)

名字 描述 價值
型別 用於 Batch 帳戶的身分識別類型。 “無”
“系統分配”
'UserAssigned' (必要)
使用者指派的身份 與 Batch 帳戶相關聯的使用者身分識別清單。 BatchAccountIdentityUserAssignedIdentities

BatchAccountIdentityUserAssignedIdentities

名字 描述 價值

ComputeNodeIdentity引用

名字 描述 價值
資源ID 使用者指派身分識別的 ARM 資源識別碼。 字串

EncryptionProperties

名字 描述 價值
keySource (金鑰源) 金鑰來源的類型。 “Microsoft.Batch”
“Microsoft.KeyVault”
keyVaultProperties 使用 Microsoft.KeyVault 時的其他詳細數據 KeyVaultProperties

EndpointAccessProfile

名字 描述 價值
defaultAction 端點存取的預設動作。 只有在啟用 publicNetworkAccess 時才適用。 '允許'
'拒絕' (必要)
ip規則 篩選用戶端 IP 位址的 IP 範圍數位。 IPRule []

IPRule

名字 描述 價值
動作 比對用戶端IP位址時的動作。 '允許' (必要)
價值 IPv4 位址或 CIDR 格式的 IPv4 位址範圍。 字串 (必要)

KeyVaultProperties

名字 描述 價值
keyIdentifier 鍵標識符 具有或不含版本之秘密的完整路徑。 範例 https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053。 或 https://mykeyvault.vault.azure.net/keys/testkey。 若要可供使用,必須符合下列必要條件:

Batch 帳戶具有系統指派的身分識別
帳戶身分識別已獲得金鑰/取得、金鑰/解除包裝和密鑰/包裝許可權
KeyVault 已啟用虛刪除和清除保護
字串

KeyVaultReference

名字 描述 價值
識別碼 與 Batch 帳戶相關聯的 Azure 金鑰保存庫資源識別碼。 字串 (必要)
URL 與 Batch 帳戶相關聯的 Azure 金鑰保存庫 URL。 字串 (必要)

網路簡介

名字 描述 價值
accountAccess 賬戶訪問 batchAccount 端點的網路存取配置檔(Batch 帳戶數據平面 API)。 EndpointAccessProfile
節點管理訪問 nodeManagement 端點的網路存取配置檔(Batch 服務管理 Batch 集區的計算節點)。 EndpointAccessProfile

UserAssignedIdentities

名字 描述 價值

使用範例

Azure 快速入門範本

下列 Azure 快速入門範本 部署此資源類型。

範本 描述
沒有公用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@2024-07-01"
  name = "string"
  parent_id = "string"
  identity {
    type = "string"
    identity_ids = [
      "string"
    ]
  }
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    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"
    }
  }
}

屬性值

Microsoft.Batch/batchAccounts

名字 描述 價值
身分識別 Batch 帳戶的身分識別。 BatchAccountIdentity (批量帳戶身份)
位置 要在其中建立帳戶的區域。 字串 (必要)
名字 資源名稱 字串

約束:
最小長度 = 3
最大長度 = 24
模式 = ^[a-z0-9]+$ (必要)
parent_id 要套用此延伸模組資源之資源的標識碼。 字串 (必要)
性能 Batch 帳戶的屬性。 BatchAccountCreatePropertiesOrBatchAccountProperties
標籤 資源標籤 標記名稱和值的字典。
型別 資源類型 “Microsoft.Batch/batchAccounts@2024-07-01”

AutoStorageBasePropertiesOrAutoStorageProperties

名字 描述 價值
authenticationMode 認證 Batch 服務將用來管理自動記憶體帳戶的驗證模式。 “BatchAccountManagedIdentity”
“StorageKeys”
nodeIdentity引用 此處參考的身分識別必須指派給具有需要存取自動記憶體之計算節點的集區。 ComputeNodeIdentity引用
storageAccountId 要用於自動記憶體帳戶之記憶體帳戶的記憶體帳戶的資源識別碼。 字串 (必要)

BatchAccountCreateParameters標籤

名字 描述 價值

BatchAccountCreatePropertiesOrBatchAccountProperties

名字 描述 價值
allowedAuthenticationModes Batch 帳戶允許的驗證模式清單,可用來向數據平面進行驗證。 這不會影響控制平面的驗證。 包含任何的字串數組:
“AAD”
“共用金鑰”
'TaskAuthenticationToken'
autoStorage 與自動記憶體帳戶相關的屬性。 AutoStorageBasePropertiesOrAutoStorageProperties
加密 設定客戶數據在 Batch 帳戶內加密的方式。 根據預設,帳戶會使用Microsoft受控密鑰來加密。 如需其他控制,可以改用客戶管理的密鑰。 EncryptionProperties
keyVault引用 與 Batch 帳戶相關聯的 Azure 金鑰保存庫參考。 KeyVaultReference
網路簡介 只有在啟用 publicNetworkAccess 時,網路配置檔才會生效。 網路簡介
poolAllocationMode (池分配模式) 集區配置模式也會影響用戶端如何向 Batch 服務 API 進行驗證。 如果模式為 BatchService,用戶端可以使用存取金鑰或Microsoft Entra 識別碼進行驗證。 如果模式為 UserSubscription,客戶端必須使用Microsoft Entra ID。 預設值為 BatchService。 “BatchService”
'UserSubscription'
公共網路存取 如果未指定,預設值為 'enabled'。 “已禁用”
“已啟用”
“SecuredByPerimeter”

BatchAccountIdentity (批量帳戶身份)

名字 描述 價值
型別 用於 Batch 帳戶的身分識別類型。 “無”
“系統分配”
'UserAssigned' (必要)
使用者指派的身份 與 Batch 帳戶相關聯的使用者身分識別清單。 BatchAccountIdentityUserAssignedIdentities

BatchAccountIdentityUserAssignedIdentities

名字 描述 價值

ComputeNodeIdentity引用

名字 描述 價值
資源ID 使用者指派身分識別的 ARM 資源識別碼。 字串

EncryptionProperties

名字 描述 價值
keySource (金鑰源) 金鑰來源的類型。 “Microsoft.Batch”
“Microsoft.KeyVault”
keyVaultProperties 使用 Microsoft.KeyVault 時的其他詳細數據 KeyVaultProperties

EndpointAccessProfile

名字 描述 價值
defaultAction 端點存取的預設動作。 只有在啟用 publicNetworkAccess 時才適用。 '允許'
'拒絕' (必要)
ip規則 篩選用戶端 IP 位址的 IP 範圍數位。 IPRule []

IPRule

名字 描述 價值
動作 比對用戶端IP位址時的動作。 '允許' (必要)
價值 IPv4 位址或 CIDR 格式的 IPv4 位址範圍。 字串 (必要)

KeyVaultProperties

名字 描述 價值
keyIdentifier 鍵標識符 具有或不含版本之秘密的完整路徑。 範例 https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053。 或 https://mykeyvault.vault.azure.net/keys/testkey。 若要可供使用,必須符合下列必要條件:

Batch 帳戶具有系統指派的身分識別
帳戶身分識別已獲得金鑰/取得、金鑰/解除包裝和密鑰/包裝許可權
KeyVault 已啟用虛刪除和清除保護
字串

KeyVaultReference

名字 描述 價值
識別碼 與 Batch 帳戶相關聯的 Azure 金鑰保存庫資源識別碼。 字串 (必要)
URL 與 Batch 帳戶相關聯的 Azure 金鑰保存庫 URL。 字串 (必要)

網路簡介

名字 描述 價值
accountAccess 賬戶訪問 batchAccount 端點的網路存取配置檔(Batch 帳戶數據平面 API)。 EndpointAccessProfile
節點管理訪問 nodeManagement 端點的網路存取配置檔(Batch 服務管理 Batch 集區的計算節點)。 EndpointAccessProfile

UserAssignedIdentities

名字 描述 價值

使用範例

Terraform 範例

部署 Azure Batch 帳戶的基本範例。

terraform {
  required_providers {
    azapi = {
      source = "Azure/azapi"
    }
  }
}

provider "azapi" {
  skip_provider_registration = false
}

variable "resource_name" {
  type    = string
  default = "acctest0001"
}

variable "location" {
  type    = string
  default = "westeurope"
}

resource "azapi_resource" "resourceGroup" {
  type     = "Microsoft.Resources/resourceGroups@2020-06-01"
  name     = var.resource_name
  location = var.location
}

resource "azapi_resource" "batchAccount" {
  type      = "Microsoft.Batch/batchAccounts@2022-10-01"
  parent_id = azapi_resource.resourceGroup.id
  name      = var.resource_name
  location  = var.location
  body = {
    properties = {
      encryption = {
        keySource = "Microsoft.Batch"
      }
      poolAllocationMode  = "BatchService"
      publicNetworkAccess = "Enabled"
    }
  }
  schema_validation_enabled = false
  response_export_values    = ["*"]
}

Azure 已驗證的模組

下列 Azure 驗證模組 可用來部署此資源類型。

模組 描述
Batch 帳戶 Batch 帳戶的AVM資源模組