ApplicationPackageOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

BatchManagementClient's

<xref:application_package> attribute.

Inheritance
builtins.object
ApplicationPackageOperations

Constructor

ApplicationPackageOperations(*args, **kwargs)

Methods

activate

Activates the specified application package. This should be done after the ApplicationPackage was created and uploaded. This needs to be done before an ApplicationPackage can be used on Pools or Tasks.

create

Creates an application package record. The record contains a storageUrl where the package should be uploaded to. Once it is uploaded the ApplicationPackage needs to be activated using ApplicationPackageActive before it can be used. If the auto storage account was configured to use storage keys, the URL returned will contain a SAS.

delete

Deletes an application package record and its associated binary file.

get

Gets information about the specified application package.

list

Lists all of the application packages in the specified application.

activate

Activates the specified application package. This should be done after the ApplicationPackage was created and uploaded. This needs to be done before an ApplicationPackage can be used on Pools or Tasks.

activate(resource_group_name: str, account_name: str, application_name: str, version_name: str, parameters: _models.ActivateApplicationPackageParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.ApplicationPackage

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the Batch account. Required.

account_name
Required
str

The name of the Batch account. Required.

application_name
Required
str

The name of the application. This must be unique within the account. Required.

version_name
Required
str

The version of the application. Required.

parameters
Required

The parameters for the request. Is either a ActivateApplicationPackageParameters type or a IO[bytes] type. Required.

Returns

Type Description

ApplicationPackage or the result of cls(response)

Exceptions

Type Description

create

Creates an application package record. The record contains a storageUrl where the package should be uploaded to. Once it is uploaded the ApplicationPackage needs to be activated using ApplicationPackageActive before it can be used. If the auto storage account was configured to use storage keys, the URL returned will contain a SAS.

create(resource_group_name: str, account_name: str, application_name: str, version_name: str, parameters: _models.ApplicationPackage | None = None, *, content_type: str = 'application/json', **kwargs: Any) -> _models.ApplicationPackage

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the Batch account. Required.

account_name
Required
str

The name of the Batch account. Required.

application_name
Required
str

The name of the application. This must be unique within the account. Required.

version_name
Required
str

The version of the application. Required.

parameters
Required

The parameters for the request. Is either a ApplicationPackage type or a IO[bytes] type. Default value is None.

Returns

Type Description

ApplicationPackage or the result of cls(response)

Exceptions

Type Description

delete

Deletes an application package record and its associated binary file.

delete(resource_group_name: str, account_name: str, application_name: str, version_name: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the Batch account. Required.

account_name
Required
str

The name of the Batch account. Required.

application_name
Required
str

The name of the application. This must be unique within the account. Required.

version_name
Required
str

The version of the application. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Gets information about the specified application package.

get(resource_group_name: str, account_name: str, application_name: str, version_name: str, **kwargs: Any) -> ApplicationPackage

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the Batch account. Required.

account_name
Required
str

The name of the Batch account. Required.

application_name
Required
str

The name of the application. This must be unique within the account. Required.

version_name
Required
str

The version of the application. Required.

Returns

Type Description

ApplicationPackage or the result of cls(response)

Exceptions

Type Description

list

Lists all of the application packages in the specified application.

list(resource_group_name: str, account_name: str, application_name: str, maxresults: int | None = None, **kwargs: Any) -> Iterable[ApplicationPackage]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group that contains the Batch account. Required.

account_name
Required
str

The name of the Batch account. Required.

application_name
Required
str

The name of the application. This must be unique within the account. Required.

maxresults
Required
int

The maximum number of items to return in the response. Default value is None.

Returns

Type Description

An iterator like instance of either ApplicationPackage or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.batch.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\batch\\models\\__init__.py'>