Skip to main content

accounts

Creates, updates, deletes, gets or lists an accounts resource.

Overview

Nameaccounts
TypeResource
Idazure.batch.accounts

Fields

The following fields are returned by SELECT queries:

The operation was successful. The response contains the Batch account entity.

NameDatatypeDescription
idstringThe ID of the resource.
namestringThe name of the resource.
identityobjectThe identity of the Batch account.
locationstringThe location of the resource.
propertiesobjectThe properties associated with the account.
tagsobjectThe tags of the resource.
typestringThe type of the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, accountName, subscriptionIdGets information about the specified Batch account.
list_by_resource_groupselectresourceGroupName, subscriptionIdGets information about the Batch accounts associated with the specified resource group.
listselectsubscriptionIdGets information about the Batch accounts associated with the subscription.
createinsertresourceGroupName, accountName, subscriptionId, data__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.
updateupdateresourceGroupName, accountName, subscriptionIdUpdates the properties of an existing Batch account.
deletedeleteresourceGroupName, accountName, subscriptionIdDeletes the specified Batch account.
synchronize_auto_storage_keysexecresourceGroupName, accountName, subscriptionIdSynchronizes access keys for the auto-storage account configured for the specified Batch account, only if storage key authentication is being used.
regenerate_keyexecresourceGroupName, accountName, subscriptionId, keyNameThis 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
accountNamestringThe name of the Batch account.
resourceGroupNamestringThe name of the resource group that contains the Batch account.
subscriptionIdstringThe Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)

SELECT examples

Gets information about the specified Batch account.

SELECT
id,
name,
identity,
location,
properties,
tags,
type
FROM azure.batch.accounts
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- 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.accounts (
data__location,
data__tags,
data__properties,
data__identity,
resourceGroupName,
accountName,
subscriptionId
)
SELECT
'{{ location }}' /* required */,
'{{ tags }}',
'{{ properties }}',
'{{ identity }}',
'{{ resourceGroupName }}',
'{{ accountName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
identity,
location,
properties,
tags,
type
;

UPDATE examples

Updates the properties of an existing Batch account.

UPDATE azure.batch.accounts
SET
data__tags = '{{ tags }}',
data__properties = '{{ properties }}',
data__identity = '{{ identity }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
id,
name,
identity,
location,
properties,
tags,
type;

DELETE examples

Deletes the specified Batch account.

DELETE FROM azure.batch.accounts
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

Synchronizes access keys for the auto-storage account configured for the specified Batch account, only if storage key authentication is being used.

EXEC azure.batch.accounts.synchronize_auto_storage_keys 
@resourceGroupName='{{ resourceGroupName }}' --required,
@accountName='{{ accountName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;