Поделиться через


ApplicationPackageOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

BatchManagementClient's

<xref:application_package> attribute.

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.

async 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. The name is case insensitive. Required.

account_name
Required
str

A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. 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 one of the following types: ActivateApplicationPackageParameters, JSON, IO[bytes] Required.

Returns

Type Description

ApplicationPackage. The ApplicationPackage is compatible with MutableMapping

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.

async 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. The name is case insensitive. Required.

account_name
Required
str

A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. 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
ApplicationPackage or <xref:JSON> or IO[bytes]

The parameters for the request. Is one of the following types: ApplicationPackage, JSON, IO[bytes] Default value is None.

Default value: None

Returns

Type Description

ApplicationPackage. The ApplicationPackage is compatible with MutableMapping

Exceptions

Type Description

delete

Deletes an application package record and its associated binary file.

async 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. The name is case insensitive. Required.

account_name
Required
str

A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. 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

Exceptions

Type Description

get

Gets information about the specified application package.

async 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. The name is case insensitive. Required.

account_name
Required
str

A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. 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. The ApplicationPackage is compatible with MutableMapping

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) -> AsyncItemPaged[ApplicationPackage]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

account_name
Required
str

A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. Required.

application_name
Required
str

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

Keyword-Only Parameters

Name Description
maxresults
int

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

Default value: None

Returns

Type Description

An iterator like instance of ApplicationPackage

Exceptions

Type Description