Skip to main content

batch_account

Creates, updates, deletes, gets or lists a batch_account resource.

Overview

Namebatch_account
TypeResource
Idazure.batch.batch_account

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
etagstringThe ETag of the resource, used for concurrency statements.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectThe tags of the resource.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
valuestringA base64 encoded string that represents the content of a detector.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_detectorselectresource_group_name, account_name, detector_id, subscription_idGets information about the given detector for a given Batch account.
getselectresource_group_name, account_name, subscription_idGets information about the specified Batch account.
list_by_resource_groupselectresource_group_name, subscription_idGets information about the Batch accounts associated with the specified resource group.
listselectsubscription_idGets information about the Batch accounts associated with the subscription.
createinsertresource_group_name, account_name, subscription_id, locationCreates 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.
updateupdateresource_group_name, account_name, subscription_idUpdates the properties of an existing Batch account.
deletedeleteresource_group_name, account_name, subscription_idDeletes the specified Batch account.
list_outbound_network_dependencies_endpointsexecresource_group_name, account_name, subscription_idLists the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch service administration. If you are deploying a Pool inside of a virtual network that you specify, you must make sure your network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see https://learn.microsoft.com/azure/batch/batch-virtual-network _.
list_detectorsexecresource_group_name, account_name, subscription_idGets information about the detectors available for a given Batch account.
get_keysexecresource_group_name, account_name, subscription_idGets the account keys for the specified Batch account. This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey'. If the Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to authenticate, and must use another allowedAuthenticationModes instead. In this case, getting the keys will fail.
synchronize_auto_storage_keysexecresource_group_name, account_name, subscription_idSynchronizes access keys for the auto-storage account configured for the specified Batch account, only if storage key authentication is being used.
regenerate_keyexecresource_group_name, account_name, subscription_id, keyNameRegenerates the specified account key for the Batch account. This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey'. If the Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to authenticate, and must use another allowedAuthenticationModes instead. In this case, regenerating the keys will fail.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_namestringA name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/ _. Required.
detector_idstringThe name of the detector. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Gets information about the given detector for a given Batch account.

SELECT
id,
name,
etag,
systemData,
tags,
type,
value
FROM azure.batch.batch_account
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND detector_id = '{{ detector_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

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.

INSERT INTO azure.batch.batch_account (
location,
tags,
properties,
identity,
resource_group_name,
account_name,
subscription_id
)
SELECT
'{{ location }}' /* required */,
'{{ tags }}',
'{{ properties }}',
'{{ identity }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates the properties of an existing Batch account.

UPDATE azure.batch.batch_account
SET
tags = '{{ tags }}',
properties = '{{ properties }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes the specified Batch account.

DELETE FROM azure.batch.batch_account
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Lists the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch service administration. If you are deploying a Pool inside of a virtual network that you specify, you must make sure your network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see https://learn.microsoft.com/azure/batch/batch-virtual-network _.

EXEC azure.batch.batch_account.list_outbound_network_dependencies_endpoints 
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;