variables
Creates, updates, deletes, gets or lists a variables
resource.
Overview
Name | variables |
Type | Resource |
Id | azure.automation.variables |
Fields
- vw_variables
- variables
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
automationAccountName | text | field from the properties object |
creation_time | text | field from the properties object |
is_encrypted | text | field from the properties object |
last_modified_time | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
value | text | field from the properties object |
variableName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Definition of the variable properties |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | automationAccountName, resourceGroupName, subscriptionId, variableName | Retrieve the variable identified by variable name. |
list_by_automation_account | SELECT | automationAccountName, resourceGroupName, subscriptionId | Retrieve a list of variables. |
create_or_update | INSERT | automationAccountName, resourceGroupName, subscriptionId, variableName, data__name, data__properties | Create a variable. |
delete | DELETE | automationAccountName, resourceGroupName, subscriptionId, variableName | Delete the variable. |
update | UPDATE | automationAccountName, resourceGroupName, subscriptionId, variableName | Update a variable. |
SELECT
examples
Retrieve a list of variables.
- vw_variables
- 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 }}';
SELECT
properties
FROM azure.automation.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.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: properties
value:
- name: value
value: string
- name: description
value: string
- name: isEncrypted
value: boolean
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 }}';