Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This is the Microsoft Azure Batch Management Client Library. This package has been tested with Python 3.7+. For a more complete view of Azure libraries, see the azure sdk python release.
Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691
pip install azure-mgmt-batch
pip install azure-identity
By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
AZURE_CLIENT_ID
for Azure client ID.AZURE_TENANT_ID
for Azure tenant ID.AZURE_CLIENT_SECRET
for Azure client secret.In addition, Azure subscription ID can be configured via environment variable AZURE_SUBSCRIPTION_ID
.
With above configuration, client can be authenticated by following code:
from azure.identity import DefaultAzureCredential
from azure.mgmt.batch import BatchManagementClient
import os
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = BatchManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
Code samples for this package can be found at:
If you encounter any bugs or have suggestions, please file an issue in the Issues section of the project.
dockerCompatible
and criCompatible
instead of fixed value dockerCompatible
Features
Features
Features
Breaking changes
BatchManagement
to BatchManagementClient
Features
Breaking changes
This is beta preview version.
This version uses a next-generation code generator that introduces important breaking changes, but also important new features (like unified authentication and async programming).
General breaking changes
Credential system has been completly revamped:
azure.common.credentials
or msrestazure.azure_active_directory
instances are no longer supported, use the azure-identity
classes instead: https://pypi.org/project/azure-identity/credentials
parameter has been renamed credential
The config
attribute no longer exists on a client, configuration should be passed as kwarg. Example: MyClient(credential, subscription_id, enable_logging=True)
. For a complete set of
supported options, see the parameters accept in init documentation of azure-core
You can't import a version
module anymore, use __version__
instead
Operations that used to return a msrest.polling.LROPoller
now returns a azure.core.polling.LROPoller
and are prefixed with begin_
.
Exceptions tree have been simplified and most exceptions are now azure.core.exceptions.HttpResponseError
(CloudError
has been removed).
Most of the operation kwarg have changed. Some of the most noticeable:
raw
has been removed. Equivalent feature can be found using cls
, a callback that will give access to internal HTTP response for advanced userGeneral new features
typing
. SDKs are mypy ready.aio
namespace of your package to find the async client.public_network_access
property on BatchAccount
.PrivateLinkResource
and PrivateEndpointConnection
resource types. These are both only used when the public_network_access
property on BatchAccount
is set to Disabled
.
public_network_access
is set to Disabled
a new PrivateLinkResource
is visible in that account, which can be used to connect to the account using an ARM Private Endpoint in your VNET.ComputeNode
disk drives using the new disk_encryption_configuration
property of VirtualMachineConfiguration
.id
property of ImageReference
can now only refer to a Shared Image Gallery image.public_ip_configuration
property of NetworkConfiguration
.
public_ips
property of NetworkConfiguration
has moved in to PublicIPAddressConfiguration
as well. This property can only be specified if IPAddressProvisioningType
is UserManaged
.identity
of type BatchAccountIdentity
to BatchAccount
. This can be used to configure how customer data is encrypted inside the Batch account.
identity
property on BatchAccountCreateParameters
and BatchAccountUpdateParameters
BatchAccountCreateParameters
and BatchAccountUpdateParameters
to properly reflect the REST APIpublic_network_access
property on BatchAccount
.PrivateLinkResource
and PrivateEndpointConnection
resource types. These are both only used when the public_network_access
property on BatchAccount
is set to Disabled
.
public_network_access
is set to Disabled
a new PrivateLinkResource
is visible in that account, which can be used to connect to the account using an ARM Private Endpoint in your VNET.ComputeNode
disk drives using the new disk_encryption_configuration
property of VirtualMachineConfiguration
.id
property of ImageReference
can now only refer to a Shared Image Gallery image.public_ip_configuration
property of NetworkConfiguration
.
public_ips
property of NetworkConfiguration
has moved in to PublicIPAddressConfiguration
as well. This property can only be specified if IPAddressProvisioningType
is UserManaged
.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 Pool
.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).[Breaking] ResourceFile improvements
Added the ability specify an entire Azure Storage container
in ResourceFile
.
A new property HttpUrl
replaces BlobSource
. This can
be any HTTP URL. Previously, this had to be an Azure Blob
Storage URL.
When constructing a ResourceFile
you can now choose
from one of the following options:
HttpUrl
: Specify an HTTP URL pointing to a
specific file to download.StorageContainerUrl
: Specify an Azure Storage
container URL. All blobs matching the BlobPrefix
in the Storage container will be downloaded.AutoStorageContainerName
: Specify the name of a
container in the Batch registered auto-storage
account. All blobs matching the BlobPrefix
in
the Storage container will be downloaded.[Breaking] Removed OSDisk
property from
VirtualMachineConfiguration
. This property is no longer
supported.
[Breaking] Application
no longer has a Packages
property, instead the packages can be retrieved via the new
ApplicationPackage.List
API.
[Breaking] TargetOsVersion
is now OsVersion
, and
CurrentOsVersion
is no longer supported on
CloudServiceConfiguration
.
Added support on Windows pools for creating users with a specific
login mode (either Batch
or Interactive
) via
WindowsUserConfiguration.LoginMode
.
Added support for ContainerConfiguration
when creating a pool.
Bugfixes
Operation
and
OperationDisplay
models.AddApplicationParameters
to
ApplicationCreateParameters
.UpdateApplicationParameters
to
ApplicationUpdateParameters
.core_quota
attribute from BatchAccount
object, now
replaced by separate dedicated_core_quota
and
low_priority_core_quota
.BatchAccountKeys
object now has additional account_name
attribute.BatchAccount
model - support for pool allocation in the
user's subscription.BatchAccount
model - support for referencing an Azure
Key Vault for accounts created with a pool allocation mode of
UserSubscription.BatchAccount
model - properties are now read only.ApplicationPackage
model - properties are now read only.BatchAccountKeys
model - properties are now read only.BatchLocationQuota
model - properties are now read only.AccountResource
to BatchAccount
.AccountOperations
to BatchAccountOperations
. The
IBatchManagementClient.Account
property was also renamed to
IBatchManagementClient.BatchAccount
.Application
and ApplicationPackage
operations up into
two separate operation groups.Application
and ApplicationPackage
methods to use
the standard Create
, Delete
, Update
syntax. For example
creating an Application
is done via
ApplicationOperations.Create
.SubscriptionOperations
to LocationOperations
and
changed SubscriptionOperations.GetSubscriptionQuotas
to be
LocationOperations.GetQuotas
.FAQs
Microsoft Azure Batch Management Client Library for Python
We found that azure-mgmt-batch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.