application_package
Creates, updates, deletes, gets or lists an application_package resource.
Overview
| Name | application_package |
| Type | Resource |
| Id | azure.batch.application_package |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
etag | string | The ETag of the resource, used for concurrency statements. |
format | string | The format of the application package, if the package is active. |
lastActivationTime | string (date-time) | The time at which the package was last activated, if the package is active. |
state | string | The current state of the application package. Known values are: "Pending" and "Active". (Pending, Active) |
storageUrl | string | The URL for the application package in Azure Storage. |
storageUrlExpiry | string (date-time) | The UTC time at which the Azure Storage URL will expire. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | The tags of the resource. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
etag | string | The ETag of the resource, used for concurrency statements. |
format | string | The format of the application package, if the package is active. |
lastActivationTime | string (date-time) | The time at which the package was last activated, if the package is active. |
state | string | The current state of the application package. Known values are: "Pending" and "Active". (Pending, Active) |
storageUrl | string | The URL for the application package in Azure Storage. |
storageUrlExpiry | string (date-time) | The UTC time at which the Azure Storage URL will expire. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | The tags of the resource. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, account_name, application_name, version_name, subscription_id | Gets information about the specified application package. | |
list | select | resource_group_name, account_name, application_name, subscription_id | maxresults | Lists all of the application packages in the specified application. |
create | insert | resource_group_name, account_name, application_name, version_name, subscription_id | 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 | delete | resource_group_name, account_name, application_name, version_name, subscription_id | Deletes an application package record and its associated binary file. | |
activate | exec | resource_group_name, account_name, application_name, version_name, subscription_id, format | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
account_name | string | 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 | string | The name of the application. This must be unique within the account. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
version_name | string | The version of the application. Required. |
maxresults | integer | The maximum number of items to return in the response. Default value is None. |
SELECT examples
- get
- list
Gets information about the specified application package.
SELECT
id,
name,
etag,
format,
lastActivationTime,
state,
storageUrl,
storageUrlExpiry,
systemData,
tags,
type
FROM azure.batch.application_package
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND application_name = '{{ application_name }}' -- required
AND version_name = '{{ version_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all of the application packages in the specified application.
SELECT
id,
name,
etag,
format,
lastActivationTime,
state,
storageUrl,
storageUrlExpiry,
systemData,
tags,
type
FROM azure.batch.application_package
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND application_name = '{{ application_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND maxresults = '{{ maxresults }}'
;
INSERT examples
- create
- Manifest
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_package (
properties,
tags,
resource_group_name,
account_name,
application_name,
version_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ application_name }}',
'{{ version_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: application_package
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the application_package resource.
- name: account_name
value: "{{ account_name }}"
description: Required parameter for the application_package resource.
- name: application_name
value: "{{ application_name }}"
description: Required parameter for the application_package resource.
- name: version_name
value: "{{ version_name }}"
description: Required parameter for the application_package resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the application_package resource.
- name: properties
description: |
The properties associated with the Application Package.
value:
state: "{{ state }}"
format: "{{ format }}"
storageUrl: "{{ storageUrl }}"
storageUrlExpiry: "{{ storageUrlExpiry }}"
lastActivationTime: "{{ lastActivationTime }}"
- name: tags
value: "{{ tags }}"
description: |
The tags of the resource.
DELETE examples
- delete
Deletes an application package record and its associated binary file.
DELETE FROM azure.batch.application_package
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND application_name = '{{ application_name }}' --required
AND version_name = '{{ version_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle 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.
EXEC azure.batch.application_package.activate
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@application_name='{{ application_name }}' --required,
@version_name='{{ version_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"format": "{{ format }}"
}'
;