azure.mgmt.batch.models module

class azure.mgmt.batch.models.ActivateApplicationPackageParameters(*, format: str, **kwargs)[source]

Bases: msrest.serialization.Model

Parameters for an activating an application package.

All required parameters must be populated in order to send to Azure.

Parameters

format (str) – Required. The format of the application package binary file.

class azure.mgmt.batch.models.Application(*, display_name: str = None, allow_updates: bool = None, default_version: str = None, **kwargs)[source]

Bases: azure.mgmt.batch.models._models_py3.ProxyResource

Contains information about an application in a Batch account.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – The ID of the resource.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource.

  • etag (str) – The ETag of the resource, used for concurrency statements.

Parameters
  • display_name (str) – The display name for the application.

  • allow_updates (bool) – A value indicating whether packages within the application may be overwritten using the same version string.

  • default_version (str) – The package to use if a client requests the application but does not specify a version. This property can only be set to the name of an existing package.

class azure.mgmt.batch.models.ApplicationPackage(**kwargs)[source]

Bases: azure.mgmt.batch.models._models_py3.ProxyResource

An application package which represents a particular version of an application.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – The ID of the resource.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource.

  • etag (str) – The ETag of the resource, used for concurrency statements.

  • state (str or PackageState) – The current state of the application package. Possible values include: ‘Pending’, ‘Active’

  • format (str) – The format of the application package, if the package is active.

  • storage_url (str) – The URL for the application package in Azure Storage.

  • storage_url_expiry (datetime) – The UTC time at which the Azure Storage URL will expire.

  • last_activation_time (datetime) – The time at which the package was last activated, if the package is active.

class azure.mgmt.batch.models.ApplicationPackageReference(*, id: str, version: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

Link to an application package inside the batch account.

All required parameters must be populated in order to send to Azure.

Parameters
  • id (str) – Required. The ID of the application package to install. This must be inside the same batch account as the pool. This can either be a reference to a specific version or the default version if one exists.

  • version (str) – The version of the application to deploy. If omitted, the default version is deployed. If this is omitted, and no default version is specified for this application, the request fails with the error code InvalidApplicationPackageReferences. If you are calling the REST API directly, the HTTP status code is 409.

class azure.mgmt.batch.models.AutoScaleRun(*, evaluation_time, results: str = None, error=None, **kwargs)[source]

Bases: msrest.serialization.Model

The results and errors from an execution of a pool autoscale formula.

All required parameters must be populated in order to send to Azure.

Parameters
  • evaluation_time (datetime) – Required. The time at which the autoscale formula was last evaluated.

  • results (str) – The final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form $variable=value, and variables are separated by semicolons.

  • error (AutoScaleRunError) – Details of the error encountered evaluating the autoscale formula on the pool, if the evaluation was unsuccessful.

class azure.mgmt.batch.models.AutoScaleRunError(*, code: str, message: str, details=None, **kwargs)[source]

Bases: msrest.serialization.Model

An error that occurred when autoscaling a pool.

All required parameters must be populated in order to send to Azure.

Parameters
  • code (str) – Required. An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

  • message (str) – Required. A message describing the error, intended to be suitable for display in a user interface.

  • details (list[AutoScaleRunError]) – Additional details about the error.

class azure.mgmt.batch.models.AutoScaleSettings(*, formula: str, evaluation_interval=None, **kwargs)[source]

Bases: msrest.serialization.Model

AutoScale settings for the pool.

All required parameters must be populated in order to send to Azure.

Parameters
  • formula (str) – Required. A formula for the desired number of compute nodes in the pool.

  • evaluation_interval (timedelta) – The time interval at which to automatically adjust the pool size according to the autoscale formula. If omitted, the default value is 15 minutes (PT15M).

class azure.mgmt.batch.models.AutoStorageBaseProperties(*, storage_account_id: str, **kwargs)[source]

Bases: msrest.serialization.Model

The properties related to the auto-storage account.

All required parameters must be populated in order to send to Azure.

Parameters

storage_account_id (str) – Required. The resource ID of the storage account to be used for auto-storage account.

class azure.mgmt.batch.models.AutoStorageProperties(*, storage_account_id: str, last_key_sync, **kwargs)[source]

Bases: azure.mgmt.batch.models._models_py3.AutoStorageBaseProperties

Contains information about the auto-storage account associated with a Batch account.

All required parameters must be populated in order to send to Azure.

Parameters
  • storage_account_id (str) – Required. The resource ID of the storage account to be used for auto-storage account.

  • last_key_sync (datetime) – Required. The UTC time at which storage keys were last synchronized with the Batch account.

class azure.mgmt.batch.models.AutoUserSpecification(*, scope=None, elevation_level=None, **kwargs)[source]

Bases: msrest.serialization.Model

Specifies the parameters for the auto user that runs a task on the Batch service.

Parameters
  • scope (str or AutoUserScope) – The scope for the auto user. The default value is Pool. If the pool is running Windows a value of Task should be specified if stricter isolation between tasks is required. For example, if the task mutates the registry in a way which could impact other tasks, or if certificates have been specified on the pool which should not be accessible by normal tasks but should be accessible by start tasks. Possible values include: ‘Task’, ‘Pool’

  • elevation_level (str or ElevationLevel) – The elevation level of the auto user. The default value is nonAdmin. Possible values include: ‘NonAdmin’, ‘Admin’

class azure.mgmt.batch.models.AzureBlobFileSystemConfiguration(*, account_name: str, container_name: str, relative_mount_path: str, account_key: str = None, sas_key: str = None, blobfuse_options: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

Information used to connect to an Azure Storage Container using Blobfuse.

All required parameters must be populated in order to send to Azure.

Parameters
  • account_name (str) – Required. The Azure Storage Account name.

  • container_name (str) – Required. The Azure Blob Storage Container name.

  • account_key (str) – The Azure Storage Account key. This property is mutually exclusive with sasKey and one must be specified.

  • sas_key (str) – The Azure Storage SAS token. This property is mutually exclusive with accountKey and one must be specified.

  • blobfuse_options (str) – Additional command line options to pass to the mount command. These are ‘net use’ options in Windows and ‘mount’ options in Linux.

  • relative_mount_path (str) – Required. The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable.

class azure.mgmt.batch.models.AzureFileShareConfiguration(*, account_name: str, azure_file_url: str, account_key: str, relative_mount_path: str, mount_options: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

Information used to connect to an Azure Fileshare.

All required parameters must be populated in order to send to Azure.

Parameters
  • account_name (str) – Required. The Azure Storage account name.

  • azure_file_url (str) – Required. The Azure Files URL. This is of the form ‘https://{account}.file.core.windows.net/’.

  • account_key (str) – Required. The Azure Storage account key.

  • relative_mount_path (str) – Required. The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable.

  • mount_options (str) – Additional command line options to pass to the mount command. These are ‘net use’ options in Windows and ‘mount’ options in Linux.

class azure.mgmt.batch.models.BatchAccount(**kwargs)[source]

Bases: azure.mgmt.batch.models._models_py3.Resource

Contains information about an Azure Batch account.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – The ID of the resource.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource.

  • location (str) – The location of the resource.

  • tags (dict[str, str]) – The tags of the resource.

  • account_endpoint (str) – The account endpoint used to interact with the Batch service.

  • provisioning_state (str or ProvisioningState) – The provisioned state of the resource. Possible values include: ‘Invalid’, ‘Creating’, ‘Deleting’, ‘Succeeded’, ‘Failed’, ‘Cancelled’

  • pool_allocation_mode (str or PoolAllocationMode) – The allocation mode to use for creating pools in the Batch account. Possible values include: ‘BatchService’, ‘UserSubscription’

  • key_vault_reference (KeyVaultReference) – A reference to the Azure key vault associated with the Batch account.

  • auto_storage (AutoStorageProperties) – The properties and status of any auto-storage account associated with the Batch account.

  • dedicated_core_quota (int) – The dedicated core quota for the Batch account. For accounts with PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned.

  • low_priority_core_quota (int) – The low-priority core quota for the Batch account. For accounts with PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned.

  • dedicated_core_quota_per_vm_family (list[VirtualMachineFamilyCoreQuota]) – 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.

  • dedicated_core_quota_per_vm_family_enforced (bool) – A value indicating whether the core quota for the Batch Account is enforced per Virtual Machine family or not. Batch is transitioning its core quota system for dedicated cores to be enforced per Virtual Machine family. During this transitional phase, the dedicated core quota per Virtual Machine family may not yet be enforced. If this flag is false, dedicated core quota is enforced via the old dedicatedCoreQuota property on the account and does not consider Virtual Machine family. If this flag is true, dedicated core quota is enforced via the dedicatedCoreQuotaPerVMFamily property on the account, and the old dedicatedCoreQuota does not apply.

  • pool_quota (int) – The pool quota for the Batch account.

  • active_job_and_job_schedule_quota (int) – The active job and job schedule quota for the Batch account.

class azure.mgmt.batch.models.BatchAccountCreateParameters(*, location: str, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None, **kwargs)[source]

Bases: msrest.serialization.Model

Parameters supplied to the Create operation.

All required parameters must be populated in order to send to Azure.

Parameters
  • location (str) – Required. The region in which to create the account.

  • tags (dict[str, str]) – The user-specified tags associated with the account.

  • auto_storage (AutoStorageBaseProperties) – The properties related to the auto-storage account.

  • pool_allocation_mode (str or PoolAllocationMode) – The allocation mode to use for creating pools in the Batch account. The pool allocation mode also affects how clients may authenticate to the Batch Service API. If the mode is BatchService, clients may authenticate using access keys or Azure Active Directory. If the mode is UserSubscription, clients must use Azure Active Directory. The default is BatchService. Possible values include: ‘BatchService’, ‘UserSubscription’

  • key_vault_reference (KeyVaultReference) – A reference to the Azure key vault associated with the Batch account.

class azure.mgmt.batch.models.BatchAccountKeys(**kwargs)[source]

Bases: msrest.serialization.Model

A set of Azure Batch account keys.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • account_name (str) – The Batch account name.

  • primary (str) – The primary key associated with the account.

  • secondary (str) – The secondary key associated with the account.

class azure.mgmt.batch.models.BatchAccountRegenerateKeyParameters(*, key_name, **kwargs)[source]

Bases: msrest.serialization.Model

Parameters supplied to the RegenerateKey operation.

All required parameters must be populated in order to send to Azure.

Parameters

key_name (str or AccountKeyType) – Required. The type of account key to regenerate. Possible values include: ‘Primary’, ‘Secondary’

class azure.mgmt.batch.models.BatchAccountUpdateParameters(*, tags=None, auto_storage=None, **kwargs)[source]

Bases: msrest.serialization.Model

Parameters for updating an Azure Batch account.

Parameters
  • tags (dict[str, str]) – The user-specified tags associated with the account.

  • auto_storage (AutoStorageBaseProperties) – The properties related to the auto-storage account.

class azure.mgmt.batch.models.BatchLocationQuota(**kwargs)[source]

Bases: msrest.serialization.Model

Quotas associated with a Batch region for a particular subscription.

Variables are only populated by the server, and will be ignored when sending a request.

Variables

account_quota (int) – The number of Batch accounts that may be created under the subscription in the specified region.

class azure.mgmt.batch.models.Certificate(*, thumbprint_algorithm: str = None, thumbprint: str = None, format=None, **kwargs)[source]

Bases: azure.mgmt.batch.models._models_py3.ProxyResource

Contains information about a certificate.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – The ID of the resource.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource.

  • etag (str) – The ETag of the resource, used for concurrency statements.

  • provisioning_state (str or CertificateProvisioningState) – The provisioned state of the resource. Possible values include: ‘Succeeded’, ‘Deleting’, ‘Failed’

  • provisioning_state_transition_time (datetime) – The time at which the certificate entered its current state.

  • previous_provisioning_state (str or CertificateProvisioningState) – The previous provisioned state of the resource. Possible values include: ‘Succeeded’, ‘Deleting’, ‘Failed’

  • previous_provisioning_state_transition_time (datetime) – The time at which the certificate entered its previous state.

  • public_data (str) – The public key of the certificate.

  • delete_certificate_error (DeleteCertificateError) – The error which occurred while deleting the certificate. This is only returned when the certificate provisioningState is ‘Failed’.

Parameters
  • thumbprint_algorithm (str) – The algorithm of the certificate thumbprint. This must match the first portion of the certificate name. Currently required to be ‘SHA1’.

  • thumbprint (str) – The thumbprint of the certificate. This must match the thumbprint from the name.

  • format (str or CertificateFormat) – The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: ‘Pfx’, ‘Cer’

class azure.mgmt.batch.models.CertificateBaseProperties(*, thumbprint_algorithm: str = None, thumbprint: str = None, format=None, **kwargs)[source]

Bases: msrest.serialization.Model

CertificateBaseProperties.

Parameters
  • thumbprint_algorithm (str) – The algorithm of the certificate thumbprint. This must match the first portion of the certificate name. Currently required to be ‘SHA1’.

  • thumbprint (str) – The thumbprint of the certificate. This must match the thumbprint from the name.

  • format (str or CertificateFormat) – The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: ‘Pfx’, ‘Cer’

class azure.mgmt.batch.models.CertificateCreateOrUpdateParameters(*, data: str, thumbprint_algorithm: str = None, thumbprint: str = None, format=None, password: str = None, **kwargs)[source]

Bases: azure.mgmt.batch.models._models_py3.ProxyResource

Contains information about a certificate.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables
  • id (str) – The ID of the resource.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource.

  • etag (str) – The ETag of the resource, used for concurrency statements.

Parameters
  • thumbprint_algorithm (str) – The algorithm of the certificate thumbprint. This must match the first portion of the certificate name. Currently required to be ‘SHA1’.

  • thumbprint (str) – The thumbprint of the certificate. This must match the thumbprint from the name.

  • format (str or CertificateFormat) – The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. Possible values include: ‘Pfx’, ‘Cer’

  • data (str) – Required. The base64-encoded contents of the certificate. The maximum size is 10KB.

  • password (str) – The password to access the certificate’s private key. This is required if the certificate format is pfx and must be omitted if the certificate format is cer.

class azure.mgmt.batch.models.CertificateReference(*, id: str, store_location=None, store_name: str = None, visibility=None, **kwargs)[source]

Bases: msrest.serialization.Model

A reference to a certificate to be installed on compute nodes in a pool. This must exist inside the same account as the pool.

All required parameters must be populated in order to send to Azure.

Parameters
  • id (str) – Required. The fully qualified ID of the certificate to install on the pool. This must be inside the same batch account as the pool.

  • store_location (str or CertificateStoreLocation) – The location of the certificate store on the compute node into which to install the certificate. The default value is currentUser. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of ‘remoteUser’, a ‘certs’ directory is created in the user’s home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. Possible values include: ‘CurrentUser’, ‘LocalMachine’

  • store_name (str) – The name of the certificate store on the compute node into which to install the certificate. This property is applicable only for pools configured with Windows nodes (that is, created with cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows image reference). Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but any custom store name can also be used. The default value is My.

  • visibility (list[str or CertificateVisibility]) – Which user accounts on the compute node should have access to the private data of the certificate.

class azure.mgmt.batch.models.CheckNameAvailabilityParameters(*, name: str, **kwargs)[source]

Bases: msrest.serialization.Model

Parameters for a check name availability request.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Parameters

name (str) – Required. The name to check for availability

Variables

type (str) – Required. The resource type. Must be set to Microsoft.Batch/batchAccounts. Default value: “Microsoft.Batch/batchAccounts” .

type = 'Microsoft.Batch/batchAccounts'
class azure.mgmt.batch.models.CheckNameAvailabilityResult(**kwargs)[source]

Bases: msrest.serialization.Model

The CheckNameAvailability operation response.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • name_available (bool) – Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or invalid and cannot be used.

  • reason (str or NameAvailabilityReason) – Gets the reason that a Batch account name could not be used. The Reason element is only returned if NameAvailable is false. Possible values include: ‘Invalid’, ‘AlreadyExists’

  • message (str) – Gets an error message explaining the Reason value in more detail.

class azure.mgmt.batch.models.CIFSMountConfiguration(*, username: str, source: str, relative_mount_path: str, password: str, mount_options: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

Information used to connect to a CIFS file system.

All required parameters must be populated in order to send to Azure.

Parameters
  • username (str) – Required. The user to use for authentication against the CIFS file system.

  • source (str) – Required. The URI of the file system to mount.

  • relative_mount_path (str) – Required. The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable.

  • mount_options (str) – Additional command line options to pass to the mount command. These are ‘net use’ options in Windows and ‘mount’ options in Linux.

  • password (str) – Required. The password to use for authentication against the CIFS file system.

class azure.mgmt.batch.models.CloudServiceConfiguration(*, os_family: str, os_version: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

The configuration for nodes in a pool based on the Azure Cloud Services platform.

All required parameters must be populated in order to send to Azure.

Parameters
  • os_family (str) – Required. The Azure Guest OS family to be installed on the virtual machines in the pool. Possible values are: 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. 3 - OS Family 3, equivalent to Windows Server 2012. 4 - OS Family 4, equivalent to Windows Server 2012 R2. 5 - OS Family 5, equivalent to Windows Server 2016. 6 - OS Family 6, equivalent to Windows Server 2019. For more information, see Azure Guest OS Releases (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases).

  • os_version (str) – The Azure Guest OS version to be installed on the virtual machines in the pool. The default value is * which specifies the latest operating system version for the specified OS family.

class azure.mgmt.batch.models.ContainerConfiguration(*, container_image_names=None, container_registries=None, **kwargs)[source]

Bases: msrest.serialization.Model

The configuration for container-enabled pools.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables

type (str) – Required. The container technology to be used. Default value: “DockerCompatible” .

Parameters
  • container_image_names (list[str]) – The collection of container image names. This is the full image reference, as would be specified to “docker pull”. An image will be sourced from the default Docker registry unless the image is fully qualified with an alternative registry.

  • container_registries (list[ContainerRegistry]) – Additional private registries from which containers can be pulled. If any images must be downloaded from a private registry which requires credentials, then those credentials must be provided here.

type = 'DockerCompatible'
class azure.mgmt.batch.models.ContainerRegistry(*, user_name: str, password: str, registry_server: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

A private container registry.

All required parameters must be populated in order to send to Azure.

Parameters
  • registry_server (str) – The registry URL. If omitted, the default is “docker.io”.

  • user_name (str) – Required. The user name to log into the registry server.

  • password (str) – Required. The password to log into the registry server.

class azure.mgmt.batch.models.DataDisk(*, lun: int, disk_size_gb: int, caching=None, storage_account_type=None, **kwargs)[source]

Bases: msrest.serialization.Model

Settings which will be used by the data disks associated to Compute Nodes in the Pool. When using attached data disks, you need to mount and format the disks from within a VM to use them.

All required parameters must be populated in order to send to Azure.

Parameters
  • lun (int) – Required. The logical unit number. The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun.

  • caching (str or CachingType) – The type of caching to be enabled for the data disks. Values are: none - The caching mode for the disk is not enabled. readOnly - The caching mode for the disk is read only. readWrite - The caching mode for the disk is read and write. The default value for caching is none. For information about the caching options see: https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. Possible values include: ‘None’, ‘ReadOnly’, ‘ReadWrite’

  • disk_size_gb (int) – Required. The initial disk size in GB when creating new data disk.

  • storage_account_type (str or StorageAccountType) – The storage account type to be used for the data disk. If omitted, the default is “Standard_LRS”. Values are: Standard_LRS - The data disk should use standard locally redundant storage. Premium_LRS - The data disk should use premium locally redundant storage. Possible values include: ‘Standard_LRS’, ‘Premium_LRS’

class azure.mgmt.batch.models.DeleteCertificateError(*, code: str, message: str, target: str = None, details=None, **kwargs)[source]

Bases: msrest.serialization.Model

An error response from the Batch service.

All required parameters must be populated in order to send to Azure.

Parameters
  • code (str) – Required. An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

  • message (str) – Required. A message describing the error, intended to be suitable for display in a user interface.

  • target (str) – The target of the particular error. For example, the name of the property in error.

  • details (list[DeleteCertificateError]) – A list of additional details about the error.

class azure.mgmt.batch.models.DeploymentConfiguration(*, cloud_service_configuration=None, virtual_machine_configuration=None, **kwargs)[source]

Bases: msrest.serialization.Model

Deployment configuration properties.

Parameters
  • cloud_service_configuration (CloudServiceConfiguration) – The cloud service configuration for the pool. This property and virtualMachineConfiguration are mutually exclusive and one of the properties must be specified. This property cannot be specified if the Batch account was created with its poolAllocationMode property set to ‘UserSubscription’.

  • virtual_machine_configuration (VirtualMachineConfiguration) – The virtual machine configuration for the pool. This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified.

class azure.mgmt.batch.models.EnvironmentSetting(*, name: str, value: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

An environment variable to be set on a task process.

All required parameters must be populated in order to send to Azure.

Parameters
  • name (str) – Required. The name of the environment variable.

  • value (str) – The value of the environment variable.

class azure.mgmt.batch.models.FixedScaleSettings(*, resize_timeout=None, target_dedicated_nodes: int = None, target_low_priority_nodes: int = None, node_deallocation_option=None, **kwargs)[source]

Bases: msrest.serialization.Model

Fixed scale settings for the pool.

Parameters
  • resize_timeout (timedelta) – The timeout for allocation of compute nodes to the pool. The default value is 15 minutes. Timeout values use ISO 8601 format. For example, use PT10M for 10 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the request with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

  • target_dedicated_nodes (int) – The desired number of dedicated compute nodes in the pool. At least one of targetDedicatedNodes, targetLowPriority nodes must be set.

  • target_low_priority_nodes (int) – The desired number of low-priority compute nodes in the pool. At least one of targetDedicatedNodes, targetLowPriority nodes must be set.

  • node_deallocation_option (str or ComputeNodeDeallocationOption) – Determines what to do with a node and its running task(s) if the pool size is decreasing. If omitted, the default value is Requeue. Possible values include: ‘Requeue’, ‘Terminate’, ‘TaskCompletion’, ‘RetainedData’

class azure.mgmt.batch.models.ImageReference(*, publisher: str = None, offer: str = None, sku: str = None, version: str = None, id: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

A reference to an Azure Virtual Machines Marketplace image or the Azure Image resource of a custom Virtual Machine. To get the list of all imageReferences verified by Azure Batch, see the ‘List supported node agent SKUs’ operation.

Parameters
  • publisher (str) – The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.

  • offer (str) – The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.

  • sku (str) – The SKU of the Azure Virtual Machines Marketplace image. For example, 18.04-LTS or 2019-Datacenter.

  • version (str) – The version of the Azure Virtual Machines Marketplace image. A value of ‘latest’ can be specified to select the latest version of an image. If omitted, the default is ‘latest’.

  • id (str) – The ARM resource identifier of the Virtual Machine Image or Shared Image Gallery Image. Compute Nodes of the Pool will be created using this Image Id. This is of either the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName} for Virtual Machine Image or /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionId} for SIG image. This property is mutually exclusive with other properties. For Virtual Machine Image it must be in the same region and subscription as the Azure Batch account. For SIG image it must have replicas in the same region as the Azure Batch account. For information about the firewall settings for the Batch node agent to communicate with the Batch service see https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration.

class azure.mgmt.batch.models.InboundNatPool(*, name: str, protocol, backend_port: int, frontend_port_range_start: int, frontend_port_range_end: int, network_security_group_rules=None, **kwargs)[source]

Bases: msrest.serialization.Model

A inbound NAT pool that can be used to address specific ports on compute nodes in a Batch pool externally.

All required parameters must be populated in order to send to Azure.

Parameters
  • name (str) – Required. The name of the endpoint. The name must be unique within a Batch pool, can contain letters, numbers, underscores, periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 characters. If any invalid values are provided the request fails with HTTP status code 400.

  • protocol (str or InboundEndpointProtocol) – Required. The protocol of the endpoint. Possible values include: ‘TCP’, ‘UDP’

  • backend_port (int) – Required. The port number on the compute node. This must be unique within a Batch pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400.

  • frontend_port_range_start (int) – Required. The first port number in the range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400.

  • frontend_port_range_end (int) – Required. The last port number in the range of external ports that will be used to provide inbound access to the backendPort on individual compute nodes. Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request fails with HTTP status code 400.

  • network_security_group_rules (list[NetworkSecurityGroupRule]) – A list of network security group rules that will be applied to the endpoint. The maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network security group rules are specified, a default rule will be created to allow inbound access to the specified backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status code 400.

class azure.mgmt.batch.models.KeyVaultReference(*, id: str, url: str, **kwargs)[source]

Bases: msrest.serialization.Model

Identifies the Azure key vault associated with a Batch account.

All required parameters must be populated in order to send to Azure.

Parameters
  • id (str) – Required. The resource ID of the Azure key vault associated with the Batch account.

  • url (str) – Required. The URL of the Azure key vault associated with the Batch account.

class azure.mgmt.batch.models.LinuxUserConfiguration(*, uid: int = None, gid: int = None, ssh_private_key: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

Properties used to create a user account on a Linux node.

Parameters
  • uid (int) – The user ID of the user account. The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the uid.

  • gid (int) – The group ID for the user account. The uid and gid properties must be specified together or not at all. If not specified the underlying operating system picks the gid.

  • ssh_private_key (str) – The SSH private key for the user account. The private key must not be password protected. The private key is used to automatically configure asymmetric-key based authentication for SSH between nodes in a Linux pool when the pool’s enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the user’s .ssh directory. If not specified, password-less SSH is not configured between nodes (no modification of the user’s .ssh directory is done).

class azure.mgmt.batch.models.MetadataItem(*, name: str, value: str, **kwargs)[source]

Bases: msrest.serialization.Model

A name-value pair associated with a Batch service resource.

The Batch service does not assign any meaning to this metadata; it is solely for the use of user code.

All required parameters must be populated in order to send to Azure.

Parameters
  • name (str) – Required. The name of the metadata item.

  • value (str) – Required. The value of the metadata item.

class azure.mgmt.batch.models.MountConfiguration(*, azure_blob_file_system_configuration=None, nfs_mount_configuration=None, cifs_mount_configuration=None, azure_file_share_configuration=None, **kwargs)[source]

Bases: msrest.serialization.Model

The file system to mount on each node.

Parameters
  • azure_blob_file_system_configuration (AzureBlobFileSystemConfiguration) – The Azure Storage Container to mount using blob FUSE on each node. This property is mutually exclusive with all other properties.

  • nfs_mount_configuration (NFSMountConfiguration) – The NFS file system to mount on each node. This property is mutually exclusive with all other properties.

  • cifs_mount_configuration (CIFSMountConfiguration) – The CIFS/SMB file system to mount on each node. This property is mutually exclusive with all other properties.

  • azure_file_share_configuration (AzureFileShareConfiguration) – The Azure File Share to mount on each node. This property is mutually exclusive with all other properties.

class azure.mgmt.batch.models.NetworkConfiguration(*, subnet_id: str = None, endpoint_configuration=None, public_ips=None, **kwargs)[source]

Bases: msrest.serialization.Model

The network configuration for a pool.

Parameters
  • subnet_id (str) – The ARM resource identifier of the virtual network subnet which the compute nodes of the pool will join. This is of the form /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. The virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet should have enough free IP addresses to accommodate the number of nodes in the pool. If the subnet doesn’t have enough free IP addresses, the pool will partially allocate compute nodes, and a resize error will occur. The ‘MicrosoftAzureBatch’ service principal must have the ‘Classic Virtual Machine Contributor’ Role-Based Access Control (RBAC) role for the specified VNet. The specified subnet must allow communication from the Azure Batch service to be able to schedule tasks on the compute nodes. This can be verified by checking if the specified VNet has any associated Network Security Groups (NSG). If communication to the compute nodes in the specified subnet is denied by an NSG, then the Batch service will set the state of the compute nodes to unusable. For pools created via virtualMachineConfiguration the Batch account must have poolAllocationMode userSubscription in order to use a VNet. If the specified VNet has any associated Network Security Groups (NSG), then a few reserved system ports must be enabled for inbound communication. For pools created with a virtual machine configuration, enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. For pools created with a cloud service configuration, enable ports 10100, 20100, and 30100. Also enable outbound connections to Azure Storage on port 443. For more details see: https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration

  • endpoint_configuration (PoolEndpointConfiguration) – The configuration for endpoints on compute nodes in the Batch pool. Pool endpoint configuration is only supported on pools with the virtualMachineConfiguration property.

  • public_ips (list[str]) – The list of public IPs which the Batch service will use when provisioning Compute Nodes. The number of IPs specified here limits the maximum size of the Pool - 50 dedicated nodes or 20 low-priority nodes can be allocated for each public IP. For example, a pool needing 150 dedicated VMs would need at least 3 public IPs specified. Each element of this collection is of the form: /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}.

class azure.mgmt.batch.models.NetworkSecurityGroupRule(*, priority: int, access, source_address_prefix: str, source_port_ranges=None, **kwargs)[source]

Bases: msrest.serialization.Model

A network security group rule to apply to an inbound endpoint.

All required parameters must be populated in order to send to Azure.

Parameters
  • priority (int) – Required. The priority for this rule. Priorities within a pool must be unique and are evaluated in order of priority. The lower the number the higher the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 3500. If any reserved or duplicate values are provided the request fails with HTTP status code 400.

  • access (str or NetworkSecurityGroupRuleAccess) – Required. The action that should be taken for a specified IP address, subnet range or tag. Possible values include: ‘Allow’, ‘Deny’

  • source_address_prefix (str) – Required. The source address prefix or tag to match for the rule. Valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. 192.168.1.0/24), default tag, or * (for all addresses). If any other values are provided the request fails with HTTP status code 400.

  • source_port_ranges (list[str]) – The source port ranges to match for the rule. Valid values are ‘*’ (for all ports 0 - 65535) or arrays of ports or port ranges (i.e. 100-200). The ports should in the range of 0 to 65535 and the port ranges or ports can’t overlap. If any other values are provided the request fails with HTTP status code 400. Default value will be *.

class azure.mgmt.batch.models.NFSMountConfiguration(*, source: str, relative_mount_path: str, mount_options: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

Information used to connect to an NFS file system.

All required parameters must be populated in order to send to Azure.

Parameters
  • source (str) – Required. The URI of the file system to mount.

  • relative_mount_path (str) – Required. The relative path on the compute node where the file system will be mounted. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable.

  • mount_options (str) – Additional command line options to pass to the mount command. These are ‘net use’ options in Windows and ‘mount’ options in Linux.

class azure.mgmt.batch.models.Operation(*, name: str = None, display=None, origin: str = None, properties=None, **kwargs)[source]

Bases: msrest.serialization.Model

A REST API operation.

Parameters
  • name (str) – The operation name. This is of the format {provider}/{resource}/{operation}

  • display (OperationDisplay) – The object that describes the operation.

  • origin (str) – The intended executor of the operation.

  • properties (object) – Properties of the operation.

class azure.mgmt.batch.models.OperationDisplay(*, provider: str = None, operation: str = None, resource: str = None, description: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

The object that describes the operation.

Parameters
  • provider (str) – Friendly name of the resource provider.

  • operation (str) – The operation type. For example: read, write, delete, or listKeys/action

  • resource (str) – The resource type on which the operation is performed.

  • description (str) – The friendly name of the operation.

class azure.mgmt.batch.models.Pool(*, display_name: str = None, vm_size: str = None, deployment_configuration=None, scale_settings=None, inter_node_communication=None, network_configuration=None, max_tasks_per_node: int = None, task_scheduling_policy=None, user_accounts=None, metadata=None, start_task=None, certificates=None, application_packages=None, application_licenses=None, mount_configuration=None, **kwargs)[source]

Bases: azure.mgmt.batch.models._models_py3.ProxyResource

Contains information about a pool.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – The ID of the resource.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource.

  • etag (str) – The ETag of the resource, used for concurrency statements.

  • last_modified (datetime) – The last modified time of the pool. This is the last time at which the pool level data, such as the targetDedicatedNodes or autoScaleSettings, changed. It does not factor in node-level changes such as a compute node changing state.

  • creation_time (datetime) – The creation time of the pool.

  • provisioning_state (str or PoolProvisioningState) – The current state of the pool. Possible values include: ‘Succeeded’, ‘Deleting’

  • provisioning_state_transition_time (datetime) – The time at which the pool entered its current state.

  • allocation_state (str or AllocationState) – Whether the pool is resizing. Possible values include: ‘Steady’, ‘Resizing’, ‘Stopping’

  • allocation_state_transition_time (datetime) – The time at which the pool entered its current allocation state.

  • current_dedicated_nodes (int) – The number of compute nodes currently in the pool.

  • current_low_priority_nodes (int) – The number of low priority compute nodes currently in the pool.

  • auto_scale_run (AutoScaleRun) – The results and errors from the last execution of the autoscale formula. This property is set only if the pool automatically scales, i.e. autoScaleSettings are used.

  • resize_operation_status (ResizeOperationStatus) – Contains details about the current or last completed resize operation.

Parameters
  • display_name (str) – The display name for the pool. The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024.

  • vm_size (str) – The size of virtual machines in the pool. All VMs in a pool are the same size. For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (http://azure.microsoft.com/documentation/articles/cloud-services-sizes-specs/). Batch supports all Cloud Services VM sizes except ExtraSmall. For information about available VM sizes for pools using images from the Virtual Machines Marketplace (pools created with virtualMachineConfiguration) see Sizes for Virtual Machines (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).

  • deployment_configuration (DeploymentConfiguration) – This property describes how the pool nodes will be deployed - using Cloud Services or Virtual Machines. Using CloudServiceConfiguration specifies that the nodes should be creating using Azure Cloud Services (PaaS), while VirtualMachineConfiguration uses Azure Virtual Machines (IaaS).

  • scale_settings (ScaleSettings) – Settings which configure the number of nodes in the pool.

  • inter_node_communication (str or InterNodeCommunicationState) – Whether the pool permits direct communication between nodes. This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to ‘Disabled’. Possible values include: ‘Enabled’, ‘Disabled’

  • network_configuration (NetworkConfiguration) – The network configuration for the pool.

  • max_tasks_per_node (int) – The maximum number of tasks that can run concurrently on a single compute node in the pool. The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256.

  • task_scheduling_policy (TaskSchedulingPolicy) – How tasks are distributed across compute nodes in a pool. If not specified, the default is spread.

  • user_accounts (list[UserAccount]) – The list of user accounts to be created on each node in the pool.

  • metadata (list[MetadataItem]) – A list of name-value pairs associated with the pool as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code.

  • start_task (StartTask) – A task specified to run on each compute node as it joins the pool. In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the pool.

  • certificates (list[CertificateReference]) – The list of certificates to be installed on each compute node in the pool. For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with visibility of ‘remoteUser’, a ‘certs’ directory is created in the user’s home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory.

  • application_packages (list[ApplicationPackageReference]) – The list of application packages to be installed on each compute node in the pool. Changes to application package references affect all new compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 application package references on any given pool.

  • application_licenses (list[str]) – The list of application licenses the Batch service will make available on each compute node in the pool. The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, pool creation will fail.

  • mount_configuration (list[MountConfiguration]) – A list of file systems to mount on each node in the pool. This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.

class azure.mgmt.batch.models.PoolEndpointConfiguration(*, inbound_nat_pools, **kwargs)[source]

Bases: msrest.serialization.Model

The endpoint configuration for a pool.

All required parameters must be populated in order to send to Azure.

Parameters

inbound_nat_pools (list[InboundNatPool]) – Required. A list of inbound NAT pools that can be used to address specific ports on an individual compute node externally. The maximum number of inbound NAT pools per Batch pool is 5. If the maximum number of inbound NAT pools is exceeded the request fails with HTTP status code 400.

class azure.mgmt.batch.models.ProxyResource(**kwargs)[source]

Bases: msrest.serialization.Model

A definition of an Azure resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – The ID of the resource.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource.

  • etag (str) – The ETag of the resource, used for concurrency statements.

class azure.mgmt.batch.models.ResizeError(*, code: str, message: str, details=None, **kwargs)[source]

Bases: msrest.serialization.Model

An error that occurred when resizing a pool.

All required parameters must be populated in order to send to Azure.

Parameters
  • code (str) – Required. An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

  • message (str) – Required. A message describing the error, intended to be suitable for display in a user interface.

  • details (list[ResizeError]) – Additional details about the error.

class azure.mgmt.batch.models.ResizeOperationStatus(*, target_dedicated_nodes: int = None, target_low_priority_nodes: int = None, resize_timeout=None, node_deallocation_option=None, start_time=None, errors=None, **kwargs)[source]

Bases: msrest.serialization.Model

Details about the current or last completed resize operation.

Describes either the current operation (if the pool AllocationState is Resizing) or the previously completed operation (if the AllocationState is Steady).

Parameters
  • target_dedicated_nodes (int) – The desired number of dedicated compute nodes in the pool.

  • target_low_priority_nodes (int) – The desired number of low-priority compute nodes in the pool.

  • resize_timeout (timedelta) – The timeout for allocation of compute nodes to the pool or removal of compute nodes from the pool. The default value is 15 minutes. The minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service returns an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request).

  • node_deallocation_option (str or ComputeNodeDeallocationOption) – Determines what to do with a node and its running task(s) if the pool size is decreasing. The default value is requeue. Possible values include: ‘Requeue’, ‘Terminate’, ‘TaskCompletion’, ‘RetainedData’

  • start_time (datetime) – The time when this resize operation was started.

  • errors (list[ResizeError]) – Details of any errors encountered while performing the last resize on the pool. This property is set only if an error occurred during the last pool resize, and only when the pool allocationState is Steady.

class azure.mgmt.batch.models.Resource(**kwargs)[source]

Bases: msrest.serialization.Model

A definition of an Azure resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – The ID of the resource.

  • name (str) – The name of the resource.

  • type (str) – The type of the resource.

  • location (str) – The location of the resource.

  • tags (dict[str, str]) – The tags of the resource.

class azure.mgmt.batch.models.ResourceFile(*, auto_storage_container_name: str = None, storage_container_url: str = None, http_url: str = None, blob_prefix: str = None, file_path: str = None, file_mode: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

A single file or multiple files to be downloaded to a compute node.

Parameters
  • auto_storage_container_name (str) – The storage container name in the auto storage account. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified.

  • storage_container_url (str) – The URL of the blob container within Azure Blob Storage. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. This URL must be readable and listable using anonymous access; that is, the Batch service does not present any credentials when downloading the blob. There are two ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read and list permissions on the blob, or set the ACL for the blob or its container to allow public access.

  • http_url (str) – The URL of the file to download. The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified. If the URL is Azure Blob Storage, it must be readable using anonymous access; that is, the Batch service does not present any credentials when downloading the blob. There are two ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read permissions on the blob, or set the ACL for the blob or its container to allow public access.

  • blob_prefix (str) – The blob prefix to use when downloading blobs from an Azure Storage container. Only the blobs whose names begin with the specified prefix will be downloaded. The property is valid only when autoStorageContainerName or storageContainerUrl is used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be downloaded.

  • file_path (str) – The location on the compute node to which to download the file, relative to the task’s working directory. If the httpUrl property is specified, the filePath is required and describes the path which the file will be downloaded to, including the filename. Otherwise, if the autoStorageContainerName or storageContainerUrl property is specified, filePath is optional and is the directory to download the files to. In the case where filePath is used as a directory, any directory structure already associated with the input data will be retained in full and appended to the specified filePath directory. The specified relative path cannot break out of the task’s working directory (for example by using ‘..’).

  • file_mode (str) – The file permission mode attribute in octal format. This property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is specified for a resourceFile which will be downloaded to a Windows node. If this property is not specified for a Linux node, then a default value of 0770 is applied to the file.

class azure.mgmt.batch.models.ScaleSettings(*, fixed_scale=None, auto_scale=None, **kwargs)[source]

Bases: msrest.serialization.Model

Scale settings for the pool.

Defines the desired size of the pool. This can either be ‘fixedScale’ where the requested targetDedicatedNodes is specified, or ‘autoScale’ which defines a formula which is periodically reevaluated. If this property is not specified, the pool will have a fixed scale with 0 targetDedicatedNodes.

Parameters
  • fixed_scale (FixedScaleSettings) – Fixed scale settings for the pool. This property and autoScale are mutually exclusive and one of the properties must be specified.

  • auto_scale (AutoScaleSettings) – AutoScale settings for the pool. This property and fixedScale are mutually exclusive and one of the properties must be specified.

class azure.mgmt.batch.models.StartTask(*, command_line: str = None, resource_files=None, environment_settings=None, user_identity=None, max_task_retry_count: int = None, wait_for_success: bool = None, container_settings=None, **kwargs)[source]

Bases: msrest.serialization.Model

A task which is run when a compute node joins a pool in the Azure Batch service, or when the compute node is rebooted or reimaged.

In some cases the start task may be re-run even though the node was not rebooted. Due to this, start tasks should be idempotent and exit gracefully if the setup they’re performing has already been done. Special care should be taken to avoid start tasks which create breakaway process or install/launch services from the start task working directory, as this will block Batch from being able to re-run the start task.

Parameters
  • command_line (str) – The command line of the start task. The command line does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using “cmd /c MyCommand” in Windows or “/bin/sh -c MyCommand” in Linux. Required if any other properties of the startTask are specified.

  • resource_files (list[ResourceFile]) – A list of files that the Batch service will download to the compute node before running the command line.

  • environment_settings (list[EnvironmentSetting]) – A list of environment variable settings for the start task.

  • user_identity (UserIdentity) – The user identity under which the start task runs. If omitted, the task runs as a non-administrative user unique to the task.

  • max_task_retry_count (int) – The maximum number of times the task may be retried. The Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the task. If the maximum retry count is -1, the Batch service retries the task without limit.

  • wait_for_success (bool) – Whether the Batch service should wait for the start task to complete successfully (that is, to exit with exit code 0) before scheduling any tasks on the compute node. If true and the start task fails on a compute node, the Batch service retries the start task up to its maximum retry count (maxTaskRetryCount). If the task has still not completed successfully after all retries, then the Batch service marks the compute node unusable, and will not schedule tasks to it. This condition can be detected via the node state and scheduling error detail. If false, the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will continue to be scheduled on the node. The default is true.

  • container_settings (TaskContainerSettings) – The settings for the container under which the start task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.

class azure.mgmt.batch.models.TaskContainerSettings(*, image_name: str, container_run_options: str = None, registry=None, working_directory=None, **kwargs)[source]

Bases: msrest.serialization.Model

The container settings for a task.

All required parameters must be populated in order to send to Azure.

Parameters
  • container_run_options (str) – Additional options to the container create command. These additional options are supplied as arguments to the “docker create” command, in addition to those controlled by the Batch Service.

  • image_name (str) – Required. The image to use to create the container in which the task will run. This is the full image reference, as would be specified to “docker pull”. If no tag is provided as part of the image name, the tag “:latest” is used as a default.

  • registry (ContainerRegistry) – The private registry which contains the container image. This setting can be omitted if was already provided at pool creation.

  • working_directory (str or ContainerWorkingDirectory) – A flag to indicate where the container task working directory is. The default is ‘taskWorkingDirectory’. Possible values include: ‘TaskWorkingDirectory’, ‘ContainerImageDefault’

class azure.mgmt.batch.models.TaskSchedulingPolicy(*, node_fill_type, **kwargs)[source]

Bases: msrest.serialization.Model

Specifies how tasks should be distributed across compute nodes.

All required parameters must be populated in order to send to Azure.

Parameters

node_fill_type (str or ComputeNodeFillType) – Required. How tasks should be distributed across compute nodes. Possible values include: ‘Spread’, ‘Pack’

class azure.mgmt.batch.models.UserAccount(*, name: str, password: str, elevation_level=None, linux_user_configuration=None, windows_user_configuration=None, **kwargs)[source]

Bases: msrest.serialization.Model

Properties used to create a user on an Azure Batch node.

All required parameters must be populated in order to send to Azure.

Parameters
  • name (str) – Required. The name of the user account.

  • password (str) – Required. The password for the user account.

  • elevation_level (str or ElevationLevel) – The elevation level of the user account. nonAdmin - The auto user is a standard user without elevated access. admin - The auto user is a user with elevated access and operates with full Administrator permissions. The default value is nonAdmin. Possible values include: ‘NonAdmin’, ‘Admin’

  • linux_user_configuration (LinuxUserConfiguration) – The Linux-specific user configuration for the user account. This property is ignored if specified on a Windows pool. If not specified, the user is created with the default options.

  • windows_user_configuration (WindowsUserConfiguration) – The Windows-specific user configuration for the user account. This property can only be specified if the user is on a Windows pool. If not specified and on a Windows pool, the user is created with the default options.

class azure.mgmt.batch.models.UserIdentity(*, user_name: str = None, auto_user=None, **kwargs)[source]

Bases: msrest.serialization.Model

The definition of the user identity under which the task is run.

Specify either the userName or autoUser property, but not both.

Parameters
  • user_name (str) – The name of the user identity under which the task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both.

  • auto_user (AutoUserSpecification) – The auto user under which the task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both.

class azure.mgmt.batch.models.VirtualMachineConfiguration(*, image_reference, node_agent_sku_id: str, windows_configuration=None, data_disks=None, license_type: str = None, container_configuration=None, **kwargs)[source]

Bases: msrest.serialization.Model

The configuration for compute nodes in a pool based on the Azure Virtual Machines infrastructure.

All required parameters must be populated in order to send to Azure.

Parameters
  • image_reference (ImageReference) – Required. A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use.

  • node_agent_sku_id (str) – Required. The SKU of the Batch node agent to be provisioned on compute nodes in the pool. The Batch node agent is a program that runs on each node in the pool, and provides the command-and-control interface between the node and the Batch service. There are different implementations of the node agent, known as SKUs, for different operating systems. You must specify a node agent SKU which matches the selected image reference. To get the list of supported node agent SKUs along with their list of verified image references, see the ‘List supported node agent SKUs’ operation.

  • windows_configuration (WindowsConfiguration) – Windows operating system settings on the virtual machine. This property must not be specified if the imageReference specifies a Linux OS image.

  • data_disks (list[DataDisk]) – The configuration for data disks attached to the compute nodes in the pool. This property must be specified if the compute nodes in the pool need to have empty data disks attached to them.

  • license_type (str) – The type of on-premises license to be used when deploying the operating system. This only applies to images that contain the Windows operating system, and should only be used when you hold valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is applied. Values are: Windows_Server - The on-premises license is for Windows Server. Windows_Client - The on-premises license is for Windows Client.

  • container_configuration (ContainerConfiguration) – The container configuration for the pool. If specified, setup is performed on each node in the pool to allow tasks to run in containers. All regular tasks and job manager tasks run on this pool must specify the containerSettings property, and all other tasks may specify it.

class azure.mgmt.batch.models.VirtualMachineFamilyCoreQuota(**kwargs)[source]

Bases: msrest.serialization.Model

A VM Family and its associated core quota for the Batch account.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • name (str) – The Virtual Machine family name.

  • core_quota (int) – The core quota for the VM family for the Batch account.

class azure.mgmt.batch.models.WindowsConfiguration(*, enable_automatic_updates: bool = None, **kwargs)[source]

Bases: msrest.serialization.Model

Windows operating system settings to apply to the virtual machine.

Parameters

enable_automatic_updates (bool) – Whether automatic updates are enabled on the virtual machine. If omitted, the default value is true.

class azure.mgmt.batch.models.WindowsUserConfiguration(*, login_mode=None, **kwargs)[source]

Bases: msrest.serialization.Model

Properties used to create a user account on a Windows node.

Parameters

login_mode (str or LoginMode) – Login mode for user. Specifies login mode for the user. The default value for VirtualMachineConfiguration pools is interactive mode and for CloudServiceConfiguration pools is batch mode. Possible values include: ‘Batch’, ‘Interactive’

class azure.mgmt.batch.models.BatchAccountPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of BatchAccount object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.batch.models.ApplicationPackagePaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of ApplicationPackage object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.batch.models.ApplicationPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of Application object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.batch.models.OperationPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of Operation object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.batch.models.CertificatePaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of Certificate object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.batch.models.PoolPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of Pool object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.batch.models.PoolAllocationMode[source]

Bases: str, enum.Enum

An enumeration.

batch_service = 'BatchService'

Pools will be allocated in subscriptions owned by the Batch service.

user_subscription = 'UserSubscription'

Pools will be allocated in a subscription owned by the user.

class azure.mgmt.batch.models.ProvisioningState[source]

Bases: str, enum.Enum

An enumeration.

cancelled = 'Cancelled'

The last operation for the account is cancelled.

creating = 'Creating'

The account is being created.

deleting = 'Deleting'

The account is being deleted.

failed = 'Failed'

The last operation for the account is failed.

invalid = 'Invalid'

The account is in an invalid state.

succeeded = 'Succeeded'

The account has been created and is ready for use.

class azure.mgmt.batch.models.AccountKeyType[source]

Bases: str, enum.Enum

An enumeration.

primary = 'Primary'

The primary account key.

secondary = 'Secondary'

The secondary account key.

class azure.mgmt.batch.models.PackageState[source]

Bases: str, enum.Enum

An enumeration.

active = 'Active'

The application package is ready for use.

pending = 'Pending'

The application package has been created but has not yet been activated.

class azure.mgmt.batch.models.CertificateFormat[source]

Bases: str, enum.Enum

An enumeration.

cer = 'Cer'

The certificate is a base64-encoded X.509 certificate.

pfx = 'Pfx'

The certificate is a PFX (PKCS#12) formatted certificate or certificate chain.

class azure.mgmt.batch.models.CertificateProvisioningState[source]

Bases: str, enum.Enum

An enumeration.

deleting = 'Deleting'

The user has requested that the certificate be deleted, but the delete operation has not yet completed. You may not reference the certificate when creating or updating pools.

failed = 'Failed'

The user requested that the certificate be deleted, but there are pools that still have references to the certificate, or it is still installed on one or more compute nodes. (The latter can occur if the certificate has been removed from the pool, but the node has not yet restarted. Nodes refresh their certificates only when they restart.) You may use the cancel certificate delete operation to cancel the delete, or the delete certificate operation to retry the delete.

succeeded = 'Succeeded'

The certificate is available for use in pools.

class azure.mgmt.batch.models.PoolProvisioningState[source]

Bases: str, enum.Enum

An enumeration.

deleting = 'Deleting'

The user has requested that the pool be deleted, but the delete operation has not yet completed.

succeeded = 'Succeeded'

The pool is available to run tasks subject to the availability of compute nodes.

class azure.mgmt.batch.models.AllocationState[source]

Bases: str, enum.Enum

An enumeration.

resizing = 'Resizing'

The pool is resizing; that is, compute nodes are being added to or removed from the pool.

steady = 'Steady'

The pool is not resizing. There are no changes to the number of nodes in the pool in progress. A pool enters this state when it is created and when no operations are being performed on the pool to change the number of nodes.

stopping = 'Stopping'

The pool was resizing, but the user has requested that the resize be stopped, but the stop request has not yet been completed.

class azure.mgmt.batch.models.CachingType[source]

Bases: str, enum.Enum

An enumeration.

none = 'None'

The caching mode for the disk is not enabled.

read_only = 'ReadOnly'

The caching mode for the disk is read only.

read_write = 'ReadWrite'

The caching mode for the disk is read and write.

class azure.mgmt.batch.models.StorageAccountType[source]

Bases: str, enum.Enum

An enumeration.

premium_lrs = 'Premium_LRS'

The data disk should use premium locally redundant storage.

standard_lrs = 'Standard_LRS'

The data disk should use standard locally redundant storage.

class azure.mgmt.batch.models.ComputeNodeDeallocationOption[source]

Bases: str, enum.Enum

An enumeration.

requeue = 'Requeue'

Terminate running task processes and requeue the tasks. The tasks will run again when a node is available. Remove nodes as soon as tasks have been terminated.

retained_data = 'RetainedData'

Allow currently running tasks to complete, then wait for all task data retention periods to expire. Schedule no new tasks while waiting. Remove nodes when all task retention periods have expired.

task_completion = 'TaskCompletion'

Allow currently running tasks to complete. Schedule no new tasks while waiting. Remove nodes when all tasks have completed.

terminate = 'Terminate'

Terminate running tasks. The tasks will be completed with failureInfo indicating that they were terminated, and will not run again. Remove nodes as soon as tasks have been terminated.

class azure.mgmt.batch.models.InterNodeCommunicationState[source]

Bases: str, enum.Enum

An enumeration.

disabled = 'Disabled'

Disable network communication between virtual machines.

enabled = 'Enabled'

Enable network communication between virtual machines.

class azure.mgmt.batch.models.InboundEndpointProtocol[source]

Bases: str, enum.Enum

An enumeration.

tcp = 'TCP'

Use TCP for the endpoint.

udp = 'UDP'

Use UDP for the endpoint.

class azure.mgmt.batch.models.NetworkSecurityGroupRuleAccess[source]

Bases: str, enum.Enum

An enumeration.

allow = 'Allow'

Allow access.

deny = 'Deny'

Deny access.

class azure.mgmt.batch.models.ComputeNodeFillType[source]

Bases: str, enum.Enum

An enumeration.

pack = 'Pack'

As many tasks as possible (maxTasksPerNode) should be assigned to each node in the pool before any tasks are assigned to the next node in the pool.

spread = 'Spread'

Tasks should be assigned evenly across all nodes in the pool.

class azure.mgmt.batch.models.ElevationLevel[source]

Bases: str, enum.Enum

An enumeration.

admin = 'Admin'

The user is a user with elevated access and operates with full Administrator permissions.

non_admin = 'NonAdmin'

The user is a standard user without elevated access.

class azure.mgmt.batch.models.LoginMode[source]

Bases: str, enum.Enum

An enumeration.

batch = 'Batch'

The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended for long running parallel processes.

interactive = 'Interactive'

The LOGON32_LOGON_INTERACTIVE Win32 login mode. Some applications require having permissions associated with the interactive login mode. If this is the case for an application used in your task, then this option is recommended.

class azure.mgmt.batch.models.AutoUserScope[source]

Bases: str, enum.Enum

An enumeration.

pool = 'Pool'

Specifies that the task runs as the common auto user account which is created on every node in a pool.

task = 'Task'

Specifies that the service should create a new user for the task.

class azure.mgmt.batch.models.ContainerWorkingDirectory[source]

Bases: str, enum.Enum

An enumeration.

container_image_default = 'ContainerImageDefault'

Using container image defined working directory. Beware that this directory will not contain the resource files downloaded by Batch.

task_working_directory = 'TaskWorkingDirectory'

Use the standard Batch service task working directory, which will contain the Task resource files populated by Batch.

class azure.mgmt.batch.models.CertificateStoreLocation[source]

Bases: str, enum.Enum

An enumeration.

current_user = 'CurrentUser'

Certificates should be installed to the CurrentUser certificate store.

local_machine = 'LocalMachine'

Certificates should be installed to the LocalMachine certificate store.

class azure.mgmt.batch.models.CertificateVisibility[source]

Bases: str, enum.Enum

An enumeration.

remote_user = 'RemoteUser'

The certificate should be visible to the user accounts under which users remotely access the node.

start_task = 'StartTask'

The certificate should be visible to the user account under which the start task is run. Note that if AutoUser Scope is Pool for both the StartTask and a Task, this certificate will be visible to the Task as well.

task = 'Task'

The certificate should be visible to the user accounts under which job tasks are run.

class azure.mgmt.batch.models.NameAvailabilityReason[source]

Bases: str, enum.Enum

An enumeration.

already_exists = 'AlreadyExists'

The requested name is already in use.

invalid = 'Invalid'

The requested name is invalid.