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.

  • version (str) – 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.

  • results (str) – 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]) –

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.

  • evaluation_interval (timedelta) – 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 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.

  • container_name (str) – Required.

  • account_key (str) – This property is mutually exclusive with sasKey and one must be specified.

  • sas_key (str) – This property is mutually exclusive with accountKey and one must be specified.

  • blobfuse_options (str) – These are ‘net use’ options in Windows and ‘mount’ options in Linux.

  • relative_mount_path (str) – Required. 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.

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

  • account_key (str) – Required.

  • relative_mount_path (str) – Required. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable.

  • mount_options (str) – These are ‘net use’ options in Windows and ‘mount’ options in Linux.

class azure.mgmt.batch.models.BatchAccount(*, identity=None, **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.

  • public_network_access (str or PublicNetworkAccessType) – The network interface type for accessing Azure Batch service and Batch account operations. If not specified, the default value is ‘enabled’. Possible values include: ‘Enabled’, ‘Disabled’. Default value: “Enabled” .

  • private_endpoint_connections (list[PrivateEndpointConnection]) – List of private endpoint connections associated with the Batch account

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

  • encryption (EncryptionProperties) – The encryption configuration for the Batch account. Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used instead.

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

Parameters

identity (BatchAccountIdentity) – The identity of the Batch account.

class azure.mgmt.batch.models.BatchAccountCreateParameters(*, location: str, tags=None, auto_storage=None, pool_allocation_mode=None, key_vault_reference=None, public_network_access='Enabled', encryption=None, identity=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.

  • public_network_access (str or PublicNetworkAccessType) – The network access type for accessing Azure Batch account. If not specified, the default value is ‘enabled’. Possible values include: ‘Enabled’, ‘Disabled’. Default value: “Enabled” .

  • encryption (EncryptionProperties) – The encryption configuration for the Batch account. Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used instead.

  • identity (BatchAccountIdentity) – The identity of the Batch account.

class azure.mgmt.batch.models.BatchAccountIdentity(*, type, **kwargs)[source]

Bases: msrest.serialization.Model

The identity of the Batch account, if configured. This is only used when the user specifies ‘Microsoft.KeyVault’ as their Batch account encryption configuration.

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
  • principal_id (str) – The principal id of the Batch account. This property will only be provided for a system assigned identity.

  • tenant_id (str) – The tenant id associated with the Batch account. This property will only be provided for a system assigned identity.

Parameters

type (str or ResourceIdentityType) – Required. The type of identity used for the Batch account. Possible values include: ‘SystemAssigned’, ‘None’

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, encryption=None, identity=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.

  • encryption (EncryptionProperties) – The encryption configuration for the Batch account. Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used instead.

  • identity (BatchAccountIdentity) – The identity of the Batch 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) – Possible values include: ‘Succeeded’, ‘Deleting’, ‘Failed’

  • provisioning_state_transition_time (datetime) –

  • 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) –

  • 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) – This must match the first portion of the certificate name. Currently required to be ‘SHA1’.

  • thumbprint (str) – 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) – This must match the first portion of the certificate name. Currently required to be ‘SHA1’.

  • thumbprint (str) – 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) – This must match the first portion of the certificate name. Currently required to be ‘SHA1’.

  • thumbprint (str) – 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 maximum size is 10KB.

  • password (str) – This must not be specified 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.

  • store_location (str or CertificateStoreLocation) – 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) – 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]) –

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

  • source (str) – Required.

  • relative_mount_path (str) – Required. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable.

  • mount_options (str) – These are ‘net use’ options in Windows and ‘mount’ options in Linux.

  • password (str) – Required.

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. 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 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. Default value: “DockerCompatible” .

Parameters
  • container_image_names (list[str]) – 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]) – 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(*, username: 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) – If omitted, the default is “docker.io”.

  • username (str) – Required.

  • password (str) – Required.

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.DiskEncryptionConfiguration(*, targets=None, **kwargs)[source]

Bases: msrest.serialization.Model

The disk encryption configuration applied on compute nodes in the pool. Disk encryption configuration is not supported on Linux pool created with Virtual Machine Image or Shared Image Gallery Image.

Parameters

targets (list[str or DiskEncryptionTarget]) – On Linux pool, only “TemporaryDisk” is supported; on Windows pool, “OsDisk” and “TemporaryDisk” must be specified.

class azure.mgmt.batch.models.EncryptionProperties(*, key_source=None, key_vault_properties=None, **kwargs)[source]

Bases: msrest.serialization.Model

Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used instead.

Parameters
  • key_source (str or KeySource) – Type of the key source. Possible values include: ‘Microsoft.Batch’, ‘Microsoft.KeyVault’

  • key_vault_properties (KeyVaultProperties) – Additional details when using Microsoft.KeyVault

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.

  • value (str) –

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 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, targetLowPriorityNodes must be set.

  • target_low_priority_nodes (int) – The desired number of low-priority compute nodes in the pool. At least one of targetDedicatedNodes, targetLowPriorityNodes 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) – For example, Canonical or MicrosoftWindowsServer.

  • offer (str) – For example, UbuntuServer or WindowsServer.

  • sku (str) – For example, 18.04-LTS or 2019-Datacenter.

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

  • id (str) – This property is mutually exclusive with other properties. The Shared Image Gallery image 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 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. 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]) – 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.KeyVaultProperties(*, key_identifier: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

KeyVault configuration when using an encryption KeySource of Microsoft.KeyVault.

Parameters

key_identifier (str) – Full path to the versioned secret. Example https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. To be usable the following prerequisites must be met: The Batch Account has a System Assigned identity The account identity has been granted Key/Get, Key/Unwrap and Key/Wrap permissions The KeyVault has soft-delete and purge protection enabled

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

  • value (str) – Required.

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_ip_address_configuration=None, **kwargs)[source]

Bases: msrest.serialization.Model

The network configuration for a pool.

Parameters
  • subnet_id (str) – 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. 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 cloudServiceConfiguration pools, only ‘classic’ VNETs are supported. 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_ip_address_configuration (PublicIPAddressConfiguration) – The Public IPAddress configuration for Compute Nodes in the Batch Pool. This property is only supported on Pools with the virtualMachineConfiguration property.

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 4096. If any reserved or duplicate values are provided the request fails with HTTP status code 400.

  • access (str or NetworkSecurityGroupRuleAccess) – Required. Possible values include: ‘Allow’, ‘Deny’

  • source_address_prefix (str) – Required. 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]) – 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.

  • relative_mount_path (str) – Required. All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable.

  • mount_options (str) – 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) – This is of the format {provider}/{resource}/{operation}

  • display (OperationDisplay) –

  • origin (str) –

  • properties (object) –

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) –

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

  • resource (str) –

  • description (str) –

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) – 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) –

  • provisioning_state (str or PoolProvisioningState) – Possible values include: ‘Succeeded’, ‘Deleting’

  • provisioning_state_transition_time (datetime) –

  • allocation_state (str or AllocationState) – Possible values include: ‘Steady’, ‘Resizing’, ‘Stopping’

  • allocation_state_transition_time (datetime) –

  • 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 need not be unique and can contain any Unicode characters up to a maximum length of 1024.

  • vm_size (str) – For information about available sizes of virtual machines for Cloud Services pools (pools created with cloudServiceConfiguration), see Sizes for Cloud Services (https://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) – 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]) –

  • metadata (list[MetadataItem]) – 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]) – 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]) – 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 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]) – 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. 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.PrivateEndpoint(**kwargs)[source]

Bases: msrest.serialization.Model

The private endpoint of the private endpoint connection.

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

Variables

id (str) –

class azure.mgmt.batch.models.PrivateEndpointConnection(*, private_endpoint=None, private_link_service_connection_state=None, **kwargs)[source]

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

Contains information about a private link 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.

  • provisioning_state (str or PrivateEndpointConnectionProvisioningState) – Possible values include: ‘Succeeded’, ‘Updating’, ‘Failed’

Parameters
  • private_endpoint (PrivateEndpoint) – The ARM resource identifier of the private endpoint.

  • private_link_service_connection_state (PrivateLinkServiceConnectionState) – The private link service connection state of the private endpoint connection.

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

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

Contains information about a private link 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.

  • group_id (str) – The group id is used to establish the private link connection.

  • required_members (list[str]) –

  • required_zone_names (list[str]) –

class azure.mgmt.batch.models.PrivateLinkServiceConnectionState(*, status, description: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

The private link service connection state of the private endpoint connection.

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
  • status (str or PrivateLinkServiceConnectionStatus) – Required. The status for the private endpoint connection of Batch account. Possible values include: ‘Approved’, ‘Pending’, ‘Rejected’, ‘Disconnected’

  • description (str) –

Variables

action_required (str) –

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.PublicIPAddressConfiguration(*, provision=None, ip_address_ids=None, **kwargs)[source]

Bases: msrest.serialization.Model

The public IP Address configuration of the networking configuration of a Pool.

Parameters
  • provision (str or IPAddressProvisioningType) – The provisioning type for Public IP Addresses for the pool. The default value is BatchManaged. Possible values include: ‘BatchManaged’, ‘UserManaged’, ‘NoPublicIPAddresses’

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

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 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) –

  • errors (list[ResizeError]) – 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 autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them must be specified.

  • storage_container_url (str) – 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 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 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) – 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) – 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 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]) –

  • environment_settings (list[EnvironmentSetting]) –

  • 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) – 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. 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) – 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. 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.

  • password (str) – Required.

  • 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 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, disk_encryption_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 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]) – This property must be specified if the compute nodes in the pool need to have empty data disks attached to them.

  • license_type (str) – 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.

  • disk_encryption_configuration (DiskEncryptionConfiguration) – The disk encryption configuration for the pool. If specified, encryption is performed on each node in the pool during node provisioning.

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) – 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.PrivateLinkResourcePaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of PrivateLinkResource object

Bring async to Paging.

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

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

Bases: msrest.paging.Paged

A paging container for iterating over a list of PrivateEndpointConnection 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.KeySource[source]

Bases: str, enum.Enum

An enumeration.

microsoft_batch = 'Microsoft.Batch'

Batch creates and manages the encryption keys used to protect the account data.

microsoft_key_vault = 'Microsoft.KeyVault'

The encryption keys used to protect the account data are stored in an external key vault. If this is set then the Batch Account identity must be set to SystemAssigned and a valid Key Identifier must also be supplied under the keyVaultProperties.

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.PublicNetworkAccessType[source]

Bases: str, enum.Enum

An enumeration.

disabled = 'Disabled'

Disables public connectivity and enables private connectivity to Azure Batch Service through private endpoint resource.

enabled = 'Enabled'

Enables connectivity to Azure Batch through public DNS.

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

Bases: str, enum.Enum

An enumeration.

none = 'None'

Batch account has no identity associated with it. Setting None in update account will remove existing identities.

system_assigned = 'SystemAssigned'

Batch account has a system assigned identity with it.

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.PrivateEndpointConnectionProvisioningState[source]

Bases: str, enum.Enum

An enumeration.

failed = 'Failed'

The user requested that the connection be updated and it failed. You may retry the update operation.

succeeded = 'Succeeded'

The connection status is final and is ready for use if Status is Approved.

updating = 'Updating'

The user has requested that the connection status be updated, but the update operation has not yet completed. You may not reference the connection when connecting the Batch account.

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

Bases: str, enum.Enum

An enumeration.

approved = 'Approved'

The private endpoint connection is approved and can be used to access Batch account

disconnected = 'Disconnected'

The private endpoint connection is disconnected and cannot be used to access Batch account

pending = 'Pending'

The private endpoint connection is pending and cannot be used to access Batch account

rejected = 'Rejected'

The private endpoint connection is rejected and cannot be used to access Batch account

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.DiskEncryptionTarget[source]

Bases: str, enum.Enum

An enumeration.

os_disk = 'OsDisk'

The OS Disk on the compute node is encrypted.

temporary_disk = 'TemporaryDisk'

The temporary disk on the compute node is encrypted. On Linux this encryption applies to other partitions (such as those on mounted data disks) when encryption occurs at boot time.

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.IPAddressProvisioningType[source]

Bases: str, enum.Enum

An enumeration.

batch_managed = 'BatchManaged'

A public IP will be created and managed by Batch. There may be multiple public IPs depending on the size of the Pool.

no_public_ip_addresses = 'NoPublicIPAddresses'

No public IP Address will be created for the Compute Nodes in the Pool.

user_managed = 'UserManaged'

Public IPs are provided by the user and will be used to provision the Compute Nodes.

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.ContainerType[source]

Bases: str, enum.Enum

An enumeration.

docker_compatible = 'DockerCompatible'

A Docker compatible container technology will be used to launch the containers.

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

Bases: str, enum.Enum

An enumeration.

batch_accounts = 'Microsoft.Batch/batchAccounts'

The Batch account resource type.

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.