Crea un nuovo account Batch con i parametri specificati. Gli account esistenti non possono essere aggiornati con questa API e devono invece essere aggiornati con l'API Aggiorna account Batch.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}?api-version=2025-06-01
Parametri dell'URI
| Nome |
In |
Necessario |
Tipo |
Descrizione |
|
accountName
|
path |
True
|
string
minLength: 3 maxLength: 24 pattern: ^[a-zA-Z0-9]+$
|
Un nome per l'account Batch che deve essere unico all'interno della regione. I nomi dei conti dei lotti devono avere una lunghezza compresa tra 3 e 24 caratteri e devono utilizzare solo numeri e lettere minuscole. Questo nome viene utilizzato come parte del nome DNS utilizzato per accedere al servizio Batch nella regione in cui l'account è stato creato. Ad esempio: http://accountname.region.batch.azure.com/.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Nome del gruppo di risorse. Il nome è insensibile alle maiuscole e minuscole.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
ID della sottoscrizione di destinazione. Il valore deve essere un UUID.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Versione dell'API da usare per questa operazione.
|
Corpo della richiesta
| Nome |
Necessario |
Tipo |
Descrizione |
|
location
|
True
|
string
|
Area in cui creare l'account.
|
|
identity
|
|
BatchAccountIdentity
|
Identità dell'account Batch.
|
|
properties.allowedAuthenticationModes
|
|
AuthenticationMode[]
|
Elenco delle modalità di autenticazione consentite per l'account Batch che può essere usato per l'autenticazione con il piano dati. Ciò non influisce sull'autenticazione con il piano di controllo.
|
|
properties.autoStorage
|
|
AutoStorageBaseProperties
|
Proprietà correlate all'account di archiviazione automatica.
|
|
properties.encryption
|
|
EncryptionProperties
|
Configurazione di crittografia per l'account Batch.
Configura la modalità di crittografia dei dati dei clienti all'interno dell'account Batch. Per impostazione predefinita, gli account vengono crittografati usando una chiave gestita da Microsoft. Per un controllo aggiuntivo, è possibile usare invece una chiave gestita dal cliente.
|
|
properties.keyVaultReference
|
|
KeyVaultReference
|
Riferimento all'insieme di credenziali delle chiavi di Azure associato all'account Batch.
|
|
properties.networkProfile
|
|
NetworkProfile
|
Profilo di rete per l'account Batch, che contiene le impostazioni delle regole di rete per ogni endpoint.
Il profilo di rete diventa effettivo solo quando publicNetworkAccess è abilitato.
|
|
properties.poolAllocationMode
|
|
PoolAllocationMode
|
Modalità di allocazione da usare per la creazione di pool nell'account Batch.
La modalità di allocazione del pool influisce anche sul modo in cui i client possono eseguire l'autenticazione all'API del servizio Batch. Se la modalità è BatchService, i client possono eseguire l'autenticazione usando le chiavi di accesso o l'ID Microsoft Entra. Se la modalità è UserSubscription, i client devono usare Microsoft Entra ID. Il valore predefinito è BatchService.
|
|
properties.publicNetworkAccess
|
|
PublicNetworkAccessType
|
Tipo di accesso alla rete per l'accesso all'account Azure Batch.
Tipo di accesso di rete per l'uso delle risorse nell'account Batch.
|
|
tags
|
|
object
|
Tag specificati dall'utente associati all'account.
|
Risposte
| Nome |
Tipo |
Descrizione |
|
200 OK
|
BatchAccount
|
Operazione di aggiornamento 'BatchAccount' della risorsa riuscita
|
|
202 Accepted
|
|
Operazione di risorsa accettata.
Intestazioni
- Location: string
- Retry-After: integer
|
|
Other Status Codes
|
CloudError
|
Risposta di errore imprevista.
|
Sicurezza
azure_auth
Flusso OAuth2 di Azure Active Directory.
Tipo:
oauth2
Flow:
implicit
URL di autorizzazione:
https://login.microsoftonline.com/common/oauth2/authorize
Ambiti
| Nome |
Descrizione |
|
user_impersonation
|
rappresentare l'account utente
|
Esempio
BatchAccountCreate_BYOS
Esempio di richiesta
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct?api-version=2025-06-01
{
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
},
"keyVaultReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
"url": "http://sample.vault.azure.net/"
},
"poolAllocationMode": "UserSubscription"
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python batch_account_create_byos.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.batch_account.begin_create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
parameters={
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
},
"keyVaultReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
"url": "http://sample.vault.azure.net/",
},
"poolAllocationMode": "UserSubscription",
},
},
).result()
print(response)
# x-ms-original-file: 2025-06-01/BatchAccountCreate_BYOS.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/BatchAccountCreate_BYOS.json
func ExampleAccountClient_BeginCreate_batchAccountCreateByos() {
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)
}
poller, err := clientFactory.NewAccountClient().BeginCreate(ctx, "default-azurebatch-japaneast", "sampleacct", armbatch.AccountCreateParameters{
Location: to.Ptr("japaneast"),
Properties: &armbatch.AccountCreateProperties{
AutoStorage: &armbatch.AutoStorageBaseProperties{
StorageAccountID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
},
KeyVaultReference: &armbatch.KeyVaultReference{
ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample"),
URL: to.Ptr("http://sample.vault.azure.net/"),
},
PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeUserSubscription),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %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.AccountClientCreateResponse{
// Account: &armbatch.Account{
// Name: to.Ptr("sampleacct"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
// Identity: &armbatch.AccountIdentity{
// Type: to.Ptr(armbatch.ResourceIdentityTypeNone),
// },
// Location: to.Ptr("japaneast"),
// Properties: &armbatch.AccountProperties{
// AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
// ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
// AutoStorage: &armbatch.AutoStorageProperties{
// LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.9878479Z"); return t}()),
// StorageAccountID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
// },
// DedicatedCoreQuota: to.Ptr[int32](20),
// KeyVaultReference: &armbatch.KeyVaultReference{
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample"),
// URL: to.Ptr("http://sample.vault.azure.net/"),
// },
// LowPriorityCoreQuota: to.Ptr[int32](20),
// PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeUserSubscription),
// PoolQuota: to.Ptr[int32](20),
// ProvisioningState: to.Ptr(armbatch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeEnabled),
// },
// },
// }
}
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 Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
*
* @summary creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
* x-ms-original-file: 2025-06-01/BatchAccountCreate_BYOS.json
*/
async function batchAccountCreateByos() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.batchAccount.create("default-azurebatch-japaneast", "sampleacct", {
location: "japaneast",
autoStorage: {
storageAccountId:
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
},
keyVaultReference: {
id: "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
url: "http://sample.vault.azure.net/",
},
poolAllocationMode: "UserSubscription",
});
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 Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/BatchAccountCreate_BYOS.json
// this example is just showing the usage of "BatchAccount_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 ResourceGroupResource created on azure
// for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// get the collection of this BatchAccountResource
BatchAccountCollection collection = resourceGroupResource.GetBatchAccounts();
// invoke the operation
string accountName = "sampleacct";
BatchAccountCreateOrUpdateContent content = new BatchAccountCreateOrUpdateContent(new AzureLocation("japaneast"))
{
AutoStorage = new BatchAccountAutoStorageBaseConfiguration(new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")),
PoolAllocationMode = BatchAccountPoolAllocationMode.UserSubscription,
KeyVaultReference = new BatchKeyVaultReference(new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample"), new Uri("http://sample.vault.azure.net/")),
};
ArmOperation<BatchAccountResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, accountName, content);
BatchAccountResource 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
BatchAccountData 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
Risposta di esempio
{
"name": "sampleacct",
"type": "Microsoft.Batch/batchAccounts",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct",
"identity": {
"type": "None"
},
"location": "japaneast",
"properties": {
"accountEndpoint": "sampleacct.japaneast.batch.azure.com",
"activeJobAndJobScheduleQuota": 20,
"autoStorage": {
"lastKeySync": "2016-03-10T23:48:38.9878479Z",
"storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
},
"dedicatedCoreQuota": 20,
"keyVaultReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
"url": "http://sample.vault.azure.net/"
},
"lowPriorityCoreQuota": 20,
"poolAllocationMode": "UserSubscription",
"poolQuota": 20,
"provisioningState": "Succeeded",
"publicNetworkAccess": "Enabled"
}
}
BatchAccountCreate_Default
Esempio di richiesta
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct?api-version=2025-06-01
{
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python batch_account_create_default.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.batch_account.begin_create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
parameters={
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
}
},
},
).result()
print(response)
# x-ms-original-file: 2025-06-01/BatchAccountCreate_Default.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/BatchAccountCreate_Default.json
func ExampleAccountClient_BeginCreate_batchAccountCreateDefault() {
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)
}
poller, err := clientFactory.NewAccountClient().BeginCreate(ctx, "default-azurebatch-japaneast", "sampleacct", armbatch.AccountCreateParameters{
Location: to.Ptr("japaneast"),
Properties: &armbatch.AccountCreateProperties{
AutoStorage: &armbatch.AutoStorageBaseProperties{
StorageAccountID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %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.AccountClientCreateResponse{
// Account: &armbatch.Account{
// Name: to.Ptr("sampleacct"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
// Identity: &armbatch.AccountIdentity{
// Type: to.Ptr(armbatch.ResourceIdentityTypeNone),
// },
// Location: to.Ptr("japaneast"),
// Properties: &armbatch.AccountProperties{
// AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
// ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
// AutoStorage: &armbatch.AutoStorageProperties{
// LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.9878479Z"); return t}()),
// StorageAccountID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
// },
// DedicatedCoreQuota: to.Ptr[int32](20),
// LowPriorityCoreQuota: to.Ptr[int32](20),
// PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeBatchService),
// PoolQuota: to.Ptr[int32](20),
// ProvisioningState: to.Ptr(armbatch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeEnabled),
// },
// },
// }
}
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 Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
*
* @summary creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
* x-ms-original-file: 2025-06-01/BatchAccountCreate_Default.json
*/
async function batchAccountCreateDefault() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.batchAccount.create("default-azurebatch-japaneast", "sampleacct", {
location: "japaneast",
autoStorage: {
storageAccountId:
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
},
});
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 Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/BatchAccountCreate_Default.json
// this example is just showing the usage of "BatchAccount_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 ResourceGroupResource created on azure
// for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// get the collection of this BatchAccountResource
BatchAccountCollection collection = resourceGroupResource.GetBatchAccounts();
// invoke the operation
string accountName = "sampleacct";
BatchAccountCreateOrUpdateContent content = new BatchAccountCreateOrUpdateContent(new AzureLocation("japaneast"))
{
AutoStorage = new BatchAccountAutoStorageBaseConfiguration(new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")),
};
ArmOperation<BatchAccountResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, accountName, content);
BatchAccountResource 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
BatchAccountData 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
Risposta di esempio
{
"name": "sampleacct",
"type": "Microsoft.Batch/batchAccounts",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct",
"identity": {
"type": "None"
},
"location": "japaneast",
"properties": {
"accountEndpoint": "sampleacct.japaneast.batch.azure.com",
"activeJobAndJobScheduleQuota": 20,
"autoStorage": {
"lastKeySync": "2016-03-10T23:48:38.9878479Z",
"storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
},
"dedicatedCoreQuota": 20,
"lowPriorityCoreQuota": 20,
"poolAllocationMode": "BatchService",
"poolQuota": 20,
"provisioningState": "Succeeded",
"publicNetworkAccess": "Enabled"
}
}
BatchAccountCreate_SystemAssignedIdentity
Esempio di richiesta
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct?api-version=2025-06-01
{
"identity": {
"type": "SystemAssigned"
},
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python batch_account_create_system_assigned_identity.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.batch_account.begin_create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
parameters={
"identity": {"type": "SystemAssigned"},
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
}
},
},
).result()
print(response)
# x-ms-original-file: 2025-06-01/BatchAccountCreate_SystemAssignedIdentity.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/BatchAccountCreate_SystemAssignedIdentity.json
func ExampleAccountClient_BeginCreate_batchAccountCreateSystemAssignedIdentity() {
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)
}
poller, err := clientFactory.NewAccountClient().BeginCreate(ctx, "default-azurebatch-japaneast", "sampleacct", armbatch.AccountCreateParameters{
Identity: &armbatch.AccountIdentity{
Type: to.Ptr(armbatch.ResourceIdentityTypeSystemAssigned),
},
Location: to.Ptr("japaneast"),
Properties: &armbatch.AccountCreateProperties{
AutoStorage: &armbatch.AutoStorageBaseProperties{
StorageAccountID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %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.AccountClientCreateResponse{
// Account: &armbatch.Account{
// Name: to.Ptr("sampleacct"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
// Identity: &armbatch.AccountIdentity{
// Type: to.Ptr(armbatch.ResourceIdentityTypeSystemAssigned),
// PrincipalID: to.Ptr("1a2e532b-9900-414c-8600-cfc6126628d7"),
// TenantID: to.Ptr("f686d426-8d16-42db-81b7-ab578e110ccd"),
// },
// Location: to.Ptr("japaneast"),
// Properties: &armbatch.AccountProperties{
// AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
// ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
// AutoStorage: &armbatch.AutoStorageProperties{
// LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.9878479Z"); return t}()),
// StorageAccountID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
// },
// DedicatedCoreQuota: to.Ptr[int32](20),
// LowPriorityCoreQuota: to.Ptr[int32](20),
// PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeBatchService),
// PoolQuota: to.Ptr[int32](20),
// ProvisioningState: to.Ptr(armbatch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeEnabled),
// },
// },
// }
}
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 Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
*
* @summary creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
* x-ms-original-file: 2025-06-01/BatchAccountCreate_SystemAssignedIdentity.json
*/
async function batchAccountCreateSystemAssignedIdentity() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.batchAccount.create("default-azurebatch-japaneast", "sampleacct", {
identity: { type: "SystemAssigned" },
location: "japaneast",
autoStorage: {
storageAccountId:
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
},
});
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 Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/BatchAccountCreate_SystemAssignedIdentity.json
// this example is just showing the usage of "BatchAccount_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 ResourceGroupResource created on azure
// for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// get the collection of this BatchAccountResource
BatchAccountCollection collection = resourceGroupResource.GetBatchAccounts();
// invoke the operation
string accountName = "sampleacct";
BatchAccountCreateOrUpdateContent content = new BatchAccountCreateOrUpdateContent(new AzureLocation("japaneast"))
{
Identity = new ManagedServiceIdentity("SystemAssigned"),
AutoStorage = new BatchAccountAutoStorageBaseConfiguration(new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")),
};
ArmOperation<BatchAccountResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, accountName, content);
BatchAccountResource 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
BatchAccountData 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
Risposta di esempio
{
"name": "sampleacct",
"type": "Microsoft.Batch/batchAccounts",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct",
"identity": {
"type": "SystemAssigned",
"principalId": "1a2e532b-9900-414c-8600-cfc6126628d7",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd"
},
"location": "japaneast",
"properties": {
"accountEndpoint": "sampleacct.japaneast.batch.azure.com",
"activeJobAndJobScheduleQuota": 20,
"autoStorage": {
"lastKeySync": "2016-03-10T23:48:38.9878479Z",
"storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
},
"dedicatedCoreQuota": 20,
"lowPriorityCoreQuota": 20,
"poolAllocationMode": "BatchService",
"poolQuota": 20,
"provisioningState": "Succeeded",
"publicNetworkAccess": "Enabled"
}
}
BatchAccountCreate_UserAssignedIdentity
Esempio di richiesta
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct?api-version=2025-06-01
{
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}
}
},
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python batch_account_create_user_assigned_identity.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.batch_account.begin_create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
parameters={
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}
},
},
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
}
},
},
).result()
print(response)
# x-ms-original-file: 2025-06-01/BatchAccountCreate_UserAssignedIdentity.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/BatchAccountCreate_UserAssignedIdentity.json
func ExampleAccountClient_BeginCreate_batchAccountCreateUserAssignedIdentity() {
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)
}
poller, err := clientFactory.NewAccountClient().BeginCreate(ctx, "default-azurebatch-japaneast", "sampleacct", armbatch.AccountCreateParameters{
Identity: &armbatch.AccountIdentity{
Type: to.Ptr(armbatch.ResourceIdentityTypeUserAssigned),
UserAssignedIdentities: map[string]*armbatch.UserAssignedIdentities{
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
},
},
Location: to.Ptr("japaneast"),
Properties: &armbatch.AccountCreateProperties{
AutoStorage: &armbatch.AutoStorageBaseProperties{
StorageAccountID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %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.AccountClientCreateResponse{
// Account: &armbatch.Account{
// Name: to.Ptr("sampleacct"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
// Identity: &armbatch.AccountIdentity{
// Type: to.Ptr(armbatch.ResourceIdentityTypeUserAssigned),
// 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"),
// },
// },
// },
// Location: to.Ptr("japaneast"),
// Properties: &armbatch.AccountProperties{
// AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
// ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
// AutoStorage: &armbatch.AutoStorageProperties{
// LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.9878479Z"); return t}()),
// StorageAccountID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
// },
// DedicatedCoreQuota: to.Ptr[int32](20),
// LowPriorityCoreQuota: to.Ptr[int32](20),
// PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeBatchService),
// PoolQuota: to.Ptr[int32](20),
// ProvisioningState: to.Ptr(armbatch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeEnabled),
// },
// },
// }
}
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 Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
*
* @summary creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
* x-ms-original-file: 2025-06-01/BatchAccountCreate_UserAssignedIdentity.json
*/
async function batchAccountCreateUserAssignedIdentity() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.batchAccount.create("default-azurebatch-japaneast", "sampleacct", {
identity: {
type: "UserAssigned",
userAssignedIdentities: {
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1":
{},
},
},
location: "japaneast",
autoStorage: {
storageAccountId:
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
},
});
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 Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/BatchAccountCreate_UserAssignedIdentity.json
// this example is just showing the usage of "BatchAccount_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 ResourceGroupResource created on azure
// for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// get the collection of this BatchAccountResource
BatchAccountCollection collection = resourceGroupResource.GetBatchAccounts();
// invoke the operation
string accountName = "sampleacct";
BatchAccountCreateOrUpdateContent content = new BatchAccountCreateOrUpdateContent(new AzureLocation("japaneast"))
{
Identity = new ManagedServiceIdentity("UserAssigned")
{
UserAssignedIdentities =
{
[new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1")] = new UserAssignedIdentity()
},
},
AutoStorage = new BatchAccountAutoStorageBaseConfiguration(new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")),
};
ArmOperation<BatchAccountResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, accountName, content);
BatchAccountResource 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
BatchAccountData 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
Risposta di esempio
{
"name": "sampleacct",
"type": "Microsoft.Batch/batchAccounts",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {
"clientId": "clientId1",
"principalId": "principalId1"
}
}
},
"location": "japaneast",
"properties": {
"accountEndpoint": "sampleacct.japaneast.batch.azure.com",
"activeJobAndJobScheduleQuota": 20,
"autoStorage": {
"lastKeySync": "2016-03-10T23:48:38.9878479Z",
"storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
},
"dedicatedCoreQuota": 20,
"lowPriorityCoreQuota": 20,
"poolAllocationMode": "BatchService",
"poolQuota": 20,
"provisioningState": "Succeeded",
"publicNetworkAccess": "Enabled"
}
}
PrivateBatchAccountCreate
Esempio di richiesta
PUT https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct?api-version=2025-06-01
{
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
},
"keyVaultReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
"url": "http://sample.vault.azure.net/"
},
"publicNetworkAccess": "Disabled"
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-batch
# USAGE
python private_batch_account_create.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.batch_account.begin_create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
parameters={
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
},
"keyVaultReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
"url": "http://sample.vault.azure.net/",
},
"publicNetworkAccess": "Disabled",
},
},
).result()
print(response)
# x-ms-original-file: 2025-06-01/PrivateBatchAccountCreate.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/PrivateBatchAccountCreate.json
func ExampleAccountClient_BeginCreate_privateBatchAccountCreate() {
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)
}
poller, err := clientFactory.NewAccountClient().BeginCreate(ctx, "default-azurebatch-japaneast", "sampleacct", armbatch.AccountCreateParameters{
Location: to.Ptr("japaneast"),
Properties: &armbatch.AccountCreateProperties{
AutoStorage: &armbatch.AutoStorageBaseProperties{
StorageAccountID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
},
KeyVaultReference: &armbatch.KeyVaultReference{
ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample"),
URL: to.Ptr("http://sample.vault.azure.net/"),
},
PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeDisabled),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %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.AccountClientCreateResponse{
// Account: &armbatch.Account{
// Name: to.Ptr("sampleacct"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts"),
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
// Identity: &armbatch.AccountIdentity{
// Type: to.Ptr(armbatch.ResourceIdentityTypeNone),
// },
// Location: to.Ptr("japaneast"),
// Properties: &armbatch.AccountProperties{
// AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
// ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
// AutoStorage: &armbatch.AutoStorageProperties{
// LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.9878479Z"); return t}()),
// StorageAccountID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
// },
// DedicatedCoreQuota: to.Ptr[int32](20),
// KeyVaultReference: &armbatch.KeyVaultReference{
// ID: to.Ptr("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample"),
// URL: to.Ptr("http://sample.vault.azure.net/"),
// },
// LowPriorityCoreQuota: to.Ptr[int32](20),
// PoolAllocationMode: to.Ptr(armbatch.PoolAllocationModeUserSubscription),
// PoolQuota: to.Ptr[int32](20),
// ProvisioningState: to.Ptr(armbatch.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armbatch.PublicNetworkAccessTypeDisabled),
// },
// },
// }
}
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 Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
*
* @summary creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and should instead be updated with the Update Batch Account API.
* x-ms-original-file: 2025-06-01/PrivateBatchAccountCreate.json
*/
async function privateBatchAccountCreate() {
const credential = new DefaultAzureCredential();
const subscriptionId = "12345678-1234-1234-1234-123456789012";
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.batchAccount.create("default-azurebatch-japaneast", "sampleacct", {
location: "japaneast",
autoStorage: {
storageAccountId:
"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
},
keyVaultReference: {
id: "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
url: "http://sample.vault.azure.net/",
},
publicNetworkAccess: "Disabled",
});
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 Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Batch.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Batch;
// Generated from example definition: specification/batch/resource-manager/Microsoft.Batch/Batch/stable/2025-06-01/examples/PrivateBatchAccountCreate.json
// this example is just showing the usage of "BatchAccount_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 ResourceGroupResource created on azure
// for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
string subscriptionId = "12345678-1234-1234-1234-123456789012";
string resourceGroupName = "default-azurebatch-japaneast";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// get the collection of this BatchAccountResource
BatchAccountCollection collection = resourceGroupResource.GetBatchAccounts();
// invoke the operation
string accountName = "sampleacct";
BatchAccountCreateOrUpdateContent content = new BatchAccountCreateOrUpdateContent(new AzureLocation("japaneast"))
{
AutoStorage = new BatchAccountAutoStorageBaseConfiguration(new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")),
KeyVaultReference = new BatchKeyVaultReference(new ResourceIdentifier("/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample"), new Uri("http://sample.vault.azure.net/")),
PublicNetworkAccess = BatchPublicNetworkAccess.Disabled,
};
ArmOperation<BatchAccountResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, accountName, content);
BatchAccountResource 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
BatchAccountData 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
Risposta di esempio
{
"name": "sampleacct",
"type": "Microsoft.Batch/batchAccounts",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct",
"identity": {
"type": "None"
},
"location": "japaneast",
"properties": {
"accountEndpoint": "sampleacct.japaneast.batch.azure.com",
"activeJobAndJobScheduleQuota": 20,
"autoStorage": {
"lastKeySync": "2016-03-10T23:48:38.9878479Z",
"storageAccountId": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
},
"dedicatedCoreQuota": 20,
"keyVaultReference": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
"url": "http://sample.vault.azure.net/"
},
"lowPriorityCoreQuota": 20,
"poolAllocationMode": "UserSubscription",
"poolQuota": 20,
"provisioningState": "Succeeded",
"publicNetworkAccess": "Disabled"
}
}
Definizioni
AuthenticationMode
Enumerazione
Modalità di autenticazione per l'account Batch.
| Valore |
Descrizione |
|
SharedKey
|
Modalità di autenticazione tramite chiavi condivise.
|
|
AAD
|
Modalità di autenticazione con Microsoft Entra ID.
|
|
TaskAuthenticationToken
|
Modalità di autenticazione tramite token di autenticazione delle attività.
|
AutoStorageAuthenticationMode
Enumerazione
Modalità di autenticazione che verrà usata dal servizio Batch per gestire l'account di archiviazione automatica.
| Valore |
Descrizione |
|
StorageKeys
|
Il servizio Batch autentica le richieste all'archiviazione automatica usando le chiavi dell'account di archiviazione.
|
|
BatchAccountManagedIdentity
|
Il servizio Batch autentica le richieste di archiviazione automatica usando l'identità gestita assegnata all'account Batch.
|
AutoStorageBaseProperties
Oggetto
Proprietà correlate all'account di archiviazione automatica.
| Nome |
Tipo |
Valore predefinito |
Descrizione |
|
authenticationMode
|
AutoStorageAuthenticationMode
|
StorageKeys
|
Modalità di autenticazione che verrà usata dal servizio Batch per gestire l'account di archiviazione automatica.
|
|
nodeIdentityReference
|
ComputeNodeIdentityReference
|
|
Riferimento all'identità assegnata dall'utente che i nodi di calcolo useranno per accedere all'archiviazione automatica.
L'identità a cui viene fatto riferimento qui deve essere assegnata ai pool che dispongono di nodi di calcolo che devono accedere all'archiviazione automatica.
|
|
storageAccountId
|
string
(arm-id)
|
|
ID risorsa dell'account di archiviazione da usare per l'account di archiviazione automatico.
|
AutoStorageProperties
Oggetto
Contiene informazioni sull'account di archiviazione automatica associato a un account Batch.
| Nome |
Tipo |
Valore predefinito |
Descrizione |
|
authenticationMode
|
AutoStorageAuthenticationMode
|
StorageKeys
|
Modalità di autenticazione che verrà usata dal servizio Batch per gestire l'account di archiviazione automatica.
|
|
lastKeySync
|
string
(date-time)
|
|
Ora UTC in cui le chiavi di archiviazione sono state sincronizzate per l'ultima volta con l'account Batch.
|
|
nodeIdentityReference
|
ComputeNodeIdentityReference
|
|
Riferimento all'identità assegnata dall'utente che i nodi di calcolo useranno per accedere all'archiviazione automatica.
L'identità a cui viene fatto riferimento qui deve essere assegnata ai pool che dispongono di nodi di calcolo che devono accedere all'archiviazione automatica.
|
|
storageAccountId
|
string
(arm-id)
|
|
ID risorsa dell'account di archiviazione da usare per l'account di archiviazione automatico.
|
BatchAccount
Oggetto
Contiene informazioni su un account Azure Batch.
| Nome |
Tipo |
Valore predefinito |
Descrizione |
|
id
|
string
(arm-id)
|
|
ID risorsa completo per la risorsa. Ad esempio, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
identity
|
BatchAccountIdentity
|
|
Identità dell'account Batch.
|
|
location
|
string
|
|
Posizione geografica in cui risiede la risorsa
|
|
name
|
string
|
|
Nome della risorsa
|
|
properties.accountEndpoint
|
string
|
|
Endpoint dell'account usato per interagire con il servizio Batch.
|
|
properties.activeJobAndJobScheduleQuota
|
integer
(int32)
|
|
Quota di pianificazione del processo e del processo attiva per l'account Batch.
Quota di pianificazione del processo e del processo attiva per l'account Batch.
|
|
properties.allowedAuthenticationModes
|
AuthenticationMode[]
|
|
Elenco delle modalità di autenticazione consentite per l'account Batch che può essere usato per l'autenticazione con il piano dati. Ciò non influisce sull'autenticazione con il piano di controllo.
|
|
properties.autoStorage
|
AutoStorageProperties
|
|
Proprietà e stato di qualsiasi account di archiviazione automatica associato all'account Batch.
Contiene informazioni sull'account di archiviazione automatica associato a un account Batch.
|
|
properties.dedicatedCoreQuota
|
integer
(int32)
|
|
Quota core dedicata per l'account Batch.
Per gli account con PoolAllocationMode impostato su UserSubscription, la quota viene gestita nella sottoscrizione in modo che questo valore non venga restituito.
|
|
properties.dedicatedCoreQuotaPerVMFamily
|
VirtualMachineFamilyCoreQuota[]
|
|
Elenco della quota di core dedicata per ogni famiglia di macchine virtuali per l'account Batch. Per gli account con PoolAllocationMode impostato su UserSubscription, la quota viene gestita nella sottoscrizione in modo che questo valore non venga restituito.
|
|
properties.dedicatedCoreQuotaPerVMFamilyEnforced
|
boolean
|
|
Valore che indica se le quote di core per ogni famiglia di macchine virtuali vengono applicate per questo account
Se questo flag è true, la quota di core dedicata viene applicata tramite le proprietà dedicatedCoreQuotaPerVMFamily e dedicatedCoreQuota nell'account. Se questo flag è false, la quota core dedicata viene applicata solo tramite la proprietà dedicatedCoreQuota nell'account e non considera la famiglia di macchine virtuali.
|
|
properties.encryption
|
EncryptionProperties
|
|
Configurazione di crittografia per l'account Batch.
Configura la modalità di crittografia dei dati dei clienti all'interno dell'account Batch. Per impostazione predefinita, gli account vengono crittografati usando una chiave gestita da Microsoft. Per un controllo aggiuntivo, è possibile usare invece una chiave gestita dal cliente.
|
|
properties.keyVaultReference
|
KeyVaultReference
|
|
Riferimento all'insieme di credenziali delle chiavi di Azure associato all'account Batch.
Identifica l'insieme di credenziali delle chiavi di Azure associato a un account Batch.
|
|
properties.lowPriorityCoreQuota
|
integer
(int32)
|
|
Quota di core spot/con priorità bassa per l'account Batch.
Per gli account con PoolAllocationMode impostato su UserSubscription, la quota viene gestita nella sottoscrizione in modo che questo valore non venga restituito.
|
|
properties.networkProfile
|
NetworkProfile
|
|
Profilo di rete per l'account Batch, che contiene le impostazioni delle regole di rete per ogni endpoint.
Il profilo di rete diventa effettivo solo quando publicNetworkAccess è abilitato.
|
|
properties.nodeManagementEndpoint
|
string
|
|
Endpoint usato dal nodo di calcolo per connettersi al servizio di gestione dei nodi Batch.
|
|
properties.poolAllocationMode
|
PoolAllocationMode
|
|
Modalità di allocazione da usare per la creazione di pool nell'account Batch.
Modalità di allocazione per la creazione di pool nell'account Batch.
|
|
properties.poolQuota
|
integer
(int32)
|
|
Quota del pool per l'account Batch.
Quota del pool per l'account Batch.
|
|
properties.privateEndpointConnections
|
PrivateEndpointConnection[]
|
|
Elenco delle connessioni di endpoint privato associate all'account Batch
|
|
properties.provisioningState
|
ProvisioningState
|
|
Stato di provisioning della risorsa
|
|
properties.publicNetworkAccess
|
PublicNetworkAccessType
|
Enabled
|
Tipo di interfaccia di rete per l'accesso alle operazioni del servizio Azure Batch e dell'account Batch.
Tipo di accesso di rete per l'uso delle risorse nell'account Batch.
|
|
systemData
|
systemData
|
|
Metadati di Azure Resource Manager contenenti le informazioni createdBy e modifiedBy.
|
|
tags
|
object
|
|
Tag di risorsa.
|
|
type
|
string
|
|
Tipo di risorsa. Ad esempio, "Microsoft.Compute/virtualMachines" o "Microsoft.Storage/storageAccounts"
|
BatchAccountCreateParameters
Oggetto
Parametri forniti all'operazione Di creazione.
| Nome |
Tipo |
Valore predefinito |
Descrizione |
|
identity
|
BatchAccountIdentity
|
|
Identità dell'account Batch.
|
|
location
|
string
|
|
Area in cui creare l'account.
|
|
properties.allowedAuthenticationModes
|
AuthenticationMode[]
|
|
Elenco delle modalità di autenticazione consentite per l'account Batch che può essere usato per l'autenticazione con il piano dati. Ciò non influisce sull'autenticazione con il piano di controllo.
|
|
properties.autoStorage
|
AutoStorageBaseProperties
|
|
Proprietà correlate all'account di archiviazione automatica.
|
|
properties.encryption
|
EncryptionProperties
|
|
Configurazione di crittografia per l'account Batch.
Configura la modalità di crittografia dei dati dei clienti all'interno dell'account Batch. Per impostazione predefinita, gli account vengono crittografati usando una chiave gestita da Microsoft. Per un controllo aggiuntivo, è possibile usare invece una chiave gestita dal cliente.
|
|
properties.keyVaultReference
|
KeyVaultReference
|
|
Riferimento all'insieme di credenziali delle chiavi di Azure associato all'account Batch.
|
|
properties.networkProfile
|
NetworkProfile
|
|
Profilo di rete per l'account Batch, che contiene le impostazioni delle regole di rete per ogni endpoint.
Il profilo di rete diventa effettivo solo quando publicNetworkAccess è abilitato.
|
|
properties.poolAllocationMode
|
PoolAllocationMode
|
|
Modalità di allocazione da usare per la creazione di pool nell'account Batch.
La modalità di allocazione del pool influisce anche sul modo in cui i client possono eseguire l'autenticazione all'API del servizio Batch. Se la modalità è BatchService, i client possono eseguire l'autenticazione usando le chiavi di accesso o l'ID Microsoft Entra. Se la modalità è UserSubscription, i client devono usare Microsoft Entra ID. Il valore predefinito è BatchService.
|
|
properties.publicNetworkAccess
|
PublicNetworkAccessType
|
Enabled
|
Tipo di accesso alla rete per l'accesso all'account Azure Batch.
Tipo di accesso di rete per l'uso delle risorse nell'account Batch.
|
|
tags
|
object
|
|
Tag specificati dall'utente associati all'account.
|
BatchAccountIdentity
Oggetto
Identità dell'account Batch, se configurata. Viene usato quando l'utente specifica "Microsoft.KeyVault" come configurazione della crittografia dell'account Batch o quando ManagedIdentity viene selezionato come modalità di autenticazione dell'archiviazione automatica.
| Nome |
Tipo |
Descrizione |
|
principalId
|
string
|
ID principale dell'account Batch. Questa proprietà verrà fornita solo per un'identità assegnata dal sistema.
|
|
tenantId
|
string
|
ID tenant associato all'account Batch. Questa proprietà verrà fornita solo per un'identità assegnata dal sistema.
|
|
type
|
ResourceIdentityType
|
Tipo di identità usato per l'account Batch.
|
|
userAssignedIdentities
|
<string,
UserAssignedIdentities>
|
Elenco di identità utente associate all'account Batch.
|
CloudError
Oggetto
Risposta di errore dal servizio Batch.
| Nome |
Tipo |
Descrizione |
|
error
|
CloudErrorBody
|
Corpo della risposta di errore.
|
CloudErrorBody
Oggetto
Risposta di errore dal servizio Batch.
| Nome |
Tipo |
Descrizione |
|
code
|
string
|
Identificatore dell'errore. I codici sono invarianti e devono essere utilizzati a livello di codice.
|
|
details
|
CloudErrorBody[]
|
Elenco di dettagli aggiuntivi sull'errore.
|
|
message
|
string
|
Messaggio che descrive l'errore, destinato a essere adatto per la visualizzazione in un'interfaccia utente.
|
|
target
|
string
|
Destinazione dell'errore specifico. Ad esempio, il nome della proprietà in errore.
|
ComputeNodeIdentityReference
Oggetto
Riferimento a un'identità assegnata dall'utente associata al pool di Batch che verrà usato da un nodo di calcolo.
| Nome |
Tipo |
Descrizione |
|
resourceId
|
string
|
ID risorsa ARM dell'identità assegnata dall'utente.
|
createdByType
Enumerazione
Tipo di identità che ha creato la risorsa.
| Valore |
Descrizione |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
EncryptionProperties
Oggetto
Configura la modalità di crittografia dei dati dei clienti all'interno dell'account Batch. Per impostazione predefinita, gli account vengono crittografati usando una chiave gestita da Microsoft. Per un controllo aggiuntivo, è possibile usare invece una chiave gestita dal cliente.
| Nome |
Tipo |
Descrizione |
|
keySource
|
KeySource
|
Tipo dell'origine della chiave.
|
|
keyVaultProperties
|
KeyVaultProperties
|
Dettagli aggiuntivi quando si usa Microsoft.KeyVault
|
EndpointAccessDefaultAction
Enumerazione
Azione predefinita per l'accesso all'endpoint. È applicabile solo quando publicNetworkAccess è abilitato.
| Valore |
Descrizione |
|
Allow
|
Consentire l'accesso client.
|
|
Deny
|
Negare l'accesso client.
|
EndpointAccessProfile
Oggetto
Profilo di accesso alla rete per l'endpoint Batch.
| Nome |
Tipo |
Descrizione |
|
defaultAction
|
EndpointAccessDefaultAction
|
Azione predefinita quando non è presente alcuna corrispondenza IPRule.
Azione predefinita per l'accesso all'endpoint. È applicabile solo quando publicNetworkAccess è abilitato.
|
|
ipRules
|
IPRule[]
|
Matrice di intervalli IP per filtrare l'indirizzo IP del client.
|
IPRule
Oggetto
Regola per filtrare l'indirizzo IP del client.
| Nome |
Tipo |
Descrizione |
|
action
|
IPRuleAction
|
Azione quando viene trovata una corrispondenza con l'indirizzo IP del client.
|
|
value
|
string
|
L'indirizzo IP o l'intervallo di indirizzi IP da filtrare
Indirizzo IPv4 o intervallo di indirizzi IPv4 in formato CIDR.
|
IPRuleAction
Enumerazione
L'azione quando l'indirizzo IP del client viene abbinato.
| Valore |
Descrizione |
|
Allow
|
Consentire l'accesso per l'indirizzo IP client corrispondente.
|
KeySource
Enumerazione
Tipo dell'origine della chiave.
| Valore |
Descrizione |
|
Microsoft.Batch
|
Batch crea e gestisce le chiavi di crittografia usate per proteggere i dati dell'account.
|
|
Microsoft.KeyVault
|
Le chiavi di crittografia usate per proteggere i dati dell'account vengono archiviate in un insieme di credenziali delle chiavi esterno. Se questa opzione è impostata, l'identità dell'account Batch deve essere impostata su SystemAssigned e deve essere specificato anche un identificatore di chiave valido in keyVaultProperties.
|
KeyVaultProperties
Oggetto
Configurazione di KeyVault quando si usa un KeySource di crittografia di Microsoft.KeyVault.
| Nome |
Tipo |
Descrizione |
|
keyIdentifier
|
string
|
Percorso completo del segreto con o senza versione. Esempio https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. o https://mykeyvault.vault.azure.net/keys/testkey. Per poter essere utilizzabili, è necessario soddisfare i prerequisiti seguenti:
L'account Batch ha un'identità assegnata dal sistema L'identità dell'account è stata concessa a Key/Get, Key/Unwrap e Key/Wrap permissions The KeyVault has soft-delete and purge protection enabled
|
KeyVaultReference
Oggetto
Identifica l'insieme di credenziali delle chiavi di Azure associato a un account Batch.
| Nome |
Tipo |
Descrizione |
|
id
|
string
(arm-id)
|
ID risorsa dell'insieme di credenziali delle chiavi di Azure associato all'account Batch.
|
|
url
|
string
|
URL dell'insieme di credenziali delle chiavi di Azure associato all'account Batch.
|
NetworkProfile
Oggetto
Profilo di rete per l'account Batch, che contiene le impostazioni delle regole di rete per ogni endpoint.
| Nome |
Tipo |
Descrizione |
|
accountAccess
|
EndpointAccessProfile
|
Profilo di accesso di rete per l'endpoint batchAccount (API del piano dati dell'account Batch).
|
|
nodeManagementAccess
|
EndpointAccessProfile
|
Profilo di accesso alla rete per l'endpoint nodeManagement (servizio Batch che gestisce i nodi di calcolo per i pool di Batch).
|
PoolAllocationMode
Enumerazione
Modalità di allocazione per la creazione di pool nell'account Batch.
| Valore |
Descrizione |
|
BatchService
|
I pool verranno allocati nelle sottoscrizioni di proprietà del servizio Batch.
|
|
UserSubscription
|
I pool verranno allocati in una sottoscrizione di proprietà dell'utente.
|
PrivateEndpoint
Oggetto
Endpoint privato della connessione dell'endpoint privato.
| Nome |
Tipo |
Descrizione |
|
id
|
string
|
Identificatore della risorsa ARM dell'endpoint privato. Si tratta del formato /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/privateEndpoints/{privateEndpoint}.
Identificatore della risorsa ARM dell'endpoint privato. Si tratta del formato /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/privateEndpoints/{privateEndpoint}.
|
PrivateEndpointConnection
Oggetto
Contiene informazioni su una risorsa collegamento privato.
| Nome |
Tipo |
Descrizione |
|
etag
|
string
|
ETag della risorsa, usata per le istruzioni di concorrenza.
|
|
id
|
string
(arm-id)
|
ID risorsa completo per la risorsa. Ad esempio, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
Nome della risorsa
|
|
properties.groupIds
|
string[]
|
ID gruppo della connessione dell'endpoint privato.
Il valore ha uno e un solo ID gruppo.
|
|
properties.privateEndpoint
|
PrivateEndpoint
|
Identificatore della risorsa ARM dell'endpoint privato.
Endpoint privato della connessione dell'endpoint privato.
|
|
properties.privateLinkServiceConnectionState
|
PrivateLinkServiceConnectionState
|
Stato della connessione al servizio di collegamento privato della connessione all'endpoint privato.
Stato della connessione al servizio di collegamento privato della connessione all'endpoint privato.
|
|
properties.provisioningState
|
PrivateEndpointConnectionProvisioningState
|
Stato di provisioning della connessione all'endpoint privato.
Stato di provisioning della connessione all'endpoint privato.
|
|
systemData
|
systemData
|
Metadati di Azure Resource Manager contenenti le informazioni createdBy e modifiedBy.
|
|
tags
|
object
|
Tag della risorsa.
|
|
type
|
string
|
Tipo di risorsa. Ad esempio, "Microsoft.Compute/virtualMachines" o "Microsoft.Storage/storageAccounts"
|
PrivateEndpointConnectionProvisioningState
Enumerazione
Stato di provisioning della connessione all'endpoint privato.
| Valore |
Descrizione |
|
Creating
|
La connessione sta creando.
|
|
Updating
|
L'utente ha richiesto che lo stato della connessione venga aggiornato, ma l'operazione di aggiornamento non è ancora stata completata. Non è possibile fare riferimento alla connessione durante la connessione dell'account Batch.
|
|
Deleting
|
La connessione sta eliminando.
|
|
Succeeded
|
Lo stato della connessione è finale ed è pronto per l'uso se lo stato è Approvato.
|
|
Failed
|
L'utente ha richiesto che la connessione venga aggiornata e non è riuscita. È possibile ritentare l'operazione di aggiornamento.
|
|
Cancelled
|
L'utente ha annullato la creazione della connessione.
|
PrivateLinkServiceConnectionState
Oggetto
Stato di connessione al servizio collegamento privato della connessione all'endpoint privato
| Nome |
Tipo |
Descrizione |
|
actionsRequired
|
string
|
Azione necessaria per lo stato della connessione privata
Azione necessaria per lo stato della connessione privata
|
|
description
|
string
|
Descrizione dello stato della connessione privata
Descrizione dello stato della connessione privata
|
|
status
|
PrivateLinkServiceConnectionStatus
|
Stato della connessione dell'endpoint privato batch
Stato della connessione dell'endpoint privato batch
|
PrivateLinkServiceConnectionStatus
Enumerazione
Stato della connessione dell'endpoint privato batch
| Valore |
Descrizione |
|
Approved
|
La connessione all'endpoint privato è approvata e può essere usata per accedere all'account Batch
|
|
Pending
|
La connessione all'endpoint privato è in sospeso e non può essere usata per accedere all'account Batch
|
|
Rejected
|
La connessione all'endpoint privato viene rifiutata e non può essere usata per accedere all'account Batch
|
|
Disconnected
|
La connessione all'endpoint privato è disconnessa e non può essere usata per accedere all'account Batch
|
ProvisioningState
Enumerazione
Stato di provisioning della risorsa
| Valore |
Descrizione |
|
Invalid
|
L'account è in uno stato non valido.
|
|
Creating
|
L'account viene creato.
|
|
Deleting
|
L'account viene eliminato.
|
|
Succeeded
|
L'account è stato creato ed è pronto per l'uso.
|
|
Failed
|
L'ultima operazione per l'account non è riuscita.
|
|
Cancelled
|
L'ultima operazione per l'account viene annullata.
|
PublicNetworkAccessType
Enumerazione
Tipo di interfaccia di rete per l'accesso alle operazioni del servizio Azure Batch e dell'account Batch.
| Valore |
Descrizione |
|
Enabled
|
Consente la connettività ad Azure Batch tramite DNS pubblico.
|
|
Disabled
|
Disabilita la connettività pubblica e abilita la connettività privata al servizio Azure Batch tramite una risorsa endpoint privato.
|
|
SecuredByPerimeter
|
Protegge la connettività ad Azure Batch tramite la configurazione NSP.
|
ResourceIdentityType
Enumerazione
Tipo di identità usato per l'account Batch.
| Valore |
Descrizione |
|
SystemAssigned
|
L'account Batch ha un'identità assegnata dal sistema.
|
|
UserAssigned
|
L'account Batch ha identità assegnate dall'utente.
|
|
None
|
All'account Batch non è associata alcuna identità. L'impostazione di None nell'account di aggiornamento rimuoverà le identità esistenti.
|
systemData
Oggetto
Metadati relativi alla creazione e all'ultima modifica della risorsa.
| Nome |
Tipo |
Descrizione |
|
createdAt
|
string
(date-time)
|
Timestamp della creazione della risorsa (UTC).
|
|
createdBy
|
string
|
Identità che ha creato la risorsa.
|
|
createdByType
|
createdByType
|
Tipo di identità che ha creato la risorsa.
|
|
lastModifiedAt
|
string
(date-time)
|
Il timestamp dell'ultima modifica della risorsa (UTC)
|
|
lastModifiedBy
|
string
|
Identità che ha modificato l'ultima volta la risorsa.
|
|
lastModifiedByType
|
createdByType
|
Tipo di identità che ha modificato l'ultima volta la risorsa.
|
UserAssignedIdentities
Oggetto
Elenco delle identità utente associate.
| Nome |
Tipo |
Descrizione |
|
clientId
|
string
|
ID client dell'identità assegnata dall'utente.
|
|
principalId
|
string
|
ID principale dell'identità assegnata dall'utente.
|
VirtualMachineFamilyCoreQuota
Oggetto
Una famiglia di macchine virtuali e la quota di core associata per l'account Batch.
| Nome |
Tipo |
Descrizione |
|
coreQuota
|
integer
(int32)
|
Quota di core per la famiglia di macchine virtuali per l'account Batch.
|
|
name
|
string
|
Nome della famiglia di macchine virtuali.
|