PoolOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

BatchManagementClient's

<xref:pool> attribute.

Inheritance
builtins.object
PoolOperations

Constructor

PoolOperations(*args, **kwargs)

Methods

begin_delete

Deletes the specified pool.

create

Creates a new pool inside the specified account.

disable_auto_scale

Disables automatic scaling for a pool.

get

Gets information about the specified pool.

list_by_batch_account

Lists all of the pools in the specified account.

stop_resize

Stops an ongoing resize operation on the pool.

This 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.

update

Updates the properties of an existing pool.

begin_delete

Deletes the specified pool.

begin_delete(resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any) -> LROPoller[None]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the Batch account. Required.

account_name
Required
str

The name of the Batch account. Required.

pool_name
Required
str

The pool name. This must be unique within the account. Required.

Returns

Type Description

An instance of LROPoller that returns either None or the result of cls(response)

Exceptions

Type Description

create

Creates a new pool inside the specified account.

create(resource_group_name: str, account_name: str, pool_name: str, parameters: _models.Pool, if_match: str | None = None, if_none_match: str | None = None, *, content_type: str = 'application/json', **kwargs: Any) -> _models.Pool

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the Batch account. Required.

account_name
Required
str

The name of the Batch account. Required.

pool_name
Required
str

The pool name. This must be unique within the account. Required.

parameters
Required
Pool or IO[bytes]

Additional parameters for pool creation. Is either a Pool type or a IO[bytes] type. Required.

if_match
Required
str

The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the operation only if the pool already exists. If omitted, this operation will always be applied. Default value is None.

if_none_match
Required
str

Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other values will be ignored. Default value is None.

Returns

Type Description

Pool or the result of cls(response)

Exceptions

Type Description

disable_auto_scale

Disables automatic scaling for a pool.

disable_auto_scale(resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any) -> Pool

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the Batch account. Required.

account_name
Required
str

The name of the Batch account. Required.

pool_name
Required
str

The pool name. This must be unique within the account. Required.

Returns

Type Description

Pool or the result of cls(response)

Exceptions

Type Description

get

Gets information about the specified pool.

get(resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any) -> Pool

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the Batch account. Required.

account_name
Required
str

The name of the Batch account. Required.

pool_name
Required
str

The pool name. This must be unique within the account. Required.

Returns

Type Description

Pool or the result of cls(response)

Exceptions

Type Description

list_by_batch_account

Lists all of the pools in the specified account.

list_by_batch_account(resource_group_name: str, account_name: str, maxresults: int | None = None, select: str | None = None, filter: str | None = None, **kwargs: Any) -> Iterable[Pool]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the Batch account. Required.

account_name
Required
str

The name of the Batch account. Required.

maxresults
Required
int

The maximum number of items to return in the response. Default value is None.

select
Required
str

Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection. Default value is None.

filter
Required
str

OData 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. Default value is None.

Returns

Type Description

An iterator like instance of either Pool or the result of cls(response)

Exceptions

Type Description

stop_resize

Stops an ongoing resize operation on the pool.

This 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.

stop_resize(resource_group_name: str, account_name: str, pool_name: str, **kwargs: Any) -> Pool

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the Batch account. Required.

account_name
Required
str

The name of the Batch account. Required.

pool_name
Required
str

The pool name. This must be unique within the account. Required.

Returns

Type Description

Pool or the result of cls(response)

Exceptions

Type Description

update

Updates the properties of an existing pool.

update(resource_group_name: str, account_name: str, pool_name: str, parameters: _models.Pool, if_match: str | None = None, *, content_type: str = 'application/json', **kwargs: Any) -> _models.Pool

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the Batch account. Required.

account_name
Required
str

The name of the Batch account. Required.

pool_name
Required
str

The pool name. This must be unique within the account. Required.

parameters
Required
Pool or IO[bytes]

Pool properties that should be updated. Properties that are supplied will be updated, any property not supplied will be unchanged. Is either a Pool type or a IO[bytes] type. Required.

if_match
Required
str

The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to apply the operation unconditionally. Default value is None.

Returns

Type Description

Pool or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.batch.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\batch\\models\\__init__.py'>