Skip to main content

pools

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

Overview

Namepools
TypeResource
Idazure.batch.pools

Fields

The following fields are returned by SELECT queries:

The operation was successful. The response contains the pool entity.

NameDatatypeDescription
idstringThe ID of the resource.
namestringThe name of the resource.
etagstringThe ETag of the resource, used for concurrency statements.
identityobjectThe type of identity used for the Batch Pool. (title: The type of identity used for the Batch Pool.)
propertiesobjectThe properties associated with the pool.
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, poolName, subscriptionIdGets information about the specified pool.
list_by_batch_accountselectresourceGroupName, accountName, subscriptionIdmaxresults, $select, $filterLists all of the pools in the specified account.
createinsertresourceGroupName, accountName, poolName, subscriptionIdIf-Match, If-None-MatchCreates a new pool inside the specified account.
updateupdateresourceGroupName, accountName, poolName, subscriptionIdIf-MatchUpdates the properties of an existing pool.
deletedeleteresourceGroupName, accountName, poolName, subscriptionIdDeletes the specified pool.
disable_auto_scaleexecresourceGroupName, accountName, poolName, subscriptionIdDisables automatic scaling for a pool.
stop_resizeexecresourceGroupName, accountName, poolName, subscriptionIdThis does not restore the pool to its previous state before the resize operation: it only stops any further changes being made, and the pool maintains its current state. After stopping, the pool stabilizes at the number of nodes it was at when the stop operation was done. During the stop operation, the pool allocation state changes first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API can also be used to halt the initial sizing of the pool when it is created.

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.
poolNamestringThe pool name. This must be unique within the 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)
$filterstringOData filter expression. Valid properties for filtering are: name properties/allocationState properties/allocationStateTransitionTime properties/creationTime properties/provisioningState properties/provisioningStateTransitionTime properties/lastModified properties/vmSize properties/interNodeCommunication properties/scaleSettings/autoScale properties/scaleSettings/fixedScale
$selectstringComma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection.
If-MatchstringThe entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally.
If-None-MatchstringSet to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other values will be ignored.
maxresultsinteger (int32)The maximum number of items to return in the response.

SELECT examples

Gets information about the specified pool.

SELECT
id,
name,
etag,
identity,
properties,
tags,
type
FROM azure.batch.pools
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND poolName = '{{ poolName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates a new pool inside the specified account.

INSERT INTO azure.batch.pools (
data__properties,
data__identity,
data__tags,
resourceGroupName,
accountName,
poolName,
subscriptionId,
If-Match,
If-None-Match
)
SELECT
'{{ properties }}',
'{{ identity }}',
'{{ tags }}',
'{{ resourceGroupName }}',
'{{ accountName }}',
'{{ poolName }}',
'{{ subscriptionId }}',
'{{ If-Match }}',
'{{ If-None-Match }}'
RETURNING
id,
name,
etag,
identity,
properties,
tags,
type
;

UPDATE examples

Updates the properties of an existing pool.

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

DELETE examples

Deletes the specified pool.

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

Lifecycle Methods

Disables automatic scaling for a pool.

EXEC azure.batch.pools.disable_auto_scale 
@resourceGroupName='{{ resourceGroupName }}' --required,
@accountName='{{ accountName }}' --required,
@poolName='{{ poolName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;