batch_account
Creates, updates, deletes, gets or lists a batch_account resource.
Overview
| Name | batch_account |
| Type | Resource |
| Id | azure.batch.batch_account |
Fields
The following fields are returned by SELECT queries:
- get_detector
- get
- list_by_resource_group
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
etag | string | The ETag of the resource, used for concurrency statements. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | The tags of the resource. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
value | string | A base64 encoded string that represents the content of a detector. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
accountEndpoint | string | The account endpoint used to interact with the Batch service. |
activeJobAndJobScheduleQuota | integer | The active job and job schedule quota for the Batch account. |
allowedAuthenticationModes | array | List of allowed authentication modes for the Batch account that can be used to authenticate with the data plane. This does not affect authentication with the control plane. |
autoStorage | object | The properties and status of any auto-storage account associated with the Batch account. |
dedicatedCoreQuota | integer | The dedicated core quota for the Batch account. |
dedicatedCoreQuotaPerVMFamily | array | A list of the dedicated core quota per Virtual Machine family for the Batch account. For accounts with PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned. |
dedicatedCoreQuotaPerVMFamilyEnforced | boolean | A value indicating whether core quotas per Virtual Machine family are enforced for this account. |
encryption | object | The encryption configuration for the Batch account. |
identity | object | The identity of the Batch account. |
keyVaultReference | object | A reference to the Azure key vault associated with the Batch account. |
location | string | The geo-location where the resource lives. Required. |
lowPriorityCoreQuota | integer | The Spot/low-priority core quota for the Batch account. |
networkProfile | object | Network profile for Batch account, which contains network rule settings for each endpoint. |
nodeManagementEndpoint | string | The endpoint used by compute node to connect to the Batch node management service. |
poolAllocationMode | string | The allocation mode to use for creating pools in the Batch account. Known values are: "BatchService" and "UserSubscription". (BatchService, UserSubscription) |
poolQuota | integer | The pool quota for the Batch account. |
privateEndpointConnections | array | List of private endpoint connections associated with the Batch account. |
provisioningState | string | The provisioned state of the resource. Known values are: "Invalid", "Creating", "Deleting", "Succeeded", "Failed", and "Cancelled". (Invalid, Creating, Deleting, Succeeded, Failed, Cancelled) |
publicNetworkAccess | string | The network interface type for accessing Azure Batch service and Batch account operations. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". (Enabled, Disabled, SecuredByPerimeter) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
accountEndpoint | string | The account endpoint used to interact with the Batch service. |
activeJobAndJobScheduleQuota | integer | The active job and job schedule quota for the Batch account. |
allowedAuthenticationModes | array | List of allowed authentication modes for the Batch account that can be used to authenticate with the data plane. This does not affect authentication with the control plane. |
autoStorage | object | The properties and status of any auto-storage account associated with the Batch account. |
dedicatedCoreQuota | integer | The dedicated core quota for the Batch account. |
dedicatedCoreQuotaPerVMFamily | array | A list of the dedicated core quota per Virtual Machine family for the Batch account. For accounts with PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned. |
dedicatedCoreQuotaPerVMFamilyEnforced | boolean | A value indicating whether core quotas per Virtual Machine family are enforced for this account. |
encryption | object | The encryption configuration for the Batch account. |
identity | object | The identity of the Batch account. |
keyVaultReference | object | A reference to the Azure key vault associated with the Batch account. |
location | string | The geo-location where the resource lives. Required. |
lowPriorityCoreQuota | integer | The Spot/low-priority core quota for the Batch account. |
networkProfile | object | Network profile for Batch account, which contains network rule settings for each endpoint. |
nodeManagementEndpoint | string | The endpoint used by compute node to connect to the Batch node management service. |
poolAllocationMode | string | The allocation mode to use for creating pools in the Batch account. Known values are: "BatchService" and "UserSubscription". (BatchService, UserSubscription) |
poolQuota | integer | The pool quota for the Batch account. |
privateEndpointConnections | array | List of private endpoint connections associated with the Batch account. |
provisioningState | string | The provisioned state of the resource. Known values are: "Invalid", "Creating", "Deleting", "Succeeded", "Failed", and "Cancelled". (Invalid, Creating, Deleting, Succeeded, Failed, Cancelled) |
publicNetworkAccess | string | The network interface type for accessing Azure Batch service and Batch account operations. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". (Enabled, Disabled, SecuredByPerimeter) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
accountEndpoint | string | The account endpoint used to interact with the Batch service. |
activeJobAndJobScheduleQuota | integer | The active job and job schedule quota for the Batch account. |
allowedAuthenticationModes | array | List of allowed authentication modes for the Batch account that can be used to authenticate with the data plane. This does not affect authentication with the control plane. |
autoStorage | object | The properties and status of any auto-storage account associated with the Batch account. |
dedicatedCoreQuota | integer | The dedicated core quota for the Batch account. |
dedicatedCoreQuotaPerVMFamily | array | A list of the dedicated core quota per Virtual Machine family for the Batch account. For accounts with PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned. |
dedicatedCoreQuotaPerVMFamilyEnforced | boolean | A value indicating whether core quotas per Virtual Machine family are enforced for this account. |
encryption | object | The encryption configuration for the Batch account. |
identity | object | The identity of the Batch account. |
keyVaultReference | object | A reference to the Azure key vault associated with the Batch account. |
location | string | The geo-location where the resource lives. Required. |
lowPriorityCoreQuota | integer | The Spot/low-priority core quota for the Batch account. |
networkProfile | object | Network profile for Batch account, which contains network rule settings for each endpoint. |
nodeManagementEndpoint | string | The endpoint used by compute node to connect to the Batch node management service. |
poolAllocationMode | string | The allocation mode to use for creating pools in the Batch account. Known values are: "BatchService" and "UserSubscription". (BatchService, UserSubscription) |
poolQuota | integer | The pool quota for the Batch account. |
privateEndpointConnections | array | List of private endpoint connections associated with the Batch account. |
provisioningState | string | The provisioned state of the resource. Known values are: "Invalid", "Creating", "Deleting", "Succeeded", "Failed", and "Cancelled". (Invalid, Creating, Deleting, Succeeded, Failed, Cancelled) |
publicNetworkAccess | string | The network interface type for accessing Azure Batch service and Batch account operations. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". (Enabled, Disabled, SecuredByPerimeter) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_detector | select | resource_group_name, account_name, detector_id, subscription_id | Gets information about the given detector for a given Batch account. | |
get | select | resource_group_name, account_name, subscription_id | Gets information about the specified Batch account. | |
list_by_resource_group | select | resource_group_name, subscription_id | Gets information about the Batch accounts associated with the specified resource group. | |
list | select | subscription_id | Gets information about the Batch accounts associated with the subscription. | |
create | insert | resource_group_name, account_name, subscription_id, location | 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. | |
update | update | resource_group_name, account_name, subscription_id | Updates the properties of an existing Batch account. | |
delete | delete | resource_group_name, account_name, subscription_id | Deletes the specified Batch account. | |
list_outbound_network_dependencies_endpoints | exec | resource_group_name, account_name, subscription_id | 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 _. | |
list_detectors | exec | resource_group_name, account_name, subscription_id | Gets information about the detectors available for a given Batch account. | |
get_keys | exec | resource_group_name, account_name, subscription_id | Gets 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_keys | exec | resource_group_name, account_name, subscription_id | Synchronizes access keys for the auto-storage account configured for the specified Batch account, only if storage key authentication is being used. | |
regenerate_key | exec | resource_group_name, account_name, subscription_id, keyName | Regenerates 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.
| Name | Datatype | Description |
|---|---|---|
account_name | string | A 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_id | string | The name of the detector. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get_detector
- get
- list_by_resource_group
- list
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
;
Gets information about the specified Batch account.
SELECT
id,
name,
accountEndpoint,
activeJobAndJobScheduleQuota,
allowedAuthenticationModes,
autoStorage,
dedicatedCoreQuota,
dedicatedCoreQuotaPerVMFamily,
dedicatedCoreQuotaPerVMFamilyEnforced,
encryption,
identity,
keyVaultReference,
location,
lowPriorityCoreQuota,
networkProfile,
nodeManagementEndpoint,
poolAllocationMode,
poolQuota,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
systemData,
tags,
type
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
;
Gets information about the Batch accounts associated with the specified resource group.
SELECT
id,
name,
accountEndpoint,
activeJobAndJobScheduleQuota,
allowedAuthenticationModes,
autoStorage,
dedicatedCoreQuota,
dedicatedCoreQuotaPerVMFamily,
dedicatedCoreQuotaPerVMFamilyEnforced,
encryption,
identity,
keyVaultReference,
location,
lowPriorityCoreQuota,
networkProfile,
nodeManagementEndpoint,
poolAllocationMode,
poolQuota,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
systemData,
tags,
type
FROM azure.batch.batch_account
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets information about the Batch accounts associated with the subscription.
SELECT
id,
name,
accountEndpoint,
activeJobAndJobScheduleQuota,
allowedAuthenticationModes,
autoStorage,
dedicatedCoreQuota,
dedicatedCoreQuotaPerVMFamily,
dedicatedCoreQuotaPerVMFamilyEnforced,
encryption,
identity,
keyVaultReference,
location,
lowPriorityCoreQuota,
networkProfile,
nodeManagementEndpoint,
poolAllocationMode,
poolQuota,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
systemData,
tags,
type
FROM azure.batch.batch_account
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: batch_account
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the batch_account resource.
- name: account_name
value: "{{ account_name }}"
description: Required parameter for the batch_account resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the batch_account resource.
- name: location
value: "{{ location }}"
description: |
The region in which to create the account. Required.
- name: tags
value: "{{ tags }}"
description: |
The user-specified tags associated with the account.
- name: properties
description: |
The properties of the Batch account.
value:
autoStorage:
storageAccountId: "{{ storageAccountId }}"
authenticationMode: "{{ authenticationMode }}"
nodeIdentityReference:
resourceId: "{{ resourceId }}"
poolAllocationMode: "{{ poolAllocationMode }}"
keyVaultReference:
id: "{{ id }}"
url: "{{ url }}"
publicNetworkAccess: "{{ publicNetworkAccess }}"
networkProfile:
accountAccess:
defaultAction: "{{ defaultAction }}"
ipRules:
- action: "{{ action }}"
value: "{{ value }}"
nodeManagementAccess:
defaultAction: "{{ defaultAction }}"
ipRules:
- action: "{{ action }}"
value: "{{ value }}"
encryption:
keySource: "{{ keySource }}"
keyVaultProperties:
keyIdentifier: "{{ keyIdentifier }}"
allowedAuthenticationModes:
- "{{ allowedAuthenticationModes }}"
- name: identity
description: |
The identity of the Batch account.
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
UPDATE examples
- update
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
- delete
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
- list_outbound_network_dependencies_endpoints
- list_detectors
- get_keys
- synchronize_auto_storage_keys
- regenerate_key
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
;
Gets information about the detectors available for a given Batch account.
EXEC azure.batch.batch_account.list_detectors
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Gets 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.
EXEC azure.batch.batch_account.get_keys
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
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.batch_account.synchronize_auto_storage_keys
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Regenerates 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.
EXEC azure.batch.batch_account.regenerate_key
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"keyName": "{{ keyName }}"
}'
;