azure.mgmt.batch.operations module

class azure.mgmt.batch.operations.BatchAccountOperations(client, config, serializer, deserializer)[source]

Bases: object

BatchAccountOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
create(resource_group_name, account_name, parameters, custom_headers=None, raw=False, **operation_config)[source]

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.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the new Batch account.
  • account_name (str) – 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/.
  • parameters (BatchAccountCreateParameters) – Additional parameters for account creation.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns BatchAccount

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

delete(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes the specified Batch account.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the Batch account to be deleted.
  • account_name (str) – The name of the account to be deleted.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
Return type:

AzureOperationPoller instance that returns None

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]

Gets information about the specified Batch account.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the Batch account.
  • account_name (str) – The name of the account.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

BatchAccount

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get_keys(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]

Gets the account keys for the specified Batch account.

This operation applies only to Batch accounts created with a poolAllocationMode of ‘BatchService’. If the Batch account was created with a poolAllocationMode of ‘UserSubscription’, clients cannot use access to keys to authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the Batch account.
  • account_name (str) – The name of the account.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

BatchAccountKeys

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

list(custom_headers=None, raw=False, **operation_config)[source]

Gets information about the Batch accounts associated with the subscription.

Parameters:
Return type:

BatchAccountPaged

Raises:

CloudError

list_by_resource_group(resource_group_name, custom_headers=None, raw=False, **operation_config)[source]

Gets information about the Batch accounts associated within the specified resource group.

Parameters:
  • resource_group_name (str) – The name of the resource group whose Batch accounts to list.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

BatchAccountPaged

Raises:

CloudError

regenerate_key(resource_group_name, account_name, key_name, custom_headers=None, raw=False, **operation_config)[source]

Regenerates the specified account key for the Batch account.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the Batch account.
  • account_name (str) – The name of the account.
  • key_name (str or AccountKeyType) – The type of account key to regenerate. Possible values include: ‘Primary’, ‘Secondary’
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

BatchAccountKeys

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

synchronize_auto_storage_keys(resource_group_name, account_name, custom_headers=None, raw=False, **operation_config)[source]

Synchronizes access keys for the auto storage account configured for the specified Batch account.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the Batch account.
  • account_name (str) – The name of the Batch account.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

update(resource_group_name, account_name, tags=None, auto_storage=None, custom_headers=None, raw=False, **operation_config)[source]

Updates the properties of an existing Batch account.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the Batch account.
  • account_name (str) – The name of the account.
  • tags (dict) – The user specified tags associated with the account.
  • auto_storage (AutoStorageBaseProperties) – The properties related to auto storage account.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

BatchAccount

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

class azure.mgmt.batch.operations.ApplicationPackageOperations(client, config, serializer, deserializer)[source]

Bases: object

ApplicationPackageOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
activate(resource_group_name, account_name, application_id, version, format, custom_headers=None, raw=False, **operation_config)[source]

Activates the specified application package.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the Batch account.
  • account_name (str) – The name of the Batch account.
  • application_id (str) – The ID of the application.
  • version (str) – The version of the application to activate.
  • format (str) – The format of the application package binary file.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

create(resource_group_name, account_name, application_id, version, custom_headers=None, raw=False, **operation_config)[source]

Creates an application package record.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the Batch account.
  • account_name (str) – The name of the Batch account.
  • application_id (str) – The ID of the application.
  • version (str) – The version of the application.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

ApplicationPackage

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

delete(resource_group_name, account_name, application_id, version, custom_headers=None, raw=False, **operation_config)[source]

Deletes an application package record and its associated binary file.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the Batch account.
  • account_name (str) – The name of the Batch account.
  • application_id (str) – The ID of the application.
  • version (str) – The version of the application to delete.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get(resource_group_name, account_name, application_id, version, custom_headers=None, raw=False, **operation_config)[source]

Gets information about the specified application package.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the Batch account.
  • account_name (str) – The name of the Batch account.
  • application_id (str) – The ID of the application.
  • version (str) – The version of the application.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

ApplicationPackage

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

class azure.mgmt.batch.operations.ApplicationOperations(client, config, serializer, deserializer)[source]

Bases: object

ApplicationOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
create(resource_group_name, account_name, application_id, allow_updates=None, display_name=None, custom_headers=None, raw=False, **operation_config)[source]

Adds an application to the specified Batch account.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the Batch account.
  • account_name (str) – The name of the Batch account.
  • application_id (str) – The ID of the application.
  • allow_updates (bool) – A value indicating whether packages within the application may be overwritten using the same version string.
  • display_name (str) – The display name for the application.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

Application

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

delete(resource_group_name, account_name, application_id, custom_headers=None, raw=False, **operation_config)[source]

Deletes an application.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the Batch account.
  • account_name (str) – The name of the Batch account.
  • application_id (str) – The ID of the application.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get(resource_group_name, account_name, application_id, custom_headers=None, raw=False, **operation_config)[source]

Gets information about the specified application.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the Batch account.
  • account_name (str) – The name of the Batch account.
  • application_id (str) – The ID of the application.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

Application

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

list(resource_group_name, account_name, maxresults=None, custom_headers=None, raw=False, **operation_config)[source]

Lists all of the applications in the specified account.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the Batch account.
  • account_name (str) – The name of the Batch account.
  • maxresults (int) – The maximum number of items to return in the response.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

ApplicationPaged

Raises:

CloudError

update(resource_group_name, account_name, application_id, parameters, custom_headers=None, raw=False, **operation_config)[source]

Updates settings for the specified application.

Parameters:
  • resource_group_name (str) – The name of the resource group that contains the Batch account.
  • account_name (str) – The name of the Batch account.
  • application_id (str) – The ID of the application.
  • parameters (UpdateApplicationParameters) – The parameters for the request.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

class azure.mgmt.batch.operations.LocationOperations(client, config, serializer, deserializer)[source]

Bases: object

LocationOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
get_quotas(location_name, custom_headers=None, raw=False, **operation_config)[source]

Gets the Batch service quotas for the specified subscription at the given location.

Parameters:
  • location_name (str) – The desired region for the quotas.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

BatchLocationQuota

Return type:

ClientRawResponse if raw=true

Raises:

CloudError