Erstellt ein neues Batchkonto mit den angegebenen Parametern. Vorhandene Konten können nicht mit dieser API aktualisiert werden und sollten stattdessen mit der API für das Updatebatchkonto aktualisiert werden.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}?api-version=2024-07-01
URI-Parameter
Name |
In |
Erforderlich |
Typ |
Beschreibung |
accountName
|
path |
True
|
string
minLength: 3 maxLength: 24 pattern: ^[a-z0-9]+$
|
Ein Name für das Batchkonto, das innerhalb der Region eindeutig sein muss. Batchkontonamen müssen zwischen 3 und 24 Zeichen lang sein und dürfen nur Zahlen und Kleinbuchstaben verwenden. Dieser Name wird als Teil des DNS-Namens verwendet, der für den Zugriff auf den Batchdienst in der Region verwendet wird, in der das Konto erstellt wird. Beispiel: http://accountname.region.batch.azure.com/.
|
resourceGroupName
|
path |
True
|
string
|
Der Name der Ressourcengruppe, die das Batchkonto enthält.
|
subscriptionId
|
path |
True
|
string
|
Die Azure-Abonnement-ID. Dies ist eine GUID-formatierte Zeichenfolge (z. B. 0000000-0000-0000-0000-0000000000000)
|
api-version
|
query |
True
|
string
|
Die API-Version, die mit der HTTP-Anforderung verwendet werden soll.
|
Anforderungstext
Name |
Erforderlich |
Typ |
Beschreibung |
location
|
True
|
string
|
Die Region, in der das Konto erstellt werden soll.
|
identity
|
|
BatchAccountIdentity
|
Die Identität des Batchkontos.
|
properties.allowedAuthenticationModes
|
|
AuthenticationMode[]
|
Liste der zulässigen Authentifizierungsmodi für das Batchkonto, das zur Authentifizierung mit der Datenebene verwendet werden kann. Dies wirkt sich nicht auf die Authentifizierung mit der Steuerebene aus.
|
properties.autoStorage
|
|
AutoStorageBaseProperties
|
Die Eigenschaften im Zusammenhang mit dem automatischen Speicherkonto.
|
properties.encryption
|
|
EncryptionProperties
|
Die Verschlüsselungskonfiguration für das Batchkonto.
Konfiguriert, wie Kundendaten innerhalb des Batchkontos verschlüsselt werden. Standardmäßig werden Konten mit einem von Microsoft verwalteten Schlüssel verschlüsselt. Für zusätzliche Steuerung kann stattdessen ein vom Kunden verwalteter Schlüssel verwendet werden.
|
properties.keyVaultReference
|
|
KeyVaultReference
|
Ein Verweis auf den Azure Key Vault, der dem Batchkonto zugeordnet ist.
|
properties.networkProfile
|
|
NetworkProfile
|
Netzwerkprofil für Batchkonto, das Netzwerkregeleinstellungen für jeden Endpunkt enthält.
Das Netzwerkprofil wird nur wirksam, wenn publicNetworkAccess aktiviert ist.
|
properties.poolAllocationMode
|
|
PoolAllocationMode
|
Der Zuordnungsmodus, der zum Erstellen von Pools im Batchkonto verwendet werden soll.
Der Poolzuweisungsmodus wirkt sich auch darauf aus, wie Clients sich bei der Batchdienst-API authentifizieren können. Wenn der Modus BatchService ist, können Clients sich mit Zugriffstasten oder Microsoft Entra-ID authentifizieren. Wenn der Modus "UserSubscription" lautet, müssen Clients die Microsoft Entra-ID verwenden. Der Standardwert ist BatchService.
|
properties.publicNetworkAccess
|
|
PublicNetworkAccessType
|
Der Netzwerkzugriffstyp für den Zugriff auf das Azure Batch-Konto.
Wenn nicht angegeben, ist der Standardwert "aktiviert".
|
tags
|
|
object
|
Die vom Benutzer angegebenen Tags, die dem Konto zugeordnet sind.
|
Antworten
Name |
Typ |
Beschreibung |
200 OK
|
BatchAccount
|
Der Vorgang war erfolgreich. Die Antwort enthält die Batchkontoentität.
|
202 Accepted
|
|
Der Vorgang wird asynchron abgeschlossen.
Header
- Location: string
- Retry-After: integer
|
Other Status Codes
|
CloudError
|
Fehlerantwort, die beschreibt, warum der Vorgang fehlgeschlagen ist.
|
Sicherheit
azure_auth
Microsoft Entra OAuth 2.0-Authentifizierungscodefluss
Typ:
oauth2
Ablauf:
implicit
Autorisierungs-URL:
https://login.microsoftonline.com/common/oauth2/authorize
Bereiche
Name |
Beschreibung |
user_impersonation
|
Identitätswechsel ihres Benutzerkontos
|
Beispiele
BatchAccountCreate_BYOS
Beispielanforderung
PUT https://management.azure.com/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct?api-version=2024-07-01
{
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
},
"poolAllocationMode": "UserSubscription",
"keyVaultReference": {
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
"url": "http://sample.vault.azure.net/"
}
}
}
import com.azure.resourcemanager.batch.models.AutoStorageBaseProperties;
import com.azure.resourcemanager.batch.models.KeyVaultReference;
import com.azure.resourcemanager.batch.models.PoolAllocationMode;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for BatchAccount Create.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountCreate_BYOS.json
*/
/**
* Sample code: BatchAccountCreate_BYOS.
*
* @param manager Entry point to BatchManager.
*/
public static void batchAccountCreateBYOS(com.azure.resourcemanager.batch.BatchManager manager) {
manager.batchAccounts().define("sampleacct").withRegion("japaneast")
.withExistingResourceGroup("default-azurebatch-japaneast")
.withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId(
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"))
.withPoolAllocationMode(PoolAllocationMode.USER_SUBSCRIPTION)
.withKeyVaultReference(new KeyVaultReference().withId(
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample")
.withUrl("http://sample.vault.azure.net/"))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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="subid",
)
response = client.batch_account.begin_create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
parameters={
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
},
"keyVaultReference": {
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
"url": "http://sample.vault.azure.net/",
},
"poolAllocationMode": "UserSubscription",
},
},
).result()
print(response)
# x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/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/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/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("<subscription-id>", 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/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
},
KeyVaultReference: &armbatch.KeyVaultReference{
ID: to.Ptr("/subscriptions/subid/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.Account = armbatch.Account{
// Name: to.Ptr("sampleacct"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
// Location: to.Ptr("japaneast"),
// Identity: &armbatch.AccountIdentity{
// Type: to.Ptr(armbatch.ResourceIdentityTypeNone),
// },
// Properties: &armbatch.AccountProperties{
// AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
// ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
// AutoStorage: &armbatch.AutoStorageProperties{
// StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
// LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.987Z"); return t}()),
// },
// DedicatedCoreQuota: to.Ptr[int32](20),
// KeyVaultReference: &armbatch.KeyVaultReference{
// ID: to.Ptr("/subscriptions/subid/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: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountCreate_BYOS.json
*/
async function batchAccountCreateByos() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["BATCH_RESOURCE_GROUP"] || "default-azurebatch-japaneast";
const accountName = "sampleacct";
const parameters = {
autoStorage: {
storageAccountId:
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
},
keyVaultReference: {
id: "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
url: "http://sample.vault.azure.net/",
},
location: "japaneast",
poolAllocationMode: "UserSubscription",
};
const credential = new DefaultAzureCredential();
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.batchAccountOperations.beginCreateAndWait(
resourceGroupName,
accountName,
parameters,
);
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/stable/2024-07-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 = "subid";
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/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")),
PoolAllocationMode = BatchAccountPoolAllocationMode.UserSubscription,
KeyVaultReference = new BatchKeyVaultReference(new ResourceIdentifier("/subscriptions/subid/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
Beispiel für eine Antwort
{
"name": "sampleacct",
"location": "japaneast",
"properties": {
"accountEndpoint": "sampleacct.japaneast.batch.azure.com",
"provisioningState": "Succeeded",
"poolAllocationMode": "UserSubscription",
"dedicatedCoreQuota": 20,
"lowPriorityCoreQuota": 20,
"poolQuota": 20,
"activeJobAndJobScheduleQuota": 20,
"autoStorage": {
"storageAccountId": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
"lastKeySync": "2016-03-10T23:48:38.9878479Z"
},
"keyVaultReference": {
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
"url": "http://sample.vault.azure.net/"
},
"publicNetworkAccess": "Enabled"
},
"identity": {
"type": "None"
},
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct",
"type": "Microsoft.Batch/batchAccounts"
}
BatchAccountCreate_Default
Beispielanforderung
PUT https://management.azure.com/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct?api-version=2024-07-01
{
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
}
}
}
import com.azure.resourcemanager.batch.models.AutoStorageBaseProperties;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for BatchAccount Create.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountCreate_Default.json
*/
/**
* Sample code: BatchAccountCreate_Default.
*
* @param manager Entry point to BatchManager.
*/
public static void batchAccountCreateDefault(com.azure.resourcemanager.batch.BatchManager manager) {
manager.batchAccounts().define("sampleacct").withRegion("japaneast")
.withExistingResourceGroup("default-azurebatch-japaneast")
.withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId(
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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="subid",
)
response = client.batch_account.begin_create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
parameters={
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
}
},
},
).result()
print(response)
# x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/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/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/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("<subscription-id>", 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/subid/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.Account = armbatch.Account{
// Name: to.Ptr("sampleacct"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
// Location: to.Ptr("japaneast"),
// Identity: &armbatch.AccountIdentity{
// Type: to.Ptr(armbatch.ResourceIdentityTypeNone),
// },
// Properties: &armbatch.AccountProperties{
// AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
// ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
// AutoStorage: &armbatch.AutoStorageProperties{
// StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
// LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.987Z"); return t}()),
// },
// 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: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountCreate_Default.json
*/
async function batchAccountCreateDefault() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["BATCH_RESOURCE_GROUP"] || "default-azurebatch-japaneast";
const accountName = "sampleacct";
const parameters = {
autoStorage: {
storageAccountId:
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
},
location: "japaneast",
};
const credential = new DefaultAzureCredential();
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.batchAccountOperations.beginCreateAndWait(
resourceGroupName,
accountName,
parameters,
);
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/stable/2024-07-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 = "subid";
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/subid/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
Beispiel für eine Antwort
{
"name": "sampleacct",
"location": "japaneast",
"properties": {
"accountEndpoint": "sampleacct.japaneast.batch.azure.com",
"provisioningState": "Succeeded",
"poolAllocationMode": "BatchService",
"dedicatedCoreQuota": 20,
"lowPriorityCoreQuota": 20,
"poolQuota": 20,
"activeJobAndJobScheduleQuota": 20,
"autoStorage": {
"storageAccountId": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
"lastKeySync": "2016-03-10T23:48:38.9878479Z"
},
"publicNetworkAccess": "Enabled"
},
"identity": {
"type": "None"
},
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct",
"type": "Microsoft.Batch/batchAccounts"
}
BatchAccountCreate_SystemAssignedIdentity
Beispielanforderung
PUT https://management.azure.com/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct?api-version=2024-07-01
{
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
}
},
"identity": {
"type": "SystemAssigned"
}
}
import com.azure.resourcemanager.batch.models.AutoStorageBaseProperties;
import com.azure.resourcemanager.batch.models.BatchAccountIdentity;
import com.azure.resourcemanager.batch.models.ResourceIdentityType;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for BatchAccount Create.
*/
public final class Main {
/*
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/
* BatchAccountCreate_SystemAssignedIdentity.json
*/
/**
* Sample code: BatchAccountCreate_SystemAssignedIdentity.
*
* @param manager Entry point to BatchManager.
*/
public static void batchAccountCreateSystemAssignedIdentity(com.azure.resourcemanager.batch.BatchManager manager) {
manager.batchAccounts().define("sampleacct").withRegion("japaneast")
.withExistingResourceGroup("default-azurebatch-japaneast")
.withIdentity(new BatchAccountIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
.withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId(
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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="subid",
)
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/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
}
},
},
).result()
print(response)
# x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/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/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/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("<subscription-id>", 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/subid/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.Account = armbatch.Account{
// Name: to.Ptr("sampleacct"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
// Location: to.Ptr("japaneast"),
// Identity: &armbatch.AccountIdentity{
// Type: to.Ptr(armbatch.ResourceIdentityTypeSystemAssigned),
// PrincipalID: to.Ptr("1a2e532b-9900-414c-8600-cfc6126628d7"),
// TenantID: to.Ptr("f686d426-8d16-42db-81b7-ab578e110ccd"),
// },
// Properties: &armbatch.AccountProperties{
// AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
// ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
// AutoStorage: &armbatch.AutoStorageProperties{
// StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
// LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.987Z"); return t}()),
// },
// 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: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountCreate_SystemAssignedIdentity.json
*/
async function batchAccountCreateSystemAssignedIdentity() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["BATCH_RESOURCE_GROUP"] || "default-azurebatch-japaneast";
const accountName = "sampleacct";
const parameters = {
autoStorage: {
storageAccountId:
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
},
identity: { type: "SystemAssigned" },
location: "japaneast",
};
const credential = new DefaultAzureCredential();
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.batchAccountOperations.beginCreateAndWait(
resourceGroupName,
accountName,
parameters,
);
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/stable/2024-07-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 = "subid";
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/subid/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
Beispiel für eine Antwort
{
"name": "sampleacct",
"location": "japaneast",
"properties": {
"accountEndpoint": "sampleacct.japaneast.batch.azure.com",
"provisioningState": "Succeeded",
"poolAllocationMode": "BatchService",
"dedicatedCoreQuota": 20,
"lowPriorityCoreQuota": 20,
"poolQuota": 20,
"activeJobAndJobScheduleQuota": 20,
"autoStorage": {
"storageAccountId": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
"lastKeySync": "2016-03-10T23:48:38.9878479Z"
},
"publicNetworkAccess": "Enabled"
},
"identity": {
"principalId": "1a2e532b-9900-414c-8600-cfc6126628d7",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd",
"type": "SystemAssigned"
},
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct",
"type": "Microsoft.Batch/batchAccounts"
}
BatchAccountCreate_UserAssignedIdentity
Beispielanforderung
PUT https://management.azure.com/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct?api-version=2024-07-01
{
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
}
},
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}
}
}
}
import com.azure.resourcemanager.batch.models.AutoStorageBaseProperties;
import com.azure.resourcemanager.batch.models.BatchAccountIdentity;
import com.azure.resourcemanager.batch.models.ResourceIdentityType;
import com.azure.resourcemanager.batch.models.UserAssignedIdentities;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for BatchAccount Create.
*/
public final class Main {
/*
* x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/
* BatchAccountCreate_UserAssignedIdentity.json
*/
/**
* Sample code: BatchAccountCreate_UserAssignedIdentity.
*
* @param manager Entry point to BatchManager.
*/
public static void batchAccountCreateUserAssignedIdentity(com.azure.resourcemanager.batch.BatchManager manager) {
manager.batchAccounts().define("sampleacct").withRegion("japaneast")
.withExistingResourceGroup("default-azurebatch-japaneast")
.withIdentity(new BatchAccountIdentity().withType(ResourceIdentityType.USER_ASSIGNED)
.withUserAssignedIdentities(mapOf(
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1",
new UserAssignedIdentities())))
.withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId(
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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="subid",
)
response = client.batch_account.begin_create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
parameters={
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {}
},
},
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
}
},
},
).result()
print(response)
# x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/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/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/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("<subscription-id>", 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/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {},
},
},
Location: to.Ptr("japaneast"),
Properties: &armbatch.AccountCreateProperties{
AutoStorage: &armbatch.AutoStorageBaseProperties{
StorageAccountID: to.Ptr("/subscriptions/subid/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.Account = armbatch.Account{
// Name: to.Ptr("sampleacct"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
// Location: to.Ptr("japaneast"),
// Identity: &armbatch.AccountIdentity{
// Type: to.Ptr(armbatch.ResourceIdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armbatch.UserAssignedIdentities{
// "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": &armbatch.UserAssignedIdentities{
// ClientID: to.Ptr("clientId1"),
// PrincipalID: to.Ptr("principalId1"),
// },
// },
// },
// Properties: &armbatch.AccountProperties{
// AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
// ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
// AutoStorage: &armbatch.AutoStorageProperties{
// StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
// LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.987Z"); return t}()),
// },
// 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: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountCreate_UserAssignedIdentity.json
*/
async function batchAccountCreateUserAssignedIdentity() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["BATCH_RESOURCE_GROUP"] || "default-azurebatch-japaneast";
const accountName = "sampleacct";
const parameters = {
autoStorage: {
storageAccountId:
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
},
identity: {
type: "UserAssigned",
userAssignedIdentities: {
"/subscriptions/subid/resourceGroups/defaultAzurebatchJapaneast/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1":
{},
},
},
location: "japaneast",
};
const credential = new DefaultAzureCredential();
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.batchAccountOperations.beginCreateAndWait(
resourceGroupName,
accountName,
parameters,
);
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/stable/2024-07-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 = "subid";
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/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1")] = new UserAssignedIdentity(),
},
},
AutoStorage = new BatchAccountAutoStorageBaseConfiguration(new ResourceIdentifier("/subscriptions/subid/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
Beispiel für eine Antwort
{
"name": "sampleacct",
"location": "japaneast",
"properties": {
"accountEndpoint": "sampleacct.japaneast.batch.azure.com",
"provisioningState": "Succeeded",
"poolAllocationMode": "BatchService",
"dedicatedCoreQuota": 20,
"lowPriorityCoreQuota": 20,
"poolQuota": 20,
"activeJobAndJobScheduleQuota": 20,
"autoStorage": {
"storageAccountId": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
"lastKeySync": "2016-03-10T23:48:38.9878479Z"
},
"publicNetworkAccess": "Enabled"
},
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {
"principalId": "principalId1",
"clientId": "clientId1"
}
}
},
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct",
"type": "Microsoft.Batch/batchAccounts"
}
PrivateBatchAccountCreate
Beispielanforderung
PUT https://management.azure.com/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct?api-version=2024-07-01
{
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
},
"keyVaultReference": {
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
"url": "http://sample.vault.azure.net/"
},
"publicNetworkAccess": "Disabled"
}
}
import com.azure.resourcemanager.batch.models.AutoStorageBaseProperties;
import com.azure.resourcemanager.batch.models.KeyVaultReference;
import com.azure.resourcemanager.batch.models.PublicNetworkAccessType;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for BatchAccount Create.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateBatchAccountCreate.json
*/
/**
* Sample code: PrivateBatchAccountCreate.
*
* @param manager Entry point to BatchManager.
*/
public static void privateBatchAccountCreate(com.azure.resourcemanager.batch.BatchManager manager) {
manager.batchAccounts().define("sampleacct").withRegion("japaneast")
.withExistingResourceGroup("default-azurebatch-japaneast")
.withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId(
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"))
.withKeyVaultReference(new KeyVaultReference().withId(
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample")
.withUrl("http://sample.vault.azure.net/"))
.withPublicNetworkAccess(PublicNetworkAccessType.DISABLED).create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
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="subid",
)
response = client.batch_account.begin_create(
resource_group_name="default-azurebatch-japaneast",
account_name="sampleacct",
parameters={
"location": "japaneast",
"properties": {
"autoStorage": {
"storageAccountId": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"
},
"keyVaultReference": {
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
"url": "http://sample.vault.azure.net/",
},
"publicNetworkAccess": "Disabled",
},
},
).result()
print(response)
# x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/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/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb/specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/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("<subscription-id>", 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/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
},
KeyVaultReference: &armbatch.KeyVaultReference{
ID: to.Ptr("/subscriptions/subid/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.Account = armbatch.Account{
// Name: to.Ptr("sampleacct"),
// Type: to.Ptr("Microsoft.Batch/batchAccounts"),
// ID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct"),
// Location: to.Ptr("japaneast"),
// Identity: &armbatch.AccountIdentity{
// Type: to.Ptr(armbatch.ResourceIdentityTypeNone),
// },
// Properties: &armbatch.AccountProperties{
// AccountEndpoint: to.Ptr("sampleacct.japaneast.batch.azure.com"),
// ActiveJobAndJobScheduleQuota: to.Ptr[int32](20),
// AutoStorage: &armbatch.AutoStorageProperties{
// StorageAccountID: to.Ptr("/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage"),
// LastKeySync: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2016-03-10T23:48:38.987Z"); return t}()),
// },
// DedicatedCoreQuota: to.Ptr[int32](20),
// KeyVaultReference: &armbatch.KeyVaultReference{
// ID: to.Ptr("/subscriptions/subid/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: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateBatchAccountCreate.json
*/
async function privateBatchAccountCreate() {
const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["BATCH_RESOURCE_GROUP"] || "default-azurebatch-japaneast";
const accountName = "sampleacct";
const parameters = {
autoStorage: {
storageAccountId:
"/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
},
keyVaultReference: {
id: "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
url: "http://sample.vault.azure.net/",
},
location: "japaneast",
publicNetworkAccess: "Disabled",
};
const credential = new DefaultAzureCredential();
const client = new BatchManagementClient(credential, subscriptionId);
const result = await client.batchAccountOperations.beginCreateAndWait(
resourceGroupName,
accountName,
parameters,
);
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/stable/2024-07-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 = "subid";
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/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")),
KeyVaultReference = new BatchKeyVaultReference(new ResourceIdentifier("/subscriptions/subid/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
Beispiel für eine Antwort
{
"name": "sampleacct",
"location": "japaneast",
"properties": {
"accountEndpoint": "sampleacct.japaneast.batch.azure.com",
"provisioningState": "Succeeded",
"poolAllocationMode": "UserSubscription",
"dedicatedCoreQuota": 20,
"lowPriorityCoreQuota": 20,
"poolQuota": 20,
"activeJobAndJobScheduleQuota": 20,
"autoStorage": {
"storageAccountId": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage",
"lastKeySync": "2016-03-10T23:48:38.9878479Z"
},
"keyVaultReference": {
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample",
"url": "http://sample.vault.azure.net/"
},
"publicNetworkAccess": "Disabled"
},
"identity": {
"type": "None"
},
"id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct",
"type": "Microsoft.Batch/batchAccounts"
}
Definitionen
Name |
Beschreibung |
AuthenticationMode
|
Der Authentifizierungsmodus für das Batchkonto.
|
AutoStorageAuthenticationMode
|
Der Authentifizierungsmodus, den der Batchdienst zum Verwalten des automatischen Speicherkontos verwendet.
|
AutoStorageBaseProperties
|
Die Eigenschaften im Zusammenhang mit dem automatischen Speicherkonto.
|
AutoStorageProperties
|
Enthält Informationen zum automatischen Speicherkonto, das einem Batchkonto zugeordnet ist.
|
BatchAccount
|
Enthält Informationen zu einem Azure Batch-Konto.
|
BatchAccountCreateParameters
|
Parameter, die für den Create-Vorgang bereitgestellt werden.
|
BatchAccountIdentity
|
Die Identität des Batchkontos, falls konfiguriert. Dies wird verwendet, wenn der Benutzer "Microsoft.KeyVault" als Verschlüsselungskonfiguration des Batchkontos angibt oder wenn ManagedIdentity als Authentifizierungsmodus für den automatischen Speicher ausgewählt wird.
|
CloudError
|
Eine Fehlerantwort des Batchdiensts.
|
CloudErrorBody
|
Eine Fehlerantwort des Batchdiensts.
|
ComputeNodeIdentityReference
|
Der Verweis auf eine vom Benutzer zugewiesene Identität, die dem Batchpool zugeordnet ist, den ein Computeknoten verwendet.
|
EncryptionProperties
|
Konfiguriert, wie Kundendaten innerhalb des Batchkontos verschlüsselt werden. Standardmäßig werden Konten mit einem von Microsoft verwalteten Schlüssel verschlüsselt. Für zusätzliche Steuerung kann stattdessen ein vom Kunden verwalteter Schlüssel verwendet werden.
|
EndpointAccessDefaultAction
|
Die Standardaktion, wenn keine IPRule-Übereinstimmung vorhanden ist.
|
EndpointAccessProfile
|
Netzwerkzugriffsprofil für Batchendpunkt.
|
IPRule
|
Regel zum Filtern der Client-IP-Adresse.
|
IPRuleAction
|
Aktion, wenn client-IP-Adresse abgeglichen wird.
|
KeySource
|
Typ der Schlüsselquelle.
|
KeyVaultProperties
|
KeyVault-Konfiguration bei Verwendung einer Verschlüsselungs-KeySource von Microsoft.KeyVault.
|
KeyVaultReference
|
Identifiziert den Azure Key Vault, der einem Batchkonto zugeordnet ist.
|
NetworkProfile
|
Netzwerkprofil für Batchkonto, das Netzwerkregeleinstellungen für jeden Endpunkt enthält.
|
PoolAllocationMode
|
Der Zuordnungsmodus zum Erstellen von Pools im Batchkonto.
|
PrivateEndpoint
|
Der private Endpunkt der privaten Endpunktverbindung.
|
PrivateEndpointConnection
|
Enthält Informationen zu einer privaten Verknüpfungsressource.
|
PrivateEndpointConnectionProvisioningState
|
Der Bereitstellungsstatus der privaten Endpunktverbindung.
|
PrivateLinkServiceConnectionState
|
Der Verbindungsstatus des privaten Verknüpfungsdiensts der privaten Endpunktverbindung
|
PrivateLinkServiceConnectionStatus
|
Der Status der Privaten Batch-Endpunktverbindung
|
ProvisioningState
|
Der bereitgestellte Status der Ressource
|
PublicNetworkAccessType
|
Der Netzwerkzugriffstyp für die Ressourcen im Batchkonto.
|
ResourceIdentityType
|
Der Identitätstyp, der für das Batchkonto verwendet wird.
|
UserAssignedIdentities
|
Die Liste der zugeordneten Benutzeridentitäten.
|
VirtualMachineFamilyCoreQuota
|
Eine VM-Familie und das zugehörige Kernkontingent für das Batchkonto.
|
AuthenticationMode
Enumeration
Der Authentifizierungsmodus für das Batchkonto.
Wert |
Beschreibung |
AAD
|
Der Authentifizierungsmodus mithilfe der Microsoft Entra-ID.
|
SharedKey
|
Der Authentifizierungsmodus mit freigegebenen Schlüsseln.
|
TaskAuthenticationToken
|
Der Authentifizierungsmodus mit Aufgabenauthentifizierungstoken.
|
AutoStorageAuthenticationMode
Enumeration
Der Authentifizierungsmodus, den der Batchdienst zum Verwalten des automatischen Speicherkontos verwendet.
Wert |
Beschreibung |
BatchAccountManagedIdentity
|
Der Batchdienst authentifiziert Anforderungen an den automatischen Speicher mithilfe der verwalteten Identität, die dem Batchkonto zugewiesen ist.
|
StorageKeys
|
Der Batchdienst authentifiziert Anforderungen an den automatischen Speicher mithilfe von Speicherkontoschlüsseln.
|
AutoStorageBaseProperties
Objekt
Die Eigenschaften im Zusammenhang mit dem automatischen Speicherkonto.
Name |
Typ |
Standardwert |
Beschreibung |
authenticationMode
|
AutoStorageAuthenticationMode
|
StorageKeys
|
Der Authentifizierungsmodus, den der Batchdienst zum Verwalten des automatischen Speicherkontos verwendet.
|
nodeIdentityReference
|
ComputeNodeIdentityReference
|
|
Der Verweis auf die vom Benutzer zugewiesene Identität, die Computeknoten für den Zugriff auf den automatischen Speicher verwenden.
Die hier referenzierte Identität muss Pools zugewiesen werden, die Über Computeknoten verfügen, die Zugriff auf den automatischen Speicher benötigen.
|
storageAccountId
|
string
(arm-id)
|
|
Die Ressourcen-ID des Speicherkontos, das für das automatische Speicherkonto verwendet werden soll.
|
AutoStorageProperties
Objekt
Enthält Informationen zum automatischen Speicherkonto, das einem Batchkonto zugeordnet ist.
Name |
Typ |
Standardwert |
Beschreibung |
authenticationMode
|
AutoStorageAuthenticationMode
|
StorageKeys
|
Der Authentifizierungsmodus, den der Batchdienst zum Verwalten des automatischen Speicherkontos verwendet.
|
lastKeySync
|
string
(date-time)
|
|
Die UTC-Zeit, zu der Speicherschlüssel zuletzt mit dem Batchkonto synchronisiert wurden.
|
nodeIdentityReference
|
ComputeNodeIdentityReference
|
|
Der Verweis auf die vom Benutzer zugewiesene Identität, die Computeknoten für den Zugriff auf den automatischen Speicher verwenden.
Die hier referenzierte Identität muss Pools zugewiesen werden, die Über Computeknoten verfügen, die Zugriff auf den automatischen Speicher benötigen.
|
storageAccountId
|
string
(arm-id)
|
|
Die Ressourcen-ID des Speicherkontos, das für das automatische Speicherkonto verwendet werden soll.
|
BatchAccount
Objekt
Enthält Informationen zu einem Azure Batch-Konto.
Name |
Typ |
Standardwert |
Beschreibung |
id
|
string
|
|
Die ID der Ressource.
|
identity
|
BatchAccountIdentity
|
|
Die Identität des Batchkontos.
|
location
|
string
|
|
Der Speicherort der Ressource.
|
name
|
string
|
|
Der Name der Ressource.
|
properties.accountEndpoint
|
string
|
|
Der Kontoendpunkt, der für die Interaktion mit dem Batchdienst verwendet wird.
|
properties.activeJobAndJobScheduleQuota
|
integer
(int32)
|
|
Das aktive Auftrags- und Auftragsplanungskontingent für das Batchkonto.
|
properties.allowedAuthenticationModes
|
AuthenticationMode[]
|
|
Liste der zulässigen Authentifizierungsmodi für das Batchkonto, das zur Authentifizierung mit der Datenebene verwendet werden kann. Dies wirkt sich nicht auf die Authentifizierung mit der Steuerebene aus.
|
properties.autoStorage
|
AutoStorageProperties
|
|
Die Eigenschaften und der Status eines automatischen Speicherkontos, das dem Batchkonto zugeordnet ist.
Enthält Informationen zum automatischen Speicherkonto, das einem Batchkonto zugeordnet ist.
|
properties.dedicatedCoreQuota
|
integer
(int32)
|
|
Das dedizierte Kernkontingent für das Batchkonto.
Bei Konten mit PoolAllocationMode, die auf UserSubscription festgelegt sind, wird das Kontingent für das Abonnement verwaltet, sodass dieser Wert nicht zurückgegeben wird.
|
properties.dedicatedCoreQuotaPerVMFamily
|
VirtualMachineFamilyCoreQuota[]
|
|
Eine Liste des dedizierten Kernkontingents pro Familie virtueller Computer für das Batchkonto. Bei Konten mit PoolAllocationMode, die auf UserSubscription festgelegt sind, wird das Kontingent für das Abonnement verwaltet, sodass dieser Wert nicht zurückgegeben wird.
|
properties.dedicatedCoreQuotaPerVMFamilyEnforced
|
boolean
|
|
Ein Wert, der angibt, ob Kernkontingente pro Familie virtueller Computer für dieses Konto erzwungen werden
Wenn diese Kennzeichnung "true" ist, wird das dedizierte Kernkontingent sowohl über die dedizierteCoreQuotaPerVMFamily- als auch die dedicatedCoreQuota-Eigenschaft des Kontos erzwungen. Wenn dieses Kennzeichen falsch ist, wird das dedizierte Kernkontingent nur über die dedizierteCoreQuota-Eigenschaft auf dem Konto erzwungen und berücksichtigt keine Familie virtueller Computer.
|
properties.encryption
|
EncryptionProperties
|
|
Die Verschlüsselungskonfiguration für das Batchkonto.
Konfiguriert, wie Kundendaten innerhalb des Batchkontos verschlüsselt werden. Standardmäßig werden Konten mit einem von Microsoft verwalteten Schlüssel verschlüsselt. Für zusätzliche Steuerung kann stattdessen ein vom Kunden verwalteter Schlüssel verwendet werden.
|
properties.keyVaultReference
|
KeyVaultReference
|
|
Ein Verweis auf den Azure Key Vault, der dem Batchkonto zugeordnet ist.
Identifiziert den Azure Key Vault, der einem Batchkonto zugeordnet ist.
|
properties.lowPriorityCoreQuota
|
integer
(int32)
|
|
Das Spot/Low-Priority-Kernkontingent für das Batchkonto.
Bei Konten mit PoolAllocationMode, die auf UserSubscription festgelegt sind, wird das Kontingent für das Abonnement verwaltet, sodass dieser Wert nicht zurückgegeben wird.
|
properties.networkProfile
|
NetworkProfile
|
|
Netzwerkprofil für Batchkonto, das Netzwerkregeleinstellungen für jeden Endpunkt enthält.
Das Netzwerkprofil wird nur wirksam, wenn publicNetworkAccess aktiviert ist.
|
properties.nodeManagementEndpoint
|
string
|
|
Der Endpunkt, der vom Computeknoten zum Herstellen einer Verbindung mit dem Batchknotenverwaltungsdienst verwendet wird.
|
properties.poolAllocationMode
|
PoolAllocationMode
|
|
Der Zuordnungsmodus, der zum Erstellen von Pools im Batchkonto verwendet werden soll.
Der Zuordnungsmodus zum Erstellen von Pools im Batchkonto.
|
properties.poolQuota
|
integer
(int32)
|
|
Das Poolkontingent für das Batchkonto.
|
properties.privateEndpointConnections
|
PrivateEndpointConnection[]
|
|
Liste der privaten Endpunktverbindungen, die dem Batchkonto zugeordnet sind
|
properties.provisioningState
|
ProvisioningState
|
|
Der bereitgestellte Status der Ressource
|
properties.publicNetworkAccess
|
PublicNetworkAccessType
|
Enabled
|
Der Netzwerkschnittstellentyp für den Zugriff auf Azure Batch-Dienst- und Batchkontovorgänge.
Wenn nicht angegeben, ist der Standardwert "aktiviert".
|
tags
|
object
|
|
Die Tags der Ressource.
|
type
|
string
|
|
Der Typ der Ressource.
|
BatchAccountCreateParameters
Objekt
Parameter, die für den Create-Vorgang bereitgestellt werden.
Name |
Typ |
Standardwert |
Beschreibung |
identity
|
BatchAccountIdentity
|
|
Die Identität des Batchkontos.
|
location
|
string
|
|
Die Region, in der das Konto erstellt werden soll.
|
properties.allowedAuthenticationModes
|
AuthenticationMode[]
|
|
Liste der zulässigen Authentifizierungsmodi für das Batchkonto, das zur Authentifizierung mit der Datenebene verwendet werden kann. Dies wirkt sich nicht auf die Authentifizierung mit der Steuerebene aus.
|
properties.autoStorage
|
AutoStorageBaseProperties
|
|
Die Eigenschaften im Zusammenhang mit dem automatischen Speicherkonto.
|
properties.encryption
|
EncryptionProperties
|
|
Die Verschlüsselungskonfiguration für das Batchkonto.
Konfiguriert, wie Kundendaten innerhalb des Batchkontos verschlüsselt werden. Standardmäßig werden Konten mit einem von Microsoft verwalteten Schlüssel verschlüsselt. Für zusätzliche Steuerung kann stattdessen ein vom Kunden verwalteter Schlüssel verwendet werden.
|
properties.keyVaultReference
|
KeyVaultReference
|
|
Ein Verweis auf den Azure Key Vault, der dem Batchkonto zugeordnet ist.
|
properties.networkProfile
|
NetworkProfile
|
|
Netzwerkprofil für Batchkonto, das Netzwerkregeleinstellungen für jeden Endpunkt enthält.
Das Netzwerkprofil wird nur wirksam, wenn publicNetworkAccess aktiviert ist.
|
properties.poolAllocationMode
|
PoolAllocationMode
|
|
Der Zuordnungsmodus, der zum Erstellen von Pools im Batchkonto verwendet werden soll.
Der Poolzuweisungsmodus wirkt sich auch darauf aus, wie Clients sich bei der Batchdienst-API authentifizieren können. Wenn der Modus BatchService ist, können Clients sich mit Zugriffstasten oder Microsoft Entra-ID authentifizieren. Wenn der Modus "UserSubscription" lautet, müssen Clients die Microsoft Entra-ID verwenden. Der Standardwert ist BatchService.
|
properties.publicNetworkAccess
|
PublicNetworkAccessType
|
Enabled
|
Der Netzwerkzugriffstyp für den Zugriff auf das Azure Batch-Konto.
Wenn nicht angegeben, ist der Standardwert "aktiviert".
|
tags
|
object
|
|
Die vom Benutzer angegebenen Tags, die dem Konto zugeordnet sind.
|
BatchAccountIdentity
Objekt
Die Identität des Batchkontos, falls konfiguriert. Dies wird verwendet, wenn der Benutzer "Microsoft.KeyVault" als Verschlüsselungskonfiguration des Batchkontos angibt oder wenn ManagedIdentity
als Authentifizierungsmodus für den automatischen Speicher ausgewählt wird.
Name |
Typ |
Beschreibung |
principalId
|
string
|
Die Prinzipal-ID des Batchkontos. Diese Eigenschaft wird nur für eine vom System zugewiesene Identität bereitgestellt.
|
tenantId
|
string
|
Die Mandanten-ID, die dem Batchkonto zugeordnet ist. Diese Eigenschaft wird nur für eine vom System zugewiesene Identität bereitgestellt.
|
type
|
ResourceIdentityType
|
Der Identitätstyp, der für das Batchkonto verwendet wird.
|
userAssignedIdentities
|
<string,
UserAssignedIdentities>
|
Die Liste der Benutzeridentitäten, die dem Batchkonto zugeordnet sind.
|
CloudError
Objekt
Eine Fehlerantwort des Batchdiensts.
Name |
Typ |
Beschreibung |
error
|
CloudErrorBody
|
Der Textkörper der Fehlerantwort.
|
CloudErrorBody
Objekt
Eine Fehlerantwort des Batchdiensts.
Name |
Typ |
Beschreibung |
code
|
string
|
Ein Bezeichner für den Fehler. Codes sind unveränderlich und sollen programmgesteuert genutzt werden.
|
details
|
CloudErrorBody[]
|
Eine Liste mit zusätzlichen Details zum Fehler.
|
message
|
string
|
Eine Meldung, die den Fehler beschreibt, der für die Anzeige in einer Benutzeroberfläche geeignet ist.
|
target
|
string
|
Das Ziel des bestimmten Fehlers. Beispielsweise der Name der Eigenschaft im Fehler.
|
ComputeNodeIdentityReference
Objekt
Der Verweis auf eine vom Benutzer zugewiesene Identität, die dem Batchpool zugeordnet ist, den ein Computeknoten verwendet.
Name |
Typ |
Beschreibung |
resourceId
|
string
|
Die ARM-Ressourcen-ID der vom Benutzer zugewiesenen Identität.
|
EncryptionProperties
Objekt
Konfiguriert, wie Kundendaten innerhalb des Batchkontos verschlüsselt werden. Standardmäßig werden Konten mit einem von Microsoft verwalteten Schlüssel verschlüsselt. Für zusätzliche Steuerung kann stattdessen ein vom Kunden verwalteter Schlüssel verwendet werden.
Name |
Typ |
Beschreibung |
keySource
|
KeySource
|
Typ der Schlüsselquelle.
|
keyVaultProperties
|
KeyVaultProperties
|
Weitere Details bei Verwendung von Microsoft.KeyVault
|
EndpointAccessDefaultAction
Enumeration
Die Standardaktion, wenn keine IPRule-Übereinstimmung vorhanden ist.
Wert |
Beschreibung |
Allow
|
Clientzugriff zulassen.
|
Deny
|
Den Clientzugriff verweigern.
|
EndpointAccessProfile
Objekt
Netzwerkzugriffsprofil für Batchendpunkt.
Name |
Typ |
Beschreibung |
defaultAction
|
EndpointAccessDefaultAction
|
Die Standardaktion, wenn keine IPRule-Übereinstimmung vorhanden ist.
Standardaktion für Endpunktzugriff. Sie gilt nur, wenn publicNetworkAccess aktiviert ist.
|
ipRules
|
IPRule[]
|
Array von IP-Bereichen zum Filtern der Client-IP-Adresse.
|
IPRule
Objekt
Regel zum Filtern der Client-IP-Adresse.
Name |
Typ |
Beschreibung |
action
|
IPRuleAction
|
Aktion, wenn client-IP-Adresse abgeglichen wird.
|
value
|
string
|
Die zu filternde IP-Adresse oder der IP-Adressbereich
IPv4-Adresse oder IPv4-Adressbereich im CIDR-Format.
|
IPRuleAction
Enumeration
Aktion, wenn client-IP-Adresse abgeglichen wird.
Wert |
Beschreibung |
Allow
|
Zugriff auf die übereinstimmene Client-IP-Adresse zulassen.
|
KeySource
Enumeration
Typ der Schlüsselquelle.
Wert |
Beschreibung |
Microsoft.Batch
|
Batch erstellt und verwaltet die Verschlüsselungsschlüssel, die zum Schutz der Kontodaten verwendet werden.
|
Microsoft.KeyVault
|
Die Verschlüsselungsschlüssel zum Schutz der Kontodaten werden in einem externen Schlüsseltresor gespeichert. Wenn dies festgelegt ist, muss die Identität des Batchkontos auf SystemAssigned festgelegt werden, und unter "keyVaultProperties" muss auch ein gültiger Schlüsselbezeichner angegeben werden.
|
KeyVaultProperties
Objekt
KeyVault-Konfiguration bei Verwendung einer Verschlüsselungs-KeySource von Microsoft.KeyVault.
KeyVaultReference
Objekt
Identifiziert den Azure Key Vault, der einem Batchkonto zugeordnet ist.
Name |
Typ |
Beschreibung |
id
|
string
(arm-id)
|
Die Ressourcen-ID des Azure Key Vault, der dem Batchkonto zugeordnet ist.
|
url
|
string
|
Die URL des Azure-Schlüsseltresors, der dem Batchkonto zugeordnet ist.
|
NetworkProfile
Objekt
Netzwerkprofil für Batchkonto, das Netzwerkregeleinstellungen für jeden Endpunkt enthält.
Name |
Typ |
Beschreibung |
accountAccess
|
EndpointAccessProfile
|
Netzwerkzugriffsprofil für batchAccount-Endpunkt (Batchkonto-Datenebene-API).
|
nodeManagementAccess
|
EndpointAccessProfile
|
Netzwerkzugriffsprofil für nodeManagement-Endpunkt (Batchdienst, der Computeknoten für Batchpools verwaltet).
|
PoolAllocationMode
Enumeration
Der Zuordnungsmodus zum Erstellen von Pools im Batchkonto.
Wert |
Beschreibung |
BatchService
|
Pools werden in Abonnements zugewiesen, die sich im Besitz des Batchdiensts befinden.
|
UserSubscription
|
Pools werden in einem Abonnement zugewiesen, das dem Benutzer gehört.
|
PrivateEndpoint
Objekt
Der private Endpunkt der privaten Endpunktverbindung.
Name |
Typ |
Beschreibung |
id
|
string
|
Der ARM-Ressourcenbezeichner des privaten Endpunkts. Dies ist das Format "/subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/privateEndpoints/{privateEndpoint}".
|
PrivateEndpointConnection
Objekt
Enthält Informationen zu einer privaten Verknüpfungsressource.
Name |
Typ |
Beschreibung |
etag
|
string
|
Das ETag der Ressource, das für Parallelitätsanweisungen verwendet wird.
|
id
|
string
|
Die ID der Ressource.
|
name
|
string
|
Der Name der Ressource.
|
properties.groupIds
|
string[]
|
Die Gruppen-ID der privaten Endpunktverbindung.
Der Wert weist nur eine Gruppen-ID auf.
|
properties.privateEndpoint
|
PrivateEndpoint
|
Der ARM-Ressourcenbezeichner des privaten Endpunkts.
Der private Endpunkt der privaten Endpunktverbindung.
|
properties.privateLinkServiceConnectionState
|
PrivateLinkServiceConnectionState
|
Der Verbindungsstatus des privaten Verknüpfungsdiensts der privaten Endpunktverbindung.
Der Verbindungsstatus des privaten Verknüpfungsdiensts der privaten Endpunktverbindung
|
properties.provisioningState
|
PrivateEndpointConnectionProvisioningState
|
Der Bereitstellungsstatus der privaten Endpunktverbindung.
|
tags
|
object
|
Die Tags der Ressource.
|
type
|
string
|
Der Typ der Ressource.
|
PrivateEndpointConnectionProvisioningState
Enumeration
Der Bereitstellungsstatus der privaten Endpunktverbindung.
Wert |
Beschreibung |
Cancelled
|
Der Benutzer hat die Verbindungserstellung abgebrochen.
|
Creating
|
Die Verbindung wird erstellt.
|
Deleting
|
Die Verbindung wird gelöscht.
|
Failed
|
Der Benutzer hat angefordert, dass die Verbindung aktualisiert und fehlgeschlagen ist. Sie können den Aktualisierungsvorgang wiederholen.
|
Succeeded
|
Der Verbindungsstatus ist abgeschlossen und kann verwendet werden, wenn der Status genehmigt ist.
|
Updating
|
Der Benutzer hat angefordert, dass der Verbindungsstatus aktualisiert wird, der Aktualisierungsvorgang wurde jedoch noch nicht abgeschlossen. Sie können beim Herstellen einer Verbindung mit dem Batchkonto nicht auf die Verbindung verweisen.
|
PrivateLinkServiceConnectionState
Objekt
Der Verbindungsstatus des privaten Verknüpfungsdiensts der privaten Endpunktverbindung
Name |
Typ |
Beschreibung |
actionsRequired
|
string
|
Aktion erforderlich für den Status der privaten Verbindung
|
description
|
string
|
Beschreibung des privaten Verbindungszustands
|
status
|
PrivateLinkServiceConnectionStatus
|
Der Status für die private Endpunktverbindung des Batchkontos
|
PrivateLinkServiceConnectionStatus
Enumeration
Der Status der Privaten Batch-Endpunktverbindung
Wert |
Beschreibung |
Approved
|
Die private Endpunktverbindung wurde genehmigt und kann für den Zugriff auf das Batchkonto verwendet werden.
|
Disconnected
|
Die private Endpunktverbindung ist getrennt und kann nicht für den Zugriff auf das Batchkonto verwendet werden.
|
Pending
|
Die private Endpunktverbindung steht aus und kann nicht für den Zugriff auf das Batchkonto verwendet werden.
|
Rejected
|
Die private Endpunktverbindung wird abgelehnt und kann nicht für den Zugriff auf das Batchkonto verwendet werden.
|
ProvisioningState
Enumeration
Der bereitgestellte Status der Ressource
Wert |
Beschreibung |
Cancelled
|
Der letzte Vorgang für das Konto wird abgebrochen.
|
Creating
|
Das Konto wird erstellt.
|
Deleting
|
Das Konto wird gelöscht.
|
Failed
|
Der letzte Vorgang für das Konto ist fehlgeschlagen.
|
Invalid
|
Das Konto befindet sich in einem ungültigen Zustand.
|
Succeeded
|
Das Konto wurde erstellt und kann verwendet werden.
|
PublicNetworkAccessType
Enumeration
Der Netzwerkzugriffstyp für die Ressourcen im Batchkonto.
Wert |
Beschreibung |
Disabled
|
Deaktiviert die öffentliche Konnektivität und ermöglicht private Konnektivität mit Azure Batch Service über private Endpunktressource.
|
Enabled
|
Ermöglicht die Verbindung mit Azure Batch über öffentliches DNS.
|
SecuredByPerimeter
|
Sichert die Konnektivität mit Azure Batch über die NSP-Konfiguration.
|
ResourceIdentityType
Enumeration
Der Identitätstyp, der für das Batchkonto verwendet wird.
Wert |
Beschreibung |
None
|
Dem Batchkonto ist keine Identität zugeordnet. Wenn Sie None im Updatekonto festlegen, werden vorhandene Identitäten entfernt.
|
SystemAssigned
|
Einem Batchkonto ist eine Systemidentität zugewiesen.
|
UserAssigned
|
Das Batchkonto hat ihm Benutzeridentitäten zugewiesen.
|
UserAssignedIdentities
Objekt
Die Liste der zugeordneten Benutzeridentitäten.
Name |
Typ |
Beschreibung |
clientId
|
string
|
Die Client-ID der vom Benutzer zugewiesenen Identität.
|
principalId
|
string
|
Die Prinzipal-ID der vom Benutzer zugewiesenen Identität.
|
VirtualMachineFamilyCoreQuota
Objekt
Eine VM-Familie und das zugehörige Kernkontingent für das Batchkonto.
Name |
Typ |
Beschreibung |
coreQuota
|
integer
(int32)
|
Das Kernkontingent für die VM-Familie für das Batchkonto.
|
name
|
string
|
Der Familienname des virtuellen Computers.
|