Skip to main content

package

Creates, updates, deletes, gets or lists a package resource.

Overview

Namepackage
TypeResource
Idazure.automation.package

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
allOfobjectMetadata pertaining to creation and last modification of the resource.
contentLinkobjectGets or sets the contentLink of the Package.
defaultbooleanGets or sets the isGlobal flag of the package.
errorobjectGets or sets the error info of the Package.
locationstringThe geo-location where the resource lives. Required.
provisioningStatestringGets 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)
sizeInBytesintegerGets or sets the size in bytes of the Package.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
versionstringGets or sets the version of the Package.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, automation_account_name, runtime_environment_name, package_name, subscription_idRetrieve the Package identified by Package name.
list_by_runtime_environmentselectresource_group_name, automation_account_name, runtime_environment_name, subscription_idRetrieve the a list of Packages.
create_or_updateinsertresource_group_name, automation_account_name, runtime_environment_name, package_name, subscription_id, propertiesCreate or update the package identified by package name.
updateupdateresource_group_name, automation_account_name, runtime_environment_name, package_name, subscription_idUpdate the Package identified by Package name.
create_or_updatereplaceresource_group_name, automation_account_name, runtime_environment_name, package_name, subscription_id, propertiesCreate or update the package identified by package name.
deletedeleteresource_group_name, automation_account_name, runtime_environment_name, package_name, subscription_idDelete the package by name.

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
automation_account_namestringThe name of the automation account. Required.
package_namestringThe Package name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
runtime_environment_namestringThe name of the Runtime Environment. Required.
subscription_idstring

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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 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 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
;