Létrehoz egy új Batch-fiókot a megadott paraméterekkel. A meglévő fiókok nem frissíthetők ezzel az API-val, ezért a Batch-fiók frissítése API-val kell frissíteni őket.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}?api-version=2025-06-01
URI-paraméterek
| Name |
In |
Kötelező |
Típus |
Description |
|
accountName
|
path |
True
|
string
minLength: 3 maxLength: 24 pattern: ^[a-zA-Z0-9]+$
|
Egy név a Batch fióknak, amelynek egyedinek kell lennie a régión belül. A csomagi számlanevek 3 és 24 karakter közötti hosszúságúak lehetnek, és csak számokat és kisbetűket kell használniuk. Ez a név a DNS név részeként szolgál, amely a Batch szolgáltatáshoz való hozzáférést szolgál abban a régióban, ahol a fiók létrejött. Például: http://accountname.region.batch.azure.com/.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Az erőforráscsoport neve. A név nem megkülönbözteti a kis- és nagybetűket.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
A cél-előfizetés azonosítója. Az értéknek UUID-nek kell lennie.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
A művelethez használandó API-verzió.
|
Kérelem törzse
| Name |
Kötelező |
Típus |
Description |
|
location
|
True
|
string
|
Az a régió, amelyben létre kívánja hozni a fiókot.
|
|
identity
|
|
BatchAccountIdentity
|
A Batch-fiók identitása.
|
|
properties.allowedAuthenticationModes
|
|
AuthenticationMode[]
|
A Batch-fiók engedélyezett hitelesítési módjainak listája, amelyek az adatsíkkal való hitelesítéshez használhatók. Ez nem befolyásolja a vezérlősíkon történő hitelesítést.
|
|
properties.autoStorage
|
|
AutoStorageBaseProperties
|
Az automatikus tárfiókhoz kapcsolódó tulajdonságok.
|
|
properties.encryption
|
|
EncryptionProperties
|
A Batch-fiók titkosítási konfigurációja.
Konfigurálja, hogy az ügyféladatok hogyan vannak titkosítva a Batch-fiókban. A fiókok alapértelmezés szerint microsoftos felügyelt kulccsal vannak titkosítva. További vezérléshez az ügyfél által felügyelt kulcs használható.
|
|
properties.keyVaultReference
|
|
KeyVaultReference
|
Hivatkozás a Batch-fiókhoz társított Azure Key Vaultra.
|
|
properties.networkProfile
|
|
NetworkProfile
|
A Batch-fiók hálózati profilja, amely az egyes végpontok hálózati szabálybeállítását tartalmazza.
A hálózati profil csak akkor lép érvénybe, ha a publicNetworkAccess engedélyezve van.
|
|
properties.poolAllocationMode
|
|
PoolAllocationMode
|
A Batch-fiók készleteinek létrehozásához használható foglalási mód.
A készletfoglalási mód azt is befolyásolja, hogy az ügyfelek hogyan hitelesíthetik magukat a Batch Service API-val. Ha a mód BatchService, az ügyfelek hozzáférési kulcsokkal vagy Microsoft Entra-azonosítóval hitelesíthetik magukat. Ha a mód UserSubscription, az ügyfeleknek Microsoft Entra-azonosítót kell használniuk. Az alapértelmezett érték a BatchService.
|
|
properties.publicNetworkAccess
|
|
PublicNetworkAccessType
|
Az Azure Batch-fiók elérésének hálózati hozzáférési típusa.
A Batch-fiók erőforrásain való üzemeltetés hálózati hozzáférési típusa.
|
|
tags
|
|
object
|
A fiókhoz társított felhasználó által megadott címkék.
|
Válaszok
| Name |
Típus |
Description |
|
200 OK
|
BatchAccount
|
A 'BatchAccount' erőforrás frissítési művelete sikeres
|
|
202 Accepted
|
|
Az erőforrásművelet elfogadott.
Fejlécek
- Location: string
- Retry-After: integer
|
|
Other Status Codes
|
CloudError
|
Váratlan hibaválasz.
|
Biztonság
azure_auth
Azure Active Directory OAuth2-folyamat.
Típus:
oauth2
Folyamat:
implicit
Engedélyezési URL:
https://login.microsoftonline.com/common/oauth2/authorize
Hatókörök
| Name |
Description |
|
user_impersonation
|
a felhasználói fiók megszemélyesítése
|
Példák
BatchAccountCreate_BYOS
Mintakérelem
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
Mintaválasz
{
"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
Mintakérelem
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
Mintaválasz
{
"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
Mintakérelem
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
Mintaválasz
{
"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
Mintakérelem
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
Mintaválasz
{
"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
Mintakérelem
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
Mintaválasz
{
"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"
}
}
Definíciók
AuthenticationMode
Felsorolás
A Batch-fiók hitelesítési módja.
| Érték |
Description |
|
SharedKey
|
A hitelesítési mód megosztott kulcsokkal.
|
|
AAD
|
A Microsoft Entra-azonosítót használó hitelesítési mód.
|
|
TaskAuthenticationToken
|
A hitelesítési mód feladat-hitelesítési jogkivonatokkal.
|
AutoStorageAuthenticationMode
Felsorolás
A Batch szolgáltatás által az automatikus tárfiók kezelésére használt hitelesítési mód.
| Érték |
Description |
|
StorageKeys
|
A Batch szolgáltatás tárfiókkulcsokkal hitelesíti az automatikus tárolásra irányuló kérelmeket.
|
|
BatchAccountManagedIdentity
|
A Batch szolgáltatás a Batch-fiókhoz rendelt felügyelt identitással hitelesíti az automatikus tárolásra irányuló kérelmeket.
|
AutoStorageBaseProperties
Tárgy
Az automatikus tárfiókhoz kapcsolódó tulajdonságok.
| Name |
Típus |
Alapértelmezett érték |
Description |
|
authenticationMode
|
AutoStorageAuthenticationMode
|
StorageKeys
|
A Batch szolgáltatás által az automatikus tárfiók kezelésére használt hitelesítési mód.
|
|
nodeIdentityReference
|
ComputeNodeIdentityReference
|
|
A felhasználó által hozzárendelt identitásra mutató hivatkozás, amelyet a számítási csomópontok használni fognak az automatikus tárolás eléréséhez.
Az itt hivatkozott identitást olyan készletekhez kell hozzárendelni, amelyek olyan számítási csomópontokkal rendelkeznek, amelyeknek hozzá kell férniük az automatikus tároláshoz.
|
|
storageAccountId
|
string
(arm-id)
|
|
Az automatikus tárfiókhoz használandó tárfiók erőforrás-azonosítója.
|
AutoStorageProperties
Tárgy
Információkat tartalmaz a Batch-fiókhoz társított automatikus tárfiókról.
| Name |
Típus |
Alapértelmezett érték |
Description |
|
authenticationMode
|
AutoStorageAuthenticationMode
|
StorageKeys
|
A Batch szolgáltatás által az automatikus tárfiók kezelésére használt hitelesítési mód.
|
|
lastKeySync
|
string
(date-time)
|
|
Az a UTC időpont, amikor a tárkulcsok utoljára szinkronizálva lettek a Batch-fiókkal.
|
|
nodeIdentityReference
|
ComputeNodeIdentityReference
|
|
A felhasználó által hozzárendelt identitásra mutató hivatkozás, amelyet a számítási csomópontok használni fognak az automatikus tárolás eléréséhez.
Az itt hivatkozott identitást olyan készletekhez kell hozzárendelni, amelyek olyan számítási csomópontokkal rendelkeznek, amelyeknek hozzá kell férniük az automatikus tároláshoz.
|
|
storageAccountId
|
string
(arm-id)
|
|
Az automatikus tárfiókhoz használandó tárfiók erőforrás-azonosítója.
|
BatchAccount
Tárgy
Egy Azure Batch-fiók adatait tartalmazza.
| Name |
Típus |
Alapértelmezett érték |
Description |
|
id
|
string
(arm-id)
|
|
Az erőforrás teljes erőforrás-azonosítója. Például: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
identity
|
BatchAccountIdentity
|
|
A Batch-fiók identitása.
|
|
location
|
string
|
|
Az a földrajzi hely, ahol az erőforrás él
|
|
name
|
string
|
|
Az erőforrás neve
|
|
properties.accountEndpoint
|
string
|
|
A Batch szolgáltatással való interakcióhoz használt fiókvégpont.
|
|
properties.activeJobAndJobScheduleQuota
|
integer
(int32)
|
|
A Batch-fiók aktív feladat- és feladatütemezési kvótája.
A Batch-fiók aktív feladat- és feladatütemezési kvótája.
|
|
properties.allowedAuthenticationModes
|
AuthenticationMode[]
|
|
A Batch-fiók engedélyezett hitelesítési módjainak listája, amelyek az adatsíkkal való hitelesítéshez használhatók. Ez nem befolyásolja a vezérlősíkon történő hitelesítést.
|
|
properties.autoStorage
|
AutoStorageProperties
|
|
A Batch-fiókhoz társított automatikus tárfiókok tulajdonságai és állapota.
Információkat tartalmaz a Batch-fiókhoz társított automatikus tárfiókról.
|
|
properties.dedicatedCoreQuota
|
integer
(int32)
|
|
A Batch-fiók dedikált magkvóta.
A PoolAllocationMode userSubscription értékre beállított fiókok esetében a kvóta kezelése az előfizetésben történik, így ez az érték nem lesz visszaadva.
|
|
properties.dedicatedCoreQuotaPerVMFamily
|
VirtualMachineFamilyCoreQuota[]
|
|
A Batch-fiókhoz tartozó virtuálisgép-családonkénti dedikált magkvóta listája. A PoolAllocationMode userSubscription értékre beállított fiókok esetében a kvóta kezelése az előfizetésben történik, így ez az érték nem lesz visszaadva.
|
|
properties.dedicatedCoreQuotaPerVMFamilyEnforced
|
boolean
|
|
Egy érték, amely azt jelzi, hogy a virtuálisgép-családonkénti alapkvóták kikényszerítve vannak-e ehhez a fiókhoz
Ha ez a jelző igaz, a dedikált magkvótát a dedikáltCoreQuotaPerVMFamily és a dedikáltCoreQuota tulajdonságok is érvényesítik a fiókon. Ha ez a jelző hamis, a dedikált magkvótát csak a fiók dedikáltCoreQuota tulajdonságán keresztül kényszeríti ki a rendszer, és nem veszi figyelembe a virtuális gépcsaládot.
|
|
properties.encryption
|
EncryptionProperties
|
|
A Batch-fiók titkosítási konfigurációja.
Konfigurálja, hogy az ügyféladatok hogyan vannak titkosítva a Batch-fiókban. A fiókok alapértelmezés szerint microsoftos felügyelt kulccsal vannak titkosítva. További vezérléshez az ügyfél által felügyelt kulcs használható.
|
|
properties.keyVaultReference
|
KeyVaultReference
|
|
Hivatkozás a Batch-fiókhoz társított Azure Key Vaultra.
A Batch-fiókhoz társított Azure-kulcstartót azonosítja.
|
|
properties.lowPriorityCoreQuota
|
integer
(int32)
|
|
A Batch-fiók kihasználatlan/alacsony prioritású magkvóta.
A PoolAllocationMode userSubscription értékre beállított fiókok esetében a kvóta kezelése az előfizetésben történik, így ez az érték nem lesz visszaadva.
|
|
properties.networkProfile
|
NetworkProfile
|
|
A Batch-fiók hálózati profilja, amely az egyes végpontok hálózati szabálybeállítását tartalmazza.
A hálózati profil csak akkor lép érvénybe, ha a publicNetworkAccess engedélyezve van.
|
|
properties.nodeManagementEndpoint
|
string
|
|
A számítási csomópont által a Batch csomópontkezelési szolgáltatáshoz való csatlakozáshoz használt végpont.
|
|
properties.poolAllocationMode
|
PoolAllocationMode
|
|
A Batch-fiók készleteinek létrehozásához használható foglalási mód.
A Batch-fiók készleteinek létrehozására szolgáló foglalási mód.
|
|
properties.poolQuota
|
integer
(int32)
|
|
A Batch-fiók készletkvótája.
A Batch-fiók készletkvótája.
|
|
properties.privateEndpointConnections
|
PrivateEndpointConnection[]
|
|
A Batch-fiókhoz társított privát végpontkapcsolatok listája
|
|
properties.provisioningState
|
ProvisioningState
|
|
Az erőforrás kiépített állapota
|
|
properties.publicNetworkAccess
|
PublicNetworkAccessType
|
Enabled
|
Az Azure Batch szolgáltatáshoz és a Batch-fiókműveletekhez való hozzáférés hálózati adaptertípusa.
A Batch-fiók erőforrásain való üzemeltetés hálózati hozzáférési típusa.
|
|
systemData
|
systemData
|
|
A createdBy és a modifiedBy adatokat tartalmazó Azure Resource Manager-metaadatok.
|
|
tags
|
object
|
|
Erőforráscímkék.
|
|
type
|
string
|
|
Az erőforrás típusa. Pl. "Microsoft.Compute/virtualMachines" vagy "Microsoft.Storage/storageAccounts"
|
BatchAccountCreateParameters
Tárgy
A Létrehozás művelethez megadott paraméterek.
| Name |
Típus |
Alapértelmezett érték |
Description |
|
identity
|
BatchAccountIdentity
|
|
A Batch-fiók identitása.
|
|
location
|
string
|
|
Az a régió, amelyben létre kívánja hozni a fiókot.
|
|
properties.allowedAuthenticationModes
|
AuthenticationMode[]
|
|
A Batch-fiók engedélyezett hitelesítési módjainak listája, amelyek az adatsíkkal való hitelesítéshez használhatók. Ez nem befolyásolja a vezérlősíkon történő hitelesítést.
|
|
properties.autoStorage
|
AutoStorageBaseProperties
|
|
Az automatikus tárfiókhoz kapcsolódó tulajdonságok.
|
|
properties.encryption
|
EncryptionProperties
|
|
A Batch-fiók titkosítási konfigurációja.
Konfigurálja, hogy az ügyféladatok hogyan vannak titkosítva a Batch-fiókban. A fiókok alapértelmezés szerint microsoftos felügyelt kulccsal vannak titkosítva. További vezérléshez az ügyfél által felügyelt kulcs használható.
|
|
properties.keyVaultReference
|
KeyVaultReference
|
|
Hivatkozás a Batch-fiókhoz társított Azure Key Vaultra.
|
|
properties.networkProfile
|
NetworkProfile
|
|
A Batch-fiók hálózati profilja, amely az egyes végpontok hálózati szabálybeállítását tartalmazza.
A hálózati profil csak akkor lép érvénybe, ha a publicNetworkAccess engedélyezve van.
|
|
properties.poolAllocationMode
|
PoolAllocationMode
|
|
A Batch-fiók készleteinek létrehozásához használható foglalási mód.
A készletfoglalási mód azt is befolyásolja, hogy az ügyfelek hogyan hitelesíthetik magukat a Batch Service API-val. Ha a mód BatchService, az ügyfelek hozzáférési kulcsokkal vagy Microsoft Entra-azonosítóval hitelesíthetik magukat. Ha a mód UserSubscription, az ügyfeleknek Microsoft Entra-azonosítót kell használniuk. Az alapértelmezett érték a BatchService.
|
|
properties.publicNetworkAccess
|
PublicNetworkAccessType
|
Enabled
|
Az Azure Batch-fiók elérésének hálózati hozzáférési típusa.
A Batch-fiók erőforrásain való üzemeltetés hálózati hozzáférési típusa.
|
|
tags
|
object
|
|
A fiókhoz társított felhasználó által megadott címkék.
|
BatchAccountIdentity
Tárgy
A Batch-fiók identitása, ha konfigurálva van. Ez akkor használatos, ha a felhasználó a "Microsoft.KeyVault" beállítást adja meg Batch-fiók titkosítási konfigurációjaként, vagy ha ManagedIdentity van kiválasztva automatikus tárolási hitelesítési módként.
| Name |
Típus |
Description |
|
principalId
|
string
|
A Batch-fiók egyszerű azonosítója. Ez a tulajdonság csak a rendszer által hozzárendelt identitáshoz lesz megadva.
|
|
tenantId
|
string
|
A Batch-fiókhoz társított bérlőazonosító. Ez a tulajdonság csak a rendszer által hozzárendelt identitáshoz lesz megadva.
|
|
type
|
ResourceIdentityType
|
A Batch-fiókhoz használt identitás típusa.
|
|
userAssignedIdentities
|
<string,
UserAssignedIdentities>
|
A Batch-fiókhoz társított felhasználói identitások listája.
|
CloudError
Tárgy
Hibaválasz a Batch szolgáltatástól.
CloudErrorBody
Tárgy
Hibaválasz a Batch szolgáltatástól.
| Name |
Típus |
Description |
|
code
|
string
|
A hiba azonosítója. A kódok invariánsak, és programozott módon használhatók.
|
|
details
|
CloudErrorBody[]
|
A hiba további részleteinek listája.
|
|
message
|
string
|
A hibát leíró üzenet, amely alkalmas a felhasználói felületen való megjelenítésre.
|
|
target
|
string
|
Az adott hiba célja. Például a tulajdonság neve hibás.
|
ComputeNodeIdentityReference
Tárgy
A számítási csomópont által használt Batch-készlethez társított felhasználó által hozzárendelt identitásra mutató hivatkozás.
| Name |
Típus |
Description |
|
resourceId
|
string
|
A felhasználó által hozzárendelt identitás ARM-erőforrás-azonosítója.
|
createdByType
Felsorolás
Az erőforrást létrehozó identitás típusa.
| Érték |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
EncryptionProperties
Tárgy
Konfigurálja, hogy az ügyféladatok hogyan vannak titkosítva a Batch-fiókban. A fiókok alapértelmezés szerint microsoftos felügyelt kulccsal vannak titkosítva. További vezérléshez az ügyfél által felügyelt kulcs használható.
| Name |
Típus |
Description |
|
keySource
|
KeySource
|
A kulcsforrás típusa.
|
|
keyVaultProperties
|
KeyVaultProperties
|
További részletek a Microsoft.KeyVault használatakor
|
EndpointAccessDefaultAction
Felsorolás
A végponthozzáférés alapértelmezett művelete. Csak akkor alkalmazható, ha a publicNetworkAccess engedélyezve van.
| Érték |
Description |
|
Allow
|
Ügyfélhozzáférés engedélyezése.
|
|
Deny
|
Ügyfélhozzáférés megtagadása.
|
EndpointAccessProfile
Tárgy
Hálózati hozzáférési profil a Batch-végponthoz.
| Name |
Típus |
Description |
|
defaultAction
|
EndpointAccessDefaultAction
|
Az alapértelmezett művelet, ha nincs egyező IPRule.
A végponthozzáférés alapértelmezett művelete. Csak akkor alkalmazható, ha a publicNetworkAccess engedélyezve van.
|
|
ipRules
|
IPRule[]
|
Ip-tartományok tömbje az ügyfél IP-címének szűréséhez.
|
IPRule
Tárgy
Az ügyfél IP-címének szűrésére használható szabály.
| Name |
Típus |
Description |
|
action
|
IPRuleAction
|
Művelet az ügyfél IP-címének egyeztetésekor.
|
|
value
|
string
|
A szűrni kívánt IP-cím vagy IP-címtartomány
IPv4-cím vagy IPv4-címtartomány CIDR formátumban.
|
IPRuleAction
Felsorolás
Az akció, amikor az ügyfél IP-címe egyezik.
| Érték |
Description |
|
Allow
|
Engedélyezze a megfelelő ügyfél IP-címének elérését.
|
KeySource
Felsorolás
A kulcsforrás típusa.
| Érték |
Description |
|
Microsoft.Batch
|
A Batch létrehozza és kezeli a fiókadatok védelméhez használt titkosítási kulcsokat.
|
|
Microsoft.KeyVault
|
A fiókadatok védelmére használt titkosítási kulcsok egy külső kulcstartóban vannak tárolva. Ha ez be van állítva, a Batch-fiók identitásának SystemAssigned kell lennie, és érvényes kulcsazonosítót is meg kell adnia a keyVaultProperties alatt.
|
KeyVaultProperties
Tárgy
KeyVault-konfiguráció a Microsoft.KeyVault titkosítási KeySource-jának használatakor.
| Name |
Típus |
Description |
|
keyIdentifier
|
string
|
A titkos kód teljes elérési útja verzióval vagy anélkül. Példa https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. vagy https://mykeyvault.vault.azure.net/keys/testkey. A használhatósághoz a következő előfeltételeknek kell teljesülniük:
A Batch-fiók rendszer által hozzárendelt identitással rendelkezik A fiók identitása kulcs-/lekéréses, kulcs-/kicsomagolási és kulcs-/körbefuttatási engedélyeket kapott A KeyVault helyreállítható törlési és törlési védelemmel rendelkezik
|
KeyVaultReference
Tárgy
A Batch-fiókhoz társított Azure-kulcstartót azonosítja.
| Name |
Típus |
Description |
|
id
|
string
(arm-id)
|
A Batch-fiókhoz társított Azure Key Vault erőforrás-azonosítója.
|
|
url
|
string
|
A Batch-fiókhoz társított Azure Key Vault URL-címe.
|
NetworkProfile
Tárgy
A Batch-fiók hálózati profilja, amely az egyes végpontok hálózati szabálybeállítását tartalmazza.
| Name |
Típus |
Description |
|
accountAccess
|
EndpointAccessProfile
|
Hálózati hozzáférési profil a BatchAccount-végponthoz (Batch-fiók adatsík API-ja).
|
|
nodeManagementAccess
|
EndpointAccessProfile
|
Hálózati hozzáférési profil a nodeManagement végponthoz (Batch-szolgáltatás a Batch-készletek számítási csomópontjait kezeli).
|
PoolAllocationMode
Felsorolás
A Batch-fiók készleteinek létrehozására szolgáló foglalási mód.
| Érték |
Description |
|
BatchService
|
A készletek a Batch szolgáltatás tulajdonában lévő előfizetésekben lesznek lefoglalva.
|
|
UserSubscription
|
A készletek a felhasználó tulajdonában lévő előfizetésben lesznek lefoglalva.
|
PrivateEndpoint
Tárgy
A privát végpont kapcsolat privát végpontja.
| Name |
Típus |
Description |
|
id
|
string
|
A privát végpont ARM-erőforrás-azonosítója. Ez az űrlap /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/privateEndpoints/{privateEndpoint}.
A privát végpont ARM-erőforrás-azonosítója. Ez az űrlap /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/privateEndpoints/{privateEndpoint}.
|
PrivateEndpointConnection
Tárgy
Egy privát kapcsolati erőforrással kapcsolatos információkat tartalmaz.
| Name |
Típus |
Description |
|
etag
|
string
|
Az erőforrás ETagje, amely az egyidejűségi utasításokhoz használatos.
|
|
id
|
string
(arm-id)
|
Az erőforrás teljes erőforrás-azonosítója. Például: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
Az erőforrás neve
|
|
properties.groupIds
|
string[]
|
A privát végpontkapcsolat csoportazonosítója.
Az érték egy és csak egy csoportazonosítóval rendelkezik.
|
|
properties.privateEndpoint
|
PrivateEndpoint
|
A privát végpont ARM-erőforrás-azonosítója.
A privát végpont kapcsolat privát végpontja.
|
|
properties.privateLinkServiceConnectionState
|
PrivateLinkServiceConnectionState
|
A privát végpont kapcsolatának privát kapcsolati állapota.
A privát végpont kapcsolatának privát kapcsolati állapota.
|
|
properties.provisioningState
|
PrivateEndpointConnectionProvisioningState
|
A privát végpontkapcsolat kiépítési állapota.
A privát végpontkapcsolat kiépítési állapota.
|
|
systemData
|
systemData
|
A createdBy és a modifiedBy adatokat tartalmazó Azure Resource Manager-metaadatok.
|
|
tags
|
object
|
Az erőforrás címkéi.
|
|
type
|
string
|
Az erőforrás típusa. Pl. "Microsoft.Compute/virtualMachines" vagy "Microsoft.Storage/storageAccounts"
|
PrivateEndpointConnectionProvisioningState
Felsorolás
A privát végpontkapcsolat kiépítési állapota.
| Érték |
Description |
|
Creating
|
A kapcsolat létrejön.
|
|
Updating
|
A felhasználó kérte a kapcsolat állapotának frissítését, de a frissítési művelet még nem fejeződött be. Előfordulhat, hogy a Batch-fiók csatlakoztatásakor nem hivatkozik a kapcsolatra.
|
|
Deleting
|
A kapcsolat törölve van.
|
|
Succeeded
|
A kapcsolat állapota végleges, és készen áll a használatra, ha az állapot jóváhagyva van.
|
|
Failed
|
A felhasználó kérte a kapcsolat frissítését, és nem sikerült. Újrapróbálkozhat a frissítési művelettel.
|
|
Cancelled
|
A felhasználó megszakította a kapcsolat létrehozását.
|
PrivateLinkServiceConnectionState
Tárgy
A privát végpont kapcsolatának privát kapcsolati állapota
| Name |
Típus |
Description |
|
actionsRequired
|
string
|
A privát kapcsolat állapotában szükséges művelet
A privát kapcsolat állapotában szükséges művelet
|
|
description
|
string
|
A privát kapcsolat állapotának leírása
A privát kapcsolat állapotának leírása
|
|
status
|
PrivateLinkServiceConnectionStatus
|
A Batch privát végpontkapcsolat állapota
A Batch privát végpontkapcsolat állapota
|
PrivateLinkServiceConnectionStatus
Felsorolás
A Batch privát végpontkapcsolat állapota
| Érték |
Description |
|
Approved
|
A privát végpontkapcsolat jóvá van hagyva, és a Batch-fiók elérésére használható
|
|
Pending
|
A privát végpont kapcsolata függőben van, és nem használható a Batch-fiók elérésére
|
|
Rejected
|
A privát végpont kapcsolata elutasítva, és nem használható a Batch-fiók elérésére
|
|
Disconnected
|
A privát végpont kapcsolata megszakadt, és nem használható a Batch-fiók elérésére
|
ProvisioningState
Felsorolás
Az erőforrás kiépített állapota
| Érték |
Description |
|
Invalid
|
A fiók érvénytelen állapotban van.
|
|
Creating
|
A fiók létrehozása folyamatban van.
|
|
Deleting
|
A fiók törlése folyamatban van.
|
|
Succeeded
|
A fiók létrejött, és használatra kész.
|
|
Failed
|
A fiók utolsó művelete sikertelen.
|
|
Cancelled
|
A fiók utolsó művelete megszakad.
|
PublicNetworkAccessType
Felsorolás
Az Azure Batch szolgáltatáshoz és a Batch-fiókműveletekhez való hozzáférés hálózati adaptertípusa.
| Érték |
Description |
|
Enabled
|
Engedélyezi az Azure Batch-hez való csatlakozást nyilvános DNS-kapcsolaton keresztül.
|
|
Disabled
|
Letiltja a nyilvános kapcsolatot, és privát végponterőforráson keresztül engedélyezi az Azure Batch Service-hez való privát kapcsolatot.
|
|
SecuredByPerimeter
|
NSP-konfiguráción keresztül biztosítja az Azure Batchhez való csatlakozást.
|
ResourceIdentityType
Felsorolás
A Batch-fiókhoz használt identitás típusa.
| Érték |
Description |
|
SystemAssigned
|
A Batch-fiókhoz rendszer által hozzárendelt identitás tartozik.
|
|
UserAssigned
|
A Batch-fiókhoz felhasználó által hozzárendelt identitások tartoznak.
|
|
None
|
A Batch-fiókhoz nincs identitás társítva. A None frissítési fiókban való beállítása eltávolítja a meglévő identitásokat.
|
systemData
Tárgy
Az erőforrás létrehozásával és utolsó módosításával kapcsolatos metaadatok.
| Name |
Típus |
Description |
|
createdAt
|
string
(date-time)
|
Az erőforrás-létrehozás időbélyege (UTC).
|
|
createdBy
|
string
|
Az erőforrást létrehozó identitás.
|
|
createdByType
|
createdByType
|
Az erőforrást létrehozó identitás típusa.
|
|
lastModifiedAt
|
string
(date-time)
|
Az erőforrás utolsó módosításának időbélyege (UTC)
|
|
lastModifiedBy
|
string
|
Az erőforrást legutóbb módosító identitás.
|
|
lastModifiedByType
|
createdByType
|
Az erőforrást legutóbb módosító identitás típusa.
|
UserAssignedIdentities
Tárgy
A társított felhasználói identitások listája.
| Name |
Típus |
Description |
|
clientId
|
string
|
A felhasználó által hozzárendelt identitás ügyfélazonosítója.
|
|
principalId
|
string
|
A felhasználó által hozzárendelt identitás egyszerű azonosítója.
|
VirtualMachineFamilyCoreQuota
Tárgy
A Batch-fiókhoz tartozó virtuálisgép-család és a hozzá tartozó magkvóta.
| Name |
Típus |
Description |
|
coreQuota
|
integer
(int32)
|
A Batch-fiók virtuálisgép-családjának alapkvótája.
|
|
name
|
string
|
A virtuális gép családneve.
|