package
Creates, updates, deletes, gets or lists a package resource.
Overview
| Name | package |
| Type | Resource |
| Id | azure.automation.package |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_runtime_environment
| 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. |
allOf | object | Metadata pertaining to creation and last modification of the resource. |
contentLink | object | Gets or sets the contentLink of the Package. |
default | boolean | Gets or sets the isGlobal flag of the package. |
error | object | Gets or sets the error info of the Package. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Gets or sets the provisioning state of the Package. Known values are: "Created", "Creating", "StartingImportModuleRunbook", "RunningImportModuleRunbook", "ContentRetrieved", "ContentDownloaded", "ContentValidated", "ConnectionTypeImported", "ContentStored", "ModuleDataStored", "ActivitiesStored", "ModuleImportRunbookComplete", "Succeeded", "Failed", "Canceled", and "Updating". (Created, Creating, StartingImportModuleRunbook, RunningImportModuleRunbook, ContentRetrieved, ContentDownloaded, ContentValidated, ConnectionTypeImported, ContentStored, ModuleDataStored, ActivitiesStored, ModuleImportRunbookComplete, Succeeded, Failed, Canceled, Updating) |
sizeInBytes | integer | Gets or sets the size in bytes of the Package. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
version | string | Gets or sets the version of the Package. |
| 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. |
allOf | object | Metadata pertaining to creation and last modification of the resource. |
contentLink | object | Gets or sets the contentLink of the Package. |
default | boolean | Gets or sets the isGlobal flag of the package. |
error | object | Gets or sets the error info of the Package. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Gets or sets the provisioning state of the Package. Known values are: "Created", "Creating", "StartingImportModuleRunbook", "RunningImportModuleRunbook", "ContentRetrieved", "ContentDownloaded", "ContentValidated", "ConnectionTypeImported", "ContentStored", "ModuleDataStored", "ActivitiesStored", "ModuleImportRunbookComplete", "Succeeded", "Failed", "Canceled", and "Updating". (Created, Creating, StartingImportModuleRunbook, RunningImportModuleRunbook, ContentRetrieved, ContentDownloaded, ContentValidated, ConnectionTypeImported, ContentStored, ModuleDataStored, ActivitiesStored, ModuleImportRunbookComplete, Succeeded, Failed, Canceled, Updating) |
sizeInBytes | integer | Gets or sets the size in bytes of the Package. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
version | string | Gets or sets the version of the Package. |
Methods
The following methods are available for this resource:
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 |
|---|---|---|
automation_account_name | string | The name of the automation account. Required. |
package_name | string | The Package name. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
runtime_environment_name | string | The name of the Runtime Environment. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_runtime_environment
Retrieve the Package identified by Package name.
SELECT
id,
name,
allOf,
contentLink,
default,
error,
location,
provisioningState,
sizeInBytes,
systemData,
tags,
type,
version
FROM azure.automation.package
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND automation_account_name = '{{ automation_account_name }}' -- required
AND runtime_environment_name = '{{ runtime_environment_name }}' -- required
AND package_name = '{{ package_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Retrieve the a list of Packages.
SELECT
id,
name,
allOf,
contentLink,
default,
error,
location,
provisioningState,
sizeInBytes,
systemData,
tags,
type,
version
FROM azure.automation.package
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND automation_account_name = '{{ automation_account_name }}' -- required
AND runtime_environment_name = '{{ runtime_environment_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Create or update the package identified by package name.
INSERT INTO azure.automation.package (
properties,
allOf,
resource_group_name,
automation_account_name,
runtime_environment_name,
package_name,
subscription_id
)
SELECT
'{{ properties }}' /* required */,
'{{ allOf }}',
'{{ resource_group_name }}',
'{{ automation_account_name }}',
'{{ runtime_environment_name }}',
'{{ package_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: package
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the package resource.
- name: automation_account_name
value: "{{ automation_account_name }}"
description: Required parameter for the package resource.
- name: runtime_environment_name
value: "{{ runtime_environment_name }}"
description: Required parameter for the package resource.
- name: package_name
value: "{{ package_name }}"
description: Required parameter for the package resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the package resource.
- name: properties
description: |
Gets or sets the package create properties. Required.
value:
contentLink:
uri: "{{ uri }}"
contentHash:
algorithm: "{{ algorithm }}"
value: "{{ value }}"
version: "{{ version }}"
- name: allOf
description: |
The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'.
value:
id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
systemData:
createdBy: "{{ createdBy }}"
createdByType: "{{ createdByType }}"
createdAt: "{{ createdAt }}"
lastModifiedBy: "{{ lastModifiedBy }}"
lastModifiedByType: "{{ lastModifiedByType }}"
lastModifiedAt: "{{ lastModifiedAt }}"
tags: "{{ tags }}"
location: "{{ location }}"
UPDATE examples
- update
Update the Package identified by Package name.
UPDATE azure.automation.package
SET
properties = '{{ properties }}',
allOf = '{{ allOf }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND automation_account_name = '{{ automation_account_name }}' --required
AND runtime_environment_name = '{{ runtime_environment_name }}' --required
AND package_name = '{{ package_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;
REPLACE examples
- create_or_update
Create or update the package identified by package name.
REPLACE azure.automation.package
SET
properties = '{{ properties }}',
allOf = '{{ allOf }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND automation_account_name = '{{ automation_account_name }}' --required
AND runtime_environment_name = '{{ runtime_environment_name }}' --required
AND package_name = '{{ package_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Delete the package by name.
DELETE FROM azure.automation.package
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND automation_account_name = '{{ automation_account_name }}' --required
AND runtime_environment_name = '{{ runtime_environment_name }}' --required
AND package_name = '{{ package_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;