Skip to main content

variables

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

Overview

Namevariables
TypeResource
Idazure.automation.variables

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
automationAccountNametextfield from the properties object
creation_timetextfield from the properties object
is_encryptedtextfield from the properties object
last_modified_timetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
valuetextfield from the properties object
variableNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTautomationAccountName, resourceGroupName, subscriptionId, variableNameRetrieve the variable identified by variable name.
list_by_automation_accountSELECTautomationAccountName, resourceGroupName, subscriptionIdRetrieve a list of variables.
create_or_updateINSERTautomationAccountName, resourceGroupName, subscriptionId, variableName, data__name, data__propertiesCreate a variable.
deleteDELETEautomationAccountName, resourceGroupName, subscriptionId, variableNameDelete the variable.
updateUPDATEautomationAccountName, resourceGroupName, subscriptionId, variableNameUpdate a variable.

SELECT examples

Retrieve a list of variables.

SELECT
description,
automationAccountName,
creation_time,
is_encrypted,
last_modified_time,
resourceGroupName,
subscriptionId,
value,
variableName
FROM azure.automation.vw_variables
WHERE automationAccountName = '{{ automationAccountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.automation.variables (
automationAccountName,
resourceGroupName,
subscriptionId,
variableName,
data__name,
data__properties,
name,
properties
)
SELECT
'{{ automationAccountName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ variableName }}',
'{{ data__name }}',
'{{ data__properties }}',
'{{ name }}',
'{{ properties }}'
;

UPDATE example

Updates a variables resource.

/*+ update */
UPDATE azure.automation.variables
SET
name = '{{ name }}',
properties = '{{ properties }}'
WHERE
automationAccountName = '{{ automationAccountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND variableName = '{{ variableName }}';

DELETE example

Deletes the specified variables resource.

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