Microsoft Azure Batch Client Library for Python
This is the Microsoft Azure Batch Client Library.
This package has been tested with Python 3.6+
For a more complete set of Azure libraries, see https://aka.ms/azsdk/python/all
For code examples, see the Batch samples repo on GitHub or see Batch on docs.microsoft.com.
If you encounter any bugs or have suggestions, please file an issue in the Issues section of the project.
enableAcceleratedNetworking
to NetworkConfiguration
.
enableAutomaticUpgrade
to VMExtension
.
type
to ContainerConfiguration
. Possible values include: dockerCompatible
and criCompatible
.job.get_all_lifetime_statistics
API.pool.get_all_lifetime_statistics
API.CertificateOperations
related methods.
NodeCommunicationMode
.
current_node_communication_mode
and target_node_communication_mode
of type NodeCommunicationMode
to CloudPool
.target_node_communication_mode
of type NodeCommunicationMode
to PoolSpecification
, PoolAddParameter
, PoolPatchParameter
, and PoolUpdatePropertiesParameter
.OutputFileBlobContainerDestination
.
allow_task_preemption
to JobSpecification
, CloudJob
, JobAddParameter
, JobPatchParameter
, JobUpdateParameter
CloudPool
. These identities will be made available on each node in the pool, and can be used to access various resources.identity_reference
property to the following models to support accessing resources via managed identity:
AzureBlobFileSystemConfiguration
OutputFileBlobContainerDestination
ContainerRegistry
ResourceFile
UploadBatchServiceLogsConfiguration
compute_node_extension
operations to BatchServiceClient
for getting/listing VM extensions on a nodeextensions
property to VirtualMachineConfiguration
on CloudPool
to specify virtual machine extensions for nodesnode_placement_configuration
on VirtualMachineConfiguration
os_disk
property to VirtualMachineConfiguration
, which contains settings for the operating system disk of the Virtual Machine.
placement
property on DiffDiskSettings
specifies the ephemeral disk placement for operating system disks for all VMs in the pool. Setting it to "CacheDisk" will store the ephemeral OS disk on the VM cache.max_parallel_tasks
property on CloudJob
to control the maximum allowed tasks per job (defaults to -1, meaning unlimited).virtual_machine_info
property on ComputeNode
which contains information about the current state of the virtual machine, including the exact version of the marketplace image the VM is using.maxTasksPerNode
with taskSlotsPerNode
on the pool. Using this property tasks in a job can consume a dynamic amount of slots allowing for more fine-grained control over resource consumption.GetTaskCounts
to return TaskCountsResult
, which is a complex object containing the previous TaskCounts
object and a new TaskSlotCounts
object providing similar information in the context of slots being used.requiredSlots
to the task allowing user to specify how many slots on a node it should take up.ComputeNode
disk drives using the new disk_encryption_configuration
property of VirtualMachineConfiguration
.virtual_machine_id
property of ImageReference
can now only refer to a Shared Image Gallery image.public_ip_address_configuration
property of NetworkConfiguration
.
public_ips
property of NetworkConfiguration
has moved in to public_ip_address_configuration
as well. This property can only be specified if ip_provisioning_type
is UserManaged
.This version of the Batch .NET client library targets version 2020-03-01.11.0 of the Azure Batch REST API.
NetworkConfiguration
via the new public_ips
property. This guarantees nodes in the Pool will have an IP from the list user provided IPs.mount_configuration
property on CloudPool
.virtual_machine_image_id
property of ImageReference
by referencing the image via its ARM ID.wait_for_success
on StartTask
is now True
(was False
).scope
on AutoUserSpecification
is now always Pool
(was Task
on Windows nodes, Pool
on Linux nodes).AccountOperations.list_node_agent_skus
with AccountOperations.list_supported_images
. list_supported_images
contains all of the same information originally available in list_node_agent_skus
but in a clearer format. New non-verified images are also now returned. Additional information about capabilities
and batch_support_end_of_life
is accessible on the ImageInformation
object returned by list_supported_images
.CloudPool
based on the source port of the traffic. This is done via the source_port_ranges
property on network_security_group_rules
.working_directory
property on TaskContainerSettings
.upgrade_os
API on CloudServiceConfiguration
pools.
PoolOperations.upgrade_os
API.target_os_version
to os_version
and removed current_os_version
on CloudServiceConfiguration
.upgrading
state from PoolState
enum.data_egress_gi_b
and data_ingress_gi_b
from PoolUsageMetrics
. These properties are no longer supported.ResourceFile
. There are now three supported modes for ResourceFile
:
http_url
creates a ResourceFile
pointing to a single HTTP URL.storage_container_url
creates a ResourceFile
pointing to the blobs under an Azure Blob Storage container.auto_storage_container_name
creates a ResourceFile
pointing to the blobs under an Azure Blob Storage container in the Batch registered auto-storage account.ResourceFile
via the http_url
property can now be any HTTP URL. Previously, these had to be an Azure Blob Storage URL.blob_prefix
property.os_disk
property from VirtualMachineConfiguration
. This property is no longer supported.dynamic_vnet_assignment_scope
on NetworkConfiguration
to be DynamicVNetAssignmentScope.job
can now dynamically assign a Virtual Network to each node the job's tasks run on. The specific Virtual Network to join the nodes to is specified in the new network_configuration
property on CloudJob
and JobSpecification
.
batch
or interactive
) via WindowsUserConfiguration.login_mode
.base_url
parameter to batch_url
on BatchServiceClient
class, and it is required now.Bugfixes
Note
node_agent_info
in ComputeNode to return the node agent informationvalidation_status
property from TaskCounts
.DataDisk
and OSDisk
is now read_write
instead of none
.BatchServiceClient
can be used as a context manager to keep the underlying HTTP session open for performance.leaving_pool
in node_counts
type.Bugfixes
enable_auto_scale
.list_pool_node_counts
method.upload_batch_service_logs
method.
license_type
on VirtualMachineConfiguration
.VirtualMachineConfiguration
based pools, via the new data_disks
attribute on VirtualMachineConfiguration
.virtual_machine_image_id
property on ImageReference
contains the reference to the ARM Image, and OSDisk.image_uris
no longer exists.image_reference
is now a required attribute of VirtualMachineConfiguration
.MultiInstanceSettings
) must now specify a coordination_commandLine
, and number_of_instances
is now optional and defaults to 1.container_configuration
on the VirtualMachineConfiguration
for a pool, and then add container_settings
on the Task.job.get_task_counts
to retrieve the number of tasks in each state.pool_endpoint_configuration
attribute on NetworkConfiguration
.
This property is only supported on pools that use virtual_machine_configuration
.ComputeNode
now also has an endpoint_configuration
attribute with the details of the applied endpoint configuration for that node.AddPoolParameter
and PoolSpecification
now have an additional property target_low_priority_nodes
.target_dedicated
and current_dedicated
on CloudPool
, AddPoolParameter
and PoolSpecification
have been renamed to target_dedicated_nodes
and current_dedicated_nodes
.resize_error
on CloudPool
is now a collection called resize_errors
.is_dedicated
property on ComputeNode
, which is false
for low-priority nodes.allow_low_priority_node
property to JobManagerTask
, which if true
allows the JobManagerTask
to run on a low-priority compute node.PoolResizeParameter
now takes two optional parameters, target_dedicated_nodes
and target_low_priority_nodes
, instead of one required parameter target_dedicated
.
At least one of these two parameters must be specified.OutputFiles
property on CloudTask
and JobManagerTask
.file_upload_error
property on ExitConditions
.result
property on all task execution information objects.scheduling_error
on all task execution information objects to failure_information
. TaskFailureInformation
replaces TaskSchedulingError
and is returned any
time there is a task failure. This includes all previous scheduling error cases, as well as nonzero task exit codes, and file upload failures from the new output files feature.SchedulingErrorCategory
enum to ErrorCategory
.scheduling_error
on ExitConditions
to pre_processing_error
to more clearly clarify when the error took place in the task life-cycle.application_licenses
property on PoolAddParameter
, CloudPool
and PoolSpecification
.
Please note that this feature is in gated public preview, and you must request access to it via a support ticket.ssh_private_key
attribute of a UserAccount
object has been replaced with an expanded LinuxUserConfiguration
object with additional settings for a user ID and group ID of the
user account.unmapped
enum state from AddTaskStatus
, CertificateFormat
, CertificateVisibility
, CertStoreLocation
, ComputeNodeFillType
, OSType
, and PoolLifetimeOption
as they were not ever used.