Skip to main content

python2_package

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

Overview

Namepython2_package
TypeResource
Idazure.automation.python2_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.
activityCountintegerGets or sets the activity count of the module.
contentLinkobjectGets or sets the contentLink of the module.
creationTimestring (date-time)Gets or sets the creation time.
descriptionstringGets or sets the description.
errorobjectGets or sets the error info of the module.
etagstringGets or sets the etag of the resource.
isCompositebooleanGets or sets type of module, if its composite or not.
isGlobalbooleanGets or sets the isGlobal flag of the module.
lastModifiedTimestring (date-time)Gets or sets the last modified time.
locationstringThe geo-location where the resource lives. Required.
provisioningStatestringGets or sets the provisioning state of the module. 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 module.
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 module.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, automation_account_name, package_name, subscription_idRetrieve the python 2 package identified by package name.
list_by_automation_accountselectresource_group_name, automation_account_name, subscription_idRetrieve a list of python 2 packages.
create_or_updateinsertresource_group_name, automation_account_name, package_name, subscription_id, propertiesCreate or Update the python 2 package identified by package name.
updateupdateresource_group_name, automation_account_name, package_name, subscription_idUpdate the python 2 package identified by package name.
create_or_updatereplaceresource_group_name, automation_account_name, package_name, subscription_id, propertiesCreate or Update the python 2 package identified by package name.
deletedeleteresource_group_name, automation_account_name, package_name, subscription_idDelete the python 2 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 python package name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Retrieve the python 2 package identified by package name.

SELECT
id,
name,
activityCount,
contentLink,
creationTime,
description,
error,
etag,
isComposite,
isGlobal,
lastModifiedTime,
location,
provisioningState,
sizeInBytes,
systemData,
tags,
type,
version
FROM azure.automation.python2_package
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND automation_account_name = '{{ automation_account_name }}' -- required
AND package_name = '{{ package_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or Update the python 2 package identified by package name.

INSERT INTO azure.automation.python2_package (
properties,
tags,
resource_group_name,
automation_account_name,
package_name,
subscription_id
)
SELECT
'{{ properties }}' /* required */,
'{{ tags }}',
'{{ resource_group_name }}',
'{{ automation_account_name }}',
'{{ package_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Update the python 2 package identified by package name.

UPDATE azure.automation.python2_package
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND automation_account_name = '{{ automation_account_name }}' --required
AND package_name = '{{ package_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Create or Update the python 2 package identified by package name.

REPLACE azure.automation.python2_package
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND automation_account_name = '{{ automation_account_name }}' --required
AND package_name = '{{ package_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
etag,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete the python 2 package by name.

DELETE FROM azure.automation.python2_package
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND automation_account_name = '{{ automation_account_name }}' --required
AND package_name = '{{ package_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;