Belirtilen hesabın içinde yeni bir havuz oluşturur.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}?api-version=2025-06-01
URI Parametreleri
| Name |
İçinde |
Gerekli |
Tür |
Description |
|
accountName
|
path |
True
|
string
minLength: 3 maxLength: 24 pattern: ^[a-zA-Z0-9]+$
|
Bölgede benzersiz olması gereken Batch hesabı için bir isim. Toplu hesap isimleri 3 ile 24 karakter arasında uzun olmalı ve yalnızca numaralar ile küçük harfler kullanılmalıdır. Bu isim, hesabın oluşturulduğu bölgedeki Batch hizmetine erişmek için kullanılan DNS adının bir parçası olarak kullanılır. Örneğin: http://accountname.region.batch.azure.com/.
|
|
poolName
|
path |
True
|
string
minLength: 1 maxLength: 64 pattern: ^[a-zA-Z0-9_-]+$
|
Havuz adı. Bu, hesap içinde benzersiz olmalıdır.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Kaynak grubunun adı. Ad büyük/küçük harfe duyarsız.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
Hedef aboneliğin kimliği. Değer bir UUID olmalıdır.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Bu işlem için kullanılacak API sürümü.
|
| Name |
Gerekli |
Tür |
Description |
|
If-Match
|
|
string
|
Güncelleştirilecek havuzun varlık durumu (ETag) sürümü. "*" değeri, yalnızca havuzun zaten mevcut olması durumunda işlemi uygulamak için kullanılabilir. Atlanırsa, bu işlem her zaman uygulanır.
|
|
If-None-Match
|
|
string
|
Yeni bir havuzun oluşturulmasına izin vermek, ancak mevcut havuzun güncelleştirilmesini önlemek için '*' olarak ayarlayın. Diğer değerler yoksayılır.
|
İstek Gövdesi
| Name |
Tür |
Description |
|
identity
|
BatchPoolIdentity
|
Batch Havuzu için kullanılan kimlik türü.
|
|
properties.applicationPackages
|
ApplicationPackageReference[]
|
Havuzdaki her işlem düğümüne yüklenecek uygulama paketlerinin listesi.
Uygulama paketi başvurularındaki değişiklikler havuza katılan tüm yeni işlem düğümlerini etkiler, ancak yeniden başlatılana veya yeniden tasarlanana kadar zaten havuzda olan işlem düğümlerini etkilemez. Belirli bir havuzda en fazla 10 uygulama paketi başvurusu vardır.
|
|
properties.deploymentConfiguration
|
DeploymentConfiguration
|
Bu özellik, havuz düğümlerinin dağıtılacağı sanal makineleri açıklar.
Dağıtım yapılandırma özellikleri.
|
|
properties.displayName
|
string
|
Havuzun görünen adı.
Görünen adın benzersiz olması gerekmez ve en fazla 1024 uzunluğa kadar unicode karakter içerebilir.
|
|
properties.interNodeCommunication
|
InterNodeCommunicationState
|
Havuzun düğümler arasında doğrudan iletişime izin verip vermediği.
Bu, havuza hangi düğümlerin atanabileceğine yönelik kısıtlamalar uygular. Bu değerin etkinleştirilmesi, istenen düğüm sayısının havuzda ayrılma olasılığını azaltabilir. Belirtilmezse, bu değer varsayılan olarak 'Devre Dışı' olur.
|
|
properties.metadata
|
MetadataItem[]
|
Havuzla meta veri olarak ilişkili ad-değer çiftlerinin listesi.
Batch hizmeti meta veriye herhangi bir anlam atamaz; yalnızca kullanıcı kodunun kullanımına yöneliktir.
|
|
properties.mountConfiguration
|
MountConfiguration[]
|
Havuzdaki her düğüme bağlanacak dosya sistemlerinin listesi.
Bu, Azure Dosyalar, NFS, CIFS/SMB ve Blobfuse'u destekler.
|
|
properties.networkConfiguration
|
NetworkConfiguration
|
Havuzun ağ yapılandırması.
Havuz için ağ yapılandırması.
|
|
properties.scaleSettings
|
ScaleSettings
|
Havuzdaki düğüm sayısını yapılandıran ayarlar.
Havuzun istenen boyutunu tanımlar. Bu, istenen targetDedicatedNodes öğesinin belirtildiği 'fixedScale' veya düzenli aralıklarla yeniden değerlendirilen bir formülü tanımlayan 'autoScale' olabilir. Bu özellik belirtilmezse havuz 0 targetDedicatedNodes ile sabit bir ölçeğe sahip olur.
|
|
properties.startTask
|
StartTask
|
Havuza katılırken her işlem düğümünde çalıştırılacak şekilde belirtilen bir görev.
PATCH (güncelleştirme) işleminde bu özellik, başlangıç görevini havuzdan kaldırmak için boş bir nesneye ayarlanabilir.
|
|
properties.taskSchedulingPolicy
|
TaskSchedulingPolicy
|
Görevlerin havuzdaki işlem düğümleri arasında nasıl dağıtıldığı.
Belirtilmezse, varsayılan yayılır.
|
|
properties.taskSlotsPerNode
|
integer
(int32)
|
Havuzdaki tek bir işlem düğümünde eşzamanlı görevleri çalıştırmak için kullanılabilecek görev yuvalarının sayısı.
Varsayılan değer 1'dir. Maksimum değer, havuzun vmSize veya 256 çekirdek sayısının 4 katı kadar küçüktür.
|
|
properties.upgradePolicy
|
UpgradePolicy
|
Havuzun yükseltme ilkesi.
Otomatik, el ile veya sıralı yükseltme ilkesini açıklar.
|
|
properties.userAccounts
|
UserAccount[]
|
Havuzdaki her düğümde oluşturulacak kullanıcı hesaplarının listesi.
Havuzdaki her düğümde oluşturulacak kullanıcı hesaplarının listesi.
|
|
properties.vmSize
|
string
|
Havuzdaki sanal makinelerin boyutu. Havuzdaki tüm VM'ler aynı boyuttadır.
Kullanılabilir VM boyutları hakkında bilgi için bkz. Azure'da Sanal Makineler için Boyutlar (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch, STANDARD_A0 ve premium depolama alanı (STANDARD_GS, STANDARD_DS ve STANDARD_DSV2 serisi) dışındaki tüm Azure VM boyutlarını destekler.
|
|
tags
|
object
|
Kaynağın etiketleri.
|
Yanıtlar
| Name |
Tür |
Description |
|
200 OK
|
Pool
|
İstek başarılı oldu.
Üst Bilgiler
ETag: string
|
|
Other Status Codes
|
CloudError
|
Beklenmeyen bir hata yanıtı.
|
Güvenlik
azure_auth
Azure Active Directory OAuth2 akışı.
Tür:
oauth2
Akış:
implicit
Yetkilendirme URL’si:
https://login.microsoftonline.com/common/oauth2/authorize
Kapsamlar
| Name |
Description |
|
user_impersonation
|
kullanıcı hesabınızın kimliğine bürünme
|
Örnekler
CreatePool - accelerated networking
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-datacenter-smalldisk",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.windows amd64"
}
},
"networkConfiguration": {
"enableAcceleratedNetworking": true,
"subnetId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"
},
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 1,
"targetLowPriorityNodes": 0
}
},
"vmSize": "STANDARD_D1_V2"
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_accelerated_networking.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-datacenter-smalldisk",
"version": "latest",
},
"nodeAgentSkuId": "batch.node.windows amd64",
}
},
"networkConfiguration": {
"enableAcceleratedNetworking": True,
"subnetId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123",
},
"scaleSettings": {"fixedScale": {"targetDedicatedNodes": 1, "targetLowPriorityNodes": 0}},
"vmSize": "STANDARD_D1_V2",
}
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_AcceleratedNetworking.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_AcceleratedNetworking.json
func ExamplePoolClient_Create_createPoolAcceleratedNetworking() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
Offer: to.Ptr("WindowsServer"),
Publisher: to.Ptr("MicrosoftWindowsServer"),
SKU: to.Ptr("2016-datacenter-smalldisk"),
Version: to.Ptr("latest"),
},
NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
},
},
NetworkConfiguration: &armbatch.NetworkConfiguration{
EnableAcceleratedNetworking: to.Ptr(true),
SubnetID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"),
},
ScaleSettings: &armbatch.ScaleSettings{
FixedScale: &armbatch.FixedScaleSettings{
TargetDedicatedNodes: to.Ptr[int32](1),
TargetLowPriorityNodes: to.Ptr[int32](0),
},
},
VMSize: to.Ptr("STANDARD_D1_V2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8DB46CB72A227E2\""
// Pool: &armbatch.Pool{
// Name: to.Ptr("testpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Properties: &armbatch.PoolProperties{
// AllocationState: to.Ptr(armbatch.AllocationStateSteady),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-27T03:00:34.0646502Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-27T02:59:41.8592226Z"); return t}()),
// CurrentDedicatedNodes: to.Ptr[int32](1),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("WindowsServer"),
// Publisher: to.Ptr("MicrosoftWindowsServer"),
// SKU: to.Ptr("2016-datacenter-smalldisk"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-27T02:59:41.8592226Z"); return t}()),
// NetworkConfiguration: &armbatch.NetworkConfiguration{
// DynamicVNetAssignmentScope: to.Ptr(armbatch.DynamicVNetAssignmentScopeNone),
// EnableAcceleratedNetworking: to.Ptr(true),
// SubnetID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"),
// },
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-27T02:59:41.8592226Z"); return t}()),
// ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// ResizeTimeout: to.Ptr("PT15M"),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-04-27T02:59:41.8592226Z"); return t}()),
// TargetDedicatedNodes: to.Ptr[int32](1),
// },
// ScaleSettings: &armbatch.ScaleSettings{
// FixedScale: &armbatch.FixedScaleSettings{
// ResizeTimeout: to.Ptr("PT15M"),
// TargetDedicatedNodes: to.Ptr[int32](1),
// TargetLowPriorityNodes: to.Ptr[int32](0),
// },
// },
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// },
// TaskSlotsPerNode: to.Ptr[int32](1),
// VMSize: to.Ptr("STANDARD_D1_V2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_AcceleratedNetworking.json
*/
async function createPoolAcceleratedNetworking() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-datacenter-smalldisk",
version: "latest",
},
nodeAgentSkuId: "batch.node.windows amd64",
},
},
networkConfiguration: {
enableAcceleratedNetworking: true,
subnetId:
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123",
},
scaleSettings: { fixedScale: { targetDedicatedNodes: 1, targetLowPriorityNodes: 0 } },
vmSize: "STANDARD_D1_V2",
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_AcceleratedNetworking.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
VmSize = "STANDARD_D1_V2",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Publisher = "MicrosoftWindowsServer",
Offer = "WindowsServer",
Sku = "2016-datacenter-smalldisk",
Version = "latest",
}, "batch.node.windows amd64"),
ScaleSettings = new BatchAccountPoolScaleSettings
{
FixedScale = new BatchAccountFixedScaleSettings
{
TargetDedicatedNodes = 1,
TargetLowPriorityNodes = 0,
},
},
NetworkConfiguration = new BatchNetworkConfiguration
{
SubnetId = new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"),
EnableAcceleratedNetworking = true,
},
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8DB46CB72A227E2"
{
"name": "testpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"properties": {
"allocationState": "Steady",
"allocationStateTransitionTime": "2023-04-27T03:00:34.0646502Z",
"creationTime": "2023-04-27T02:59:41.8592226Z",
"currentDedicatedNodes": 1,
"currentLowPriorityNodes": 0,
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-datacenter-smalldisk",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.windows amd64"
}
},
"interNodeCommunication": "Disabled",
"lastModified": "2023-04-27T02:59:41.8592226Z",
"networkConfiguration": {
"dynamicVnetAssignmentScope": "none",
"enableAcceleratedNetworking": true,
"subnetId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"
},
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2023-04-27T02:59:41.8592226Z",
"resizeOperationStatus": {
"nodeDeallocationOption": "Requeue",
"resizeTimeout": "PT15M",
"startTime": "2023-04-27T02:59:41.8592226Z",
"targetDedicatedNodes": 1
},
"scaleSettings": {
"fixedScale": {
"resizeTimeout": "PT15M",
"targetDedicatedNodes": 1,
"targetLowPriorityNodes": 0
}
},
"taskSchedulingPolicy": {
"nodeFillType": "Spread"
},
"taskSlotsPerNode": 1,
"vmSize": "STANDARD_D1_V2"
}
}
CreatePool - confidential disk encryption set for user subscription accounts
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"properties": {
"vmSize": "Standard_DC2as_v5",
"taskSchedulingPolicy": {
"nodeFillType": "Pack"
},
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2019-datacenter-core-g2",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.windows amd64",
"securityProfile": {
"securityType": "confidentialVM",
"encryptionAtHost": false,
"uefiSettings": {
"vTpmEnabled": true,
"secureBootEnabled": true
}
},
"osDisk": {
"managedDisk": {
"storageAccountType": "Standard_LRS",
"diskEncryptionSet": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"
},
"securityProfile": {
"securityEncryptionType": "DiskWithVMGuestState",
"diskEncryptionSet": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/ConfidentialDiskEncryptionSetId"
}
}
}
},
"dataDisks": [
{
"lun": 0,
"diskSizeGB": 1024,
"managedDisk": {
"storageAccountType": "Standard_LRS",
"diskEncryptionSet": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"
}
}
}
]
}
},
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 1,
"resizeTimeout": "PT15M"
}
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_confidential_disk_encryption_set_for_user_subscription_accounts.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"dataDisks": [
{
"diskSizeGB": 1024,
"lun": 0,
"managedDisk": {
"diskEncryptionSet": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"
},
"storageAccountType": "Standard_LRS",
},
}
],
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2019-datacenter-core-g2",
"version": "latest",
},
"nodeAgentSkuId": "batch.node.windows amd64",
"osDisk": {
"managedDisk": {
"diskEncryptionSet": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"
},
"securityProfile": {
"diskEncryptionSet": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/ConfidentialDiskEncryptionSetId"
},
"securityEncryptionType": "DiskWithVMGuestState",
},
"storageAccountType": "Standard_LRS",
}
},
"securityProfile": {
"encryptionAtHost": False,
"securityType": "confidentialVM",
"uefiSettings": {"secureBootEnabled": True, "vTpmEnabled": True},
},
}
},
"scaleSettings": {"fixedScale": {"resizeTimeout": "PT15M", "targetDedicatedNodes": 1}},
"taskSchedulingPolicy": {"nodeFillType": "Pack"},
"vmSize": "Standard_DC2as_v5",
}
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_ConfidentialDiskEncryptionSet_ForUserSubscriptionAccounts.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_ConfidentialDiskEncryptionSet_ForUserSubscriptionAccounts.json
func ExamplePoolClient_Create_createPoolConfidentialDiskEncryptionSetForUserSubscriptionAccounts() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
VMSize: to.Ptr("Standard_DC2as_v5"),
TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypePack),
},
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
Publisher: to.Ptr("MicrosoftWindowsServer"),
Offer: to.Ptr("WindowsServer"),
SKU: to.Ptr("2019-datacenter-core-g2"),
Version: to.Ptr("latest"),
},
NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
SecurityProfile: &armbatch.SecurityProfile{
SecurityType: to.Ptr(armbatch.SecurityTypesConfidentialVM),
EncryptionAtHost: to.Ptr(false),
UefiSettings: &armbatch.UefiSettings{
VTpmEnabled: to.Ptr(true),
SecureBootEnabled: to.Ptr(true),
},
},
OSDisk: &armbatch.OSDisk{
ManagedDisk: &armbatch.ManagedDisk{
StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardLRS),
DiskEncryptionSet: &armbatch.DiskEncryptionSetParameters{
ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"),
},
SecurityProfile: &armbatch.VMDiskSecurityProfile{
SecurityEncryptionType: to.Ptr(armbatch.SecurityEncryptionTypesDiskWithVMGuestState),
DiskEncryptionSet: &armbatch.DiskEncryptionSetParameters{
ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/ConfidentialDiskEncryptionSetId"),
},
},
},
},
DataDisks: []*armbatch.DataDisk{
{
Lun: to.Ptr[int32](0),
DiskSizeGB: to.Ptr[int32](1024),
ManagedDisk: &armbatch.ManagedDisk{
StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardLRS),
DiskEncryptionSet: &armbatch.DiskEncryptionSetParameters{
ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"),
},
},
},
},
},
},
ScaleSettings: &armbatch.ScaleSettings{
FixedScale: &armbatch.FixedScaleSettings{
TargetDedicatedNodes: to.Ptr[int32](1),
ResizeTimeout: to.Ptr("PT15M"),
},
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8D4EDFEBFADF4AB\""
// Pool: &armbatch.Pool{
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Name: to.Ptr("testpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// Etag: to.Ptr("W/\"0x8D4EDFEBFADF4AB\""),
// Properties: &armbatch.PoolProperties{
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-30T07:30:49.7522647Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-30T07:30:49.7522634Z"); return t}()),
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-30T07:30:49.7522634Z"); return t}()),
// AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-30T07:30:49.7522647Z"); return t}()),
// VMSize: to.Ptr("STANDARD_DC2as_v5"),
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// TaskSlotsPerNode: to.Ptr[int32](1),
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypePack),
// JobDefaultOrder: to.Ptr(armbatch.JobDefaultOrderNone),
// },
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Publisher: to.Ptr("MicrosoftWindowsServer"),
// Offer: to.Ptr("WindowsServer"),
// SKU: to.Ptr("2019-datacenter-core-g2"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// DataDisks: []*armbatch.DataDisk{
// {
// Lun: to.Ptr[int32](0),
// Caching: to.Ptr(armbatch.CachingTypeNone),
// DiskSizeGB: to.Ptr[int32](1024),
// ManagedDisk: &armbatch.ManagedDisk{
// StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardLRS),
// DiskEncryptionSet: &armbatch.DiskEncryptionSetParameters{
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"),
// },
// },
// },
// },
// OSDisk: &armbatch.OSDisk{
// Caching: to.Ptr(armbatch.CachingTypeNone),
// ManagedDisk: &armbatch.ManagedDisk{
// StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardLRS),
// SecurityProfile: &armbatch.VMDiskSecurityProfile{
// SecurityEncryptionType: to.Ptr(armbatch.SecurityEncryptionTypesDiskWithVMGuestState),
// DiskEncryptionSet: &armbatch.DiskEncryptionSetParameters{
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/ConfidentialDiskEncryptionSetId"),
// },
// },
// DiskEncryptionSet: &armbatch.DiskEncryptionSetParameters{
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"),
// },
// },
// },
// SecurityProfile: &armbatch.SecurityProfile{
// SecurityType: to.Ptr(armbatch.SecurityTypesConfidentialVM),
// EncryptionAtHost: to.Ptr(false),
// UefiSettings: &armbatch.UefiSettings{
// SecureBootEnabled: to.Ptr(true),
// VTpmEnabled: to.Ptr(true),
// },
// },
// },
// },
// ScaleSettings: &armbatch.ScaleSettings{
// FixedScale: &armbatch.FixedScaleSettings{
// TargetDedicatedNodes: to.Ptr[int32](1),
// TargetLowPriorityNodes: to.Ptr[int32](0),
// ResizeTimeout: to.Ptr("PT15M"),
// },
// },
// ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// TargetDedicatedNodes: to.Ptr[int32](1),
// NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// ResizeTimeout: to.Ptr("PT15M"),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-30T07:30:49.7522324Z"); return t}()),
// },
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_ConfidentialDiskEncryptionSet_ForUserSubscriptionAccounts.json
*/
async function createPoolConfidentialDiskEncryptionSetForUserSubscriptionAccounts() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
vmSize: "Standard_DC2as_v5",
taskSchedulingPolicy: { nodeFillType: "Pack" },
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: {
publisher: "MicrosoftWindowsServer",
offer: "WindowsServer",
sku: "2019-datacenter-core-g2",
version: "latest",
},
nodeAgentSkuId: "batch.node.windows amd64",
securityProfile: {
securityType: "confidentialVM",
encryptionAtHost: false,
uefiSettings: { vTpmEnabled: true, secureBootEnabled: true },
},
osDisk: {
managedDisk: {
storageAccountType: "Standard_LRS",
diskEncryptionSet: {
id: "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId",
},
securityProfile: {
securityEncryptionType: "DiskWithVMGuestState",
diskEncryptionSet: {
id: "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/ConfidentialDiskEncryptionSetId",
},
},
},
},
dataDisks: [
{
lun: 0,
diskSizeGB: 1024,
managedDisk: {
storageAccountType: "Standard_LRS",
diskEncryptionSet: {
id: "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId",
},
},
},
],
},
},
scaleSettings: { fixedScale: { targetDedicatedNodes: 1, resizeTimeout: "PT15M" } },
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_ConfidentialDiskEncryptionSet_ForUserSubscriptionAccounts.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
VmSize = "Standard_DC2as_v5",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Publisher = "MicrosoftWindowsServer",
Offer = "WindowsServer",
Sku = "2019-datacenter-core-g2",
Version = "latest",
}, "batch.node.windows amd64")
{
DataDisks = {new BatchVmDataDisk(0, 1024)
{
ManagedDisk = new ManagedDisk
{
StorageAccountType = BatchStorageAccountType.StandardLrs,
DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"),
},
}},
OSDisk = new BatchOSDisk
{
ManagedDisk = new ManagedDisk
{
StorageAccountType = BatchStorageAccountType.StandardLrs,
SecurityProfile = new VmDiskSecurityProfile
{
SecurityEncryptionType = BatchSecurityEncryptionType.DiskWithVmGuestState,
DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/ConfidentialDiskEncryptionSetId"),
},
DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"),
},
},
SecurityProfile = new BatchSecurityProfile
{
SecurityType = BatchSecurityType.ConfidentialVm,
EncryptionAtHost = false,
UefiSettings = new BatchUefiSettings
{
IsSecureBootEnabled = true,
IsVTpmEnabled = true,
},
},
},
ScaleSettings = new BatchAccountPoolScaleSettings
{
FixedScale = new BatchAccountFixedScaleSettings
{
ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"),
TargetDedicatedNodes = 1,
},
},
TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Pack),
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8D4EDFEBFADF4AB"
{
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"name": "testpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"etag": "W/\"0x8D4EDFEBFADF4AB\"",
"properties": {
"lastModified": "2025-06-30T07:30:49.7522647Z",
"creationTime": "2025-06-30T07:30:49.7522634Z",
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2025-06-30T07:30:49.7522634Z",
"allocationState": "Resizing",
"allocationStateTransitionTime": "2025-06-30T07:30:49.7522647Z",
"vmSize": "STANDARD_DC2as_v5",
"interNodeCommunication": "Disabled",
"taskSlotsPerNode": 1,
"taskSchedulingPolicy": {
"nodeFillType": "Pack",
"jobDefaultOrder": "None"
},
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2019-datacenter-core-g2",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.windows amd64",
"dataDisks": [
{
"lun": 0,
"caching": "None",
"diskSizeGB": 1024,
"managedDisk": {
"storageAccountType": "Standard_LRS",
"diskEncryptionSet": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"
}
}
}
],
"osDisk": {
"caching": "None",
"managedDisk": {
"storageAccountType": "Standard_LRS",
"securityProfile": {
"securityEncryptionType": "DiskWithVMGuestState",
"diskEncryptionSet": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/ConfidentialDiskEncryptionSetId"
}
},
"diskEncryptionSet": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"
}
}
},
"securityProfile": {
"securityType": "confidentialVM",
"encryptionAtHost": false,
"uefiSettings": {
"secureBootEnabled": true,
"vTpmEnabled": true
}
}
}
},
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 1,
"targetLowPriorityNodes": 0,
"resizeTimeout": "PT15M"
}
},
"resizeOperationStatus": {
"targetDedicatedNodes": 1,
"nodeDeallocationOption": "Requeue",
"resizeTimeout": "PT15M",
"startTime": "2025-06-30T07:30:49.7522324Z"
},
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0
}
}
CreatePool - Custom Image
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04"
}
},
"vmSize": "STANDARD_D4"
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_shared_image_gallery.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04",
}
},
"vmSize": "STANDARD_D4",
}
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_SharedImageGallery.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_SharedImageGallery.json
func ExamplePoolClient_Create_createPoolCustomImage() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"),
},
NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
},
},
VMSize: to.Ptr("STANDARD_D4"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8D4EDFEBFADF4AB\""
// Pool: &armbatch.Pool{
// Name: to.Ptr("testpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Properties: &armbatch.PoolProperties{
// AllocationState: to.Ptr(armbatch.AllocationStateSteady),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// ScaleSettings: &armbatch.ScaleSettings{
// FixedScale: &armbatch.FixedScaleSettings{
// TargetDedicatedNodes: to.Ptr[int32](0),
// TargetLowPriorityNodes: to.Ptr[int32](0),
// },
// },
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// },
// TaskSlotsPerNode: to.Ptr[int32](1),
// VMSize: to.Ptr("STANDARD_D4"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_SharedImageGallery.json
*/
async function createPoolCustomImage() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: {
id: "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1",
},
nodeAgentSkuId: "batch.node.ubuntu 18.04",
},
},
vmSize: "STANDARD_D4",
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_SharedImageGallery.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
VmSize = "STANDARD_D4",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Id = new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"),
}, "batch.node.ubuntu 18.04"),
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8D4EDFEBFADF4AB"
{
"name": "testpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"properties": {
"allocationState": "Steady",
"allocationStateTransitionTime": "2017-08-28T10:22:55.9407275Z",
"creationTime": "2017-08-28T10:22:55.9407275Z",
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0,
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04"
}
},
"interNodeCommunication": "Disabled",
"lastModified": "2017-08-28T10:22:55.9407275Z",
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2017-08-28T10:22:55.9407275Z",
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 0,
"targetLowPriorityNodes": 0
}
},
"taskSchedulingPolicy": {
"nodeFillType": "Spread"
},
"taskSlotsPerNode": 1,
"vmSize": "STANDARD_D4"
}
}
CreatePool - customer managed key for Batch managed accounts
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"properties": {
"vmSize": "Standard_D4ds_v5",
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"sku": "2022-Datacenter",
"publisher": "MicrosoftWindowsServer",
"version": "latest",
"offer": "WindowsServer"
},
"nodeAgentSkuId": "batch.node.windows amd64",
"diskEncryptionConfiguration": {
"targets": [
"OsDisk"
],
"customerManagedKey": {
"keyUrl": "http://sample.vault.azure.net//keys/cmk/bb60031a6d4545d3a60d3f94588538c9",
"identityReference": {
"resourceId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"
}
}
}
}
},
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 1,
"resizeTimeout": "PT15M"
}
}
},
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_customer_managed_key_for_batch_managed_accounts.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}
},
},
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"diskEncryptionConfiguration": {
"customerManagedKey": {
"identityReference": {
"resourceId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"
},
"keyUrl": "http://sample.vault.azure.net//keys/cmk/bb60031a6d4545d3a60d3f94588538c9",
},
"targets": ["OsDisk"],
},
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2022-Datacenter",
"version": "latest",
},
"nodeAgentSkuId": "batch.node.windows amd64",
}
},
"scaleSettings": {"fixedScale": {"resizeTimeout": "PT15M", "targetDedicatedNodes": 1}},
"vmSize": "Standard_D4ds_v5",
},
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_CustomerManagedKey_ForBatchManagedAccounts.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_CustomerManagedKey_ForBatchManagedAccounts.json
func ExamplePoolClient_Create_createPoolCustomerManagedKeyForBatchManagedAccounts() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
VMSize: to.Ptr("Standard_D4ds_v5"),
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
SKU: to.Ptr("2022-Datacenter"),
Publisher: to.Ptr("MicrosoftWindowsServer"),
Version: to.Ptr("latest"),
Offer: to.Ptr("WindowsServer"),
},
NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
DiskEncryptionConfiguration: &armbatch.DiskEncryptionConfiguration{
Targets: []*armbatch.DiskEncryptionTarget{
to.Ptr(armbatch.DiskEncryptionTargetOsDisk),
},
CustomerManagedKey: &armbatch.DiskCustomerManagedKey{
KeyURL: to.Ptr("http://sample.vault.azure.net//keys/cmk/bb60031a6d4545d3a60d3f94588538c9"),
IdentityReference: &armbatch.ComputeNodeIdentityReference{
ResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
},
},
},
},
},
ScaleSettings: &armbatch.ScaleSettings{
FixedScale: &armbatch.FixedScaleSettings{
TargetDedicatedNodes: to.Ptr[int32](1),
ResizeTimeout: to.Ptr("PT15M"),
},
},
},
Identity: &armbatch.PoolIdentity{
Type: to.Ptr(armbatch.PoolIdentityTypeUserAssigned),
UserAssignedIdentities: map[string]*armbatch.UserAssignedIdentities{
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8D4EDFEBFADF4AB\""
// Pool: &armbatch.Pool{
// Identity: &armbatch.PoolIdentity{
// Type: to.Ptr(armbatch.PoolIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armbatch.UserAssignedIdentities{
// "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armbatch.UserAssignedIdentities{
// PrincipalID: to.Ptr("principalId"),
// ClientID: to.Ptr("clientId"),
// },
// },
// },
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Name: to.Ptr("testpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// Etag: to.Ptr("W/\"0x8D4EDFEBFADF4AB\""),
// Properties: &armbatch.PoolProperties{
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-30T07:16:33.4309281Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-30T07:16:33.4309266Z"); return t}()),
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-30T07:16:33.4309266Z"); return t}()),
// AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-30T07:16:33.4309281Z"); return t}()),
// VMSize: to.Ptr("Standard_D4ds_v5"),
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// TaskSlotsPerNode: to.Ptr[int32](1),
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// JobDefaultOrder: to.Ptr(armbatch.JobDefaultOrderNone),
// },
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Publisher: to.Ptr("MicrosoftWindowsServer"),
// Offer: to.Ptr("WindowsServer"),
// SKU: to.Ptr("2022-Datacenter"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// DiskEncryptionConfiguration: &armbatch.DiskEncryptionConfiguration{
// Targets: []*armbatch.DiskEncryptionTarget{
// to.Ptr(armbatch.DiskEncryptionTargetOsDisk),
// },
// CustomerManagedKey: &armbatch.DiskCustomerManagedKey{
// KeyURL: to.Ptr("http://sample.vault.azure.net//keys/cmk/bb60031a6d4545d3a60d3f94588538c9"),
// IdentityReference: &armbatch.ComputeNodeIdentityReference{
// ResourceID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
// },
// },
// },
// },
// },
// ScaleSettings: &armbatch.ScaleSettings{
// FixedScale: &armbatch.FixedScaleSettings{
// TargetDedicatedNodes: to.Ptr[int32](1),
// TargetLowPriorityNodes: to.Ptr[int32](0),
// ResizeTimeout: to.Ptr("PT15M"),
// },
// },
// ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// TargetDedicatedNodes: to.Ptr[int32](1),
// NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// ResizeTimeout: to.Ptr("PT15M"),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-30T07:16:33.4309126Z"); return t}()),
// },
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_CustomerManagedKey_ForBatchManagedAccounts.json
*/
async function createPoolCustomerManagedKeyForBatchManagedAccounts() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
vmSize: "Standard_D4ds_v5",
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: {
sku: "2022-Datacenter",
publisher: "MicrosoftWindowsServer",
version: "latest",
offer: "WindowsServer",
},
nodeAgentSkuId: "batch.node.windows amd64",
diskEncryptionConfiguration: {
targets: ["OsDisk"],
customerManagedKey: {
keyUrl: "http://sample.vault.azure.net//keys/cmk/bb60031a6d4545d3a60d3f94588538c9",
identityReference: {
resourceId:
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
},
},
},
},
},
scaleSettings: { fixedScale: { targetDedicatedNodes: 1, resizeTimeout: "PT15M" } },
identity: {
type: "UserAssigned",
userAssignedIdentities: {
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1":
{},
},
},
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_CustomerManagedKey_ForBatchManagedAccounts.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
Identity = new ManagedServiceIdentity("UserAssigned")
{
UserAssignedIdentities =
{
[new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1")] = new UserAssignedIdentity()
},
},
VmSize = "Standard_D4ds_v5",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Publisher = "MicrosoftWindowsServer",
Offer = "WindowsServer",
Sku = "2022-Datacenter",
Version = "latest",
}, "batch.node.windows amd64")
{
DiskEncryptionConfiguration = new BatchDiskEncryptionConfiguration
{
Targets = { BatchDiskEncryptionTarget.OSDisk },
CustomerManagedKey = new BatchDiskCustomerManagedKey
{
KeyUri = new Uri("http://sample.vault.azure.net//keys/cmk/bb60031a6d4545d3a60d3f94588538c9"),
IdentityReferenceResourceId = new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"),
},
},
},
ScaleSettings = new BatchAccountPoolScaleSettings
{
FixedScale = new BatchAccountFixedScaleSettings
{
ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"),
TargetDedicatedNodes = 1,
},
},
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8D4EDFEBFADF4AB"
{
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {
"principalId": "principalId",
"clientId": "clientId"
}
}
},
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"name": "testpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"etag": "W/\"0x8D4EDFEBFADF4AB\"",
"properties": {
"lastModified": "2025-06-30T07:16:33.4309281Z",
"creationTime": "2025-06-30T07:16:33.4309266Z",
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2025-06-30T07:16:33.4309266Z",
"allocationState": "Resizing",
"allocationStateTransitionTime": "2025-06-30T07:16:33.4309281Z",
"vmSize": "Standard_D4ds_v5",
"interNodeCommunication": "Disabled",
"taskSlotsPerNode": 1,
"taskSchedulingPolicy": {
"nodeFillType": "Spread",
"jobDefaultOrder": "None"
},
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2022-Datacenter",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.windows amd64",
"diskEncryptionConfiguration": {
"targets": [
"OsDisk"
],
"customerManagedKey": {
"keyUrl": "http://sample.vault.azure.net//keys/cmk/bb60031a6d4545d3a60d3f94588538c9",
"identityReference": {
"resourceId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1"
}
}
}
}
},
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 1,
"targetLowPriorityNodes": 0,
"resizeTimeout": "PT15M"
}
},
"resizeOperationStatus": {
"targetDedicatedNodes": 1,
"nodeDeallocationOption": "Requeue",
"resizeTimeout": "PT15M",
"startTime": "2025-06-30T07:16:33.4309126Z"
},
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0
}
}
CreatePool - disk encryption set for user subscription accounts
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"properties": {
"vmSize": "Standard_D4ds_v5",
"taskSchedulingPolicy": {
"nodeFillType": "Pack"
},
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"sku": "2022-Datacenter",
"publisher": "MicrosoftWindowsServer",
"version": "latest",
"offer": "WindowsServer"
},
"nodeAgentSkuId": "batch.node.windows amd64",
"securityProfile": {
"encryptionAtHost": false
},
"osDisk": {
"managedDisk": {
"storageAccountType": "Standard_LRS",
"diskEncryptionSet": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"
}
}
}
}
},
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 1,
"resizeTimeout": "PT15M"
}
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_disk_encryption_set_for_user_subscription_accounts.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2022-Datacenter",
"version": "latest",
},
"nodeAgentSkuId": "batch.node.windows amd64",
"osDisk": {
"managedDisk": {
"diskEncryptionSet": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"
},
"storageAccountType": "Standard_LRS",
}
},
"securityProfile": {"encryptionAtHost": False},
}
},
"scaleSettings": {"fixedScale": {"resizeTimeout": "PT15M", "targetDedicatedNodes": 1}},
"taskSchedulingPolicy": {"nodeFillType": "Pack"},
"vmSize": "Standard_D4ds_v5",
}
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_DiskEncryptionSet_ForUserSubscriptionAccounts.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_DiskEncryptionSet_ForUserSubscriptionAccounts.json
func ExamplePoolClient_Create_createPoolDiskEncryptionSetForUserSubscriptionAccounts() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
VMSize: to.Ptr("Standard_D4ds_v5"),
TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypePack),
},
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
SKU: to.Ptr("2022-Datacenter"),
Publisher: to.Ptr("MicrosoftWindowsServer"),
Version: to.Ptr("latest"),
Offer: to.Ptr("WindowsServer"),
},
NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
SecurityProfile: &armbatch.SecurityProfile{
EncryptionAtHost: to.Ptr(false),
},
OSDisk: &armbatch.OSDisk{
ManagedDisk: &armbatch.ManagedDisk{
StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardLRS),
DiskEncryptionSet: &armbatch.DiskEncryptionSetParameters{
ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"),
},
},
},
},
},
ScaleSettings: &armbatch.ScaleSettings{
FixedScale: &armbatch.FixedScaleSettings{
TargetDedicatedNodes: to.Ptr[int32](1),
ResizeTimeout: to.Ptr("PT15M"),
},
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8D4EDFEBFADF4AB\""
// Pool: &armbatch.Pool{
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Name: to.Ptr("testpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// Etag: to.Ptr("W/\"0x8D4EDFEBFADF4AB\""),
// Properties: &armbatch.PoolProperties{
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-30T07:45:46.1580726Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-30T07:35:44.5579791Z"); return t}()),
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-30T07:35:44.5579791Z"); return t}()),
// AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-30T07:45:46.1580727Z"); return t}()),
// VMSize: to.Ptr("Standard_D4ds_v5"),
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// TaskSlotsPerNode: to.Ptr[int32](1),
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypePack),
// JobDefaultOrder: to.Ptr(armbatch.JobDefaultOrderNone),
// },
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Publisher: to.Ptr("MicrosoftWindowsServer"),
// Offer: to.Ptr("WindowsServer"),
// SKU: to.Ptr("2022-Datacenter"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// OSDisk: &armbatch.OSDisk{
// Caching: to.Ptr(armbatch.CachingTypeNone),
// ManagedDisk: &armbatch.ManagedDisk{
// StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardLRS),
// DiskEncryptionSet: &armbatch.DiskEncryptionSetParameters{
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"),
// },
// },
// },
// SecurityProfile: &armbatch.SecurityProfile{
// EncryptionAtHost: to.Ptr(false),
// },
// },
// },
// ScaleSettings: &armbatch.ScaleSettings{
// FixedScale: &armbatch.FixedScaleSettings{
// TargetDedicatedNodes: to.Ptr[int32](1),
// TargetLowPriorityNodes: to.Ptr[int32](0),
// ResizeTimeout: to.Ptr("PT15M"),
// },
// },
// ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// TargetDedicatedNodes: to.Ptr[int32](1),
// NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// ResizeTimeout: to.Ptr("PT15M"),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-06-30T07:45:46.1580724Z"); return t}()),
// },
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_DiskEncryptionSet_ForUserSubscriptionAccounts.json
*/
async function createPoolDiskEncryptionSetForUserSubscriptionAccounts() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
vmSize: "Standard_D4ds_v5",
taskSchedulingPolicy: { nodeFillType: "Pack" },
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: {
sku: "2022-Datacenter",
publisher: "MicrosoftWindowsServer",
version: "latest",
offer: "WindowsServer",
},
nodeAgentSkuId: "batch.node.windows amd64",
securityProfile: { encryptionAtHost: false },
osDisk: {
managedDisk: {
storageAccountType: "Standard_LRS",
diskEncryptionSet: {
id: "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId",
},
},
},
},
},
scaleSettings: { fixedScale: { targetDedicatedNodes: 1, resizeTimeout: "PT15M" } },
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_DiskEncryptionSet_ForUserSubscriptionAccounts.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
VmSize = "Standard_D4ds_v5",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Publisher = "MicrosoftWindowsServer",
Offer = "WindowsServer",
Sku = "2022-Datacenter",
Version = "latest",
}, "batch.node.windows amd64")
{
OSDisk = new BatchOSDisk
{
ManagedDisk = new ManagedDisk
{
StorageAccountType = BatchStorageAccountType.StandardLrs,
DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"),
},
},
SecurityProfile = new BatchSecurityProfile
{
EncryptionAtHost = false,
},
},
ScaleSettings = new BatchAccountPoolScaleSettings
{
FixedScale = new BatchAccountFixedScaleSettings
{
ResizeTimeout = XmlConvert.ToTimeSpan("PT15M"),
TargetDedicatedNodes = 1,
},
},
TaskSchedulingPolicy = new BatchTaskSchedulingPolicy(BatchNodeFillType.Pack),
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8D4EDFEBFADF4AB"
{
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"name": "testpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"etag": "W/\"0x8D4EDFEBFADF4AB\"",
"properties": {
"lastModified": "2025-06-30T07:45:46.1580726Z",
"creationTime": "2025-06-30T07:35:44.5579791Z",
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2025-06-30T07:35:44.5579791Z",
"allocationState": "Resizing",
"allocationStateTransitionTime": "2025-06-30T07:45:46.1580727Z",
"vmSize": "Standard_D4ds_v5",
"interNodeCommunication": "Disabled",
"taskSlotsPerNode": 1,
"taskSchedulingPolicy": {
"nodeFillType": "Pack",
"jobDefaultOrder": "None"
},
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2022-Datacenter",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.windows amd64",
"osDisk": {
"caching": "None",
"managedDisk": {
"storageAccountType": "Standard_LRS",
"diskEncryptionSet": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"
}
}
},
"securityProfile": {
"encryptionAtHost": false
}
}
},
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 1,
"targetLowPriorityNodes": 0,
"resizeTimeout": "PT15M"
}
},
"resizeOperationStatus": {
"targetDedicatedNodes": 1,
"nodeDeallocationOption": "Requeue",
"resizeTimeout": "PT15M",
"startTime": "2025-06-30T07:45:46.1580724Z"
},
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0
}
}
CreatePool - dual stack networking
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch/providers/Microsoft.Batch/batchAccounts/exampleacc/pools/dualstackpool?api-version=2025-06-01
{
"properties": {
"vmSize": "Standard_D4ds_v5",
"networkConfiguration": {
"publicIPAddressConfiguration": {
"ipFamilies": [
"IPv4",
"IPv6"
]
},
"endpointConfiguration": {
"inboundNatPools": [
{
"backendPort": 22,
"frontendPortRangeStart": 40000,
"frontendPortRangeEnd": 40500,
"name": "sshpool",
"protocol": "TCP",
"networkSecurityGroupRules": [
{
"access": "Allow",
"priority": 1000,
"sourceAddressPrefix": "*",
"sourcePortRanges": [
"*"
]
}
]
}
]
}
},
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"publisher": "Canonical",
"offer": "ubuntu-24_04-lts",
"sku": "server"
},
"nodeAgentSkuId": "batch.node.ubuntu 24.04"
}
},
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 1,
"targetLowPriorityNodes": 0
}
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_dual_stack_networking.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch",
account_name="exampleacc",
pool_name="dualstackpool",
parameters={
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {"offer": "ubuntu-24_04-lts", "publisher": "Canonical", "sku": "server"},
"nodeAgentSkuId": "batch.node.ubuntu 24.04",
}
},
"networkConfiguration": {
"endpointConfiguration": {
"inboundNatPools": [
{
"backendPort": 22,
"frontendPortRangeEnd": 40500,
"frontendPortRangeStart": 40000,
"name": "sshpool",
"networkSecurityGroupRules": [
{
"access": "Allow",
"priority": 1000,
"sourceAddressPrefix": "*",
"sourcePortRanges": ["*"],
}
],
"protocol": "TCP",
}
]
},
"publicIPAddressConfiguration": {"ipFamilies": ["IPv4", "IPv6"]},
},
"scaleSettings": {"fixedScale": {"targetDedicatedNodes": 1, "targetLowPriorityNodes": 0}},
"vmSize": "Standard_D4ds_v5",
}
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_DualStackNetworking.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_DualStackNetworking.json
func ExamplePoolClient_Create_createPoolDualStackNetworking() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch", "exampleacc", "dualstackpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
VMSize: to.Ptr("Standard_D4ds_v5"),
NetworkConfiguration: &armbatch.NetworkConfiguration{
PublicIPAddressConfiguration: &armbatch.PublicIPAddressConfiguration{
IPFamilies: []*armbatch.IPFamily{
to.Ptr(armbatch.IPFamilyIPv4),
to.Ptr(armbatch.IPFamilyIPv6),
},
},
EndpointConfiguration: &armbatch.PoolEndpointConfiguration{
InboundNatPools: []*armbatch.InboundNatPool{
{
BackendPort: to.Ptr[int32](22),
FrontendPortRangeStart: to.Ptr[int32](40000),
FrontendPortRangeEnd: to.Ptr[int32](40500),
Name: to.Ptr("sshpool"),
Protocol: to.Ptr(armbatch.InboundEndpointProtocolTCP),
NetworkSecurityGroupRules: []*armbatch.NetworkSecurityGroupRule{
{
Access: to.Ptr(armbatch.NetworkSecurityGroupRuleAccessAllow),
Priority: to.Ptr[int32](1000),
SourceAddressPrefix: to.Ptr("*"),
SourcePortRanges: []*string{
to.Ptr("*"),
},
},
},
},
},
},
},
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
Publisher: to.Ptr("Canonical"),
Offer: to.Ptr("ubuntu-24_04-lts"),
SKU: to.Ptr("server"),
},
NodeAgentSKUID: to.Ptr("batch.node.ubuntu 24.04"),
},
},
ScaleSettings: &armbatch.ScaleSettings{
FixedScale: &armbatch.FixedScaleSettings{
TargetDedicatedNodes: to.Ptr[int32](1),
TargetLowPriorityNodes: to.Ptr[int32](0),
},
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8D4EDFEBFADF4AB\""
// Pool: &armbatch.Pool{
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/dualstackpool"),
// Name: to.Ptr("dualstackpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// Etag: to.Ptr("W/\"0x8DDC34D4A01A419\""),
// Properties: &armbatch.PoolProperties{
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-07-15T03:11:27.7998105Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-07-15T03:11:27.7997967Z"); return t}()),
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-07-15T03:11:27.7997967Z"); return t}()),
// AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-07-15T03:11:27.7998136Z"); return t}()),
// VMSize: to.Ptr("Standard_D4ds_v5"),
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// TaskSlotsPerNode: to.Ptr[int32](1),
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// JobDefaultOrder: to.Ptr(armbatch.JobDefaultOrderNone),
// },
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Publisher: to.Ptr("Canonical"),
// Offer: to.Ptr("ubuntu-24_04-lts"),
// SKU: to.Ptr("server"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.ubuntu 24.04"),
// },
// },
// NetworkConfiguration: &armbatch.NetworkConfiguration{
// PublicIPAddressConfiguration: &armbatch.PublicIPAddressConfiguration{
// IPFamilies: []*armbatch.IPFamily{
// to.Ptr(armbatch.IPFamilyIPv4),
// to.Ptr(armbatch.IPFamilyIPv6),
// },
// },
// EndpointConfiguration: &armbatch.PoolEndpointConfiguration{
// InboundNatPools: []*armbatch.InboundNatPool{
// {
// Name: to.Ptr("sshpool"),
// Protocol: to.Ptr(armbatch.InboundEndpointProtocolTCP),
// BackendPort: to.Ptr[int32](22),
// FrontendPortRangeStart: to.Ptr[int32](40000),
// FrontendPortRangeEnd: to.Ptr[int32](40500),
// NetworkSecurityGroupRules: []*armbatch.NetworkSecurityGroupRule{
// {
// Access: to.Ptr(armbatch.NetworkSecurityGroupRuleAccessAllow),
// SourceAddressPrefix: to.Ptr("*"),
// Priority: to.Ptr[int32](1000),
// SourcePortRanges: []*string{
// to.Ptr("*"),
// },
// },
// },
// },
// },
// },
// DynamicVNetAssignmentScope: to.Ptr(armbatch.DynamicVNetAssignmentScopeNone),
// EnableAcceleratedNetworking: to.Ptr(false),
// },
// ScaleSettings: &armbatch.ScaleSettings{
// FixedScale: &armbatch.FixedScaleSettings{
// TargetDedicatedNodes: to.Ptr[int32](1),
// TargetLowPriorityNodes: to.Ptr[int32](0),
// ResizeTimeout: to.Ptr("PT15M"),
// },
// },
// ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// TargetDedicatedNodes: to.Ptr[int32](1),
// NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// ResizeTimeout: to.Ptr("PT15M"),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-07-15T03:11:27.7994621Z"); return t}()),
// },
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_DualStackNetworking.json
*/
async function createPoolDualStackNetworking() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create("default-azurebatch", "exampleacc", "dualstackpool", {
vmSize: "Standard_D4ds_v5",
networkConfiguration: {
publicIPAddressConfiguration: { ipFamilies: ["IPv4", "IPv6"] },
endpointConfiguration: {
inboundNatPools: [
{
backendPort: 22,
frontendPortRangeStart: 40000,
frontendPortRangeEnd: 40500,
name: "sshpool",
protocol: "TCP",
networkSecurityGroupRules: [
{
access: "Allow",
priority: 1000,
sourceAddressPrefix: "*",
sourcePortRanges: ["*"],
},
],
},
],
},
},
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: { publisher: "Canonical", offer: "ubuntu-24_04-lts", sku: "server" },
nodeAgentSkuId: "batch.node.ubuntu 24.04",
},
},
scaleSettings: { fixedScale: { targetDedicatedNodes: 1, targetLowPriorityNodes: 0 } },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_DualStackNetworking.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch";
string accountName = "exampleacc";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "dualstackpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
VmSize = "Standard_D4ds_v5",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Publisher = "Canonical",
Offer = "ubuntu-24_04-lts",
Sku = "server",
}, "batch.node.ubuntu 24.04"),
ScaleSettings = new BatchAccountPoolScaleSettings
{
FixedScale = new BatchAccountFixedScaleSettings
{
TargetDedicatedNodes = 1,
TargetLowPriorityNodes = 0,
},
},
NetworkConfiguration = new BatchNetworkConfiguration
{
EndpointInboundNatPools = {new BatchInboundNatPool("sshpool", BatchInboundEndpointProtocol.Tcp, 22, 40000, 40500)
{
NetworkSecurityGroupRules = {new BatchNetworkSecurityGroupRule(1000, BatchNetworkSecurityGroupRuleAccess.Allow, "*")
{
SourcePortRanges = {"*"},
}},
}},
PublicIPAddressConfiguration = new BatchPublicIPAddressConfiguration
{
IPFamilies = { BatchIPFamily.IPv4, BatchIPFamily.IPv6 },
},
},
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8D4EDFEBFADF4AB"
{
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/dualstackpool",
"name": "dualstackpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"etag": "W/\"0x8DDC34D4A01A419\"",
"properties": {
"lastModified": "2025-07-15T03:11:27.7998105Z",
"creationTime": "2025-07-15T03:11:27.7997967Z",
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2025-07-15T03:11:27.7997967Z",
"allocationState": "Resizing",
"allocationStateTransitionTime": "2025-07-15T03:11:27.7998136Z",
"vmSize": "Standard_D4ds_v5",
"interNodeCommunication": "Disabled",
"taskSlotsPerNode": 1,
"taskSchedulingPolicy": {
"nodeFillType": "Spread",
"jobDefaultOrder": "None"
},
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"publisher": "Canonical",
"offer": "ubuntu-24_04-lts",
"sku": "server",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.ubuntu 24.04"
}
},
"networkConfiguration": {
"publicIPAddressConfiguration": {
"ipFamilies": [
"IPv4",
"IPv6"
]
},
"endpointConfiguration": {
"inboundNatPools": [
{
"name": "sshpool",
"protocol": "TCP",
"backendPort": 22,
"frontendPortRangeStart": 40000,
"frontendPortRangeEnd": 40500,
"networkSecurityGroupRules": [
{
"access": "Allow",
"sourceAddressPrefix": "*",
"priority": 1000,
"sourcePortRanges": [
"*"
]
}
]
}
]
},
"dynamicVnetAssignmentScope": "none",
"enableAcceleratedNetworking": false
},
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 1,
"targetLowPriorityNodes": 0,
"resizeTimeout": "PT15M"
}
},
"resizeOperationStatus": {
"targetDedicatedNodes": 1,
"nodeDeallocationOption": "Requeue",
"resizeTimeout": "PT15M",
"startTime": "2025-07-15T03:11:27.7994621Z"
},
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0
}
}
CreatePool - Full VirtualMachineConfiguration
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"dataDisks": [
{
"caching": "ReadWrite",
"diskSizeGB": 30,
"lun": 0,
"managedDisk": {
"storageAccountType": "StandardSSD_LRS"
}
},
{
"caching": "None",
"diskSizeGB": 200,
"lun": 1,
"managedDisk": {
"storageAccountType": "Premium_LRS"
}
}
],
"diskEncryptionConfiguration": {
"targets": [
"OsDisk",
"TemporaryDisk"
]
},
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter-SmallDisk",
"version": "latest"
},
"licenseType": "Windows_Server",
"nodeAgentSkuId": "batch.node.windows amd64",
"nodePlacementConfiguration": {
"policy": "Zonal"
},
"osDisk": {
"ephemeralOSDiskSettings": {
"placement": "CacheDisk"
}
},
"windowsConfiguration": {
"enableAutomaticUpdates": false
}
}
},
"networkConfiguration": {
"endpointConfiguration": {
"inboundNatPools": [
{
"name": "testnat",
"backendPort": 12001,
"frontendPortRangeEnd": 15100,
"frontendPortRangeStart": 15000,
"networkSecurityGroupRules": [
{
"access": "Allow",
"priority": 150,
"sourceAddressPrefix": "192.100.12.45",
"sourcePortRanges": [
"1",
"2"
]
},
{
"access": "Deny",
"priority": 3500,
"sourceAddressPrefix": "*",
"sourcePortRanges": [
"*"
]
}
],
"protocol": "TCP"
}
]
}
},
"scaleSettings": {
"autoScale": {
"evaluationInterval": "PT5M",
"formula": "$TargetDedicatedNodes=1"
}
},
"vmSize": "STANDARD_D4"
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_virtual_machine_configuration.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"dataDisks": [
{
"caching": "ReadWrite",
"diskSizeGB": 30,
"lun": 0,
"managedDisk": {"storageAccountType": "StandardSSD_LRS"},
},
{
"caching": "None",
"diskSizeGB": 200,
"lun": 1,
"managedDisk": {"storageAccountType": "Premium_LRS"},
},
],
"diskEncryptionConfiguration": {"targets": ["OsDisk", "TemporaryDisk"]},
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter-SmallDisk",
"version": "latest",
},
"licenseType": "Windows_Server",
"nodeAgentSkuId": "batch.node.windows amd64",
"nodePlacementConfiguration": {"policy": "Zonal"},
"osDisk": {"ephemeralOSDiskSettings": {"placement": "CacheDisk"}},
"windowsConfiguration": {"enableAutomaticUpdates": False},
}
},
"networkConfiguration": {
"endpointConfiguration": {
"inboundNatPools": [
{
"backendPort": 12001,
"frontendPortRangeEnd": 15100,
"frontendPortRangeStart": 15000,
"name": "testnat",
"networkSecurityGroupRules": [
{
"access": "Allow",
"priority": 150,
"sourceAddressPrefix": "192.100.12.45",
"sourcePortRanges": ["1", "2"],
},
{
"access": "Deny",
"priority": 3500,
"sourceAddressPrefix": "*",
"sourcePortRanges": ["*"],
},
],
"protocol": "TCP",
}
]
}
},
"scaleSettings": {"autoScale": {"evaluationInterval": "PT5M", "formula": "$TargetDedicatedNodes=1"}},
"vmSize": "STANDARD_D4",
}
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_VirtualMachineConfiguration.json
func ExamplePoolClient_Create_createPoolFullVirtualMachineConfiguration() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
DataDisks: []*armbatch.DataDisk{
{
Caching: to.Ptr(armbatch.CachingTypeReadWrite),
DiskSizeGB: to.Ptr[int32](30),
Lun: to.Ptr[int32](0),
ManagedDisk: &armbatch.ManagedDisk{
StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardSSDLRS),
},
},
{
Caching: to.Ptr(armbatch.CachingTypeNone),
DiskSizeGB: to.Ptr[int32](200),
Lun: to.Ptr[int32](1),
ManagedDisk: &armbatch.ManagedDisk{
StorageAccountType: to.Ptr(armbatch.StorageAccountTypePremiumLRS),
},
},
},
DiskEncryptionConfiguration: &armbatch.DiskEncryptionConfiguration{
Targets: []*armbatch.DiskEncryptionTarget{
to.Ptr(armbatch.DiskEncryptionTargetOsDisk),
to.Ptr(armbatch.DiskEncryptionTargetTemporaryDisk),
},
},
ImageReference: &armbatch.ImageReference{
Offer: to.Ptr("WindowsServer"),
Publisher: to.Ptr("MicrosoftWindowsServer"),
SKU: to.Ptr("2016-Datacenter-SmallDisk"),
Version: to.Ptr("latest"),
},
LicenseType: to.Ptr("Windows_Server"),
NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
NodePlacementConfiguration: &armbatch.NodePlacementConfiguration{
Policy: to.Ptr(armbatch.NodePlacementPolicyTypeZonal),
},
OSDisk: &armbatch.OSDisk{
EphemeralOSDiskSettings: &armbatch.DiffDiskSettings{
Placement: to.Ptr("CacheDisk"),
},
},
WindowsConfiguration: &armbatch.WindowsConfiguration{
EnableAutomaticUpdates: to.Ptr(false),
},
},
},
NetworkConfiguration: &armbatch.NetworkConfiguration{
EndpointConfiguration: &armbatch.PoolEndpointConfiguration{
InboundNatPools: []*armbatch.InboundNatPool{
{
Name: to.Ptr("testnat"),
BackendPort: to.Ptr[int32](12001),
FrontendPortRangeEnd: to.Ptr[int32](15100),
FrontendPortRangeStart: to.Ptr[int32](15000),
NetworkSecurityGroupRules: []*armbatch.NetworkSecurityGroupRule{
{
Access: to.Ptr(armbatch.NetworkSecurityGroupRuleAccessAllow),
Priority: to.Ptr[int32](150),
SourceAddressPrefix: to.Ptr("192.100.12.45"),
SourcePortRanges: []*string{
to.Ptr("1"),
to.Ptr("2"),
},
},
{
Access: to.Ptr(armbatch.NetworkSecurityGroupRuleAccessDeny),
Priority: to.Ptr[int32](3500),
SourceAddressPrefix: to.Ptr("*"),
SourcePortRanges: []*string{
to.Ptr("*"),
},
},
},
Protocol: to.Ptr(armbatch.InboundEndpointProtocolTCP),
},
},
},
},
ScaleSettings: &armbatch.ScaleSettings{
AutoScale: &armbatch.AutoScaleSettings{
EvaluationInterval: to.Ptr("PT5M"),
Formula: to.Ptr("$TargetDedicatedNodes=1"),
},
},
VMSize: to.Ptr("STANDARD_D4"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8D4EDFEBFADF4AB\""
// Pool: &armbatch.Pool{
// Name: to.Ptr("testpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Properties: &armbatch.PoolProperties{
// AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// DataDisks: []*armbatch.DataDisk{
// {
// Caching: to.Ptr(armbatch.CachingTypeReadWrite),
// DiskSizeGB: to.Ptr[int32](30),
// Lun: to.Ptr[int32](0),
// ManagedDisk: &armbatch.ManagedDisk{
// StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardSSDLRS),
// },
// },
// {
// Caching: to.Ptr(armbatch.CachingTypeNone),
// DiskSizeGB: to.Ptr[int32](200),
// Lun: to.Ptr[int32](1),
// ManagedDisk: &armbatch.ManagedDisk{
// StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardLRS),
// },
// },
// },
// DiskEncryptionConfiguration: &armbatch.DiskEncryptionConfiguration{
// Targets: []*armbatch.DiskEncryptionTarget{
// to.Ptr(armbatch.DiskEncryptionTargetOsDisk),
// to.Ptr(armbatch.DiskEncryptionTargetTemporaryDisk),
// },
// },
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("WindowsServer"),
// Publisher: to.Ptr("MicrosoftWindowsServer"),
// SKU: to.Ptr("2016-Datacenter-SmallDisk"),
// Version: to.Ptr("latest"),
// },
// LicenseType: to.Ptr("Windows_Server"),
// NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// NodePlacementConfiguration: &armbatch.NodePlacementConfiguration{
// Policy: to.Ptr(armbatch.NodePlacementPolicyTypeZonal),
// },
// WindowsConfiguration: &armbatch.WindowsConfiguration{
// EnableAutomaticUpdates: to.Ptr(false),
// },
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// NetworkConfiguration: &armbatch.NetworkConfiguration{
// EndpointConfiguration: &armbatch.PoolEndpointConfiguration{
// InboundNatPools: []*armbatch.InboundNatPool{
// {
// Name: to.Ptr("testnat"),
// BackendPort: to.Ptr[int32](12001),
// FrontendPortRangeEnd: to.Ptr[int32](15100),
// FrontendPortRangeStart: to.Ptr[int32](15000),
// NetworkSecurityGroupRules: []*armbatch.NetworkSecurityGroupRule{
// {
// Access: to.Ptr(armbatch.NetworkSecurityGroupRuleAccessAllow),
// Priority: to.Ptr[int32](150),
// SourceAddressPrefix: to.Ptr("192.100.12.45"),
// SourcePortRanges: []*string{
// to.Ptr("1"),
// to.Ptr("2"),
// },
// },
// {
// Access: to.Ptr(armbatch.NetworkSecurityGroupRuleAccessDeny),
// Priority: to.Ptr[int32](3500),
// SourceAddressPrefix: to.Ptr("*"),
// SourcePortRanges: []*string{
// to.Ptr("*"),
// },
// },
// },
// Protocol: to.Ptr(armbatch.InboundEndpointProtocolTCP),
// },
// },
// },
// },
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// ScaleSettings: &armbatch.ScaleSettings{
// AutoScale: &armbatch.AutoScaleSettings{
// EvaluationInterval: to.Ptr("PT5M"),
// Formula: to.Ptr("$TargetDedicatedNodes=1"),
// },
// },
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// },
// TaskSlotsPerNode: to.Ptr[int32](1),
// VMSize: to.Ptr("STANDARD_D4"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration.json
*/
async function createPoolFullVirtualMachineConfiguration() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
deploymentConfiguration: {
virtualMachineConfiguration: {
dataDisks: [
{
caching: "ReadWrite",
diskSizeGB: 30,
lun: 0,
managedDisk: { storageAccountType: "StandardSSD_LRS" },
},
{
caching: "None",
diskSizeGB: 200,
lun: 1,
managedDisk: { storageAccountType: "Premium_LRS" },
},
],
diskEncryptionConfiguration: { targets: ["OsDisk", "TemporaryDisk"] },
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2016-Datacenter-SmallDisk",
version: "latest",
},
licenseType: "Windows_Server",
nodeAgentSkuId: "batch.node.windows amd64",
nodePlacementConfiguration: { policy: "Zonal" },
osDisk: { ephemeralOSDiskSettings: { placement: "CacheDisk" } },
windowsConfiguration: { enableAutomaticUpdates: false },
},
},
networkConfiguration: {
endpointConfiguration: {
inboundNatPools: [
{
name: "testnat",
backendPort: 12001,
frontendPortRangeEnd: 15100,
frontendPortRangeStart: 15000,
networkSecurityGroupRules: [
{
access: "Allow",
priority: 150,
sourceAddressPrefix: "192.100.12.45",
sourcePortRanges: ["1", "2"],
},
{
access: "Deny",
priority: 3500,
sourceAddressPrefix: "*",
sourcePortRanges: ["*"],
},
],
protocol: "TCP",
},
],
},
},
scaleSettings: {
autoScale: { evaluationInterval: "PT5M", formula: "$TargetDedicatedNodes=1" },
},
vmSize: "STANDARD_D4",
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_VirtualMachineConfiguration.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
VmSize = "STANDARD_D4",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Publisher = "MicrosoftWindowsServer",
Offer = "WindowsServer",
Sku = "2016-Datacenter-SmallDisk",
Version = "latest",
}, "batch.node.windows amd64")
{
IsAutomaticUpdateEnabled = false,
DataDisks = {new BatchVmDataDisk(0, 30)
{
Caching = BatchDiskCachingType.ReadWrite,
ManagedDisk = new ManagedDisk
{
StorageAccountType = BatchStorageAccountType.StandardSsdLrs,
},
}, new BatchVmDataDisk(1, 200)
{
Caching = BatchDiskCachingType.None,
ManagedDisk = new ManagedDisk
{
StorageAccountType = BatchStorageAccountType.PremiumLrs,
},
}},
LicenseType = "Windows_Server",
DiskEncryptionConfiguration = new BatchDiskEncryptionConfiguration
{
Targets = { BatchDiskEncryptionTarget.OSDisk, BatchDiskEncryptionTarget.TemporaryDisk },
},
NodePlacementPolicy = BatchNodePlacementPolicyType.Zonal,
OSDisk = new BatchOSDisk
{
EphemeralOSDiskPlacement = BatchDiffDiskPlacement.CacheDisk,
},
},
ScaleSettings = new BatchAccountPoolScaleSettings
{
AutoScale = new BatchAccountAutoScaleSettings("$TargetDedicatedNodes=1")
{
EvaluationInterval = XmlConvert.ToTimeSpan("PT5M"),
},
},
NetworkConfiguration = new BatchNetworkConfiguration
{
EndpointInboundNatPools = {new BatchInboundNatPool("testnat", BatchInboundEndpointProtocol.Tcp, 12001, 15000, 15100)
{
NetworkSecurityGroupRules = {new BatchNetworkSecurityGroupRule(150, BatchNetworkSecurityGroupRuleAccess.Allow, "192.100.12.45")
{
SourcePortRanges = {"1", "2"},
}, new BatchNetworkSecurityGroupRule(3500, BatchNetworkSecurityGroupRuleAccess.Deny, "*")
{
SourcePortRanges = {"*"},
}},
}},
},
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8D4EDFEBFADF4AB"
{
"name": "testpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"properties": {
"allocationState": "Resizing",
"allocationStateTransitionTime": "2017-08-28T10:22:55.9407275Z",
"creationTime": "2017-08-28T10:22:55.9407275Z",
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0,
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"dataDisks": [
{
"caching": "ReadWrite",
"diskSizeGB": 30,
"lun": 0,
"managedDisk": {
"storageAccountType": "StandardSSD_LRS"
}
},
{
"caching": "None",
"diskSizeGB": 200,
"lun": 1,
"managedDisk": {
"storageAccountType": "Standard_LRS"
}
}
],
"diskEncryptionConfiguration": {
"targets": [
"OsDisk",
"TemporaryDisk"
]
},
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2016-Datacenter-SmallDisk",
"version": "latest"
},
"licenseType": "Windows_Server",
"nodeAgentSkuId": "batch.node.windows amd64",
"nodePlacementConfiguration": {
"policy": "Zonal"
},
"windowsConfiguration": {
"enableAutomaticUpdates": false
}
}
},
"interNodeCommunication": "Disabled",
"lastModified": "2017-08-28T10:22:55.9407275Z",
"networkConfiguration": {
"endpointConfiguration": {
"inboundNatPools": [
{
"name": "testnat",
"backendPort": 12001,
"frontendPortRangeEnd": 15100,
"frontendPortRangeStart": 15000,
"networkSecurityGroupRules": [
{
"access": "Allow",
"priority": 150,
"sourceAddressPrefix": "192.100.12.45",
"sourcePortRanges": [
"1",
"2"
]
},
{
"access": "Deny",
"priority": 3500,
"sourceAddressPrefix": "*",
"sourcePortRanges": [
"*"
]
}
],
"protocol": "TCP"
}
]
}
},
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2017-08-28T10:22:55.9407275Z",
"scaleSettings": {
"autoScale": {
"evaluationInterval": "PT5M",
"formula": "$TargetDedicatedNodes=1"
}
},
"taskSchedulingPolicy": {
"nodeFillType": "Spread"
},
"taskSlotsPerNode": 1,
"vmSize": "STANDARD_D4"
}
}
CreatePool - Minimal VirtualMachineConfiguration
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "UbuntuServer",
"publisher": "Canonical",
"sku": "18.04-LTS",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04"
}
},
"scaleSettings": {
"autoScale": {
"evaluationInterval": "PT5M",
"formula": "$TargetDedicatedNodes=1"
}
},
"vmSize": "STANDARD_D4"
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_minimal_virtual_machine_configuration.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "UbuntuServer",
"publisher": "Canonical",
"sku": "18.04-LTS",
"version": "latest",
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04",
}
},
"scaleSettings": {"autoScale": {"evaluationInterval": "PT5M", "formula": "$TargetDedicatedNodes=1"}},
"vmSize": "STANDARD_D4",
}
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_MinimalVirtualMachineConfiguration.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_MinimalVirtualMachineConfiguration.json
func ExamplePoolClient_Create_createPoolMinimalVirtualMachineConfiguration() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
Offer: to.Ptr("UbuntuServer"),
Publisher: to.Ptr("Canonical"),
SKU: to.Ptr("18.04-LTS"),
Version: to.Ptr("latest"),
},
NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
},
},
ScaleSettings: &armbatch.ScaleSettings{
AutoScale: &armbatch.AutoScaleSettings{
EvaluationInterval: to.Ptr("PT5M"),
Formula: to.Ptr("$TargetDedicatedNodes=1"),
},
},
VMSize: to.Ptr("STANDARD_D4"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8D4EDFEBFADF4AB\""
// Pool: &armbatch.Pool{
// Name: to.Ptr("testpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Properties: &armbatch.PoolProperties{
// AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("UbuntuServer"),
// Publisher: to.Ptr("Canonical"),
// SKU: to.Ptr("18.04-LTS"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// ScaleSettings: &armbatch.ScaleSettings{
// AutoScale: &armbatch.AutoScaleSettings{
// EvaluationInterval: to.Ptr("PT5M"),
// Formula: to.Ptr("$TargetDedicatedNodes=1"),
// },
// },
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// },
// TaskSlotsPerNode: to.Ptr[int32](1),
// VMSize: to.Ptr("STANDARD_D4"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_MinimalVirtualMachineConfiguration.json
*/
async function createPoolMinimalVirtualMachineConfiguration() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: {
offer: "UbuntuServer",
publisher: "Canonical",
sku: "18.04-LTS",
version: "latest",
},
nodeAgentSkuId: "batch.node.ubuntu 18.04",
},
},
scaleSettings: {
autoScale: { evaluationInterval: "PT5M", formula: "$TargetDedicatedNodes=1" },
},
vmSize: "STANDARD_D4",
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_MinimalVirtualMachineConfiguration.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
VmSize = "STANDARD_D4",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Publisher = "Canonical",
Offer = "UbuntuServer",
Sku = "18.04-LTS",
Version = "latest",
}, "batch.node.ubuntu 18.04"),
ScaleSettings = new BatchAccountPoolScaleSettings
{
AutoScale = new BatchAccountAutoScaleSettings("$TargetDedicatedNodes=1")
{
EvaluationInterval = XmlConvert.ToTimeSpan("PT5M"),
},
},
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8D4EDFEBFADF4AB"
{
"name": "testpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"properties": {
"allocationState": "Resizing",
"allocationStateTransitionTime": "2017-08-28T10:22:55.9407275Z",
"creationTime": "2017-08-28T10:22:55.9407275Z",
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0,
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "UbuntuServer",
"publisher": "Canonical",
"sku": "18.04-LTS",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04"
}
},
"interNodeCommunication": "Disabled",
"lastModified": "2017-08-28T10:22:55.9407275Z",
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2017-08-28T10:22:55.9407275Z",
"scaleSettings": {
"autoScale": {
"evaluationInterval": "PT5M",
"formula": "$TargetDedicatedNodes=1"
}
},
"taskSchedulingPolicy": {
"nodeFillType": "Spread"
},
"taskSlotsPerNode": 1,
"vmSize": "STANDARD_D4"
}
}
CreatePool - No public IP
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04"
}
},
"networkConfiguration": {
"publicIPAddressConfiguration": {
"provision": "NoPublicIPAddresses"
},
"subnetId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"
},
"vmSize": "STANDARD_D4"
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_no_public_ip_addresses.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04",
}
},
"networkConfiguration": {
"publicIPAddressConfiguration": {"provision": "NoPublicIPAddresses"},
"subnetId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123",
},
"vmSize": "STANDARD_D4",
}
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_NoPublicIPAddresses.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_NoPublicIPAddresses.json
func ExamplePoolClient_Create_createPoolNoPublicIP() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"),
},
NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
},
},
NetworkConfiguration: &armbatch.NetworkConfiguration{
PublicIPAddressConfiguration: &armbatch.PublicIPAddressConfiguration{
Provision: to.Ptr(armbatch.IPAddressProvisioningTypeNoPublicIPAddresses),
},
SubnetID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"),
},
VMSize: to.Ptr("STANDARD_D4"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8D4EDFEBFADF4AB\""
// Pool: &armbatch.Pool{
// Name: to.Ptr("testpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Properties: &armbatch.PoolProperties{
// AllocationState: to.Ptr(armbatch.AllocationStateSteady),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// NetworkConfiguration: &armbatch.NetworkConfiguration{
// PublicIPAddressConfiguration: &armbatch.PublicIPAddressConfiguration{
// Provision: to.Ptr(armbatch.IPAddressProvisioningTypeNoPublicIPAddresses),
// },
// SubnetID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"),
// },
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// ScaleSettings: &armbatch.ScaleSettings{
// FixedScale: &armbatch.FixedScaleSettings{
// TargetDedicatedNodes: to.Ptr[int32](0),
// TargetLowPriorityNodes: to.Ptr[int32](0),
// },
// },
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// },
// TaskSlotsPerNode: to.Ptr[int32](1),
// VMSize: to.Ptr("STANDARD_D4"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_NoPublicIPAddresses.json
*/
async function createPoolNoPublicIP() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: {
id: "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1",
},
nodeAgentSkuId: "batch.node.ubuntu 18.04",
},
},
networkConfiguration: {
publicIPAddressConfiguration: { provision: "NoPublicIPAddresses" },
subnetId:
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123",
},
vmSize: "STANDARD_D4",
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_NoPublicIPAddresses.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
VmSize = "STANDARD_D4",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Id = new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"),
}, "batch.node.ubuntu 18.04"),
NetworkConfiguration = new BatchNetworkConfiguration
{
SubnetId = new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"),
PublicIPAddressConfiguration = new BatchPublicIPAddressConfiguration
{
Provision = BatchIPAddressProvisioningType.NoPublicIPAddresses,
},
},
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8D4EDFEBFADF4AB"
{
"name": "testpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"properties": {
"allocationState": "Steady",
"allocationStateTransitionTime": "2017-08-28T10:22:55.9407275Z",
"creationTime": "2017-08-28T10:22:55.9407275Z",
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0,
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04"
}
},
"interNodeCommunication": "Disabled",
"lastModified": "2017-08-28T10:22:55.9407275Z",
"networkConfiguration": {
"publicIPAddressConfiguration": {
"provision": "NoPublicIPAddresses"
},
"subnetId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"
},
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2017-08-28T10:22:55.9407275Z",
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 0,
"targetLowPriorityNodes": 0
}
},
"taskSchedulingPolicy": {
"nodeFillType": "Spread"
},
"taskSlotsPerNode": 1,
"vmSize": "STANDARD_D4"
}
}
CreatePool - Public IPs
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04"
}
},
"networkConfiguration": {
"publicIPAddressConfiguration": {
"ipAddressIds": [
"/subscriptions/12345678-1234-1234-1234-1234567890121/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135"
],
"provision": "UserManaged"
},
"subnetId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"
},
"vmSize": "STANDARD_D4"
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_public_ips.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04",
}
},
"networkConfiguration": {
"publicIPAddressConfiguration": {
"ipAddressIds": [
"/subscriptions/12345678-1234-1234-1234-1234567890121/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135"
],
"provision": "UserManaged",
},
"subnetId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123",
},
"vmSize": "STANDARD_D4",
}
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_PublicIPs.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_PublicIPs.json
func ExamplePoolClient_Create_createPoolPublicIPs() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"),
},
NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
},
},
NetworkConfiguration: &armbatch.NetworkConfiguration{
PublicIPAddressConfiguration: &armbatch.PublicIPAddressConfiguration{
IPAddressIDs: []*string{
to.Ptr("/subscriptions/12345678-1234-1234-1234-1234567890121/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135"),
},
Provision: to.Ptr(armbatch.IPAddressProvisioningTypeUserManaged),
},
SubnetID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"),
},
VMSize: to.Ptr("STANDARD_D4"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8D4EDFEBFADF4AB\""
// Pool: &armbatch.Pool{
// Name: to.Ptr("testpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Properties: &armbatch.PoolProperties{
// AllocationState: to.Ptr(armbatch.AllocationStateSteady),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// NetworkConfiguration: &armbatch.NetworkConfiguration{
// PublicIPAddressConfiguration: &armbatch.PublicIPAddressConfiguration{
// IPAddressIDs: []*string{
// to.Ptr("/subscriptions/12345678-1234-1234-1234-1234567890121/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135"),
// },
// Provision: to.Ptr(armbatch.IPAddressProvisioningTypeUserManaged),
// },
// SubnetID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"),
// },
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// ScaleSettings: &armbatch.ScaleSettings{
// FixedScale: &armbatch.FixedScaleSettings{
// TargetDedicatedNodes: to.Ptr[int32](0),
// TargetLowPriorityNodes: to.Ptr[int32](0),
// },
// },
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// },
// TaskSlotsPerNode: to.Ptr[int32](1),
// VMSize: to.Ptr("STANDARD_D4"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_PublicIPs.json
*/
async function createPoolPublicIPs() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: {
id: "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1",
},
nodeAgentSkuId: "batch.node.ubuntu 18.04",
},
},
networkConfiguration: {
publicIPAddressConfiguration: {
ipAddressIds: [
"/subscriptions/12345678-1234-1234-1234-1234567890121/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135",
],
provision: "UserManaged",
},
subnetId:
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123",
},
vmSize: "STANDARD_D4",
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_PublicIPs.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
VmSize = "STANDARD_D4",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Id = new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"),
}, "batch.node.ubuntu 18.04"),
NetworkConfiguration = new BatchNetworkConfiguration
{
SubnetId = new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"),
PublicIPAddressConfiguration = new BatchPublicIPAddressConfiguration
{
Provision = BatchIPAddressProvisioningType.UserManaged,
IPAddressIds = { new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-1234567890121/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135") },
},
},
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8D4EDFEBFADF4AB"
{
"name": "testpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"properties": {
"allocationState": "Steady",
"allocationStateTransitionTime": "2017-08-28T10:22:55.9407275Z",
"creationTime": "2017-08-28T10:22:55.9407275Z",
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0,
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04"
}
},
"interNodeCommunication": "Disabled",
"lastModified": "2017-08-28T10:22:55.9407275Z",
"networkConfiguration": {
"publicIPAddressConfiguration": {
"ipAddressIds": [
"/subscriptions/12345678-1234-1234-1234-1234567890121/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135"
],
"provision": "UserManaged"
},
"subnetId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"
},
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2017-08-28T10:22:55.9407275Z",
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 0,
"targetLowPriorityNodes": 0
}
},
"taskSchedulingPolicy": {
"nodeFillType": "Spread"
},
"taskSlotsPerNode": 1,
"vmSize": "STANDARD_D4"
}
}
CreatePool - SecurityProfile
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "UbuntuServer",
"publisher": "Canonical",
"sku": "18_04-lts-gen2",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04",
"securityProfile": {
"encryptionAtHost": true,
"securityType": "trustedLaunch",
"uefiSettings": {
"secureBootEnabled": null,
"vTpmEnabled": false
}
}
}
},
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 1,
"targetLowPriorityNodes": 0
}
},
"vmSize": "Standard_d4s_v3"
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_security_profile.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "UbuntuServer",
"publisher": "Canonical",
"sku": "18_04-lts-gen2",
"version": "latest",
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04",
"securityProfile": {
"encryptionAtHost": True,
"securityType": "trustedLaunch",
"uefiSettings": {"secureBootEnabled": None, "vTpmEnabled": False},
},
}
},
"scaleSettings": {"fixedScale": {"targetDedicatedNodes": 1, "targetLowPriorityNodes": 0}},
"vmSize": "Standard_d4s_v3",
}
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_SecurityProfile.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_SecurityProfile.json
func ExamplePoolClient_Create_createPoolSecurityProfile() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
Offer: to.Ptr("UbuntuServer"),
Publisher: to.Ptr("Canonical"),
SKU: to.Ptr("18_04-lts-gen2"),
Version: to.Ptr("latest"),
},
NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
SecurityProfile: &armbatch.SecurityProfile{
EncryptionAtHost: to.Ptr(true),
SecurityType: to.Ptr(armbatch.SecurityTypesTrustedLaunch),
UefiSettings: &armbatch.UefiSettings{
VTpmEnabled: to.Ptr(false),
},
},
},
},
ScaleSettings: &armbatch.ScaleSettings{
FixedScale: &armbatch.FixedScaleSettings{
TargetDedicatedNodes: to.Ptr[int32](1),
TargetLowPriorityNodes: to.Ptr[int32](0),
},
},
VMSize: to.Ptr("Standard_d4s_v3"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8DB554F8E08BCF4\""
// Pool: &armbatch.Pool{
// Name: to.Ptr("testpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Properties: &armbatch.PoolProperties{
// AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.3231917Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.3231917Z"); return t}()),
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("UbuntuServer"),
// Publisher: to.Ptr("Canonical"),
// SKU: to.Ptr("18_04-lts-gen2"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
// SecurityProfile: &armbatch.SecurityProfile{
// EncryptionAtHost: to.Ptr(true),
// SecurityType: to.Ptr(armbatch.SecurityTypesTrustedLaunch),
// UefiSettings: &armbatch.UefiSettings{
// VTpmEnabled: to.Ptr(false),
// },
// },
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.3231917Z"); return t}()),
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.3231917Z"); return t}()),
// ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// ResizeTimeout: to.Ptr("PT15M"),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.3231917Z"); return t}()),
// TargetDedicatedNodes: to.Ptr[int32](1),
// },
// ScaleSettings: &armbatch.ScaleSettings{
// FixedScale: &armbatch.FixedScaleSettings{
// ResizeTimeout: to.Ptr("PT15M"),
// TargetDedicatedNodes: to.Ptr[int32](1),
// TargetLowPriorityNodes: to.Ptr[int32](0),
// },
// },
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// },
// TaskSlotsPerNode: to.Ptr[int32](1),
// VMSize: to.Ptr("STANDARD_D4S_V3"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_SecurityProfile.json
*/
async function createPoolSecurityProfile() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: {
offer: "UbuntuServer",
publisher: "Canonical",
sku: "18_04-lts-gen2",
version: "latest",
},
nodeAgentSkuId: "batch.node.ubuntu 18.04",
securityProfile: {
encryptionAtHost: true,
securityType: "trustedLaunch",
uefiSettings: { vTpmEnabled: false },
},
},
},
scaleSettings: { fixedScale: { targetDedicatedNodes: 1, targetLowPriorityNodes: 0 } },
vmSize: "Standard_d4s_v3",
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_SecurityProfile.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
VmSize = "Standard_d4s_v3",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Publisher = "Canonical",
Offer = "UbuntuServer",
Sku = "18_04-lts-gen2",
Version = "latest",
}, "batch.node.ubuntu 18.04")
{
SecurityProfile = new BatchSecurityProfile
{
SecurityType = BatchSecurityType.TrustedLaunch,
EncryptionAtHost = true,
UefiSettings = new BatchUefiSettings
{
IsSecureBootEnabled = default,
IsVTpmEnabled = false,
},
},
},
ScaleSettings = new BatchAccountPoolScaleSettings
{
FixedScale = new BatchAccountFixedScaleSettings
{
TargetDedicatedNodes = 1,
TargetLowPriorityNodes = 0,
},
},
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8DB554F8E08BCF4"
{
"name": "testpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"properties": {
"allocationState": "Resizing",
"allocationStateTransitionTime": "2023-06-14T07:03:58.3231917Z",
"creationTime": "2023-06-14T07:03:58.3231917Z",
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0,
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "UbuntuServer",
"publisher": "Canonical",
"sku": "18_04-lts-gen2",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04",
"securityProfile": {
"encryptionAtHost": true,
"securityType": "trustedLaunch",
"uefiSettings": {
"vTpmEnabled": false
}
}
}
},
"interNodeCommunication": "Disabled",
"lastModified": "2023-06-14T07:03:58.3231917Z",
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2023-06-14T07:03:58.3231917Z",
"resizeOperationStatus": {
"nodeDeallocationOption": "Requeue",
"resizeTimeout": "PT15M",
"startTime": "2023-06-14T07:03:58.3231917Z",
"targetDedicatedNodes": 1
},
"scaleSettings": {
"fixedScale": {
"resizeTimeout": "PT15M",
"targetDedicatedNodes": 1,
"targetLowPriorityNodes": 0
}
},
"taskSchedulingPolicy": {
"nodeFillType": "Spread"
},
"taskSlotsPerNode": 1,
"vmSize": "STANDARD_D4S_V3"
}
}
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "0001-com-ubuntu-server-jammy",
"publisher": "Canonical",
"sku": "22_04-lts",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.ubuntu 22.04"
}
},
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 1,
"targetLowPriorityNodes": 0
}
},
"vmSize": "Standard_d4s_v3"
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_tags.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "0001-com-ubuntu-server-jammy",
"publisher": "Canonical",
"sku": "22_04-lts",
"version": "latest",
},
"nodeAgentSkuId": "batch.node.ubuntu 22.04",
}
},
"scaleSettings": {"fixedScale": {"targetDedicatedNodes": 1, "targetLowPriorityNodes": 0}},
"vmSize": "Standard_d4s_v3",
}
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_Tags.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_Tags.json
func ExamplePoolClient_Create_createPoolTags() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
Offer: to.Ptr("0001-com-ubuntu-server-jammy"),
Publisher: to.Ptr("Canonical"),
SKU: to.Ptr("22_04-lts"),
Version: to.Ptr("latest"),
},
NodeAgentSKUID: to.Ptr("batch.node.ubuntu 22.04"),
},
},
ScaleSettings: &armbatch.ScaleSettings{
FixedScale: &armbatch.FixedScaleSettings{
TargetDedicatedNodes: to.Ptr[int32](1),
TargetLowPriorityNodes: to.Ptr[int32](0),
},
},
VMSize: to.Ptr("Standard_d4s_v3"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8DB554F8E08BCF4\""
// Pool: &armbatch.Pool{
// Name: to.Ptr("testpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Properties: &armbatch.PoolProperties{
// AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.3231917Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.3231917Z"); return t}()),
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("0001-com-ubuntu-server-jammy"),
// Publisher: to.Ptr("Canonical"),
// SKU: to.Ptr("22_04-lts"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.ubuntu 22.04"),
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.3231917Z"); return t}()),
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-14T07:03:58.3231917Z"); return t}()),
// ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// ResizeTimeout: to.Ptr("PT15M"),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-27T07:33:13.0625789Z"); return t}()),
// TargetDedicatedNodes: to.Ptr[int32](1),
// },
// ScaleSettings: &armbatch.ScaleSettings{
// FixedScale: &armbatch.FixedScaleSettings{
// ResizeTimeout: to.Ptr("PT15M"),
// TargetDedicatedNodes: to.Ptr[int32](1),
// TargetLowPriorityNodes: to.Ptr[int32](0),
// },
// },
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// },
// TaskSlotsPerNode: to.Ptr[int32](1),
// VMSize: to.Ptr("STANDARD_D4S_V3"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_Tags.json
*/
async function createPoolTags() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: {
offer: "0001-com-ubuntu-server-jammy",
publisher: "Canonical",
sku: "22_04-lts",
version: "latest",
},
nodeAgentSkuId: "batch.node.ubuntu 22.04",
},
},
scaleSettings: { fixedScale: { targetDedicatedNodes: 1, targetLowPriorityNodes: 0 } },
vmSize: "Standard_d4s_v3",
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_Tags.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
VmSize = "Standard_d4s_v3",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Publisher = "Canonical",
Offer = "0001-com-ubuntu-server-jammy",
Sku = "22_04-lts",
Version = "latest",
}, "batch.node.ubuntu 22.04"),
ScaleSettings = new BatchAccountPoolScaleSettings
{
FixedScale = new BatchAccountFixedScaleSettings
{
TargetDedicatedNodes = 1,
TargetLowPriorityNodes = 0,
},
},
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8DB554F8E08BCF4"
{
"name": "testpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"properties": {
"allocationState": "Resizing",
"allocationStateTransitionTime": "2023-06-14T07:03:58.3231917Z",
"creationTime": "2023-06-14T07:03:58.3231917Z",
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0,
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "0001-com-ubuntu-server-jammy",
"publisher": "Canonical",
"sku": "22_04-lts",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.ubuntu 22.04"
}
},
"interNodeCommunication": "Disabled",
"lastModified": "2023-06-14T07:03:58.3231917Z",
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2023-06-14T07:03:58.3231917Z",
"resizeOperationStatus": {
"nodeDeallocationOption": "Requeue",
"resizeTimeout": "PT15M",
"startTime": "2023-09-27T07:33:13.0625789Z",
"targetDedicatedNodes": 1
},
"scaleSettings": {
"fixedScale": {
"resizeTimeout": "PT15M",
"targetDedicatedNodes": 1,
"targetLowPriorityNodes": 0
}
},
"taskSchedulingPolicy": {
"nodeFillType": "Spread"
},
"taskSlotsPerNode": 1,
"vmSize": "STANDARD_D4S_V3"
}
}
CreatePool - UpgradePolicy
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2019-datacenter-smalldisk",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.windows amd64",
"nodePlacementConfiguration": {
"policy": "Zonal"
},
"windowsConfiguration": {
"enableAutomaticUpdates": false
}
}
},
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 2,
"targetLowPriorityNodes": 0
}
},
"upgradePolicy": {
"automaticOSUpgradePolicy": {
"disableAutomaticRollback": true,
"enableAutomaticOSUpgrade": true,
"osRollingUpgradeDeferral": true,
"useRollingUpgradePolicy": true
},
"mode": "automatic",
"rollingUpgradePolicy": {
"enableCrossZoneUpgrade": true,
"maxBatchInstancePercent": 20,
"maxUnhealthyInstancePercent": 20,
"maxUnhealthyUpgradedInstancePercent": 20,
"pauseTimeBetweenBatches": "PT0S",
"prioritizeUnhealthyInstances": false,
"rollbackFailedInstancesOnPolicyBreach": false
}
},
"vmSize": "Standard_d4s_v3"
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_upgrade_policy.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2019-datacenter-smalldisk",
"version": "latest",
},
"nodeAgentSkuId": "batch.node.windows amd64",
"nodePlacementConfiguration": {"policy": "Zonal"},
"windowsConfiguration": {"enableAutomaticUpdates": False},
}
},
"scaleSettings": {"fixedScale": {"targetDedicatedNodes": 2, "targetLowPriorityNodes": 0}},
"upgradePolicy": {
"automaticOSUpgradePolicy": {
"disableAutomaticRollback": True,
"enableAutomaticOSUpgrade": True,
"osRollingUpgradeDeferral": True,
"useRollingUpgradePolicy": True,
},
"mode": "automatic",
"rollingUpgradePolicy": {
"enableCrossZoneUpgrade": True,
"maxBatchInstancePercent": 20,
"maxUnhealthyInstancePercent": 20,
"maxUnhealthyUpgradedInstancePercent": 20,
"pauseTimeBetweenBatches": "PT0S",
"prioritizeUnhealthyInstances": False,
"rollbackFailedInstancesOnPolicyBreach": False,
},
},
"vmSize": "Standard_d4s_v3",
}
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_UpgradePolicy.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_UpgradePolicy.json
func ExamplePoolClient_Create_createPoolUpgradePolicy() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
Offer: to.Ptr("WindowsServer"),
Publisher: to.Ptr("MicrosoftWindowsServer"),
SKU: to.Ptr("2019-datacenter-smalldisk"),
Version: to.Ptr("latest"),
},
NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
NodePlacementConfiguration: &armbatch.NodePlacementConfiguration{
Policy: to.Ptr(armbatch.NodePlacementPolicyTypeZonal),
},
WindowsConfiguration: &armbatch.WindowsConfiguration{
EnableAutomaticUpdates: to.Ptr(false),
},
},
},
ScaleSettings: &armbatch.ScaleSettings{
FixedScale: &armbatch.FixedScaleSettings{
TargetDedicatedNodes: to.Ptr[int32](2),
TargetLowPriorityNodes: to.Ptr[int32](0),
},
},
UpgradePolicy: &armbatch.UpgradePolicy{
AutomaticOSUpgradePolicy: &armbatch.AutomaticOSUpgradePolicy{
DisableAutomaticRollback: to.Ptr(true),
EnableAutomaticOSUpgrade: to.Ptr(true),
OSRollingUpgradeDeferral: to.Ptr(true),
UseRollingUpgradePolicy: to.Ptr(true),
},
Mode: to.Ptr(armbatch.UpgradeModeAutomatic),
RollingUpgradePolicy: &armbatch.RollingUpgradePolicy{
EnableCrossZoneUpgrade: to.Ptr(true),
MaxBatchInstancePercent: to.Ptr[int32](20),
MaxUnhealthyInstancePercent: to.Ptr[int32](20),
MaxUnhealthyUpgradedInstancePercent: to.Ptr[int32](20),
PauseTimeBetweenBatches: to.Ptr("PT0S"),
PrioritizeUnhealthyInstances: to.Ptr(false),
RollbackFailedInstancesOnPolicyBreach: to.Ptr(false),
},
},
VMSize: to.Ptr("Standard_d4s_v3"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8DB51E64D3C3B69\""
// Pool: &armbatch.Pool{
// Name: to.Ptr("testpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Properties: &armbatch.PoolProperties{
// AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T06:16:44.2372184Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T06:16:44.2372184Z"); return t}()),
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("WindowsServer"),
// Publisher: to.Ptr("MicrosoftWindowsServer"),
// SKU: to.Ptr("2019-datacenter-smalldisk"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// NodePlacementConfiguration: &armbatch.NodePlacementConfiguration{
// Policy: to.Ptr(armbatch.NodePlacementPolicyTypeZonal),
// },
// WindowsConfiguration: &armbatch.WindowsConfiguration{
// EnableAutomaticUpdates: to.Ptr(false),
// },
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T06:16:44.2372184Z"); return t}()),
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T06:16:44.2372184Z"); return t}()),
// ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// ResizeTimeout: to.Ptr("PT15M"),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T06:16:44.2372184Z"); return t}()),
// TargetDedicatedNodes: to.Ptr[int32](2),
// },
// ScaleSettings: &armbatch.ScaleSettings{
// FixedScale: &armbatch.FixedScaleSettings{
// ResizeTimeout: to.Ptr("PT15M"),
// TargetDedicatedNodes: to.Ptr[int32](2),
// TargetLowPriorityNodes: to.Ptr[int32](0),
// },
// },
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// },
// TaskSlotsPerNode: to.Ptr[int32](1),
// UpgradePolicy: &armbatch.UpgradePolicy{
// AutomaticOSUpgradePolicy: &armbatch.AutomaticOSUpgradePolicy{
// DisableAutomaticRollback: to.Ptr(true),
// EnableAutomaticOSUpgrade: to.Ptr(true),
// OSRollingUpgradeDeferral: to.Ptr(true),
// UseRollingUpgradePolicy: to.Ptr(true),
// },
// Mode: to.Ptr(armbatch.UpgradeModeAutomatic),
// RollingUpgradePolicy: &armbatch.RollingUpgradePolicy{
// EnableCrossZoneUpgrade: to.Ptr(true),
// MaxBatchInstancePercent: to.Ptr[int32](20),
// MaxUnhealthyInstancePercent: to.Ptr[int32](20),
// MaxUnhealthyUpgradedInstancePercent: to.Ptr[int32](20),
// PauseTimeBetweenBatches: to.Ptr("PT0S"),
// PrioritizeUnhealthyInstances: to.Ptr(false),
// RollbackFailedInstancesOnPolicyBreach: to.Ptr(false),
// },
// },
// VMSize: to.Ptr("STANDARD_D4S_V3"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_UpgradePolicy.json
*/
async function createPoolUpgradePolicy() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2019-datacenter-smalldisk",
version: "latest",
},
nodeAgentSkuId: "batch.node.windows amd64",
nodePlacementConfiguration: { policy: "Zonal" },
windowsConfiguration: { enableAutomaticUpdates: false },
},
},
scaleSettings: { fixedScale: { targetDedicatedNodes: 2, targetLowPriorityNodes: 0 } },
upgradePolicy: {
automaticOSUpgradePolicy: {
disableAutomaticRollback: true,
enableAutomaticOSUpgrade: true,
osRollingUpgradeDeferral: true,
useRollingUpgradePolicy: true,
},
mode: "automatic",
rollingUpgradePolicy: {
enableCrossZoneUpgrade: true,
maxBatchInstancePercent: 20,
maxUnhealthyInstancePercent: 20,
maxUnhealthyUpgradedInstancePercent: 20,
pauseTimeBetweenBatches: "PT0S",
prioritizeUnhealthyInstances: false,
rollbackFailedInstancesOnPolicyBreach: false,
},
},
vmSize: "Standard_d4s_v3",
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_UpgradePolicy.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
VmSize = "Standard_d4s_v3",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Publisher = "MicrosoftWindowsServer",
Offer = "WindowsServer",
Sku = "2019-datacenter-smalldisk",
Version = "latest",
}, "batch.node.windows amd64")
{
IsAutomaticUpdateEnabled = false,
NodePlacementPolicy = BatchNodePlacementPolicyType.Zonal,
},
ScaleSettings = new BatchAccountPoolScaleSettings
{
FixedScale = new BatchAccountFixedScaleSettings
{
TargetDedicatedNodes = 2,
TargetLowPriorityNodes = 0,
},
},
UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic)
{
AutomaticOSUpgradePolicy = new AutomaticOSUpgradePolicy
{
DisableAutomaticRollback = true,
EnableAutomaticOSUpgrade = true,
UseRollingUpgradePolicy = true,
OSRollingUpgradeDeferral = true,
},
RollingUpgradePolicy = new RollingUpgradePolicy
{
EnableCrossZoneUpgrade = true,
MaxBatchInstancePercent = 20,
MaxUnhealthyInstancePercent = 20,
MaxUnhealthyUpgradedInstancePercent = 20,
PauseTimeBetweenBatches = "PT0S",
PrioritizeUnhealthyInstances = false,
RollbackFailedInstancesOnPolicyBreach = false,
},
},
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8DB51E64D3C3B69"
{
"name": "testpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"properties": {
"allocationState": "Resizing",
"allocationStateTransitionTime": "2023-05-11T06:16:44.2372184Z",
"creationTime": "2023-05-11T06:16:44.2372184Z",
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0,
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2019-datacenter-smalldisk",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.windows amd64",
"nodePlacementConfiguration": {
"policy": "Zonal"
},
"windowsConfiguration": {
"enableAutomaticUpdates": false
}
}
},
"interNodeCommunication": "Disabled",
"lastModified": "2023-05-11T06:16:44.2372184Z",
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2023-05-11T06:16:44.2372184Z",
"resizeOperationStatus": {
"nodeDeallocationOption": "Requeue",
"resizeTimeout": "PT15M",
"startTime": "2023-05-11T06:16:44.2372184Z",
"targetDedicatedNodes": 2
},
"scaleSettings": {
"fixedScale": {
"resizeTimeout": "PT15M",
"targetDedicatedNodes": 2,
"targetLowPriorityNodes": 0
}
},
"taskSchedulingPolicy": {
"nodeFillType": "Spread"
},
"taskSlotsPerNode": 1,
"upgradePolicy": {
"automaticOSUpgradePolicy": {
"disableAutomaticRollback": true,
"enableAutomaticOSUpgrade": true,
"osRollingUpgradeDeferral": true,
"useRollingUpgradePolicy": true
},
"mode": "automatic",
"rollingUpgradePolicy": {
"enableCrossZoneUpgrade": true,
"maxBatchInstancePercent": 20,
"maxUnhealthyInstancePercent": 20,
"maxUnhealthyUpgradedInstancePercent": 20,
"pauseTimeBetweenBatches": "PT0S",
"prioritizeUnhealthyInstances": false,
"rollbackFailedInstancesOnPolicyBreach": false
}
},
"vmSize": "STANDARD_D4S_V3"
}
}
CreatePool - UserAssignedIdentities
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {}
}
},
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "UbuntuServer",
"publisher": "Canonical",
"sku": "18.04-LTS",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04"
}
},
"scaleSettings": {
"autoScale": {
"evaluationInterval": "PT5M",
"formula": "$TargetDedicatedNodes=1"
}
},
"vmSize": "STANDARD_D4"
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_user_assigned_identities.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {},
},
},
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "UbuntuServer",
"publisher": "Canonical",
"sku": "18.04-LTS",
"version": "latest",
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04",
}
},
"scaleSettings": {"autoScale": {"evaluationInterval": "PT5M", "formula": "$TargetDedicatedNodes=1"}},
"vmSize": "STANDARD_D4",
},
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_UserAssignedIdentities.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_UserAssignedIdentities.json
func ExamplePoolClient_Create_createPoolUserAssignedIdentities() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Identity: &armbatch.PoolIdentity{
Type: to.Ptr(armbatch.PoolIdentityTypeUserAssigned),
UserAssignedIdentities: map[string]*armbatch.UserAssignedIdentities{
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {},
},
},
Properties: &armbatch.PoolProperties{
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
Offer: to.Ptr("UbuntuServer"),
Publisher: to.Ptr("Canonical"),
SKU: to.Ptr("18.04-LTS"),
Version: to.Ptr("latest"),
},
NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
},
},
ScaleSettings: &armbatch.ScaleSettings{
AutoScale: &armbatch.AutoScaleSettings{
EvaluationInterval: to.Ptr("PT5M"),
Formula: to.Ptr("$TargetDedicatedNodes=1"),
},
},
VMSize: to.Ptr("STANDARD_D4"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8D4EDFEBFADF4AB\""
// Pool: &armbatch.Pool{
// Name: to.Ptr("testpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Identity: &armbatch.PoolIdentity{
// Type: to.Ptr(armbatch.PoolIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armbatch.UserAssignedIdentities{
// "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armbatch.UserAssignedIdentities{
// ClientID: to.Ptr("clientId1"),
// PrincipalID: to.Ptr("principalId1"),
// },
// "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": &armbatch.UserAssignedIdentities{
// ClientID: to.Ptr("clientId2"),
// PrincipalID: to.Ptr("principalId2"),
// },
// },
// },
// Properties: &armbatch.PoolProperties{
// AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T10:22:55.9407275Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T10:22:55.9407275Z"); return t}()),
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("UbuntuServer"),
// Publisher: to.Ptr("Canonical"),
// SKU: to.Ptr("18.04-LTS"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.ubuntu 18.04"),
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T10:22:55.9407275Z"); return t}()),
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-10-01T10:22:55.9407275Z"); return t}()),
// ScaleSettings: &armbatch.ScaleSettings{
// AutoScale: &armbatch.AutoScaleSettings{
// EvaluationInterval: to.Ptr("PT5M"),
// Formula: to.Ptr("$TargetDedicatedNodes=1"),
// },
// },
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// },
// TaskSlotsPerNode: to.Ptr[int32](1),
// VMSize: to.Ptr("STANDARD_D4"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_UserAssignedIdentities.json
*/
async function createPoolUserAssignedIdentities() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
identity: {
type: "UserAssigned",
userAssignedIdentities: {
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1":
{},
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2":
{},
},
},
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: {
offer: "UbuntuServer",
publisher: "Canonical",
sku: "18.04-LTS",
version: "latest",
},
nodeAgentSkuId: "batch.node.ubuntu 18.04",
},
},
scaleSettings: {
autoScale: { evaluationInterval: "PT5M", formula: "$TargetDedicatedNodes=1" },
},
vmSize: "STANDARD_D4",
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_UserAssignedIdentities.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
Identity = new ManagedServiceIdentity("UserAssigned")
{
UserAssignedIdentities =
{
[new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1")] = new UserAssignedIdentity(),
[new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2")] = new UserAssignedIdentity()
},
},
VmSize = "STANDARD_D4",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Publisher = "Canonical",
Offer = "UbuntuServer",
Sku = "18.04-LTS",
Version = "latest",
}, "batch.node.ubuntu 18.04"),
ScaleSettings = new BatchAccountPoolScaleSettings
{
AutoScale = new BatchAccountAutoScaleSettings("$TargetDedicatedNodes=1")
{
EvaluationInterval = XmlConvert.ToTimeSpan("PT5M"),
},
},
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8D4EDFEBFADF4AB"
{
"name": "testpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {
"clientId": "clientId1",
"principalId": "principalId1"
},
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2": {
"clientId": "clientId2",
"principalId": "principalId2"
}
}
},
"properties": {
"allocationState": "Resizing",
"allocationStateTransitionTime": "2020-10-01T10:22:55.9407275Z",
"creationTime": "2020-10-01T10:22:55.9407275Z",
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0,
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "UbuntuServer",
"publisher": "Canonical",
"sku": "18.04-LTS",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.ubuntu 18.04"
}
},
"interNodeCommunication": "Disabled",
"lastModified": "2020-10-01T10:22:55.9407275Z",
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2020-10-01T10:22:55.9407275Z",
"scaleSettings": {
"autoScale": {
"evaluationInterval": "PT5M",
"formula": "$TargetDedicatedNodes=1"
}
},
"taskSchedulingPolicy": {
"nodeFillType": "Spread"
},
"taskSlotsPerNode": 1,
"vmSize": "STANDARD_D4"
}
}
CreatePool - VirtualMachineConfiguration Extensions
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "0001-com-ubuntu-server-focal",
"publisher": "Canonical",
"sku": "20_04-lts"
},
"nodeAgentSkuId": "batch.node.ubuntu 20.04",
"extensions": [
{
"name": "batchextension1",
"type": "KeyVaultForLinux",
"autoUpgradeMinorVersion": true,
"enableAutomaticUpgrade": true,
"publisher": "Microsoft.Azure.KeyVault",
"settings": {
"authenticationSettingsKey": "authenticationSettingsValue",
"secretsManagementSettingsKey": "secretsManagementSettingsValue"
},
"typeHandlerVersion": "2.0"
}
]
}
},
"scaleSettings": {
"autoScale": {
"evaluationInterval": "PT5M",
"formula": "$TargetDedicatedNodes=1"
}
},
"vmSize": "STANDARD_D4"
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_virtual_machine_configuration_extensions.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"extensions": [
{
"autoUpgradeMinorVersion": True,
"enableAutomaticUpgrade": True,
"name": "batchextension1",
"publisher": "Microsoft.Azure.KeyVault",
"settings": {
"authenticationSettingsKey": "authenticationSettingsValue",
"secretsManagementSettingsKey": "secretsManagementSettingsValue",
},
"type": "KeyVaultForLinux",
"typeHandlerVersion": "2.0",
}
],
"imageReference": {
"offer": "0001-com-ubuntu-server-focal",
"publisher": "Canonical",
"sku": "20_04-lts",
},
"nodeAgentSkuId": "batch.node.ubuntu 20.04",
}
},
"scaleSettings": {"autoScale": {"evaluationInterval": "PT5M", "formula": "$TargetDedicatedNodes=1"}},
"vmSize": "STANDARD_D4",
}
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration_Extensions.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_VirtualMachineConfiguration_Extensions.json
func ExamplePoolClient_Create_createPoolVirtualMachineConfigurationExtensions() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
Offer: to.Ptr("0001-com-ubuntu-server-focal"),
Publisher: to.Ptr("Canonical"),
SKU: to.Ptr("20_04-lts"),
},
NodeAgentSKUID: to.Ptr("batch.node.ubuntu 20.04"),
Extensions: []*armbatch.VMExtension{
{
Name: to.Ptr("batchextension1"),
Type: to.Ptr("KeyVaultForLinux"),
AutoUpgradeMinorVersion: to.Ptr(true),
EnableAutomaticUpgrade: to.Ptr(true),
Publisher: to.Ptr("Microsoft.Azure.KeyVault"),
Settings: map[string]any{
"authenticationSettingsKey": "authenticationSettingsValue",
"secretsManagementSettingsKey": "secretsManagementSettingsValue",
},
TypeHandlerVersion: to.Ptr("2.0"),
},
},
},
},
ScaleSettings: &armbatch.ScaleSettings{
AutoScale: &armbatch.AutoScaleSettings{
EvaluationInterval: to.Ptr("PT5M"),
Formula: to.Ptr("$TargetDedicatedNodes=1"),
},
},
VMSize: to.Ptr("STANDARD_D4"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8D4EDFEBFADF4AB\""
// Pool: &armbatch.Pool{
// Name: to.Ptr("testpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Properties: &armbatch.PoolProperties{
// AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("0001-com-ubuntu-server-focal"),
// Publisher: to.Ptr("Canonical"),
// SKU: to.Ptr("20_04-lts"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.ubuntu 20.04"),
// Extensions: []*armbatch.VMExtension{
// {
// Name: to.Ptr("batchextension1"),
// Type: to.Ptr("KeyVaultForLinux"),
// AutoUpgradeMinorVersion: to.Ptr(true),
// EnableAutomaticUpgrade: to.Ptr(true),
// Publisher: to.Ptr("Microsoft.Azure.KeyVault"),
// Settings: map[string]any{
// "authenticationSettingsKey": "authenticationSettingsValue",
// "secretsManagementSettingsKey": "secretsManagementSettingsValue",
// },
// TypeHandlerVersion: to.Ptr("2.0"),
// },
// },
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-08-28T10:22:55.9407275Z"); return t}()),
// ScaleSettings: &armbatch.ScaleSettings{
// AutoScale: &armbatch.AutoScaleSettings{
// EvaluationInterval: to.Ptr("PT5M"),
// Formula: to.Ptr("$TargetDedicatedNodes=1"),
// },
// },
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// },
// TaskSlotsPerNode: to.Ptr[int32](1),
// VMSize: to.Ptr("STANDARD_D4"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration_Extensions.json
*/
async function createPoolVirtualMachineConfigurationExtensions() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: {
offer: "0001-com-ubuntu-server-focal",
publisher: "Canonical",
sku: "20_04-lts",
},
nodeAgentSkuId: "batch.node.ubuntu 20.04",
extensions: [
{
name: "batchextension1",
type: "KeyVaultForLinux",
autoUpgradeMinorVersion: true,
enableAutomaticUpgrade: true,
publisher: "Microsoft.Azure.KeyVault",
settings: {
authenticationSettingsKey: "authenticationSettingsValue",
secretsManagementSettingsKey: "secretsManagementSettingsValue",
},
typeHandlerVersion: "2.0",
},
],
},
},
scaleSettings: {
autoScale: { evaluationInterval: "PT5M", formula: "$TargetDedicatedNodes=1" },
},
vmSize: "STANDARD_D4",
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
VmSize = "STANDARD_D4",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Publisher = "Canonical",
Offer = "0001-com-ubuntu-server-focal",
Sku = "20_04-lts",
}, "batch.node.ubuntu 20.04")
{
Extensions = {new BatchVmExtension("batchextension1", "Microsoft.Azure.KeyVault", "KeyVaultForLinux")
{
TypeHandlerVersion = "2.0",
AutoUpgradeMinorVersion = true,
EnableAutomaticUpgrade = true,
Settings = BinaryData.FromObjectAsJson(new
{
authenticationSettingsKey = "authenticationSettingsValue",
secretsManagementSettingsKey = "secretsManagementSettingsValue",
}),
}},
},
ScaleSettings = new BatchAccountPoolScaleSettings
{
AutoScale = new BatchAccountAutoScaleSettings("$TargetDedicatedNodes=1")
{
EvaluationInterval = XmlConvert.ToTimeSpan("PT5M"),
},
},
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8D4EDFEBFADF4AB"
{
"name": "testpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"properties": {
"allocationState": "Resizing",
"allocationStateTransitionTime": "2017-08-28T10:22:55.9407275Z",
"creationTime": "2017-08-28T10:22:55.9407275Z",
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0,
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "0001-com-ubuntu-server-focal",
"publisher": "Canonical",
"sku": "20_04-lts"
},
"nodeAgentSkuId": "batch.node.ubuntu 20.04",
"extensions": [
{
"name": "batchextension1",
"type": "KeyVaultForLinux",
"autoUpgradeMinorVersion": true,
"enableAutomaticUpgrade": true,
"publisher": "Microsoft.Azure.KeyVault",
"settings": {
"authenticationSettingsKey": "authenticationSettingsValue",
"secretsManagementSettingsKey": "secretsManagementSettingsValue"
},
"typeHandlerVersion": "2.0"
}
]
}
},
"interNodeCommunication": "Disabled",
"lastModified": "2017-08-28T10:22:55.9407275Z",
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2017-08-28T10:22:55.9407275Z",
"scaleSettings": {
"autoScale": {
"evaluationInterval": "PT5M",
"formula": "$TargetDedicatedNodes=1"
}
},
"taskSchedulingPolicy": {
"nodeFillType": "Spread"
},
"taskSlotsPerNode": 1,
"vmSize": "STANDARD_D4"
}
}
CreatePool - VirtualMachineConfiguration OSDisk
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "windowsserver",
"publisher": "microsoftwindowsserver",
"sku": "2022-datacenter-smalldisk"
},
"nodeAgentSkuId": "batch.node.windows amd64",
"osDisk": {
"caching": "ReadWrite",
"diskSizeGB": 100,
"managedDisk": {
"storageAccountType": "StandardSSD_LRS"
},
"writeAcceleratorEnabled": false
}
}
},
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 1,
"targetLowPriorityNodes": 0
}
},
"vmSize": "Standard_d2s_v3"
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_virtual_machine_configuration_managed_os_disk.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "windowsserver",
"publisher": "microsoftwindowsserver",
"sku": "2022-datacenter-smalldisk",
},
"nodeAgentSkuId": "batch.node.windows amd64",
"osDisk": {
"caching": "ReadWrite",
"diskSizeGB": 100,
"managedDisk": {"storageAccountType": "StandardSSD_LRS"},
"writeAcceleratorEnabled": False,
},
}
},
"scaleSettings": {"fixedScale": {"targetDedicatedNodes": 1, "targetLowPriorityNodes": 0}},
"vmSize": "Standard_d2s_v3",
}
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json
func ExamplePoolClient_Create_createPoolVirtualMachineConfigurationOSDisk() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
Offer: to.Ptr("windowsserver"),
Publisher: to.Ptr("microsoftwindowsserver"),
SKU: to.Ptr("2022-datacenter-smalldisk"),
},
NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
OSDisk: &armbatch.OSDisk{
Caching: to.Ptr(armbatch.CachingTypeReadWrite),
DiskSizeGB: to.Ptr[int32](100),
ManagedDisk: &armbatch.ManagedDisk{
StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardSSDLRS),
},
WriteAcceleratorEnabled: to.Ptr(false),
},
},
},
ScaleSettings: &armbatch.ScaleSettings{
FixedScale: &armbatch.FixedScaleSettings{
TargetDedicatedNodes: to.Ptr[int32](1),
TargetLowPriorityNodes: to.Ptr[int32](0),
},
},
VMSize: to.Ptr("Standard_d2s_v3"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8DB51F14DC1A8AD\""
// Pool: &armbatch.Pool{
// Name: to.Ptr("testpool"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Properties: &armbatch.PoolProperties{
// AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.7527697Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.7527697Z"); return t}()),
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("windowsserver"),
// Publisher: to.Ptr("microsoftwindowsserver"),
// SKU: to.Ptr("2022-datacenter-smalldisk"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// OSDisk: &armbatch.OSDisk{
// Caching: to.Ptr(armbatch.CachingTypeReadWrite),
// DiskSizeGB: to.Ptr[int32](100),
// ManagedDisk: &armbatch.ManagedDisk{
// StorageAccountType: to.Ptr(armbatch.StorageAccountTypeStandardSSDLRS),
// },
// WriteAcceleratorEnabled: to.Ptr(false),
// },
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.7527697Z"); return t}()),
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.7527697Z"); return t}()),
// ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// ResizeTimeout: to.Ptr("PT15M"),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-08-24T02:12:27.7527697Z"); return t}()),
// TargetDedicatedNodes: to.Ptr[int32](1),
// },
// ScaleSettings: &armbatch.ScaleSettings{
// FixedScale: &armbatch.FixedScaleSettings{
// ResizeTimeout: to.Ptr("PT15M"),
// TargetDedicatedNodes: to.Ptr[int32](1),
// TargetLowPriorityNodes: to.Ptr[int32](0),
// },
// },
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// },
// TaskSlotsPerNode: to.Ptr[int32](1),
// VMSize: to.Ptr("STANDARD_D2_V3"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json
*/
async function createPoolVirtualMachineConfigurationOSDisk() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: {
offer: "windowsserver",
publisher: "microsoftwindowsserver",
sku: "2022-datacenter-smalldisk",
},
nodeAgentSkuId: "batch.node.windows amd64",
osDisk: {
caching: "ReadWrite",
diskSizeGB: 100,
managedDisk: { storageAccountType: "StandardSSD_LRS" },
writeAcceleratorEnabled: false,
},
},
},
scaleSettings: { fixedScale: { targetDedicatedNodes: 1, targetLowPriorityNodes: 0 } },
vmSize: "Standard_d2s_v3",
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
VmSize = "Standard_d2s_v3",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Publisher = "microsoftwindowsserver",
Offer = "windowsserver",
Sku = "2022-datacenter-smalldisk",
}, "batch.node.windows amd64")
{
OSDisk = new BatchOSDisk
{
Caching = BatchDiskCachingType.ReadWrite,
ManagedDisk = new ManagedDisk
{
StorageAccountType = BatchStorageAccountType.StandardSsdLrs,
},
DiskSizeGB = 100,
IsWriteAcceleratorEnabled = false,
},
},
ScaleSettings = new BatchAccountPoolScaleSettings
{
FixedScale = new BatchAccountFixedScaleSettings
{
TargetDedicatedNodes = 1,
TargetLowPriorityNodes = 0,
},
},
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8DB51F14DC1A8AD"
{
"name": "testpool",
"type": "Microsoft.Batch/batchAccounts/pools",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"properties": {
"allocationState": "Resizing",
"allocationStateTransitionTime": "2023-08-24T02:12:27.7527697Z",
"creationTime": "2023-08-24T02:12:27.7527697Z",
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0,
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "windowsserver",
"publisher": "microsoftwindowsserver",
"sku": "2022-datacenter-smalldisk",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.windows amd64",
"osDisk": {
"caching": "ReadWrite",
"diskSizeGB": 100,
"managedDisk": {
"storageAccountType": "StandardSSD_LRS"
},
"writeAcceleratorEnabled": false
}
}
},
"interNodeCommunication": "Disabled",
"lastModified": "2023-08-24T02:12:27.7527697Z",
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2023-08-24T02:12:27.7527697Z",
"resizeOperationStatus": {
"nodeDeallocationOption": "Requeue",
"resizeTimeout": "PT15M",
"startTime": "2023-08-24T02:12:27.7527697Z",
"targetDedicatedNodes": 1
},
"scaleSettings": {
"fixedScale": {
"resizeTimeout": "PT15M",
"targetDedicatedNodes": 1,
"targetLowPriorityNodes": 0
}
},
"taskSchedulingPolicy": {
"nodeFillType": "Spread"
},
"taskSlotsPerNode": 1,
"vmSize": "STANDARD_D2_V3"
}
}
CreatePool - VirtualMachineConfiguration ServiceArtifactReference
Örnek isteği
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool?api-version=2025-06-01
{
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2019-datacenter-smalldisk",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.windows amd64",
"serviceArtifactReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"
},
"windowsConfiguration": {
"enableAutomaticUpdates": false
}
}
},
"scaleSettings": {
"fixedScale": {
"targetDedicatedNodes": 2,
"targetLowPriorityNodes": 0
}
},
"upgradePolicy": {
"automaticOSUpgradePolicy": {
"enableAutomaticOSUpgrade": true
},
"mode": "automatic"
},
"vmSize": "Standard_d4s_v3"
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python pool_create_virtual_machine_configuration_service_artifact_reference.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = BatchManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.pool.create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
pool_name="testpool",
parameters={
"properties": {
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2019-datacenter-smalldisk",
"version": "latest",
},
"nodeAgentSkuId": "batch.node.windows amd64",
"serviceArtifactReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"
},
"windowsConfiguration": {"enableAutomaticUpdates": False},
}
},
"scaleSettings": {"fixedScale": {"targetDedicatedNodes": 2, "targetLowPriorityNodes": 0}},
"upgradePolicy": {"automaticOSUpgradePolicy": {"enableAutomaticOSUpgrade": True}, "mode": "automatic"},
"vmSize": "Standard_d4s_v3",
}
},
)
print(response)
# x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armbatch_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch/v4"
)
// Generated from example definition: 2025-06-01/PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json
func ExamplePoolClient_Create_createPoolVirtualMachineConfigurationServiceArtifactReference() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armbatch.NewClientFactory("12345678-1234-1234-1234-123456789012", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPoolClient().Create(ctx, "default-azurebatch-japaneast", "sampleacct", "testpool", armbatch.Pool{
Properties: &armbatch.PoolProperties{
DeploymentConfiguration: &armbatch.DeploymentConfiguration{
VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
ImageReference: &armbatch.ImageReference{
Offer: to.Ptr("WindowsServer"),
Publisher: to.Ptr("MicrosoftWindowsServer"),
SKU: to.Ptr("2019-datacenter-smalldisk"),
Version: to.Ptr("latest"),
},
NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
ServiceArtifactReference: &armbatch.ServiceArtifactReference{
ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"),
},
WindowsConfiguration: &armbatch.WindowsConfiguration{
EnableAutomaticUpdates: to.Ptr(false),
},
},
},
ScaleSettings: &armbatch.ScaleSettings{
FixedScale: &armbatch.FixedScaleSettings{
TargetDedicatedNodes: to.Ptr[int32](2),
TargetLowPriorityNodes: to.Ptr[int32](0),
},
},
UpgradePolicy: &armbatch.UpgradePolicy{
AutomaticOSUpgradePolicy: &armbatch.AutomaticOSUpgradePolicy{
EnableAutomaticOSUpgrade: to.Ptr(true),
},
Mode: to.Ptr(armbatch.UpgradeModeAutomatic),
},
VMSize: to.Ptr("Standard_d4s_v3"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armbatch.PoolClientCreateResponse{
// ETag: "W/\"0x8DB51F14DC1A8AD\""
// Pool: &armbatch.Pool{
// Name: to.Ptr("mypool41"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts/pools"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool"),
// Properties: &armbatch.PoolProperties{
// AllocationState: to.Ptr(armbatch.AllocationStateResizing),
// AllocationStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.8580493Z"); return t}()),
// CreationTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.8580493Z"); return t}()),
// CurrentDedicatedNodes: to.Ptr[int32](0),
// CurrentLowPriorityNodes: to.Ptr[int32](0),
// DeploymentConfiguration: &armbatch.DeploymentConfiguration{
// VirtualMachineConfiguration: &armbatch.VirtualMachineConfiguration{
// ImageReference: &armbatch.ImageReference{
// Offer: to.Ptr("WindowsServer"),
// Publisher: to.Ptr("MicrosoftWindowsServer"),
// SKU: to.Ptr("2019-datacenter-smalldisk"),
// Version: to.Ptr("latest"),
// },
// NodeAgentSKUID: to.Ptr("batch.node.windows amd64"),
// ServiceArtifactReference: &armbatch.ServiceArtifactReference{
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"),
// },
// WindowsConfiguration: &armbatch.WindowsConfiguration{
// EnableAutomaticUpdates: to.Ptr(false),
// },
// },
// },
// InterNodeCommunication: to.Ptr(armbatch.InterNodeCommunicationStateDisabled),
// LastModified: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.8580493Z"); return t}()),
// ProvisioningState: to.Ptr(armbatch.PoolProvisioningStateSucceeded),
// ProvisioningStateTransitionTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.8580493Z"); return t}()),
// ResizeOperationStatus: &armbatch.ResizeOperationStatus{
// NodeDeallocationOption: to.Ptr(armbatch.ComputeNodeDeallocationOptionRequeue),
// ResizeTimeout: to.Ptr("PT15M"),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-05-11T07:44:44.8580493Z"); return t}()),
// TargetDedicatedNodes: to.Ptr[int32](2),
// },
// ScaleSettings: &armbatch.ScaleSettings{
// FixedScale: &armbatch.FixedScaleSettings{
// ResizeTimeout: to.Ptr("PT15M"),
// TargetDedicatedNodes: to.Ptr[int32](2),
// TargetLowPriorityNodes: to.Ptr[int32](0),
// },
// },
// TaskSchedulingPolicy: &armbatch.TaskSchedulingPolicy{
// NodeFillType: to.Ptr(armbatch.ComputeNodeFillTypeSpread),
// },
// TaskSlotsPerNode: to.Ptr[int32](1),
// UpgradePolicy: &armbatch.UpgradePolicy{
// AutomaticOSUpgradePolicy: &armbatch.AutomaticOSUpgradePolicy{
// EnableAutomaticOSUpgrade: to.Ptr(true),
// },
// Mode: to.Ptr(armbatch.UpgradeModeAutomatic),
// },
// VMSize: to.Ptr("STANDARD_D4S_V3"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { BatchManagementClient } = require("@azure/arm-batch");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to creates a new pool inside the specified account.
*
* @summary creates a new pool inside the specified account.
* x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json
*/
async function createPoolVirtualMachineConfigurationServiceArtifactReference() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.pool.create(
"default-azurebatch-japaneast",
"sampleacct",
"testpool",
{
deploymentConfiguration: {
virtualMachineConfiguration: {
imageReference: {
offer: "WindowsServer",
publisher: "MicrosoftWindowsServer",
sku: "2019-datacenter-smalldisk",
version: "latest",
},
nodeAgentSkuId: "batch.node.windows amd64",
serviceArtifactReference: {
id: "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile",
},
windowsConfiguration: { enableAutomaticUpdates: false },
},
},
scaleSettings: { fixedScale: { targetDedicatedNodes: 2, targetLowPriorityNodes: 0 } },
upgradePolicy: {
automaticOSUpgradePolicy: { enableAutomaticOSUpgrade: true },
mode: "automatic",
},
vmSize: "Standard_d4s_v3",
},
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using System.Xml;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json
// this example is just showing the usage of "Pool_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BatchAccountResource created on azure
// for more information of creating BatchAccountResource, please refer to the document of BatchAccountResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
string accountName = "sampleacct";
ResourceIdentifier batchAccountResourceId = BatchAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
BatchAccountResource batchAccount = client.GetBatchAccountResource(batchAccountResourceId);
// get the collection of this BatchAccountPoolResource
BatchAccountPoolCollection collection = batchAccount.GetBatchAccountPools();
// invoke the operation
string poolName = "testpool";
BatchAccountPoolData data = new BatchAccountPoolData
{
VmSize = "Standard_d4s_v3",
DeploymentVmConfiguration = new BatchVmConfiguration(new BatchImageReference
{
Publisher = "MicrosoftWindowsServer",
Offer = "WindowsServer",
Sku = "2019-datacenter-smalldisk",
Version = "latest",
}, "batch.node.windows amd64")
{
IsAutomaticUpdateEnabled = false,
ServiceArtifactReferenceId = new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"),
},
ScaleSettings = new BatchAccountPoolScaleSettings
{
FixedScale = new BatchAccountFixedScaleSettings
{
TargetDedicatedNodes = 2,
TargetLowPriorityNodes = 0,
},
},
UpgradePolicy = new UpgradePolicy(UpgradeMode.Automatic)
{
AutomaticOSUpgradePolicy = new AutomaticOSUpgradePolicy
{
EnableAutomaticOSUpgrade = true,
},
},
};
ArmOperation<BatchAccountPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, poolName, data);
BatchAccountPoolResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BatchAccountPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Örnek yanıt
ETag: W/"0x8DB51F14DC1A8AD"
{
"name": "mypool41",
"type": "Microsoft.Batch/batchAccounts/pools",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool",
"properties": {
"allocationState": "Resizing",
"allocationStateTransitionTime": "2023-05-11T07:44:44.8580493Z",
"creationTime": "2023-05-11T07:44:44.8580493Z",
"currentDedicatedNodes": 0,
"currentLowPriorityNodes": 0,
"deploymentConfiguration": {
"virtualMachineConfiguration": {
"imageReference": {
"offer": "WindowsServer",
"publisher": "MicrosoftWindowsServer",
"sku": "2019-datacenter-smalldisk",
"version": "latest"
},
"nodeAgentSkuId": "batch.node.windows amd64",
"serviceArtifactReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"
},
"windowsConfiguration": {
"enableAutomaticUpdates": false
}
}
},
"interNodeCommunication": "Disabled",
"lastModified": "2023-05-11T07:44:44.8580493Z",
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2023-05-11T07:44:44.8580493Z",
"resizeOperationStatus": {
"nodeDeallocationOption": "Requeue",
"resizeTimeout": "PT15M",
"startTime": "2023-05-11T07:44:44.8580493Z",
"targetDedicatedNodes": 2
},
"scaleSettings": {
"fixedScale": {
"resizeTimeout": "PT15M",
"targetDedicatedNodes": 2,
"targetLowPriorityNodes": 0
}
},
"taskSchedulingPolicy": {
"nodeFillType": "Spread"
},
"taskSlotsPerNode": 1,
"upgradePolicy": {
"automaticOSUpgradePolicy": {
"enableAutomaticOSUpgrade": true
},
"mode": "automatic"
},
"vmSize": "STANDARD_D4S_V3"
}
}
Tanımlar
| Name |
Description |
|
AllocationState
|
Havuzun yeniden boyutlandırılıp boyutlandırılmadığı.
|
|
ApplicationPackageReference
|
Toplu iş hesabının içindeki bir uygulama paketine bağlanma
|
|
AutomaticOSUpgradePolicy
|
Otomatik işletim sistemi yükseltmesi gerçekleştirmek için kullanılan yapılandırma parametreleri.
|
|
AutoScaleRun
|
Havuz otomatik ölçeklendirme formülünün yürütülmesiyle ilgili sonuçlar ve hatalar.
|
|
AutoScaleRunError
|
Bir havuzu otomatik ölçeklendirme sırasında oluşan bir hata.
|
|
AutoScaleSettings
|
Havuz için Otomatik Ölçeklendirme ayarları.
|
|
AutoUserScope
|
Varsayılan değer Havuz'dur. Havuz Windows çalıştırıyorsa, görevler arasında daha sıkı yalıtım gerekiyorsa Görev değeri belirtilmelidir. Örneğin, görev kayıt defterini diğer görevleri etkileyebilecek şekilde değiştirirse.
|
|
AutoUserSpecification
|
Batch hizmetinde bir görev çalıştıran otomatik kullanıcının parametrelerini belirtir.
|
|
AzureBlobFileSystemConfiguration
|
Blobfuse kullanarak azure depolama kapsayıcısına bağlanmak için kullanılan bilgiler.
|
|
AzureFileShareConfiguration
|
Azure Fileshare'e bağlanmak için kullanılan bilgiler.
|
|
BatchPoolIdentity
|
Yapılandırıldıysa Batch havuzunun kimliği. Mevcut bir havuzu güncelleştirme sırasında havuz kimliği güncelleştirilirse, yalnızca havuz 0'a daraltıldıktan sonra oluşturulan yeni vm'ler güncelleştirilmiş kimliklere sahip olur
|
|
CachingType
|
Disk için etkinleştirileceği önbelleğe alma türü.
|
|
CIFSMountConfiguration
|
CIFS dosya sistemine bağlanmak için kullanılan bilgiler.
|
|
CloudError
|
Batch hizmetinden bir hata yanıtı.
|
|
CloudErrorBody
|
Batch hizmetinden bir hata yanıtı.
|
|
ComputeNodeDeallocationOption
|
Serbest bırakma için seçildikten sonra düğüm ve çalışan görevleriyle ne yapacağını belirler.
|
|
ComputeNodeFillType
|
Görevlerin işlem düğümleri arasında nasıl dağıtılacağı.
|
|
ComputeNodeIdentityReference
|
İşlem düğümlerinin kullanacağı Batch havuzuyla ilişkili kullanıcı tarafından atanan kimliğe başvuru.
|
|
ContainerConfiguration
|
Kapsayıcı etkin havuzlar için yapılandırma.
|
|
ContainerHostBatchBindMountEntry
|
Görev kapsayıcısına bağlamak istediğiniz yol ve bağlama modunun girişi.
|
|
ContainerHostDataPath
|
Kapsayıcı görevinin kapsayıcısına bağlanacak yollar.
|
|
ContainerRegistry
|
Özel bir kapsayıcı kayıt defteri.
|
|
ContainerType
|
Kullanılacak kapsayıcı teknolojisi.
|
|
ContainerWorkingDirectory
|
Kapsayıcı görevi çalışma dizininin nerede olduğunu belirten bir bayrak. Varsayılan değer 'taskWorkingDirectory'dir.
|
|
createdByType
|
Kaynağı oluşturan kimliğin türü.
|
|
DataDisk
|
Havuzdaki İşlem Düğümleriyle ilişkili veri diskleri tarafından kullanılacak ayarlar. Bağlı veri disklerini kullanırken, diskleri kullanmak için vm'nin içinden bağlamanız ve biçimlendirmeniz gerekir.
|
|
DeploymentConfiguration
|
Dağıtım yapılandırma özellikleri.
|
|
DiffDiskPlacement
|
OS diskinin yerleştirilmesi gereken yer.
|
|
DiffDiskSettings
|
Sanal makine tarafından kullanılan işletim sistemi diski için kısa ömürlü Disk Ayarlarını belirtir.
|
|
DiskCustomerManagedKey
|
Diski şifrelemek için Müşteri Tarafından Yönetilen Anahtar başvurusu.
|
|
DiskEncryptionConfiguration
|
Havuzdaki işlem düğümlerine uygulanan disk şifreleme yapılandırması. Sanal Makine Görüntüsü veya Azure İşlem Galerisi Görüntüsü ile oluşturulan Linux havuzunda disk şifreleme yapılandırması desteklenmez.
|
|
DiskEncryptionSetParameters
|
Disk şifreleme kümesinin ARM kaynak kimliği.
|
|
DiskEncryptionTarget
|
Atlanırsa, havuzdaki işlem düğümlerindeki diskler şifrelenmez.
|
|
DynamicVNetAssignmentScope
|
Dinamik sanal ağ atamasının kapsamı.
|
|
ElevationLevel
|
Kullanıcının yükseltme düzeyi.
|
|
EnvironmentSetting
|
Görev işleminde ayarlanacak ortam değişkeni.
|
|
FixedScaleSettings
|
Havuz için ölçek ayarları düzeltildi.
|
|
HostEndpointSettings
|
Belirli konak uç noktası ayarlarını belirtir.
|
|
HostEndpointSettingsModeTypes
|
Erişim denetimi ilkesi yürütme modunu belirtir.
|
|
ImageReference
|
Azure Sanal Makineler Market görüntüsüne veya özel bir Sanal Makinenin Azure Görüntüsü kaynağına başvuru. Azure Batch tarafından doğrulanan tüm imageReferences listesini almak için 'Desteklenen düğüm aracısı SKU'larını listeleme' işlemine bakın.
|
|
InboundEndpointProtocol
|
Uç noktanın protokolü.
|
|
InboundNatPool
|
Batch havuzundaki işlem düğümlerindeki belirli bağlantı noktalarını harici olarak ele almak için kullanılabilecek gelen NAT havuzu.
|
|
InterNodeCommunicationState
|
Bu, havuza hangi düğümlerin atanabileceğine yönelik kısıtlamalar uygular. Bu değerin etkinleştirilmesi, istenen düğüm sayısının havuzda ayrılma olasılığını azaltabilir. Belirtilmezse, bu değer varsayılan olarak 'Devre Dışı' olur.
|
|
IPAddressProvisioningType
|
Batch Havuzu için Genel IP Adresleri için sağlama türü.
|
|
IPFamily
|
Havuzun kullanabileceği IP sürümlerini belirtmek için kullanılan IP aileleri.
|
|
IPTag
|
Görevlerin işlem düğümleri arasında nasıl dağıtılması gerektiğini belirtir.
|
|
JobDefaultOrder
|
Aynı önceliğe sahip farklı işlerden görev zamanlama sırası.
|
|
LinuxUserConfiguration
|
Linux düğümünde kullanıcı hesabı oluşturmak için kullanılan özellikler.
|
|
LoginMode
|
Kullanıcının oturum açma modunu belirtir. Varsayılan değer Etkileşimli'dir.
|
|
ManagedDisk
|
Yönetilen disk parametreleri.
|
|
MetadataItem
|
Batch hizmet kaynağıyla ilişkilendirilmiş bir ad-değer çifti.
|
|
MountConfiguration
|
Her düğüme bağlanacak dosya sistemi.
|
|
NetworkConfiguration
|
Havuz için ağ yapılandırması.
|
|
NetworkSecurityGroupRule
|
Gelen uç noktaya uygulanacak bir ağ güvenlik grubu kuralı.
|
|
NetworkSecurityGroupRuleAccess
|
Belirtilen IP adresi, alt ağ aralığı veya etiketi için yapılması gereken eylem.
|
|
NFSMountConfiguration
|
NFS dosya sistemine bağlanmak için kullanılan bilgiler.
|
|
NodePlacementConfiguration
|
Batch havuzları için düğüm yerleştirme yapılandırması.
|
|
NodePlacementPolicyType
|
Varsayılan değer bölgeseldir.
|
|
OSDisk
|
Sanal makinenin işletim sistemi diskinin ayarları.
|
|
Pool
|
Havuz hakkında bilgi içerir.
|
|
PoolEndpointConfiguration
|
Havuz için uç nokta yapılandırması.
|
|
PoolIdentityType
|
Batch Havuzu için kullanılan kimlik türü.
|
|
PoolProvisioningState
|
Havuzun geçerli durumu.
|
|
ProxyAgentSettings
|
Sanal makine oluşturulurken ProxyAgent ayarlarını belirtir.
|
|
PublicIPAddressConfiguration
|
Havuzun ağ yapılandırmasının genel IP Adresi yapılandırması.
|
|
ResizeError
|
Havuzu yeniden boyutlandırırken oluşan bir hata.
|
|
ResizeOperationStatus
|
Geçerli veya son tamamlanan yeniden boyutlandırma işlemi hakkındaki ayrıntılar.
|
|
ResourceFile
|
İşlem düğümüne indirilecek tek bir dosya veya birden çok dosya.
|
|
RollingUpgradePolicy
|
Sıralı yükseltme gerçekleştirirken kullanılan yapılandırma parametreleri.
|
|
ScaleSettings
|
Havuz için ölçek ayarları
|
|
SecurityEncryptionTypes
|
Yönetilen diskin EncryptionType değerini belirtir. Yönetilen diskin şifrelenmesi için DiskWithVMGuestState olarak ve VMGuestState blobun şifrelenmesi için VMGuestState blobuna, sadece VMGuestState blobun şifrelenmesi için VMGuestStateOnly ve VMGuestState blobunda firmware durumu devam etmemesi için NonPersistedTPM olarak ayarlanmıştır.
Not: Yalnızca Gizli VM'ler için ayarlanabilir ve Gizli VM'ler kullanılırken gereklidir.
|
|
SecurityProfile
|
Sanal makine veya sanal makine ölçek kümesi için güvenlik profili ayarlarını belirtir.
|
|
SecurityTypes
|
Sanal makinenin SecurityType değerini belirtir. UefiSettings'i etkinleştirmek için belirtilen herhangi bir değere ayarlanması gerekir.
|
|
ServiceArtifactReference
|
'En son' görüntü sürümü kullanılırken ölçek kümesindeki tüm sanal makineler için aynı görüntü sürümünü ayarlamak için kullanılan hizmet yapıtı başvuru kimliğini belirtir.
|
|
StartTask
|
İşlem düğümü Azure Batch hizmetindeki bir havuza katıldığında veya işlem düğümü yeniden başlatıldığında veya yeniden oluşturulduğunda çalıştırılan görev.
|
|
StorageAccountType
|
Veri diskleri veya işletim sistemi diski oluştururken kullanılacak depolama hesabı türü.
|
|
systemData
|
Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.
|
|
TaskContainerSettings
|
Görevin kapsayıcı ayarları.
|
|
TaskSchedulingPolicy
|
Görevlerin işlem düğümleri arasında nasıl dağıtılması gerektiğini belirtir.
|
|
UefiSettings
|
Sanal makineyi oluştururken kullanılan güvenli önyükleme ve vTPM gibi güvenlik ayarlarını belirtir.
|
|
UpgradeMode
|
Ölçek kümesindeki sanal makinelere yükseltme modunu belirtir.
Olası değerler şunlardır:
el ile - Ölçek kümesindeki sanal makinelerde güncelleştirmelerin uygulanmasını siz denetlersiniz. Bunu manualUpgrade eylemini kullanarak yaparsınız.
Otomatik - Ölçek kümesindeki tüm sanal makineler aynı anda otomatik olarak güncelleştirilir.
Rolling - Ölçek kümesi güncelleştirmeleri toplu olarak gerçekleştirir ve arada isteğe bağlı bir duraklatma süresi vardır.
|
|
UpgradePolicy
|
Otomatik, el ile veya sıralı yükseltme ilkesini açıklar.
|
|
UserAccount
|
Azure Batch düğümünde kullanıcı oluşturmak için kullanılan özellikler.
|
|
UserAssignedIdentities
|
İlişkili kullanıcı kimliklerinin listesi.
|
|
UserIdentity
|
Görevin çalıştırıldığı kullanıcı kimliğinin tanımı.
|
|
VirtualMachineConfiguration
|
Azure Sanal Makineler altyapısını temel alan bir havuzdaki işlem düğümleri için yapılandırma.
|
|
VMDiskSecurityProfile
|
Yönetilen disk için güvenlik profili ayarlarını belirtir.
Not: Yalnızca Gizli VM'ler için ayarlanabilir ve Gizli VM'ler kullanılırken gereklidir.
|
|
VMExtension
|
Sanal makine uzantılarının yapılandırması.
|
|
WindowsConfiguration
|
Sanal makineye uygulanacak Windows işletim sistemi ayarları.
|
|
WindowsUserConfiguration
|
Windows düğümünde kullanıcı hesabı oluşturmak için kullanılan özellikler.
|
AllocationState
Numaralandırma
Havuzun yeniden boyutlandırılıp boyutlandırılmadığı.
| Değer |
Description |
|
Steady
|
Havuz yeniden boyutlandırılmıyor. Devam eden havuzdaki düğüm sayısında değişiklik yok. Havuz, oluşturulduğunda ve düğüm sayısını değiştirmek için havuzda hiçbir işlem yapılmadığında bu duruma girer.
|
|
Resizing
|
Havuz yeniden boyutlandırılıyor; diğer bir ifadeyle, işlem düğümleri havuza ekleniyor veya havuzdan kaldırılıyor.
|
|
Stopping
|
Havuz yeniden boyutlandırıldı, ancak kullanıcı yeniden boyutlandırmanın durdurulmasını istedi, ancak durdurma isteği henüz tamamlanmadı.
|
ApplicationPackageReference
Nesne
Toplu iş hesabının içindeki bir uygulama paketine bağlanma
| Name |
Tür |
Description |
|
id
|
string
|
Yüklenecek uygulama paketinin kimliği. Bu, havuzun içinde olmalı. Bu, belirli bir sürüme başvuru veya varsa varsayılan sürüm olabilir.
Yüklenecek uygulama paketinin kimliği. Bu, havuzla aynı toplu iş hesabında olmalıdır. Bu, belirli bir sürüme başvuru veya varsa varsayılan sürüm olabilir.
|
|
version
|
string
|
Dağıtılacak uygulamanın sürümü. Atlanırsa, varsayılan sürüm dağıtılır.
Bu atlanırsa ve bu uygulama için varsayılan sürüm belirtilmezse istek InvalidApplicationPackageReferences hata koduyla başarısız olur. REST API'yi doğrudan çağırıyorsanız HTTP durum kodu 409'dur.
|
AutomaticOSUpgradePolicy
Nesne
Otomatik işletim sistemi yükseltmesi gerçekleştirmek için kullanılan yapılandırma parametreleri.
| Name |
Tür |
Description |
|
disableAutomaticRollback
|
boolean
|
İşletim sistemi görüntüsü geri alma özelliğinin devre dışı bırakılıp bırakılmayacağı.
|
|
enableAutomaticOSUpgrade
|
boolean
|
İşletim sistemi görüntüsünün daha yeni bir sürümü kullanılabilir olduğunda, ölçek kümesi örneklerine sıralı bir şekilde işletim sistemi yükseltmelerinin otomatik olarak uygulanıp uygulanmayacağını gösterir.
Bu, Windows tabanlı havuzlar için true olarak ayarlanırsa WindowsConfiguration.enableAutomaticUpdates true olarak ayarlanamaz.
|
|
osRollingUpgradeDeferral
|
boolean
|
Görevler çalıştırılıyorsa TVM'lerde işletim sistemi yükseltmelerini ertele.
|
|
useRollingUpgradePolicy
|
boolean
|
Otomatik İşletim Sistemi Yükseltmesi sırasında sıralı yükseltme ilkesinin kullanılıp kullanılmayacağını gösterir. VMSS'de hiçbir ilke tanımlanmadıysa Otomatik İşletim Sistemi Yükseltmesi varsayılan ilkeye geri döndürülecektir.
|
AutoScaleRun
Nesne
Havuz otomatik ölçeklendirme formülünün yürütülmesiyle ilgili sonuçlar ve hatalar.
| Name |
Tür |
Description |
|
error
|
AutoScaleRunError
|
Değerlendirme başarısız olduysa havuzdaki otomatik ölçeklendirme formülü değerlendirilirken karşılaşılan hatanın ayrıntıları.
Bir havuzu otomatik ölçeklendirme sırasında oluşan bir hata.
|
|
evaluationTime
|
string
(date-time)
|
Otomatik ölçeklendirme formülünü son değerlendirme zamanı.
Otomatik ölçeklendirme formülünü son değerlendirme zamanı.
|
|
results
|
string
|
Otomatik ölçeklendirme formülünün değerlendirilmesinde kullanılan tüm değişkenlerin son değerleri.
Her değişken değeri $variable=değer biçiminde döndürülür ve değişkenler noktalı virgülle ayrılır.
|
AutoScaleRunError
Nesne
Bir havuzu otomatik ölçeklendirme sırasında oluşan bir hata.
| Name |
Tür |
Description |
|
code
|
string
|
Hatanın tanımlayıcısı. Kodlar sabittir ve program aracılığıyla kullanılması amaçlanmıştır.
|
|
details
|
AutoScaleRunError[]
|
Hata hakkında ek ayrıntılar.
Hata hakkında ek ayrıntılar.
|
|
message
|
string
|
Hatayı açıklayan ve kullanıcı arabiriminde görüntülenmeye uygun olması amaçlanan bir ileti.
|
AutoScaleSettings
Nesne
Havuz için Otomatik Ölçeklendirme ayarları.
| Name |
Tür |
Description |
|
evaluationInterval
|
string
(duration)
|
Havuz boyutunun otomatik ölçeklendirme formülüne göre otomatik olarak ayarlandığı zaman aralığı.
Atlanırsa, varsayılan değer 15 dakikadır (PT15M).
|
|
formula
|
string
|
Havuzdaki istenen işlem düğümü sayısı için bir formül.
Havuzdaki istenen işlem düğümü sayısı için bir formül.
|
AutoUserScope
Numaralandırma
Varsayılan değer Havuz'dur. Havuz Windows çalıştırıyorsa, görevler arasında daha sıkı yalıtım gerekiyorsa Görev değeri belirtilmelidir. Örneğin, görev kayıt defterini diğer görevleri etkileyebilecek şekilde değiştirirse.
| Değer |
Description |
|
Task
|
Hizmetin görev için yeni bir kullanıcı oluşturması gerektiğini belirtir.
|
|
Pool
|
Görevin bir havuzdaki her düğümde oluşturulan ortak otomatik kullanıcı hesabı olarak çalıştırıldığını belirtir.
|
AutoUserSpecification
Nesne
Batch hizmetinde bir görev çalıştıran otomatik kullanıcının parametrelerini belirtir.
| Name |
Tür |
Description |
|
elevationLevel
|
ElevationLevel
|
Kullanıcının yükseltme düzeyi.
Varsayılan değer nonAdmin'dir.
|
|
scope
|
AutoUserScope
|
Otomatik kullanıcının kapsamı
Varsayılan değer Havuz'dur. Havuz Windows çalıştırıyorsa, görevler arasında daha sıkı yalıtım gerekiyorsa Görev değeri belirtilmelidir. Örneğin, görev kayıt defterini diğer görevleri etkileyebilecek bir şekilde sessize alırsa veya havuzda normal görevler tarafından erişilemeyen ancak başlangıç görevleriyle erişilebilir olması gereken sertifikalar belirtilmişse.
|
AzureBlobFileSystemConfiguration
Nesne
Blobfuse kullanarak azure depolama kapsayıcısına bağlanmak için kullanılan bilgiler.
| Name |
Tür |
Description |
|
accountKey
|
string
(password)
|
Azure Depolama Hesabı anahtarı.
Bu özellik hem sasKey hem de kimlik ile birbirini dışlar; tam olarak bir belirtilmelidir.
|
|
accountName
|
string
|
Azure Depolama Hesabı adı.
Azure Depolama Hesabı adı.
|
|
blobfuseOptions
|
string
|
Bağlama komutuna geçirmek için ek komut satırı seçenekleri.
Bunlar Windows'taki 'net use' seçenekleri ve Linux'taki 'bağlama' seçenekleridir.
|
|
containerName
|
string
|
Azure Blob Depolama Kapsayıcısı adı.
Azure Blob Depolama Kapsayıcısı adı.
|
|
identityReference
|
ComputeNodeIdentityReference
|
containerName'e erişmek için kullanılacak kullanıcı tarafından atanan kimliğe başvuru
Bu özellik hem accountKey hem de sasKey ile birbirini dışlar; tam olarak bir belirtilmelidir.
|
|
relativeMountPath
|
string
|
Dosya sisteminin bağlanacağı işlem düğümündeki göreli yol
Tüm dosya sistemleri Batch bağlamaları dizinine göre bağlanır ve AZ_BATCH_NODE_MOUNTS_DIR ortam değişkeni aracılığıyla erişilebilir.
|
|
sasKey
|
string
(password)
|
Azure Depolama SAS belirteci.
Bu özellik hem accountKey hem de identity ile birbirini dışlar; tam olarak bir belirtilmelidir.
|
AzureFileShareConfiguration
Nesne
Azure Fileshare'e bağlanmak için kullanılan bilgiler.
| Name |
Tür |
Description |
|
accountKey
|
string
(password)
|
Azure Depolama hesabı anahtarı.
Azure Depolama hesabı anahtarı.
|
|
accountName
|
string
|
Azure Depolama hesabı adı.
Azure Depolama hesabı adı.
|
|
azureFileUrl
|
string
|
Azure Dosyalar URL'si.
Bu, 'https://{account}.file.core.windows.net/' biçimindedir.
|
|
mountOptions
|
string
|
Bağlama komutuna geçirmek için ek komut satırı seçenekleri.
Bunlar Windows'taki 'net use' seçenekleri ve Linux'taki 'bağlama' seçenekleridir.
|
|
relativeMountPath
|
string
|
Dosya sisteminin bağlanacağı işlem düğümündeki göreli yol
Tüm dosya sistemleri Batch bağlamaları dizinine göre bağlanır ve AZ_BATCH_NODE_MOUNTS_DIR ortam değişkeni aracılığıyla erişilebilir.
|
BatchPoolIdentity
Nesne
Yapılandırıldıysa Batch havuzunun kimliği. Mevcut bir havuzu güncelleştirme sırasında havuz kimliği güncelleştirilirse, yalnızca havuz 0'a daraltıldıktan sonra oluşturulan yeni vm'ler güncelleştirilmiş kimliklere sahip olur
| Name |
Tür |
Description |
|
type
|
PoolIdentityType
|
Batch Havuzu için kullanılan kimlik türü.
|
|
userAssignedIdentities
|
<string,
UserAssignedIdentities>
|
Batch havuzuyla ilişkilendirilmiş kullanıcı kimliklerinin listesi.
|
CachingType
Numaralandırma
Disk için etkinleştirileceği önbelleğe alma türü.
| Değer |
Description |
|
None
|
Disk için önbelleğe alma modu etkinleştirilmedi.
|
|
ReadOnly
|
Diskin önbelleğe alma modu salt okunur.
|
|
ReadWrite
|
Diskin önbelleğe alma modu okunur ve yazılır.
|
CIFSMountConfiguration
Nesne
CIFS dosya sistemine bağlanmak için kullanılan bilgiler.
| Name |
Tür |
Description |
|
mountOptions
|
string
|
Bağlama komutuna geçirmek için ek komut satırı seçenekleri.
Bunlar Windows'taki 'net use' seçenekleri ve Linux'taki 'bağlama' seçenekleridir.
|
|
password
|
string
(password)
|
CIFS dosya sisteminde kimlik doğrulaması için kullanılacak parola.
CIFS dosya sisteminde kimlik doğrulaması için kullanılacak parola.
|
|
relativeMountPath
|
string
|
Dosya sisteminin bağlanacağı işlem düğümündeki göreli yol
Tüm dosya sistemleri Batch bağlamaları dizinine göre bağlanır ve AZ_BATCH_NODE_MOUNTS_DIR ortam değişkeni aracılığıyla erişilebilir.
|
|
source
|
string
|
Bağlanacak dosya sisteminin URI'sini.
Bağlanacak dosya sisteminin URI'sini.
|
|
userName
|
string
|
CIFS dosya sisteminde kimlik doğrulaması için kullanılacak kullanıcı.
CIFS dosya sisteminde kimlik doğrulaması için kullanılacak kullanıcı.
|
CloudError
Nesne
Batch hizmetinden bir hata yanıtı.
CloudErrorBody
Nesne
Batch hizmetinden bir hata yanıtı.
| Name |
Tür |
Description |
|
code
|
string
|
Hatanın tanımlayıcısı. Kodlar sabittir ve program aracılığıyla kullanılması amaçlanmıştır.
|
|
details
|
CloudErrorBody[]
|
Hatayla ilgili ek ayrıntıların listesi.
|
|
message
|
string
|
Hatayı açıklayan ve kullanıcı arabiriminde görüntülenmeye uygun olması amaçlanan bir ileti.
|
|
target
|
string
|
Belirli bir hatanın hedefi. Örneğin, özelliğin adı hatalı.
|
ComputeNodeDeallocationOption
Numaralandırma
Serbest bırakma için seçildikten sonra düğüm ve çalışan görevleriyle ne yapacağını belirler.
| Değer |
Description |
|
Requeue
|
Çalışan görev işlemlerini sonlandırın ve görevleri yeniden sıraya getirin. Bir düğüm kullanılabilir olduğunda görevler yeniden çalışır. Görevler sonlandırılır sonlandırılmaz düğümleri kaldırın.
|
|
Terminate
|
Çalışan görevleri sonlandır. Görevler, sonlandırıldıklarını belirten failureInfo ile tamamlanır ve yeniden çalıştırılmaz. Görevler sonlandırılır sonlandırılmaz düğümleri kaldırın.
|
|
TaskCompletion
|
Çalışmakta olan görevlerin tamamlanmasına izin verin. Beklerken yeni görev zamanlama. Tüm görevler tamamlandığında düğümleri kaldırın.
|
|
RetainedData
|
Şu anda çalışan görevlerin tamamlanmasına izin verin, ardından tüm görev verileri saklama sürelerinin dolmasını bekleyin. Beklerken yeni görev zamanlama. Tüm görev saklama sürelerinin süresi dolduğunda düğümleri kaldırın.
|
ComputeNodeFillType
Numaralandırma
Görevlerin işlem düğümleri arasında nasıl dağıtılacağı.
| Değer |
Description |
|
Spread
|
Görevler havuzdaki tüm düğümler arasında eşit olarak atanmalıdır.
|
|
Pack
|
Havuzdaki bir sonraki düğüme herhangi bir görev atanmadan önce havuzdaki her düğüme mümkün olduğunca çok görev (taskSlotsPerNode) atanmalıdır.
|
ComputeNodeIdentityReference
Nesne
İşlem düğümlerinin kullanacağı Batch havuzuyla ilişkili kullanıcı tarafından atanan kimliğe başvuru.
| Name |
Tür |
Description |
|
resourceId
|
string
|
Kullanıcı tarafından atanan kimliğin ARM kaynak kimliği.
|
ContainerConfiguration
Nesne
Kapsayıcı etkin havuzlar için yapılandırma.
| Name |
Tür |
Description |
|
containerImageNames
|
string[]
|
Kapsayıcı görüntüsü adları koleksiyonu.
Bu, "docker pull" için belirtildiği gibi tam görüntü başvurusudur. Görüntü, alternatif bir kayıt defteriyle tam olarak nitelemediği sürece varsayılan Docker kayıt defterinden kaynaklanır.
|
|
containerRegistries
|
ContainerRegistry[]
|
Kapsayıcıların çekilebileceği ek özel kayıt defterleri.
Kimlik bilgileri gerektiren bir özel kayıt defterinden herhangi bir görüntü indirilmesi gerekiyorsa, bu kimlik bilgileri burada sağlanmalıdır.
|
|
type
|
ContainerType
|
Kullanılacak kapsayıcı teknolojisi.
Kullanılacak kapsayıcı teknolojisi.
|
ContainerHostBatchBindMountEntry
Nesne
Görev kapsayıcısına bağlamak istediğiniz yol ve bağlama modunun girişi.
| Name |
Tür |
Description |
|
isReadOnly
|
boolean
|
Bu kaynak yolu salt okunur mod olarak bağlayın veya bağlamayın. Varsayılan değer false (okuma/yazma modu).
Linux için bu yolu okuma/yazma modu olarak bağlarsanız bu, kapsayıcıdaki tüm kullanıcıların yol için okuma/yazma erişimine sahip olduğu anlamına gelmez; konak VM'deki erişime bağlıdır. Bu yol salt okunur olarak bağlanırsa, kapsayıcıdaki tüm kullanıcılar yolu değiştiremez.
|
|
source
|
ContainerHostDataPath
|
Kapsayıcı görevinin kapsayıcısına bağlanacak yollar.
Kapsayıcı görevinin kapsayıcısına bağlanacak yollar.
|
ContainerHostDataPath
Numaralandırma
Kapsayıcı görevinin kapsayıcısına bağlanacak yollar.
| Değer |
Description |
|
Shared
|
Çok örnekli görevin dosyalarını paylaşma yolu.
|
|
Startup
|
Başlangıç görevinin yolu.
|
|
VfsMounts
|
Yol, bu düğüme bağlı olan tüm sanal dosya sistemlerini içerir.
|
|
Task
|
Görev yolu.
|
|
JobPrep
|
İş hazırlama görev yolu.
|
|
Applications
|
Uygulama yolu.
|
ContainerRegistry
Nesne
Özel bir kapsayıcı kayıt defteri.
| Name |
Tür |
Description |
|
identityReference
|
ComputeNodeIdentityReference
|
Kullanıcı adı ve parola yerine Azure Container Registry'ye erişmek için kullanılacak kullanıcı tarafından atanan kimliğe başvuru.
İşlem düğümlerinin kullanacağı Batch havuzuyla ilişkili kullanıcı tarafından atanan kimliğe başvuru.
|
|
password
|
string
(password)
|
Kayıt defteri sunucusunda oturum açma parolası.
Kayıt defteri sunucusunda oturum açma parolası.
|
|
registryServer
|
string
|
Kayıt defteri URL'si.
Atlanırsa, varsayılan değer "docker.io"dir.
|
|
username
|
string
|
Kayıt defteri sunucusunda oturum açmak için kullanıcı adı.
Kayıt defteri sunucusunda oturum açmak için kullanıcı adı.
|
ContainerType
Numaralandırma
Kullanılacak kapsayıcı teknolojisi.
| Değer |
Description |
|
DockerCompatible
|
Kapsayıcıları başlatmak için Docker uyumlu bir kapsayıcı teknolojisi kullanılacaktır.
|
|
CriCompatible
|
Kapsayıcıları başlatmak için CRI tabanlı bir teknoloji kullanılacaktır.
|
ContainerWorkingDirectory
Numaralandırma
Kapsayıcı görevi çalışma dizininin nerede olduğunu belirten bir bayrak. Varsayılan değer 'taskWorkingDirectory'dir.
| Değer |
Description |
|
TaskWorkingDirectory
|
Batch tarafından doldurulan Görev kaynak dosyalarını içeren standart Batch hizmeti görev çalışma dizinini kullanın.
|
|
ContainerImageDefault
|
Kapsayıcı görüntüsü tanımlı çalışma dizinini kullanma. Bu dizinin Batch tarafından indirilen kaynak dosyalarını içermeyeceğini dikkate alın.
|
createdByType
Numaralandırma
Kaynağı oluşturan kimliğin türü.
| Değer |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
DataDisk
Nesne
Havuzdaki İşlem Düğümleriyle ilişkili veri diskleri tarafından kullanılacak ayarlar. Bağlı veri disklerini kullanırken, diskleri kullanmak için vm'nin içinden bağlamanız ve biçimlendirmeniz gerekir.
| Name |
Tür |
Description |
|
caching
|
CachingType
|
Disk için etkinleştirileceği önbelleğe alma türü.
Değerler şunlardır:
none - Disk için önbelleğe alma modu etkin değil.
readOnly - Diskin önbelleğe alma modu salt okunur.
readWrite - Diskin önbelleğe alma modu okunur ve yazılır.
Önbelleğe alma için varsayılan değer yoktur. Önbelleğe alma seçenekleri hakkında bilgi için bkz. https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/.
|
|
diskSizeGB
|
integer
(int32)
|
Yeni veri diski oluşturulurken GB cinsinden ilk disk boyutu.
Yeni veri diski oluşturulurken GB cinsinden ilk disk boyutu.
|
|
lun
|
integer
(int32)
|
Mantıksal birim numarası.
Lun, her veri diskini benzersiz olarak tanımlamak için kullanılır. Birden çok disk ekleniyorsa, her birinin ayrı bir lun değeri olmalıdır. Değer 0 ile 63 (dahil) arasında olmalıdır.
|
|
managedDisk
|
ManagedDisk
|
Yönetilen disk parametreleri.
Yönetilen disk parametreleri.
|
DeploymentConfiguration
Nesne
Dağıtım yapılandırma özellikleri.
| Name |
Tür |
Description |
|
virtualMachineConfiguration
|
VirtualMachineConfiguration
|
Havuzun sanal makine yapılandırması.
Azure Sanal Makineler altyapısını temel alan bir havuzdaki işlem düğümleri için yapılandırma.
|
DiffDiskPlacement
Numaralandırma
OS diskinin yerleştirilmesi gereken yer.
| Değer |
Description |
|
CacheDisk
|
OS diski, VM'nin önbellek diskine yerleştirilecektir.
|
DiffDiskSettings
Nesne
Sanal makine tarafından kullanılan işletim sistemi diski için kısa ömürlü Disk Ayarlarını belirtir.
DiskCustomerManagedKey
Nesne
Diski şifrelemek için Müşteri Tarafından Yönetilen Anahtar başvurusu.
| Name |
Tür |
Description |
|
identityReference
|
ComputeNodeIdentityReference
|
Disk'i şifrelemek için havuz kimliklerinden birinin başvurusu. Bu kimlik KeyVault'a erişmek için kullanılır.
|
|
keyUrl
|
string
(uri)
|
KeyVault'ta bir anahtara işaret eden tam sürüme sahip Anahtar Url'si. RotationToLatestKeyVersionEnabled değerinden bağımsız olarak Url'nin sürüm kesimi gereklidir.
|
|
rotationToLatestKeyVersionEnabled
|
boolean
|
Disk Şifrelemesi'nin en son anahtar sürümüne otomatik olarak güncellenmesini etkinleştirmek için bu bayrağı true olarak ayarlayın. Varsayılan değer false'tur.
|
DiskEncryptionConfiguration
Nesne
Havuzdaki işlem düğümlerine uygulanan disk şifreleme yapılandırması. Sanal Makine Görüntüsü veya Azure İşlem Galerisi Görüntüsü ile oluşturulan Linux havuzunda disk şifreleme yapılandırması desteklenmez.
| Name |
Tür |
Description |
|
customerManagedKey
|
DiskCustomerManagedKey
|
İşletim Sistemi Diskini şifrelemek için Müşteri Tarafından Yönetilen Anahtar başvurusu.
Müşteri Tarafından Yönetilen Anahtar, İşletim Sistemi Diskini EncryptionAtRest ile şifreler ve varsayılan olarak veri diskini de şifreleriz. Yalnızca havuz bir kimlikle yapılandırıldığında ve OsDisk, DiskEncryption'ın hedeflerinden biri olarak ayarlandığında kullanılabilir.
|
|
targets
|
DiskEncryptionTarget[]
|
Batch Hizmeti'nin işlem düğümünde şifreleeceği disk hedefleri listesi
Linux havuzunda yalnızca "TemporaryDisk" desteklenir; Windows havuzunda , "OsDisk" ve "TemporaryDisk" belirtilmelidir.
|
DiskEncryptionSetParameters
Nesne
Disk şifreleme kümesinin ARM kaynak kimliği.
| Name |
Tür |
Description |
|
id
|
string
(arm-id)
|
Disk şifreleme setinin kaynak kimliği.
Disk şifreleme kümesinin ARM kaynak kimliği. Kaynak, Batch hesabıyla aynı abonelikte olmalı.
|
DiskEncryptionTarget
Numaralandırma
Atlanırsa, havuzdaki işlem düğümlerindeki diskler şifrelenmez.
| Değer |
Description |
|
OsDisk
|
İşlem düğümündeki işletim sistemi diski şifrelenir.
|
|
TemporaryDisk
|
İşlem düğümündeki geçici disk şifrelenir. Linux'ta bu şifreleme, şifreleme önyükleme zamanında gerçekleştiğinde diğer bölümlere (bağlı veri disklerindekiler gibi) uygulanır.
|
DynamicVNetAssignmentScope
Numaralandırma
Dinamik sanal ağ atamasının kapsamı.
| Değer |
Description |
|
none
|
Dinamik sanal ağ ataması etkinleştirilmedi.
|
|
job
|
Dinamik sanal ağ ataması iş başına yapılır. Bu değer ayarlanırsa, ağ yapılandırma alt ağ kimliği de ayarlanmalıdır. Bu özellik kullanımdan önce onay gerektirir, lütfen desteğe başvurun
|
ElevationLevel
Numaralandırma
Kullanıcının yükseltme düzeyi.
| Değer |
Description |
|
NonAdmin
|
Kullanıcı, yükseltilmiş erişimi olmayan standart bir kullanıcıdır.
|
|
Admin
|
Kullanıcı, yükseltilmiş erişimi olan bir kullanıcıdır ve tam Yönetici izinleriyle çalışır.
|
EnvironmentSetting
Nesne
Görev işleminde ayarlanacak ortam değişkeni.
| Name |
Tür |
Description |
|
name
|
string
|
Ortam değişkeninin adı.
Ortam değişkeninin adı.
|
|
value
|
string
|
Ortam değişkeninin değeri.
Ortam değişkeninin değeri.
|
FixedScaleSettings
Nesne
Havuz için ölçek ayarları düzeltildi.
| Name |
Tür |
Default value |
Description |
|
nodeDeallocationOption
|
ComputeNodeDeallocationOption
|
|
Serbest bırakma için seçildikten sonra düğüm ve çalışan görevleriyle ne yapacağını belirler.
Atlanırsa, varsayılan değer Yeniden Sorgula'dır.
|
|
resizeTimeout
|
string
(duration)
|
PT15M
|
İşlem düğümlerinin havuza ayrılması için zaman aşımı.
Varsayılan değer 15 dakikadır. Zaman aşımı değerleri ISO 8601 biçimini kullanır. Örneğin, PT10M'yi 10 dakika boyunca kullanın. En düşük değer 5 dakikadır. 5 dakikadan kısa bir değer belirtirseniz, Batch hizmeti isteği bir hatayla reddeder; REST API'yi doğrudan çağırıyorsanız HTTP durum kodu 400'dür (Hatalı İstek).
|
|
targetDedicatedNodes
|
integer
(int32)
|
|
Havuzdaki ayrılmış işlem düğümlerinin istenen sayısı.
targetDedicatedNodes'lardan en az biri, targetLowPriorityNodes ayarlanmalıdır.
|
|
targetLowPriorityNodes
|
integer
(int32)
|
|
Havuzdaki istenen Spot/düşük öncelikli işlem düğümü sayısı.
targetDedicatedNodes'lardan en az biri, targetLowPriorityNodes ayarlanmalıdır.
|
HostEndpointSettings
Nesne
Belirli konak uç noktası ayarlarını belirtir.
| Name |
Tür |
Description |
|
inVMAccessControlProfileReferenceId
|
string
(arm-id)
|
InVMAccessControlProfileVersion kaynak kimliğine başvuruyu /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version} biçiminde belirtir.
|
|
mode
|
HostEndpointSettingsModeTypes
|
Erişim denetimi ilkesi yürütme modunu belirtir.
|
HostEndpointSettingsModeTypes
Numaralandırma
Erişim denetimi ilkesi yürütme modunu belirtir.
| Değer |
Description |
|
Audit
|
Denetim modunda sistem, günlüklere erişim engelleme girdileri yaymak da dahil olmak üzere erişim denetimi ilkesini zorunluyormuş gibi davranır, ancak konak uç noktalarına yönelik istekleri gerçekten reddetmez.
|
|
Enforce
|
Zorunlu mod önerilen çalışma modudur ve sistem erişim kontrol politikasını uygular. Bu özellik 'inVMAccessControlProfileReferenceId' ile birlikte kullanılamaz.
|
ImageReference
Nesne
Azure Sanal Makineler Market görüntüsüne veya özel bir Sanal Makinenin Azure Görüntüsü kaynağına başvuru. Azure Batch tarafından doğrulanan tüm imageReferences listesini almak için 'Desteklenen düğüm aracısı SKU'larını listeleme' işlemine bakın.
| Name |
Tür |
Description |
|
communityGalleryImageId
|
string
|
Topluluk galerisi görüntüsü benzersiz tanımlayıcısı
Bu özellik diğer özelliklerle birbirini dışlar ve topluluk galerisi görüntüsü GET çağrısından getirilebilir.
|
|
id
|
string
|
Azure İşlem Galerisi Görüntüsünün ARM kaynak tanımlayıcısı. Havuzdaki İşlem Düğümleri bu Görüntü Kimliği kullanılarak oluşturulur. Bu, /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/gallerys/{galleryName}/images/{imageDefinitionName}/versions/{versionId} biçimindedir.
Bu özellik diğer özelliklerle birbirini dışlar. Azure İşlem Galerisi Görüntüsü,Azure Batch hesabıyla aynı bölgede çoğaltmalara sahip olmalıdır. Batch düğümü aracısının Batch hizmetiyle iletişim kurması için güvenlik duvarı ayarları hakkında bilgi için bkz. https://learn.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration.
|
|
offer
|
string
|
Azure Sanal Makineler Market görüntüsünün teklif türü.
Örneğin, UbuntuServer veya WindowsServer.
|
|
publisher
|
string
|
Azure Sanal Makineler Market görüntüsünün yayımcısı.
Örneğin, Canonical veya MicrosoftWindowsServer.
|
|
sharedGalleryImageId
|
string
|
Paylaşılan galeri görüntüsü benzersiz tanımlayıcısı
Bu özellik diğer özelliklerle birbirini dışlar ve paylaşılan galeri görüntüsü GET çağrısından getirilebilir.
|
|
sku
|
string
|
Azure Sanal Makineler Market görüntüsünün SKU'su.
Örneğin, 18.04-LTS veya 2022-datacenter.
|
|
version
|
string
|
Azure Sanal Makineler Market görüntüsünün sürümü.
Görüntünün en son sürümünü seçmek için 'en son' değeri belirtilebilir. Atlanırsa, varsayılan değer 'en son' olur.
|
InboundEndpointProtocol
Numaralandırma
Uç noktanın protokolü.
| Değer |
Description |
|
TCP
|
Uç nokta için TCP kullanın.
|
|
UDP
|
Uç nokta için UDP kullanın.
|
InboundNatPool
Nesne
Batch havuzundaki işlem düğümlerindeki belirli bağlantı noktalarını harici olarak ele almak için kullanılabilecek gelen NAT havuzu.
| Name |
Tür |
Description |
|
backendPort
|
integer
(int32)
|
İşlem düğümündeki bağlantı noktası numarası.
Bu, Batch havuzu içinde benzersiz olmalıdır. 29876 ve 29877 hariç kabul edilebilir değerler 1 ile 65535 arasındadır, bunlar ayrılmıştır. Ayrılmış değerler sağlanırsa istek HTTP durum kodu 400 ile başarısız olur.
|
|
frontendPortRangeEnd
|
integer
(int32)
|
Tek tek işlem düğümlerinde arka uçPort'a gelen erişim sağlamak için kullanılacak dış bağlantı noktaları aralığındaki son bağlantı noktası numarası.
Batch hizmeti tarafından ayrılan 50000 ile 55000 arasındaki bağlantı noktaları dışında kabul edilebilir değerler 1 ile 65534 arasında değişir. Havuz içindeki tüm aralıklar ayrı olmalıdır ve çakışmamalıdır. Ayrılmış veya çakışan değerler sağlanırsa istek HTTP durum kodu 400 ile başarısız olur.
|
|
frontendPortRangeStart
|
integer
(int32)
|
Tek tek işlem düğümlerinde arka uçPort'a gelen erişim sağlamak için kullanılacak dış bağlantı noktaları aralığındaki ilk bağlantı noktası numarası.
50000 ile 55000 arasında ayrılmış bağlantı noktaları dışında kabul edilebilir değerler 1 ile 65534 arasında değişir. Havuz içindeki tüm aralıklar ayrı olmalıdır ve çakışmamalıdır. Ayrılmış veya çakışan değerler sağlanırsa istek HTTP durum kodu 400 ile başarısız olur.
|
|
name
|
string
|
Uç noktanın adı.
Ad bir Batch havuzu içinde benzersiz olmalıdır; harf, sayı, alt çizgi, nokta ve kısa çizgi içerebilir. Adlar bir harf veya sayı ile başlamalı, harf, sayı veya alt çizgiyle bitmelidir ve 77 karakteri aşamaz. Geçersiz değerler sağlanırsa istek HTTP durum kodu 400 ile başarısız olur.
|
|
networkSecurityGroupRules
|
NetworkSecurityGroupRule[]
|
Uç noktaya uygulanacak ağ güvenlik grubu kurallarının listesi.
Batch havuzundaki tüm uç noktalarda belirtilebilen kural sayısı üst sınırı 25'tir. Hiçbir ağ güvenlik grubu kuralı belirtilmezse, belirtilen arka uçPort'a gelen erişime izin vermek için varsayılan bir kural oluşturulur. Ağ güvenlik grubu kuralları üst sınırı aşılırsa istek HTTP durum kodu 400 ile başarısız olur.
|
|
protocol
|
InboundEndpointProtocol
|
Uç noktanın protokolü.
Uç noktanın protokolü.
|
InterNodeCommunicationState
Numaralandırma
Bu, havuza hangi düğümlerin atanabileceğine yönelik kısıtlamalar uygular. Bu değerin etkinleştirilmesi, istenen düğüm sayısının havuzda ayrılma olasılığını azaltabilir. Belirtilmezse, bu değer varsayılan olarak 'Devre Dışı' olur.
| Değer |
Description |
|
Enabled
|
Sanal makineler arasında ağ iletişimlerini etkinleştirin.
|
|
Disabled
|
Sanal makineler arasındaki ağ iletişimlerini devre dışı bırakın.
|
IPAddressProvisioningType
Numaralandırma
Batch Havuzu için Genel IP Adresleri için sağlama türü.
| Değer |
Description |
|
BatchManaged
|
Batch tarafından bir genel IP oluşturulur ve yönetilir. Havuzun boyutuna bağlı olarak birden çok genel IP olabilir.
|
|
UserManaged
|
Genel IP'ler kullanıcı tarafından sağlanır ve İşlem Düğümlerini sağlamak için kullanılır.
|
|
NoPublicIPAddresses
|
Havuzdaki İşlem Düğümleri için genel IP Adresi oluşturulmaz.
|
IPFamily
Numaralandırma
Havuzun kullanabileceği IP sürümlerini belirtmek için kullanılan IP aileleri.
| Değer |
Description |
|
IPv4
|
IPv4 havuzda mevcuttur.
|
|
IPv6
|
IPv6 havuzda mevcuttur.
|
IPTag
Nesne
Görevlerin işlem düğümleri arasında nasıl dağıtılması gerektiğini belirtir.
| Name |
Tür |
Description |
|
ipTagType
|
string
|
IP Etiketi türü.
Örnek: FirstPartyUsage.
|
|
tag
|
string
|
Genel IP ile ilişkili IP etiketinin değeri.
Örnek: SQL.
|
JobDefaultOrder
Numaralandırma
Aynı önceliğe sahip farklı işlerden görev zamanlama sırası.
| Değer |
Description |
|
None
|
Görevler, havuzdaki tüm eşit öncelikli işlerden eşit şekilde planlanmalıdır.
|
|
CreationTime
|
Eğer işler eşit öncelikliyse, daha önce oluşturulan işlerden gelen görevler önce planlanmalıdır.
|
LinuxUserConfiguration
Nesne
Linux düğümünde kullanıcı hesabı oluşturmak için kullanılan özellikler.
| Name |
Tür |
Description |
|
gid
|
integer
(int32)
|
Kullanıcı hesabının grup kimliği.
Uid ve gid özellikleri birlikte belirtilmeli veya hiç belirtilmemelidir. Belirtilmezse, temel işletim sistemi gid'i seçer.
|
|
sshPrivateKey
|
string
(password)
|
Kullanıcı hesabının SSH özel anahtarı.
Özel anahtar parola korumalı olmamalıdır. Özel anahtar, havuzun enableInterNodeCommunication özelliği true olduğunda linux havuzundaki düğümler arasında SSH için asimetrik anahtar tabanlı kimlik doğrulamasını otomatik olarak yapılandırmak için kullanılır (enableInterNodeCommunication yanlışsa yoksayılır). Anahtar çiftini kullanıcının .ssh dizinine yerleştirerek bunu yapar. Belirtilmezse, düğümler arasında parolasız SSH yapılandırılmaz (kullanıcının .ssh dizininde değişiklik yapılmaz).
|
|
uid
|
integer
(int32)
|
Kullanıcı hesabının kullanıcı kimliği.
Uid ve gid özellikleri birlikte belirtilmeli veya hiç belirtilmemelidir. Belirtilmezse, temel işletim sistemi uid'yi seçer.
|
LoginMode
Numaralandırma
Kullanıcının oturum açma modunu belirtir. Varsayılan değer Etkileşimli'dir.
| Değer |
Description |
|
Batch
|
win32 oturum açma modunu LOGON32_LOGON_BATCH. Uzun süre çalışan paralel işlemler için toplu oturum açma modu önerilir.
|
|
Interactive
|
win32 oturum açma modunu LOGON32_LOGON_INTERACTIVE. Bazı uygulamalar etkileşimli oturum açma moduyla ilişkili izinlere sahip olmayı gerektirir. Görevinizde kullanılan bir uygulama için bu durum söz konusuysa, bu seçenek önerilir.
|
ManagedDisk
Nesne
Yönetilen disk parametreleri.
| Name |
Tür |
Description |
|
diskEncryptionSet
|
DiskEncryptionSetParameters
|
Yönetilen disk için müşteri tarafından yönetilen disk şifreleme kümesi kaynak kimliğini belirtir. Yalnızca UserSubscription modunda ayarlanabilir.
|
|
securityProfile
|
VMDiskSecurityProfile
|
Yönetilen disk için güvenlik profilini belirtir.
Yönetilen disk için güvenlik profili ayarlarını belirtir.
Not: Yalnızca Gizli VM'ler için ayarlanabilir ve Gizli VM'ler kullanılırken gereklidir.
|
|
storageAccountType
|
StorageAccountType
|
Veri diskleri veya işletim sistemi diski oluştururken kullanılacak depolama hesabı türü.
Veri diskleri veya işletim sistemi diski oluştururken kullanılacak depolama hesabı türü.
|
Nesne
Batch hizmet kaynağıyla ilişkilendirilmiş bir ad-değer çifti.
| Name |
Tür |
Description |
|
name
|
string
|
Meta veri öğesinin adı.
Meta veri öğesinin adı.
|
|
value
|
string
|
Meta veri öğesinin değeri.
Meta veri öğesinin değeri.
|
MountConfiguration
Nesne
Her düğüme bağlanacak dosya sistemi.
| Name |
Tür |
Description |
|
azureBlobFileSystemConfiguration
|
AzureBlobFileSystemConfiguration
|
Her düğümde blob FUSE kullanılarak bağlanacak Azure Depolama Kapsayıcısı.
Bu özellik diğer tüm özelliklerle birbirini dışlar.
|
|
azureFileShareConfiguration
|
AzureFileShareConfiguration
|
Her düğüme bağlanacak Azure Dosya Paylaşımı.
Bu özellik diğer tüm özelliklerle birbirini dışlar.
|
|
cifsMountConfiguration
|
CIFSMountConfiguration
|
Her düğüme bağlanacak CIFS/SMB dosya sistemi.
Bu özellik diğer tüm özelliklerle birbirini dışlar.
|
|
nfsMountConfiguration
|
NFSMountConfiguration
|
Her düğüme bağlanacak NFS dosya sistemi.
Bu özellik diğer tüm özelliklerle birbirini dışlar.
|
NetworkConfiguration
Nesne
Havuz için ağ yapılandırması.
| Name |
Tür |
Default value |
Description |
|
dynamicVnetAssignmentScope
|
DynamicVNetAssignmentScope
|
none
|
Dinamik sanal ağ atamasının kapsamı.
Dinamik sanal ağ atamasının kapsamı.
|
|
enableAcceleratedNetworking
|
boolean
|
|
Bu havuzun hızlandırılmış ağı etkinleştirmesi gerekip gerekmediği.
Hızlandırılmış ağ, vm için tek kök G/Ç sanallaştırmasını (SR-IOV) etkinleştirir ve bu da ağ performansının artmasına neden olabilir. Daha fazla ayrıntı için bkz. https://learn.microsoft.com/azure/virtual-network/accelerated-networking-overview.
|
|
endpointConfiguration
|
PoolEndpointConfiguration
|
|
Batch havuzundaki işlem düğümlerindeki uç noktaların yapılandırması.
Havuz için uç nokta yapılandırması.
|
|
publicIPAddressConfiguration
|
PublicIPAddressConfiguration
|
|
Batch Havuzu'ndaki İşlem Düğümleri için Genel IPAddress yapılandırması.
Havuzun ağ yapılandırmasının genel IP Adresi yapılandırması.
|
|
subnetId
|
string
|
|
Havuzun işlem düğümlerinin birleştirileceği sanal ağ alt ağının ARM kaynak tanımlayıcısı. Bu, /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet} biçimindedir.
Sanal ağın Azure Batch hesabıyla aynı bölgede ve abonelikte olması gerekir. Belirtilen alt ağ, havuzdaki düğüm sayısını karşılamak için yeterli boş IP adresine sahip olmalıdır. Alt ağda yeterli boş IP adresi yoksa havuz işlem düğümlerini kısmen ayırır ve yeniden boyutlandırma hatası oluşur. 'MicrosoftAzureBatch' hizmet sorumlusu, belirtilen sanal ağ için Erişim Denetimi (RBAC) Role-Based 'Klasik Sanal Makine Katılımcısı' rolüne sahip olmalıdır. Belirtilen alt ağ, işlem düğümlerinde görevleri zamanlayabilmek için Azure Batch hizmetinden iletişime izin vermelidir. Bu, belirtilen sanal ağın ilişkili Ağ Güvenlik Grupları (NSG) olup olmadığını denetleyerek doğrulanabilir. Belirtilen alt ağdaki işlem düğümleriyle iletişim bir NSG tarafından reddedilirse Batch hizmeti işlem düğümlerinin durumunu kullanılamaz olarak ayarlar. Belirtilen sanal ağda ilişkili Ağ Güvenlik Grupları (NSG) varsa, 29876 ve 29877 bağlantı noktaları dahil olmak üzere gelen iletişim için birkaç ayrılmış sistem bağlantı noktası etkinleştirilmelidir. Ayrıca 443 numaralı bağlantı noktasından Azure Depolama'ya giden bağlantıları etkinleştirin. Daha fazla ayrıntı için bkz. https://learn.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration
|
NetworkSecurityGroupRule
Nesne
Gelen uç noktaya uygulanacak bir ağ güvenlik grubu kuralı.
| Name |
Tür |
Description |
|
access
|
NetworkSecurityGroupRuleAccess
|
Belirtilen IP adresi, alt ağ aralığı veya etiketi için yapılması gereken eylem.
Belirtilen IP adresi, alt ağ aralığı veya etiketi için yapılması gereken eylem.
|
|
priority
|
integer
(int32)
|
Bu kuralın önceliği.
Havuz içindeki önceliklerin benzersiz olması ve öncelik sırasına göre değerlendirilmesi gerekir. Sayı ne kadar düşük ise öncelik o kadar yüksektir. Örneğin, kurallar 150, 250 ve 350 sipariş numaralarıyla belirtilebilir. Sipariş numarası 150 olan kural, 250 sırasına sahip kuraldan önceliklidir. İzin verilen öncelikler 150 ile 4096'dır. Ayrılmış veya yinelenen değerler sağlanırsa istek HTTP durum kodu 400 ile başarısız olur.
|
|
sourceAddressPrefix
|
string
|
Kuralla eşleşecek kaynak adres ön eki veya etiketi.
Geçerli değerler tek bir IP adresi (örneğin, 10.10.10.10), IP alt ağı (192.168.1.0/24), varsayılan etiket veya * (tüm adresler için). Başka değerler sağlanırsa istek HTTP durum kodu 400 ile başarısız olur.
|
|
sourcePortRanges
|
string[]
|
Kaynak bağlantı noktası, kuralla eşleşecek şekilde değişir.
Geçerli değerler '*' (0 - 65535 numaralı tüm bağlantı noktaları için) veya bağlantı noktası veya bağlantı noktası aralığı dizileridir (örneğin, 100-200). Bağlantı noktaları 0 ile 65535 arasında olmalıdır ve bağlantı noktası aralıkları veya bağlantı noktaları çakışamaz. Başka değerler sağlanırsa istek HTTP durum kodu 400 ile başarısız olur. Varsayılan değer * olacaktır.
|
NetworkSecurityGroupRuleAccess
Numaralandırma
Belirtilen IP adresi, alt ağ aralığı veya etiketi için yapılması gereken eylem.
| Değer |
Description |
|
Allow
|
Erişime izin ver.
|
|
Deny
|
Erişimi reddet.
|
NFSMountConfiguration
Nesne
NFS dosya sistemine bağlanmak için kullanılan bilgiler.
| Name |
Tür |
Description |
|
mountOptions
|
string
|
Bağlama komutuna geçirmek için ek komut satırı seçenekleri.
Bunlar Windows'taki 'net use' seçenekleri ve Linux'taki 'bağlama' seçenekleridir.
|
|
relativeMountPath
|
string
|
Dosya sisteminin bağlanacağı işlem düğümündeki göreli yol
Tüm dosya sistemleri Batch bağlamaları dizinine göre bağlanır ve AZ_BATCH_NODE_MOUNTS_DIR ortam değişkeni aracılığıyla erişilebilir.
|
|
source
|
string
|
Bağlanacak dosya sisteminin URI'sini.
Bağlanacak dosya sisteminin URI'sini.
|
NodePlacementConfiguration
Nesne
Batch havuzları için düğüm yerleştirme yapılandırması.
| Name |
Tür |
Description |
|
policy
|
NodePlacementPolicyType
|
Batch havuzlarında düğüm yerleştirme politikası türü.
Batch Hizmeti tarafından düğümleri sağlamak için kullanılan ayırma ilkesi. Belirtilmezse, Batch bölgesel ilkeyi kullanır.
|
NodePlacementPolicyType
Numaralandırma
Varsayılan değer bölgeseldir.
| Değer |
Description |
|
Regional
|
Havuzdaki tüm düğümler aynı bölgede ayrılır.
|
|
Zonal
|
Havuzdaki düğümler, en iyi çaba dengelemesi ile farklı bölgelere yayılır.
|
OSDisk
Nesne
Sanal makinenin işletim sistemi diskinin ayarları.
| Name |
Tür |
Description |
|
caching
|
CachingType
|
Disk için etkinleştirileceği önbelleğe alma türü.
Disk için etkinleştirileceği önbelleğe alma türü.
|
|
diskSizeGB
|
integer
(int32)
|
Yeni işletim sistemi diski oluşturulurken GB cinsinden ilk disk boyutu.
Yeni işletim sistemi diski oluşturulurken GB cinsinden ilk disk boyutu.
|
|
ephemeralOSDiskSettings
|
DiffDiskSettings
|
Sanal makine tarafından kullanılan işletim sistemi diski için kısa ömürlü Disk Ayarlarını belirtir.
Sanal makine tarafından kullanılan işletim sistemi diski için kısa ömürlü Disk Ayarlarını belirtir.
|
|
managedDisk
|
ManagedDisk
|
Yönetilen disk parametreleri.
Yönetilen disk parametreleri.
|
|
writeAcceleratorEnabled
|
boolean
|
diskte writeAccelerator'ın etkinleştirilip etkinleştirilmeymeyeceğini veya devre dışı bırakılıp bırakılmayacağını belirtir.
diskte writeAccelerator'ın etkinleştirilip etkinleştirilmeymeyeceğini veya devre dışı bırakılıp bırakılmayacağını belirtir.
|
Pool
Nesne
Havuz hakkında bilgi içerir.
| Name |
Tür |
Default value |
Description |
|
etag
|
string
|
|
Eşzamanlılık deyimleri için kullanılan kaynağın ETag'i.
|
|
id
|
string
(arm-id)
|
|
Kaynağın tam kaynak kimliği. Örneğin, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
identity
|
BatchPoolIdentity
|
|
Batch Havuzu için kullanılan kimlik türü.
|
|
name
|
string
|
|
Kaynağın adı
|
|
properties.allocationState
|
AllocationState
|
|
Havuzun yeniden boyutlandırılıp boyutlandırılmadığı.
Havuzun yeniden boyutlandırılıp boyutlandırılmadığı.
|
|
properties.allocationStateTransitionTime
|
string
(date-time)
|
|
Havuzun geçerli ayırma durumuna girdiği saat.
Havuzun geçerli ayırma durumuna girdiği saat.
|
|
properties.applicationPackages
|
ApplicationPackageReference[]
|
|
Havuzdaki her işlem düğümüne yüklenecek uygulama paketlerinin listesi.
Uygulama paketi başvurularındaki değişiklikler havuza katılan tüm yeni işlem düğümlerini etkiler, ancak yeniden başlatılana veya yeniden tasarlanana kadar zaten havuzda olan işlem düğümlerini etkilemez. Belirli bir havuzda en fazla 10 uygulama paketi başvurusu vardır.
|
|
properties.autoScaleRun
|
AutoScaleRun
|
|
Otomatik ölçeklendirme formülünün son yürütmesinin sonuçları ve hataları.
Bu özellik yalnızca havuzun otomatik olarak ölçeklendirilmesi, yani autoScaleSettings kullanılması durumunda ayarlanır.
|
|
properties.creationTime
|
string
(date-time)
|
|
Havuzun oluşturma zamanı.
Havuzun oluşturma zamanı.
|
|
properties.currentDedicatedNodes
|
integer
(int32)
|
|
Şu anda havuzda bulunan ayrılmış işlem düğümlerinin sayısı.
Şu anda havuzda bulunan ayrılmış işlem düğümlerinin sayısı.
|
|
properties.currentLowPriorityNodes
|
integer
(int32)
|
|
Şu anda havuzda yer alan Spot/düşük öncelikli işlem düğümlerinin sayısı.
Şu anda havuzda yer alan Spot/düşük öncelikli işlem düğümlerinin sayısı.
|
|
properties.deploymentConfiguration
|
DeploymentConfiguration
|
|
Bu özellik, havuz düğümlerinin dağıtılacağı sanal makineleri açıklar.
Dağıtım yapılandırma özellikleri.
|
|
properties.displayName
|
string
|
|
Havuzun görünen adı.
Görünen adın benzersiz olması gerekmez ve en fazla 1024 uzunluğa kadar unicode karakter içerebilir.
|
|
properties.interNodeCommunication
|
InterNodeCommunicationState
|
|
Havuzun düğümler arasında doğrudan iletişime izin verip vermediği.
Bu, havuza hangi düğümlerin atanabileceğine yönelik kısıtlamalar uygular. Bu değerin etkinleştirilmesi, istenen düğüm sayısının havuzda ayrılma olasılığını azaltabilir. Belirtilmezse, bu değer varsayılan olarak 'Devre Dışı' olur.
|
|
properties.lastModified
|
string
(date-time)
|
|
Havuzun son değiştirme zamanı.
Bu, targetDedicatedNodes veya autoScaleSettings gibi havuz düzeyindeki verilerin değiştirildiği son durumdur. İşlem düğümü değiştirme durumu gibi düğüm düzeyindeki değişiklikleri dikkate almaz.
|
|
properties.metadata
|
MetadataItem[]
|
|
Havuzla meta veri olarak ilişkili ad-değer çiftlerinin listesi.
Batch hizmeti meta veriye herhangi bir anlam atamaz; yalnızca kullanıcı kodunun kullanımına yöneliktir.
|
|
properties.mountConfiguration
|
MountConfiguration[]
|
|
Havuzdaki her düğüme bağlanacak dosya sistemlerinin listesi.
Bu, Azure Dosyalar, NFS, CIFS/SMB ve Blobfuse'u destekler.
|
|
properties.networkConfiguration
|
NetworkConfiguration
|
|
Havuzun ağ yapılandırması.
Havuz için ağ yapılandırması.
|
|
properties.provisioningState
|
PoolProvisioningState
|
|
Havuzun geçerli durumu.
Havuzun geçerli durumu.
|
|
properties.provisioningStateTransitionTime
|
string
(date-time)
|
|
Havuzun geçerli durumuna girdiği saat.
Havuzun geçerli durumuna girdiği saat.
|
|
properties.resizeOperationStatus
|
ResizeOperationStatus
|
|
Geçerli veya son tamamlanan yeniden boyutlandırma işlemiyle ilgili ayrıntıları içerir.
Geçerli işlemi (AllocationState havuzu Yeniden Boyutlandırılıyorsa) veya daha önce tamamlanan işlemi (AllocationState Kararlı ise) açıklar.
|
|
properties.scaleSettings
|
ScaleSettings
|
|
Havuzdaki düğüm sayısını yapılandıran ayarlar.
Havuzun istenen boyutunu tanımlar. Bu, istenen targetDedicatedNodes öğesinin belirtildiği 'fixedScale' veya düzenli aralıklarla yeniden değerlendirilen bir formülü tanımlayan 'autoScale' olabilir. Bu özellik belirtilmezse havuz 0 targetDedicatedNodes ile sabit bir ölçeğe sahip olur.
|
|
properties.startTask
|
StartTask
|
|
Havuza katılırken her işlem düğümünde çalıştırılacak şekilde belirtilen bir görev.
PATCH (güncelleştirme) işleminde bu özellik, başlangıç görevini havuzdan kaldırmak için boş bir nesneye ayarlanabilir.
|
|
properties.taskSchedulingPolicy
|
TaskSchedulingPolicy
|
|
Görevlerin havuzdaki işlem düğümleri arasında nasıl dağıtıldığı.
Belirtilmezse, varsayılan yayılır.
|
|
properties.taskSlotsPerNode
|
integer
(int32)
|
1
|
Havuzdaki tek bir işlem düğümünde eşzamanlı görevleri çalıştırmak için kullanılabilecek görev yuvalarının sayısı.
Varsayılan değer 1'dir. Maksimum değer, havuzun vmSize veya 256 çekirdek sayısının 4 katı kadar küçüktür.
|
|
properties.upgradePolicy
|
UpgradePolicy
|
|
Havuzun yükseltme ilkesi.
Otomatik, el ile veya sıralı yükseltme ilkesini açıklar.
|
|
properties.userAccounts
|
UserAccount[]
|
|
Havuzdaki her düğümde oluşturulacak kullanıcı hesaplarının listesi.
Havuzdaki her düğümde oluşturulacak kullanıcı hesaplarının listesi.
|
|
properties.vmSize
|
string
|
|
Havuzdaki sanal makinelerin boyutu. Havuzdaki tüm VM'ler aynı boyuttadır.
Kullanılabilir VM boyutları hakkında bilgi için bkz. Azure'da Sanal Makineler için Boyutlar (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch, STANDARD_A0 ve premium depolama alanı (STANDARD_GS, STANDARD_DS ve STANDARD_DSV2 serisi) dışındaki tüm Azure VM boyutlarını destekler.
|
|
systemData
|
systemData
|
|
createdBy ve modifiedBy bilgilerini içeren Azure Resource Manager meta verileri.
|
|
tags
|
object
|
|
Kaynağın etiketleri.
|
|
type
|
string
|
|
Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts"
|
PoolEndpointConfiguration
Nesne
Havuz için uç nokta yapılandırması.
| Name |
Tür |
Description |
|
inboundNatPools
|
InboundNatPool[]
|
Tek bir işlem düğümündeki belirli bağlantı noktalarını harici olarak ele almak için kullanılabilecek gelen NAT havuzlarının listesi.
Batch havuzu başına gelen NAT havuzu sayısı üst sınırı 5'tir. Gelen NAT havuzu sayısı üst sınırı aşılırsa istek HTTP durum kodu 400 ile başarısız olur. IPAddressProvisioningType NoPublicIPAddresses ise bu belirtilemez.
|
PoolIdentityType
Numaralandırma
Batch Havuzu için kullanılan kimlik türü.
| Değer |
Description |
|
UserAssigned
|
Batch havuzunda kullanıcı tarafından atanan kimlikler vardır.
|
|
None
|
Batch havuzunun kendisiyle ilişkilendirilmiş kimliği yok. Güncelleştirme havuzundaki None ayarı mevcut kimlikleri kaldırır.
|
PoolProvisioningState
Numaralandırma
Havuzun geçerli durumu.
| Değer |
Description |
|
Succeeded
|
Havuz, işlem düğümlerinin kullanılabilirliğine bağlı olarak görevleri çalıştırmak için kullanılabilir.
|
|
Deleting
|
Kullanıcı havuzun silinmesini istedi, ancak silme işlemi henüz tamamlanmadı.
|
ProxyAgentSettings
Nesne
Sanal makine oluşturulurken ProxyAgent ayarlarını belirtir.
| Name |
Tür |
Description |
|
enabled
|
boolean
|
Meta Veri Güvenlik Protokolü özelliğinin sanal makinede mi yoksa sanal makine ölçek kümesinde mi etkinleştirilmesi gerektiğini belirtir. Varsayılan değer False'tur.
|
|
imds
|
HostEndpointSettings
|
IMDS uç noktası ayarları.
|
|
wireServer
|
HostEndpointSettings
|
WireServer uç noktasının ayarları.
|
PublicIPAddressConfiguration
Nesne
Havuzun ağ yapılandırmasının genel IP Adresi yapılandırması.
| Name |
Tür |
Description |
|
ipAddressIds
|
string[]
|
Batch hizmetinin İşlem Düğümleri sağlarken kullanacağı genel IP'lerin listesi.
Burada belirtilen IP sayısı Havuzun maksimum boyutunu sınırlar - Her genel IP için 100 ayrılmış düğüm veya 100 Spot/düşük öncelikli düğüm ayrılabilir. Örneğin, 250 ayrılmış VM'ye ihtiyaç duyan bir havuzun en az 3 genel IP belirtilmesi gerekir. Bu koleksiyonun her öğesi şu biçimdedir: /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}.
|
|
ipFamilies
|
IPFamily[]
|
Havuzun kullanabileceği IP sürümlerini belirtmek için kullanılan IP aileleri.
IP aileleri, tek yığınlı veya çift yığınlı havuzları belirlemek için kullanılır. Tek yığın için beklenen değer IPv4'dür. çift yığın için beklenen değerler IPv4 ve IPv6'dır.
|
|
ipTags
|
IPTag[]
|
Batch'in oluşturduğu yeni Açık IP'lere uygulanacak IP etiketleri.
Batch'in oluşturduğu yeni Açık IP'lere uygulanacak IP etiketleri.
|
|
provision
|
IPAddressProvisioningType
|
Batch Havuzu için Genel IP Adresleri için sağlama türü.
Varsayılan değer BatchManaged değeridir
|
ResizeError
Nesne
Havuzu yeniden boyutlandırırken oluşan bir hata.
| Name |
Tür |
Description |
|
code
|
string
|
Hatanın tanımlayıcısı. Kodlar sabittir ve program aracılığıyla kullanılması amaçlanmıştır.
|
|
details
|
ResizeError[]
|
Hata hakkında ek ayrıntılar.
Hata hakkında ek ayrıntılar.
|
|
message
|
string
|
Hatayı açıklayan ve kullanıcı arabiriminde görüntülenmeye uygun olması amaçlanan bir ileti.
|
ResizeOperationStatus
Nesne
Geçerli veya son tamamlanan yeniden boyutlandırma işlemi hakkındaki ayrıntılar.
| Name |
Tür |
Description |
|
errors
|
ResizeError[]
|
Havuzdaki son yeniden boyutlandırma işlemi gerçekleştirilirken karşılaşılan hataların ayrıntıları.
Bu özellik yalnızca son havuzu yeniden boyutlandırma sırasında bir hata oluştuğunda ve yalnızca pool allocationState Sabit olduğunda ayarlanır.
|
|
nodeDeallocationOption
|
ComputeNodeDeallocationOption
|
Serbest bırakma için seçildikten sonra düğüm ve çalışan görevleriyle ne yapacağını belirler.
Varsayılan değer yeniden sorgulanır.
|
|
resizeTimeout
|
string
(duration)
|
İşlem düğümlerinin havuza ayrılması veya işlem düğümlerinin havuzdan kaldırılması için zaman aşımı.
Varsayılan değer 15 dakikadır. En düşük değer 5 dakikadır. 5 dakikadan kısa bir değer belirtirseniz, Batch hizmeti bir hata döndürür; REST API'yi doğrudan çağırıyorsanız HTTP durum kodu 400'dür (Hatalı İstek).
|
|
startTime
|
string
(date-time)
|
Bu yeniden boyutlandırma işleminin başlatıldığı saat.
Bu yeniden boyutlandırma işleminin başlatıldığı saat.
|
|
targetDedicatedNodes
|
integer
(int32)
|
Havuzdaki ayrılmış işlem düğümlerinin istenen sayısı.
Havuzdaki ayrılmış işlem düğümlerinin istenen sayısı.
|
|
targetLowPriorityNodes
|
integer
(int32)
|
Havuzdaki istenen Spot/düşük öncelikli işlem düğümü sayısı.
Havuzdaki istenen Spot/düşük öncelikli işlem düğümü sayısı.
|
ResourceFile
Nesne
İşlem düğümüne indirilecek tek bir dosya veya birden çok dosya.
| Name |
Tür |
Description |
|
autoStorageContainerName
|
string
|
Otomatik depolama hesabındaki depolama kapsayıcısı adı.
autoStorageContainerName, storageContainerUrl ve httpUrl özellikleri birbirini dışlar ve bunlardan biri belirtilmelidir.
|
|
blobPrefix
|
string
|
Azure Depolama kapsayıcısından blob indirirken kullanılacak blob ön eki. Yalnızca adları belirtilen ön ek ile başlayan bloblar indirilir.
özelliği yalnızca autoStorageContainerName veya storageContainerUrl kullanıldığında geçerlidir. Bu ön ek kısmi bir dosya adı veya alt dizin olabilir. Ön ek belirtilmezse kapsayıcıdaki tüm dosyalar indirilir.
|
|
fileMode
|
string
|
Sekizli biçimde dosya izin modu özniteliği.
Bu özellik yalnızca Linux işlem düğümlerine indirilen dosyalar için geçerlidir. Bir Windows düğümüne indirilecek resourceFile için belirtilirse yoksayılır. Bu özellik bir Linux düğümü için belirtilmezse, dosyaya varsayılan 0770 değeri uygulanır.
|
|
filePath
|
string
|
Dosyanın indirildiği işlem düğümünde görevin çalışma dizinine göre konum.
httpUrl özelliği belirtilirse filePath gereklidir ve dosya adı da dahil olmak üzere dosyanın indirileceği yolu açıklar. Aksi takdirde, autoStorageContainerName veya storageContainerUrl özelliği belirtilirse, filePath isteğe bağlıdır ve dosyaların indirilmesi gereken dizindir. filePath'in dizin olarak kullanıldığı durumlarda, giriş verileriyle zaten ilişkili tüm dizin yapıları tam olarak korunur ve belirtilen filePath dizinine eklenir. Belirtilen göreli yol, görevin çalışma dizininden ayrılamaz (örneğin, '..' kullanılarak).
|
|
httpUrl
|
string
|
İndirilmesi gereken dosyanın URL'si.
autoStorageContainerName, storageContainerUrl ve httpUrl özellikleri birbirini dışlar ve bunlardan biri belirtilmelidir. URL Azure Blob Depolama'yı işaret ederse işlem düğümlerinden okunabilir olmalıdır. Azure depolama alanındaki bir blob için böyle bir URL almanın üç yolu vardır: Blob üzerinde okuma izinleri veren Paylaşılan Erişim İmzası (SAS) dahil, okuma izni olan bir yönetilen kimlik kullanın veya blob veya kapsayıcısının ACL'sini genel erişime izin verecek şekilde ayarlayın.
|
|
identityReference
|
ComputeNodeIdentityReference
|
storageContainerUrl veya httpUrl tarafından belirtilen Azure Blob Depolama'ya erişmek için kullanılacak kullanıcı tarafından atanan kimliğe başvuru
İşlem düğümlerinin kullanacağı Batch havuzuyla ilişkili kullanıcı tarafından atanan kimliğe başvuru.
|
|
storageContainerUrl
|
string
|
Azure Blob Depolama içindeki blob kapsayıcısının URL'si.
autoStorageContainerName, storageContainerUrl ve httpUrl özellikleri birbirini dışlar ve bunlardan biri belirtilmelidir. Bu URL, işlem düğümlerinden okunabilir ve listelenebilir olmalıdır. Azure depolamadaki bir kapsayıcı için böyle bir URL almanın üç yolu vardır: kapsayıcıda okuma ve liste izinleri veren Paylaşılan Erişim İmzası (SAS) dahil, okuma ve liste izinleri olan yönetilen bir kimlik kullanın veya kapsayıcının ACL'sini genel erişime izin verecek şekilde ayarlayın.
|
RollingUpgradePolicy
Nesne
Sıralı yükseltme gerçekleştirirken kullanılan yapılandırma parametreleri.
| Name |
Tür |
Description |
|
enableCrossZoneUpgrade
|
boolean
|
Yükseltme toplu işlemleri oluştururken VMSS'nin AZ sınırlarını yoksaymasına izin verin. Toplu iş boyutunu belirlemek için Etki Alanını Güncelleştir ve maxBatchInstancePercent'ı dikkate alın. Bu alan ayarlanmadıysa Azure Batch varsayılan değerini ayarlamaz. Oluşturulan VirtualMachineScaleSet üzerindeki enableCrossZoneUpgrade değeri VirtualMachineScaleSet'teki varsayılan yapılandırmalar tarafından belirlenir. Bu alan yalnızca NodePlacementConfiguration, Zonal olarak kullanıldığında true veya false olarak ayarlanabilir.
|
|
maxBatchInstancePercent
|
integer
(int32)
minimum: 5 maximum: 100
|
Tek bir toplu işlemde sıralı yükseltme ile aynı anda yükseltilecek toplam sanal makine örneklerinin maksimum yüzdesi. Bu en yüksek düzeyde olduğundan, önceki veya gelecekteki toplu işlerdeki iyi durumda olmayan örnekler, daha yüksek güvenilirlik sağlamak için toplu işlerdeki örneklerin yüzdesinin azalmasına neden olabilir. Bu alanın değeri 5 ile 100 (dahil) arasında olmalıdır. Hem maxBatchInstancePercent hem de maxUnhealthyInstancePercent değeriyle atanırsa maxBatchInstancePercent değeri maxUnhealthyInstancePercent değerinden fazla olmamalıdır.
|
|
maxUnhealthyInstancePercent
|
integer
(int32)
minimum: 5 maximum: 100
|
Ölçek kümesindeki toplam sanal makine örneklerinin en yüksek yüzdesi, yükseltilme sonucunda veya sıralı yükseltme durdurulmadan önce sanal makine sistem durumu denetimleri tarafından iyi durumda bulunarak aynı anda iyi durumda olmayabilir. Bu kısıtlama, herhangi bir toplu işlem başlatılmadan önce denetlenecektir. Bu alanın değeri 5 ile 100 (dahil) arasında olmalıdır. Hem maxBatchInstancePercent hem de maxUnhealthyInstancePercent değeriyle atanırsa maxBatchInstancePercent değeri maxUnhealthyInstancePercent değerinden fazla olmamalıdır.
|
|
maxUnhealthyUpgradedInstancePercent
|
integer
(int32)
minimum: 0 maximum: 100
|
İyi durumda olmayan bir durumda bulunabilecek yükseltilmiş sanal makine örneklerinin en yüksek yüzdesi. Bu denetim, her toplu iş yükseltildikten sonra gerçekleşir. Bu yüzde hiç aşılırsa, sıralı güncelleştirme iptal edilir. Bu alanın değeri 0 ile 100 (dahil) arasında olmalıdır.
|
|
pauseTimeBetweenBatches
|
string
|
Tüm sanal makineler için güncelleştirmeyi tek bir toplu işte tamamlama ile sonraki toplu işlemi başlatma arasındaki bekleme süresi. Süre ISO 8601 biçiminde belirtilmelidir.
|
|
prioritizeUnhealthyInstances
|
boolean
|
Bir ölçek kümesindeki tüm iyi durumda olmayan örnekleri iyi durumdaki örneklerden önce yükseltin.
|
|
rollbackFailedInstancesOnPolicyBreach
|
boolean
|
Sıralı Yükseltme ilkesi ihlal edilirse örnekleri önceki modele geri alma başarısız oldu.
|
ScaleSettings
Nesne
Havuz için ölçek ayarları
| Name |
Tür |
Description |
|
autoScale
|
AutoScaleSettings
|
Havuz için Otomatik Ölçeklendirme ayarları.
Bu özellik ve fixedScale birbirini dışlar ve özelliklerden biri belirtilmelidir.
|
|
fixedScale
|
FixedScaleSettings
|
Havuz için ölçek ayarları düzeltildi.
Bu özellik ve otomatik Ölçeklendirme birbirini dışlar ve özelliklerden biri belirtilmelidir.
|
SecurityEncryptionTypes
Numaralandırma
Yönetilen diskin EncryptionType değerini belirtir. Yönetilen diskin şifrelenmesi için DiskWithVMGuestState olarak ve VMGuestState blobun şifrelenmesi için VMGuestState blobuna, sadece VMGuestState blobun şifrelenmesi için VMGuestStateOnly ve VMGuestState blobunda firmware durumu devam etmemesi için NonPersistedTPM olarak ayarlanmıştır.
Not: Yalnızca Gizli VM'ler için ayarlanabilir ve Gizli VM'ler kullanılırken gereklidir.
| Değer |
Description |
|
NonPersistedTPM
|
EncryptionType VMGuestState blobunda üretici yazılımı durumunu kalıcı hale getirmemek için yönetilen diskin NonPersistedTPM olarak ayarlanır.
|
|
VMGuestStateOnly
|
EncryptionType yalnızca VMGuestState blobunun şifrelenmesi için yönetilen diskin VMGuestStateOnly olarak ayarlanır.
|
|
DiskWithVMGuestState
|
EncryptionType yönetilen diskin VMGuestState blobu ile birlikte yönetilen diskin şifrelenmesi için DiskWithVMGuestState olarak ayarlanır. Veri disklerinde desteklenmez.
|
SecurityProfile
Nesne
Sanal makine veya sanal makine ölçek kümesi için güvenlik profili ayarlarını belirtir.
| Name |
Tür |
Description |
|
encryptionAtHost
|
boolean
|
Bu özellik, kullanıcı tarafından istekte sanal makine veya sanal makine ölçek kümesi için Konak Şifrelemesi'ni etkinleştirmek veya devre dışı bırakmak için kullanılabilir. Bu, ana bilgisayarın kendisinde Kaynak/Geçici disk de dahil olmak üzere tüm diskler için şifrelemeyi etkinleştirir.
|
|
proxyAgentSettings
|
ProxyAgentSettings
|
Sanal makine oluşturulurken ProxyAgent ayarlarını belirtir.
|
|
securityType
|
SecurityTypes
|
Sanal makinenin SecurityType değerini belirtir. UefiSettings'i etkinleştirmek için belirtilen herhangi bir değere ayarlanması gerekir.
Sanal makinenin SecurityType değerini belirtir. UefiSettings'i etkinleştirmek için belirtilen herhangi bir değere ayarlanması gerekir.
|
|
uefiSettings
|
UefiSettings
|
Sanal makineyi oluştururken kullanılan güvenli önyükleme ve vTPM gibi güvenlik ayarlarını belirtir.
Sanal makineyi oluştururken kullanılan güvenli önyükleme ve vTPM gibi güvenlik ayarlarını belirtir.
|
SecurityTypes
Numaralandırma
Sanal makinenin SecurityType değerini belirtir. UefiSettings'i etkinleştirmek için belirtilen herhangi bir değere ayarlanması gerekir.
| Değer |
Description |
|
trustedLaunch
|
Güvenilir başlatma, gelişmiş ve kalıcı saldırı tekniklerine karşı koruma sağlar.
|
|
confidentialVM
|
Azure gizli bilgi işlem, gizli VM'ler yüksek güvenlik ve gizlilik gereksinimleri olan kiracılara yöneliktir. Bu VM'ler, güvenlik gereksinimlerinizi karşılamaya yardımcı olmak için güçlü, donanım tarafından zorlanmış bir sınır sağlar. Platform vm'nizin durumunu okunmaya veya değiştirilmeye karşı korurken, kodunuzda değişiklik yapmadan geçişler için gizli VM'leri kullanabilirsiniz.
|
ServiceArtifactReference
Nesne
'En son' görüntü sürümü kullanılırken ölçek kümesindeki tüm sanal makineler için aynı görüntü sürümünü ayarlamak için kullanılan hizmet yapıtı başvuru kimliğini belirtir.
| Name |
Tür |
Description |
|
id
|
string
|
ServiceArtifactReference'ın hizmet yapıtı başvuru kimliği
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/gallerys/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName} biçiminde hizmet yapıtı başvuru kimliği
|
StartTask
Nesne
İşlem düğümü Azure Batch hizmetindeki bir havuza katıldığında veya işlem düğümü yeniden başlatıldığında veya yeniden oluşturulduğunda çalıştırılan görev.
| Name |
Tür |
Default value |
Description |
|
commandLine
|
string
|
|
Başlangıç görevinin komut satırı.
Komut satırı bir kabuk altında çalışmaz ve bu nedenle ortam değişkeni genişletme gibi kabuk özelliklerinden yararlanamaz. Bu tür özelliklerden yararlanmak istiyorsanız, kabuğu komut satırında çağırmanız gerekir; örneğin, Windows'ta "cmd /c MyCommand" veya Linux'ta "/bin/sh -c MyCommand" kullanın. startTask'in diğer özellikleri belirtilirse gereklidir.
|
|
containerSettings
|
TaskContainerSettings
|
|
Başlangıç görevinin altında çalıştığı kapsayıcının ayarları.
Bu belirtildiğinde, AZ_BATCH_NODE_ROOT_DIR altındaki tüm dizinler (düğümdeki Azure Batch dizinlerinin kökü) kapsayıcıya eşlenir, tüm görev ortamı değişkenleri kapsayıcıya eşlenir ve görev komut satırı kapsayıcıda yürütülür.
|
|
environmentSettings
|
EnvironmentSetting[]
|
|
Başlangıç görevi için ortam değişkeni ayarlarının listesi.
Başlangıç görevi için ortam değişkeni ayarlarının listesi.
|
|
maxTaskRetryCount
|
integer
(int32)
|
0
|
Görevin yeniden denenebileceği en fazla sayı.
Batch hizmeti, çıkış kodu sıfır olmayan bir görevi yeniden denenir. Bu değerin yeniden deneme sayısını özellikle denetlediğini unutmayın. Batch hizmeti görevi bir kez dener ve bu sınıra kadar yeniden deneyebilir. Örneğin, yeniden deneme sayısı üst sınırı 3 ise Batch görevi en fazla 4 kez dener (ilk deneme ve 3 yeniden deneme). Yeniden deneme sayısı üst sınırı 0 ise Batch hizmeti görevi yeniden denemez. Yeniden deneme sayısı üst sınırı -1 ise Batch hizmeti görevi sınırsız olarak yeniden dener. Varsayılan değer 0'dır
|
|
resourceFiles
|
ResourceFile[]
|
|
Komut satırını çalıştırmadan önce Batch hizmetinin işlem düğümüne indireceği dosyaların listesi.
Komut satırını çalıştırmadan önce Batch hizmetinin işlem düğümüne indireceği dosyaların listesi.
|
|
userIdentity
|
UserIdentity
|
|
Başlangıç görevinin çalıştığı kullanıcı kimliği.
Atlanırsa, görev, göreve özgü yönetici olmayan bir kullanıcı olarak çalışır.
|
|
waitForSuccess
|
boolean
|
|
İşlem düğümünde herhangi bir görevi zamanlamadan önce Batch hizmetinin başlangıç görevinin başarıyla tamamlanmasını (yani çıkış kodu 0 ile çıkmak için) beklemesi gerekip gerekmediği.
True ise ve başlangıç görevi bir işlem düğümünde başarısız olursa, Batch hizmeti başlangıç görevini en fazla yeniden deneme sayısına (maxTaskRetryCount) kadar yeniden dener. Tüm yeniden denemelerden sonra görev hala başarıyla tamamlanmamışsa Batch hizmeti işlem düğümünü kullanılamaz olarak işaretler ve görev zamanlamaz. Bu koşul düğüm durumu ve zamanlama hatası ayrıntıları aracılığıyla algılanabilir. False ise, Batch hizmeti başlangıç görevinin tamamlanmasını beklemez. Bu durumda, başlangıç görevi çalışmaya devam ederken diğer görevler işlem düğümünde yürütülmeye başlayabilir; ve başlangıç görevi başarısız olsa bile düğümde yeni görevler zamanlamaya devam eder. Varsayılan değer true'dur.
|
StorageAccountType
Numaralandırma
Veri diskleri veya işletim sistemi diski oluştururken kullanılacak depolama hesabı türü.
| Değer |
Description |
|
Standard_LRS
|
Veri diski /işletim sistemi diski standart yerel olarak yedekli depolama kullanmalıdır.
|
|
Premium_LRS
|
Veri diski /işletim sistemi diski, premium yerel olarak yedekli depolama kullanmalıdır.
|
|
StandardSSD_LRS
|
Veri diski /işletim sistemi diski standart SSD yerel olarak yedekli depolama kullanmalıdır.
|
systemData
Nesne
Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.
| Name |
Tür |
Description |
|
createdAt
|
string
(date-time)
|
Kaynak oluşturma (UTC) zaman damgası.
|
|
createdBy
|
string
|
Kaynağı oluşturan kimlik.
|
|
createdByType
|
createdByType
|
Kaynağı oluşturan kimliğin türü.
|
|
lastModifiedAt
|
string
(date-time)
|
Kaynağın son değişikliğinin zaman damgası (UTC)
|
|
lastModifiedBy
|
string
|
Kaynağı en son değiştiren kimlik.
|
|
lastModifiedByType
|
createdByType
|
Kaynağı en son değiştiren kimlik türü.
|
TaskContainerSettings
Nesne
Görevin kapsayıcı ayarları.
| Name |
Tür |
Description |
|
containerHostBatchBindMounts
|
ContainerHostBatchBindMountEntry[]
|
Kapsayıcı görevine bağlanmak istediğiniz yollar.
Bu dizi null ise veya yoksa, kapsayıcı görevi windows'ta (veya Linux'ta AZ_BATCH_NODE_ROOT_DIR) geçici disk sürücüsünün tamamını bağlar. Bu dizi boş olarak ayarlanırsa kapsayıcıya veri yolu bağlamaz.
|
|
containerRunOptions
|
string
|
Kapsayıcı oluşturma komutuna ek seçenekler.
Bu ek seçenekler, Batch Hizmeti tarafından denetlenenlere ek olarak "docker create" komutuna bağımsız değişken olarak sağlanır.
|
|
imageName
|
string
|
Görevin çalıştırılacağı kapsayıcıyı oluşturmak için kullanılacak görüntü.
Bu, "docker pull" için belirtildiği gibi tam görüntü başvurusudur. Görüntü adının bir parçası olarak hiçbir etiket sağlanmazsa, varsayılan olarak ":latest" etiketi kullanılır.
|
|
registry
|
ContainerRegistry
|
Kapsayıcı görüntüsünü içeren özel kayıt defteri.
Havuz oluşturma sırasında zaten sağlanmışsa bu ayar atlanabilir.
|
|
workingDirectory
|
ContainerWorkingDirectory
|
Kapsayıcı görevi çalışma dizininin nerede olduğunu belirten bir bayrak. Varsayılan değer 'taskWorkingDirectory'dir.
Kapsayıcı görevi çalışma dizininin nerede olduğunu belirten bir bayrak. Varsayılan değer 'taskWorkingDirectory'dir.
|
TaskSchedulingPolicy
Nesne
Görevlerin işlem düğümleri arasında nasıl dağıtılması gerektiğini belirtir.
| Name |
Tür |
Default value |
Description |
|
jobDefaultOrder
|
JobDefaultOrder
|
|
Belirtilmezse, varsayılan değer hiçbiridir.
Aynı önceliğe sahip farklı işlerden görev zamanlama sırası.
|
|
nodeFillType
|
ComputeNodeFillType
|
Spread
|
Görevlerin işlem düğümleri arasında nasıl dağıtılacağı.
Görevlerin işlem düğümleri arasında nasıl dağıtılacağı.
|
UefiSettings
Nesne
Sanal makineyi oluştururken kullanılan güvenli önyükleme ve vTPM gibi güvenlik ayarlarını belirtir.
| Name |
Tür |
Description |
|
secureBootEnabled
|
boolean
|
Sanal makinede güvenli önyüklemenin etkinleştirilip etkinleştirilmeymeyeceğini belirtir.
|
|
vTpmEnabled
|
boolean
|
Sanal makinede vTPM'nin etkinleştirilip etkinleştirilmeymeyeceğini belirtir.
|
UpgradeMode
Numaralandırma
Ölçek kümesindeki sanal makinelere yükseltme modunu belirtir.
Olası değerler şunlardır:
el ile - Ölçek kümesindeki sanal makinelerde güncelleştirmelerin uygulanmasını siz denetlersiniz. Bunu manualUpgrade eylemini kullanarak yaparsınız.
Otomatik - Ölçek kümesindeki tüm sanal makineler aynı anda otomatik olarak güncelleştirilir.
Rolling - Ölçek kümesi güncelleştirmeleri toplu olarak gerçekleştirir ve arada isteğe bağlı bir duraklatma süresi vardır.
| Değer |
Description |
|
automatic
|
Ölçek kümesindeki tüm sanal makineler aynı anda otomatik olarak güncelleştirilir.
|
|
manual
|
Ölçek kümesindeki sanal makinelere yapılan güncelleştirmelerin uygulanmasını siz denetlersiniz. Bunu manualUpgrade eylemini kullanarak yaparsınız.
|
|
rolling
|
Bir ölçek kümesindeki mevcut örnekler, yükseltilecek toplu işlemler halinde indirilir. Yükseltilen toplu işlem tamamlandıktan sonra örnekler yeniden trafik almaya başlar ve sonraki toplu işlem başlar. Bu, tüm örnekler up-to-date getirene kadar devam eder.
|
UpgradePolicy
Nesne
Otomatik, el ile veya sıralı yükseltme ilkesini açıklar.
| Name |
Tür |
Description |
|
automaticOSUpgradePolicy
|
AutomaticOSUpgradePolicy
|
Otomatik işletim sistemi yükseltmesi gerçekleştirmek için kullanılan yapılandırma parametreleri.
Otomatik işletim sistemi yükseltmesi gerçekleştirmek için kullanılan yapılandırma parametreleri.
|
|
mode
|
UpgradeMode
|
Ölçek kümesindeki sanal makinelere yükseltme modunu belirtir.
Olası değerler şunlardır:
el ile - Ölçek kümesindeki sanal makinelerde güncelleştirmelerin uygulanmasını siz denetlersiniz. Bunu manualUpgrade eylemini kullanarak yaparsınız.
Otomatik - Ölçek kümesindeki tüm sanal makineler aynı anda otomatik olarak güncelleştirilir.
Rolling - Ölçek kümesi güncelleştirmeleri toplu olarak gerçekleştirir ve arada isteğe bağlı bir duraklatma süresi vardır.
Ölçek kümesindeki sanal makinelere yükseltme modunu belirtir.
Olası değerler şunlardır:
el ile - Ölçek kümesindeki sanal makinelerde güncelleştirmelerin uygulanmasını siz denetlersiniz. Bunu manualUpgrade eylemini kullanarak yaparsınız.
Otomatik - Ölçek kümesindeki tüm sanal makineler aynı anda otomatik olarak güncelleştirilir.
Rolling - Ölçek kümesi güncelleştirmeleri toplu olarak gerçekleştirir ve arada isteğe bağlı bir duraklatma süresi vardır.
|
|
rollingUpgradePolicy
|
RollingUpgradePolicy
|
Sıralı yükseltme gerçekleştirirken kullanılan yapılandırma parametreleri.
Sıralı yükseltme gerçekleştirirken kullanılan yapılandırma parametreleri.
|
UserAccount
Nesne
Azure Batch düğümünde kullanıcı oluşturmak için kullanılan özellikler.
| Name |
Tür |
Description |
|
elevationLevel
|
ElevationLevel
|
Kullanıcının yükseltme düzeyi.
nonAdmin - Otomatik kullanıcı, yükseltilmiş erişimi olmayan standart bir kullanıcıdır. admin - Otomatik kullanıcı, yükseltilmiş erişimi olan bir kullanıcıdır ve tam Yönetici izinleriyle çalışır. Varsayılan değer nonAdmin'dir.
|
|
linuxUserConfiguration
|
LinuxUserConfiguration
|
Kullanıcı hesabı için Linux'a özgü kullanıcı yapılandırması.
Bir Windows havuzunda belirtilirse bu özellik yoksayılır. Belirtilmezse, kullanıcı varsayılan seçeneklerle oluşturulur.
|
|
name
|
string
|
Kullanıcı hesabının adı. Adlar en fazla 20 uzunluğa kadar herhangi bir Unicode karakter içerebilir.
Kullanıcı hesabının adı. Adlar en fazla 20 uzunluğa kadar herhangi bir Unicode karakter içerebilir.
|
|
password
|
string
(password)
|
Kullanıcı hesabının parolası.
Kullanıcı hesabının parolası.
|
|
windowsUserConfiguration
|
WindowsUserConfiguration
|
Kullanıcı hesabı için Windows'a özgü kullanıcı yapılandırması.
Bu özellik yalnızca kullanıcı bir Windows havuzundaysa belirtilebilir. Belirtilmezse ve bir Windows havuzunda kullanıcı varsayılan seçeneklerle oluşturulur.
|
UserAssignedIdentities
Nesne
İlişkili kullanıcı kimliklerinin listesi.
| Name |
Tür |
Description |
|
clientId
|
string
|
Kullanıcı tarafından atanan kimliğin istemci kimliği.
|
|
principalId
|
string
|
Kullanıcı tarafından atanan kimliğin asıl kimliği.
|
UserIdentity
Nesne
Görevin çalıştırıldığı kullanıcı kimliğinin tanımı.
| Name |
Tür |
Description |
|
autoUser
|
AutoUserSpecification
|
Görevin altında çalıştırıldığı otomatik kullanıcı.
userName ve autoUser özellikleri birbirini dışlar; birini belirtmeniz gerekir, ancak ikisini birden belirtmemelisiniz.
|
|
userName
|
string
|
Görevin çalıştırıldığı kullanıcı kimliğinin adı.
userName ve autoUser özellikleri birbirini dışlar; birini belirtmeniz gerekir, ancak ikisini birden belirtmemelisiniz.
|
VirtualMachineConfiguration
Nesne
Azure Sanal Makineler altyapısını temel alan bir havuzdaki işlem düğümleri için yapılandırma.
| Name |
Tür |
Description |
|
containerConfiguration
|
ContainerConfiguration
|
Havuzun kapsayıcı yapılandırması.
Belirtilirse, görevlerin kapsayıcılarda çalışmasına izin vermek için havuzdaki her düğümde kurulum gerçekleştirilir. Bu havuzda çalıştırılacak tüm normal görevler ve iş yöneticisi görevleri containerSettings özelliğini belirtmelidir ve diğer tüm görevler bunu belirtebilir.
|
|
dataDisks
|
DataDisk[]
|
Havuzdaki işlem düğümlerine bağlı veri diskleri için yapılandırma.
Havuzdaki işlem düğümlerinin kendilerine eklenmiş boş veri diskleri olması gerekiyorsa bu özellik belirtilmelidir.
|
|
diskEncryptionConfiguration
|
DiskEncryptionConfiguration
|
Havuzun disk şifreleme yapılandırması.
Belirtilirse, düğüm sağlama sırasında havuzdaki her düğümde şifreleme gerçekleştirilir.
|
|
extensions
|
VMExtension[]
|
Havuzun sanal makine uzantısı.
Belirtilirse, bu yapılandırmada belirtilen uzantılar her düğüme yüklenir.
|
|
imageReference
|
ImageReference
|
Azure Sanal Makineler Market Görüntüsüne veya kullanılacak özel Sanal Makine Görüntüsüne başvuru.
Azure Sanal Makineler Market görüntüsüne veya özel bir Sanal Makinenin Azure Görüntüsü kaynağına başvuru. Azure Batch tarafından doğrulanan tüm imageReferences listesini almak için 'Desteklenen düğüm aracısı SKU'larını listeleme' işlemine bakın.
|
|
licenseType
|
string
|
İşletim sistemi dağıtılırken kullanılacak şirket içi lisans türü.
Bu yalnızca Windows işletim sistemini içeren görüntüler için geçerlidir ve yalnızca dağıtılacak düğümler için geçerli şirket içi lisanslara sahip olduğunuzda kullanılmalıdır. Atlanırsa, şirket içi lisans indirimi uygulanmaz. Değerler şunlardır:
Windows_Server - Şirket içi lisans Windows Server içindir.
Windows_Client - Şirket içi lisans Windows İstemcisi içindir.
|
|
nodeAgentSkuId
|
string
|
Havuzdaki işlem düğümlerinde sağlanacak Batch düğümü aracısının SKU'su.
Batch düğüm aracısı, havuzdaki her düğümde çalışan ve düğüm ile Batch hizmeti arasında komut ve denetim arabirimi sağlayan bir programdır. Farklı işletim sistemleri için düğüm aracısının SKU'lar olarak bilinen farklı uygulamaları vardır. Seçili görüntü başvurusuyla eşleşen bir düğüm aracısı SKU'su belirtmeniz gerekir. Desteklenen düğüm aracısı SKU'larının listesini ve doğrulanmış görüntü başvurularının listesini almak için bkz. 'Desteklenen düğüm aracısı SKU'larını listeleme' işlemi.
|
|
nodePlacementConfiguration
|
NodePlacementConfiguration
|
Havuz için düğüm yerleştirme yapılandırması.
Bu yapılandırma, havuzdaki düğümlerin fiziksel olarak nasıl ayrılacağıyla ilgili kuralları belirtir.
|
|
osDisk
|
OSDisk
|
Sanal Makinenin işletim sistemi diskinin ayarları.
Kısa ömürlü OSDisk ayarları için yapılandırmayı içerir.
|
|
securityProfile
|
SecurityProfile
|
Sanal makine veya sanal makine ölçek kümesi için güvenlik profili ayarlarını belirtir.
Sanal makine veya sanal makine ölçek kümesi için güvenlik profili ayarlarını belirtir.
|
|
serviceArtifactReference
|
ServiceArtifactReference
|
'En son' görüntü sürümü kullanılırken ölçek kümesindeki tüm sanal makineler için aynı görüntü sürümünü ayarlamak için kullanılan hizmet yapıtı başvuru kimliğini belirtir.
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/gallerys/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName} biçiminde hizmet yapıtı başvuru kimliği
|
|
windowsConfiguration
|
WindowsConfiguration
|
Sanal makinedeki Windows işletim sistemi ayarları.
imageReference bir Linux işletim sistemi görüntüsü belirtiyorsa bu özellik belirtilmemelidir.
|
VMDiskSecurityProfile
Nesne
Yönetilen disk için güvenlik profili ayarlarını belirtir.
Not: Yalnızca Gizli VM'ler için ayarlanabilir ve Gizli VM'ler kullanılırken gereklidir.
| Name |
Tür |
Description |
|
diskEncryptionSet
|
DiskEncryptionSetParameters
|
Müşteri Tarafından Yönetilen Anahtar ile şifrelenmiş GizliVM İşletim Sistemi Diski ve VMGuest blobu için kullanılan yönetilen disk için müşteri tarafından yönetilen disk şifreleme kümesi kaynak kimliğini belirtir. Yalnızca UserSubscription modunda ayarlanabilir.
|
|
securityEncryptionType
|
SecurityEncryptionTypes
|
Yönetilen diskin EncryptionType değerini belirtir. Yalnızca VMGuestState blobunun şifrelenmesi için VMGuestStateOnly ve VMGuestState blobunda üretici yazılımı durumunu kalıcı hale getirmemek için NonPersistedTPM olarak ayarlanır.
Not: Yalnızca Gizli VM'ler için ayarlanabilir ve Gizli VM'ler kullanılırken gereklidir.
Yönetilen diskin EncryptionType değerini belirtir. Yalnızca VMGuestState blobunun şifrelenmesi için VMGuestStateOnly ve VMGuestState blobunda üretici yazılımı durumunu kalıcı hale getirmemek için NonPersistedTPM olarak ayarlanır.
Not: Yalnızca Gizli VM'ler için ayarlanabilir ve Gizli VM'ler kullanılırken gereklidir.
|
VMExtension
Nesne
Sanal makine uzantılarının yapılandırması.
| Name |
Tür |
Description |
|
autoUpgradeMinorVersion
|
boolean
|
Dağıtım zamanında kullanılabilir durumdaysa uzantının daha yeni bir ikincil sürüm kullanıp kullanmayacağını gösterir. Ancak dağıtıldıktan sonra, bu özellik true olarak ayarlanmış olsa bile uzantı yeniden dağıtılmadığı sürece ikincil sürümleri yükseltmez.
|
|
enableAutomaticUpgrade
|
boolean
|
Kullanılabilir uzantının daha yeni bir sürümü varsa, uzantının platform tarafından otomatik olarak yükseltilip yükseltilmeyeceğini gösterir.
|
|
name
|
string
|
Sanal makine uzantısının adı.
Sanal makine uzantısının adı.
|
|
protectedSettings
|
|
Uzantı protectedSettings veya protectedSettingsFromKeyVault içerebilir veya hiç korumalı ayar içeremez.
|
|
provisionAfterExtensions
|
string[]
|
Uzantı adları koleksiyonu.
Bu uzantının sağlanması gereken uzantı adlarının koleksiyonu.
|
|
publisher
|
string
|
Uzantı işleyici yayımcısının adı.
Uzantı işleyici yayımcısının adı.
|
|
settings
|
|
Uzantı için JSON biçimli genel ayarlar.
Uzantı için JSON biçimli genel ayarlar.
|
|
type
|
string
|
Uzantıların türü.
Uzantıların türü.
|
|
typeHandlerVersion
|
string
|
Betik işleyicisinin sürümü.
Betik işleyicisinin sürümü.
|
WindowsConfiguration
Nesne
Sanal makineye uygulanacak Windows işletim sistemi ayarları.
| Name |
Tür |
Description |
|
enableAutomaticUpdates
|
boolean
|
Sanal makinede otomatik güncelleştirmelerin etkinleştirilip etkinleştirilmediği.
Atlanırsa, varsayılan değer true olur.
|
WindowsUserConfiguration
Nesne
Windows düğümünde kullanıcı hesabı oluşturmak için kullanılan özellikler.
| Name |
Tür |
Description |
|
loginMode
|
LoginMode
|
Kullanıcı için oturum açma modu
Kullanıcının oturum açma modunu belirtir. Varsayılan değer Etkileşimli'dir.
|