Microsoft Azure Batch Client Library for Python
Project description
Microsoft Azure SDK for Python
This is the Microsoft Azure Batch Client Library.
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8
For a more complete set of Azure libraries, see https://aka.ms/azsdk/python/all
Usage
For code examples, see the Batch samples repo on GitHub or see Batch on docs.microsoft.com.
Provide Feedback
If you encounter any bugs or have suggestions, please file an issue in the Issues section of the project.
Release History
11.0.0 (2021-07-30)
Features
- Add ability to assign user-assigned managed identities to
CloudPool
. These identities will be made available on each node in the pool, and can be used to access various resources. - Added
identity_reference
property to the following models to support accessing resources via managed identity:AzureBlobFileSystemConfiguration
OutputFileBlobContainerDestination
ContainerRegistry
ResourceFile
UploadBatchServiceLogsConfiguration
- Added new
compute_node_extension
operations toBatchServiceClient
for getting/listing VM extensions on a node - Added new
extensions
property toVirtualMachineConfiguration
onCloudPool
to specify virtual machine extensions for nodes - Added the ability to specify availability zones using a new property
node_placement_configuration
onVirtualMachineConfiguration
- Added new
os_disk
property toVirtualMachineConfiguration
, which contains settings for the operating system disk of the Virtual Machine.- The
placement
property onDiffDiskSettings
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.
- The
- Added
max_parallel_tasks
property onCloudJob
to control the maximum allowed tasks per job (defaults to -1, meaning unlimited). - Added
virtual_machine_info
property onComputeNode
which contains information about the current state of the virtual machine, including the exact version of the marketplace image the VM is using.
10.0.0 (2020-09-01)
Features
- [Breaking] Replaced property
maxTasksPerNode
withtaskSlotsPerNode
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. - [Breaking] Changed the response type of
GetTaskCounts
to returnTaskCountsResult
, which is a complex object containing the previousTaskCounts
object and a newTaskSlotCounts
object providing similar information in the context of slots being used. - Added property
requiredSlots
to the task allowing user to specify how many slots on a node it should take up.
9.0.0 (2020-03-24)
Features
- Added ability to encrypt
ComputeNode
disk drives using the newdisk_encryption_configuration
property ofVirtualMachineConfiguration
. - [Breaking] The
virtual_machine_id
property ofImageReference
can now only refer to a Shared Image Gallery image. - [Breaking] Pools can now be provisioned without a public IP using the new
public_ip_address_configuration
property ofNetworkConfiguration
.- The
public_ips
property ofNetworkConfiguration
has moved in topublic_ip_address_configuration
as well. This property can only be specified ifip_provisioning_type
isUserManaged
.
- The
REST API version
This version of the Batch .NET client library targets version 2020-03-01.11.0 of the Azure Batch REST API.
8.0.0 (2019-8-5)
- Using REST API version 2019-08-01.10.0.
- Added ability to specify a collection of public IPs on
NetworkConfiguration
via the newpublic_ips
property. This guarantees nodes in the Pool will have an IP from the list user provided IPs. - Added ability to mount remote file-systems on each node of a pool via the
mount_configuration
property onCloudPool
. - Shared Image Gallery images can now be specified on the
virtual_machine_image_id
property ofImageReference
by referencing the image via its ARM ID. - Breaking When not specified, the default value for
wait_for_success
onStartTask
is nowTrue
(wasFalse
). - Breaking When not specified, the default value for
scope
onAutoUserSpecification
is now alwaysPool
(wasTask
on Windows nodes,Pool
on Linux nodes).
- Added ability to specify a collection of public IPs on
7.0.0 (2019-6-11)
- Using REST API version 2019-06-01.9.0.
- Breaking Replaced
AccountOperations.list_node_agent_skus
withAccountOperations.list_supported_images
.list_supported_images
contains all of the same information originally available inlist_node_agent_skus
but in a clearer format. New non-verified images are also now returned. Additional information aboutcapabilities
andbatch_support_end_of_life
is accessible on theImageInformation
object returned bylist_supported_images
. - Now support network security rules blocking network access to a
CloudPool
based on the source port of the traffic. This is done via thesource_port_ranges
property onnetwork_security_group_rules
. - When running a container, Batch now supports executing the task in the container working directory or in the Batch task working directory. This is controlled by the
working_directory
property onTaskContainerSettings
.
- Breaking Replaced
6.0.1 (2019-2-26)
- Fix bug in TaskOperations.add_collection methods exception handling
6.0.0 (2018-12-14)
- Using REST API version 2018-12-01.8.0.
- Breaking Removed support for the
upgrade_os
API onCloudServiceConfiguration
pools.- Removed
PoolOperations.upgrade_os
API. - Renamed
target_os_version
toos_version
and removedcurrent_os_version
onCloudServiceConfiguration
. - Removed
upgrading
state fromPoolState
enum.
- Removed
- Breaking Removed
data_egress_gi_b
anddata_ingress_gi_b
fromPoolUsageMetrics
. These properties are no longer supported. - Breaking ResourceFile improvements
- Added the ability specify an entire Azure Storage container in
ResourceFile
. There are now three supported modes forResourceFile
:http_url
creates aResourceFile
pointing to a single HTTP URL.storage_container_url
creates aResourceFile
pointing to the blobs under an Azure Blob Storage container.auto_storage_container_name
creates aResourceFile
pointing to the blobs under an Azure Blob Storage container in the Batch registered auto-storage account.
- URLs provided to
ResourceFile
via thehttp_url
property can now be any HTTP URL. Previously, these had to be an Azure Blob Storage URL. - The blobs under the Azure Blob Storage container can be filtered by
blob_prefix
property.
- Added the ability specify an entire Azure Storage container in
- Breaking Removed
os_disk
property fromVirtualMachineConfiguration
. This property is no longer supported. - Pools which set the
dynamic_vnet_assignment_scope
onNetworkConfiguration
to beDynamicVNetAssignmentScope.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 newnetwork_configuration
property onCloudJob
andJobSpecification
.- Note: This feature is in public preview. It is disabled for all Batch accounts except for those which have contacted us and requested to be in the pilot.
- The maximum lifetime of a task is now 180 days (previously it was 7).
- Added support on Windows pools for creating users with a specific login mode (either
batch
orinteractive
) viaWindowsUserConfiguration.login_mode
. - The default task retention time for all tasks is now 7 days, previously it was infinite.
- Breaking Removed support for the
- Breaking Renamed the
base_url
parameter tobatch_url
onBatchServiceClient
class, and it is required now.
5.1.1 (2018-10-16)
Bugfixes
- Fix authentication class to allow HTTP session to be re-used
Note
- azure-nspkg is not installed anymore on Python 3 (PEP420-based namespace package)
5.1.0 (2018-08-28)
- Update operation TaskOperations.add_collection with the following added functionality:
- Retry server side errors.
- Automatically chunk lists of more than 100 tasks to multiple requests.
- If tasks are too large to be submitted in chunks of 100, reduces number of tasks per request.
- Add a parameter to specify number of threads to use when submitting tasks.
5.0.0 (2018-08-24)
- Using REST API version 2018-08-01.7.0.
- Added
node_agent_info
in ComputeNode to return the node agent information - Breaking Removed the
validation_status
property fromTaskCounts
. - Breaking The default caching type for
DataDisk
andOSDisk
is nowread_write
instead ofnone
.
- Added
BatchServiceClient
can be used as a context manager to keep the underlying HTTP session open for performance.- Breaking Model signatures are now using only keywords-arguments syntax. Each positional argument must be rewritten as a keyword argument.
- Breaking The following operations signatures are changed:
- Operation PoolOperations.enable_auto_scale
- Operation TaskOperations.update
- Operation ComputeNodeOperations.reimage
- Operation ComputeNodeOperations.disable_scheduling
- Operation ComputeNodeOperations.reboot
- Operation JobOperations.terminate
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered.
4.1.3 (2018-04-24)
- Update some APIs' comments
- New property
leaving_pool
innode_counts
type.
4.1.2 (2018-04-23)
Bugfixes
- Compatibility of the sdist with wheel 0.31.0
- Compatibility with msrestazure 0.4.28
4.1.1 (2018-03-26)
- Fix regression on method
enable_auto_scale
.
4.1.0 (2018-03-07)
- Using REST API version 2018-03-01.6.1.
- Added the ability to query pool node counts by state, via the new
list_pool_node_counts
method. - Added the ability to upload Azure Batch node agent logs from a particular node, via the
upload_batch_service_logs
method.- This is intended for use in debugging by Microsoft support when there are problems on a node.
4.0.0 (2017-09-25)
- Using REST API version 2017-09-01.6.0.
- Added the ability to get a discount on Windows VM pricing if you have on-premises licenses for the OS SKUs you are deploying, via
license_type
onVirtualMachineConfiguration
. - Added support for attaching empty data drives to
VirtualMachineConfiguration
based pools, via the newdata_disks
attribute onVirtualMachineConfiguration
. - Breaking Custom images must now be deployed using a reference to an ARM Image, instead of pointing to .vhd files in blobs directly.
- The new
virtual_machine_image_id
property onImageReference
contains the reference to the ARM Image, andOSDisk.image_uris
no longer exists. - Because of this,
image_reference
is now a required attribute ofVirtualMachineConfiguration
.
- The new
- Breaking Multi-instance tasks (created using
MultiInstanceSettings
) must now specify acoordination_commandLine
, andnumber_of_instances
is now optional and defaults to 1. - Added support for tasks run using Docker containers. To run a task using a Docker container you must specify a
container_configuration
on theVirtualMachineConfiguration
for a pool, and then addcontainer_settings
on the Task.
3.1.0 (2017-07-24)
- Added a new operation
job.get_task_counts
to retrieve the number of tasks in each state. - Added suuport for inbound endpoint configuration on a pool - there is a new
pool_endpoint_configuration
attribute onNetworkConfiguration
. This property is only supported on pools that usevirtual_machine_configuration
. - A
ComputeNode
now also has anendpoint_configuration
attribute with the details of the applied endpoint configuration for that node.
3.0.0 (2017-05-10)
- Added support for the new low-priority node type;
AddPoolParameter
andPoolSpecification
now have an additional propertytarget_low_priority_nodes
. target_dedicated
andcurrent_dedicated
onCloudPool
,AddPoolParameter
andPoolSpecification
have been renamed totarget_dedicated_nodes
andcurrent_dedicated_nodes
.resize_error
onCloudPool
is now a collection calledresize_errors
.- Added a new
is_dedicated
property onComputeNode
, which isfalse
for low-priority nodes. - Added a new
allow_low_priority_node
property toJobManagerTask
, which iftrue
allows theJobManagerTask
to run on a low-priority compute node. PoolResizeParameter
now takes two optional parameters,target_dedicated_nodes
andtarget_low_priority_nodes
, instead of one required parametertarget_dedicated
. At least one of these two parameters must be specified.- Added support for uploading task output files to persistent storage, via the
OutputFiles
property onCloudTask
andJobManagerTask
. - Added support for specifying actions to take based on a task's output file upload status, via the
file_upload_error
property onExitConditions
. - Added support for determining if a task was a success or a failure via the new
result
property on all task execution information objects. - Renamed
scheduling_error
on all task execution information objects tofailure_information
.TaskFailureInformation
replacesTaskSchedulingError
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. - Renamed
SchedulingErrorCategory
enum toErrorCategory
. - Renamed
scheduling_error
onExitConditions
topre_processing_error
to more clearly clarify when the error took place in the task life-cycle. - Added support for provisioning application licenses to your pool, via a new
application_licenses
property onPoolAddParameter
,CloudPool
andPoolSpecification
. Please note that this feature is in gated public preview, and you must request access to it via a support ticket. - The
ssh_private_key
attribute of aUserAccount
object has been replaced with an expandedLinuxUserConfiguration
object with additional settings for a user ID and group ID of the user account. - Removed
unmapped
enum state fromAddTaskStatus
,CertificateFormat
,CertificateVisibility
,CertStoreLocation
,ComputeNodeFillType
,OSType
, andPoolLifetimeOption
as they were not ever used. - Improved and clarified documentation.
2.0.1 (2017-04-19)
- This wheel package is now built with the azure wheel extension
2.0.0 (2017-02-23)
- AAD token authentication now supported.
- Some operation names have changed (along with their associated parameter model classes):
- pool.list_pool_usage_metrics -> pool.list_usage_metrics
- pool.get_all_pools_lifetime_statistics -> pool.get_all_lifetime_statistics
- job.get_all_jobs_lifetime_statistics -> job.get_all_lifetime_statistics
- file.get_node_file_properties_from_task -> file.get_properties_from_task
- file.get_node_file_properties_from_compute_node -> file.get_properties_from_compute_node
- The attribute 'file_name' in relation to file operations has been renamed to 'file_path'.
- Change in naming convention for enum values to use underscores: e.g. StartTaskState.waitingforstarttask -> StartTaskState.waiting_for_start_task.
- Support for running tasks under a predefined or automatic user account. This includes tasks, job manager tasks, job preparation and release tasks and pool start tasks. This feature replaces the previous 'run_elevated' option on a task.
- Tasks now have an optional scoped authentication token (only applies to tasks and job manager tasks).
- Support for creating pools with a list of user accounts.
- Support for creating pools using a custom VM image (only supported on accounts created with a "User Subscription" pool allocation mode).
1.1.0 (2016-09-15)
- Added support for task reactivation
1.0.0 (2016-08-09)
- Added support for joining a CloudPool to a virtual network on using the network_configuration property.
- Added support for application package references on CloudTask and JobManagerTask.
- Added support for automatically terminating jobs when all tasks complete or when a task fails, via the on_all_tasks_complete property and the CloudTask exit_conditions property.
0.30.0rc5
- Initial Release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file azure-batch-11.0.0.zip
.
File metadata
- Download URL: azure-batch-11.0.0.zip
- Upload date:
- Size: 257.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce5fdb0ec962eddfe85cd82205e9177cb0bbdb445265746e38b3bbbf1f16dc73 |
|
MD5 | 721f0a12de3960db144dda6309aa5b3f |
|
BLAKE2b-256 | 25f6e4a2dca7aa85d62f85f28d84ee509b4524012cdf3ea3d879cdfbacbee6bd |
File details
Details for the file azure_batch-11.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: azure_batch-11.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 228.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7059a82d1f7e466896d2f24fd4fa040a3717a7c3dc110e21c9fc2e754fc3ac72 |
|
MD5 | bb2f34ab72e12c800729676490e01020 |
|
BLAKE2b-256 | d0fc1b63a150b575fd5ed0120fa6e5f8035810d0a596ea4e95bb4d2aedc074d2 |