Skip to main content

modules

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

Overview

Namemodules
TypeResource
Idazure.automation.modules

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
activity_counttextfield from the properties object
automationAccountNametextfield from the properties object
content_linktextfield from the properties object
creation_timetextfield from the properties object
errortextfield from the properties object
etagtextGets the etag of the resource.
is_compositetextfield from the properties object
is_globaltextfield from the properties object
last_modified_timetextfield from the properties object
locationtextThe geo-location where the resource lives
moduleNametextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
size_in_bytestextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
versiontextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTautomationAccountName, moduleName, resourceGroupName, subscriptionIdRetrieve the module identified by module name.
list_by_automation_accountSELECTautomationAccountName, resourceGroupName, subscriptionIdRetrieve a list of modules.
create_or_updateINSERTautomationAccountName, moduleName, resourceGroupName, subscriptionId, data__propertiesCreate or Update the module identified by module name.
deleteDELETEautomationAccountName, moduleName, resourceGroupName, subscriptionIdDelete the module by name.
updateUPDATEautomationAccountName, moduleName, resourceGroupName, subscriptionIdUpdate the module identified by module name.

SELECT examples

Retrieve a list of modules.

SELECT
description,
activity_count,
automationAccountName,
content_link,
creation_time,
error,
etag,
is_composite,
is_global,
last_modified_time,
location,
moduleName,
provisioning_state,
resourceGroupName,
size_in_bytes,
subscriptionId,
tags,
version
FROM azure.automation.vw_modules
WHERE automationAccountName = '{{ automationAccountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new modules resource.

/*+ create */
INSERT INTO azure.automation.modules (
automationAccountName,
moduleName,
resourceGroupName,
subscriptionId,
data__properties,
properties,
name,
location,
tags
)
SELECT
'{{ automationAccountName }}',
'{{ moduleName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}',
'{{ name }}',
'{{ location }}',
'{{ tags }}'
;

UPDATE example

Updates a modules resource.

/*+ update */
UPDATE azure.automation.modules
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
automationAccountName = '{{ automationAccountName }}'
AND moduleName = '{{ moduleName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified modules resource.

/*+ delete */
DELETE FROM azure.automation.modules
WHERE automationAccountName = '{{ automationAccountName }}'
AND moduleName = '{{ moduleName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';