Skip to main content

application_packages

Creates, updates, deletes, gets or lists an application_packages resource.

Overview

Nameapplication_packages
TypeResource
Idazure.batch.application_packages

Fields

The following fields are returned by SELECT queries:

The operation was successful. The response contains the application package entity.

NameDatatypeDescription
idstringThe ID of the resource.
namestringThe name of the resource.
etagstringThe ETag of the resource, used for concurrency statements.
propertiesobjectThe properties associated with the Application Package.
tagsobjectThe tags of the resource.
typestringThe type of the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, accountName, applicationName, versionName, subscriptionIdGets information about the specified application package.
listselectresourceGroupName, accountName, applicationName, subscriptionIdmaxresultsLists all of the application packages in the specified application.
createinsertresourceGroupName, accountName, applicationName, versionName, subscriptionIdCreates 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.
deletedeleteresourceGroupName, accountName, applicationName, versionName, subscriptionIdDeletes an application package record and its associated binary file.
activateexecresourceGroupName, accountName, applicationName, versionName, subscriptionId, formatActivates 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
accountNamestringThe name of the Batch account.
applicationNamestringThe name of the application. This must be unique within the account.
resourceGroupNamestringThe name of the resource group that contains the Batch account.
subscriptionIdstringThe Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
versionNamestringThe version of the application.
maxresultsinteger (int32)The maximum number of items to return in the response.

SELECT examples

Gets information about the specified application package.

SELECT
id,
name,
etag,
properties,
tags,
type
FROM azure.batch.application_packages
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND applicationName = '{{ applicationName }}' -- required
AND versionName = '{{ versionName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

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.

INSERT INTO azure.batch.application_packages (
data__properties,
data__tags,
resourceGroupName,
accountName,
applicationName,
versionName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ resourceGroupName }}',
'{{ accountName }}',
'{{ applicationName }}',
'{{ versionName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
etag,
properties,
tags,
type
;

DELETE examples

Deletes an application package record and its associated binary file.

DELETE FROM azure.batch.application_packages
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND applicationName = '{{ applicationName }}' --required
AND versionName = '{{ versionName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

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.

EXEC azure.batch.application_packages.activate 
@resourceGroupName='{{ resourceGroupName }}' --required,
@accountName='{{ accountName }}' --required,
@applicationName='{{ applicationName }}' --required,
@versionName='{{ versionName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"format": "{{ format }}"
}'
;