Skip to main content

variable_values

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

Overview

Namevariable_values
TypeResource
Idazure.resource.variable_values

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.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
valuesarrayVariable value column value array. Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectvariable_name, variable_value_name, subscription_idRetrieves a variable value. This operation retrieves a single variable value; given its name, subscription it was created at and the variable it's created for.
get_at_management_groupselectmanagement_group_id, variable_name, variable_value_nameRetrieves a variable value. This operation retrieves a single variable value; given its name, management group it was created at and the variable it's created for.
listselectvariable_name, subscription_idList variable values for a variable. This operation retrieves the list of all variable values associated with the given variable that is at a subscription level.
list_for_management_groupselectmanagement_group_id, variable_nameList variable values at management group level. This operation retrieves the list of all variable values applicable the variable indicated at the management group scope.
create_or_updateinsertvariable_name, variable_value_name, subscription_idCreates or updates a variable value. This operation creates or updates a variable value with the given subscription and name for a given variable. Variable values are scoped to the variable for which they are created for.
create_or_update_at_management_groupinsertmanagement_group_id, variable_name, variable_value_nameCreates or updates a variable value. This operation creates or updates a variable value with the given management group and name for a given variable. Variable values are scoped to the variable for which they are created for.
create_or_updatereplacevariable_name, variable_value_name, subscription_idCreates or updates a variable value. This operation creates or updates a variable value with the given subscription and name for a given variable. Variable values are scoped to the variable for which they are created for.
create_or_update_at_management_groupreplacemanagement_group_id, variable_name, variable_value_nameCreates or updates a variable value. This operation creates or updates a variable value with the given management group and name for a given variable. Variable values are scoped to the variable for which they are created for.
deletedeletevariable_name, variable_value_name, subscription_idDeletes a variable value. This operation deletes a variable value, given its name, the subscription it was created in, and the variable it belongs to. The scope of a variable value is the part of its ID preceding '/providers/Microsoft.Authorization/variables/{variableName}'.
delete_at_management_groupdeletemanagement_group_id, variable_name, variable_value_nameDeletes a variable value. This operation deletes a variable value, given its name, the management group it was created in, and the variable it belongs to. The scope of a variable value is the part of its ID preceding '/providers/Microsoft.Authorization/variables/{variableName}'.

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
management_group_idstringThe ID of the management group. Required.
subscription_idstring
variable_namestringThe name of the variable to operate on. Required.
variable_value_namestringThe name of the variable value to operate on. Required.

SELECT examples

Retrieves a variable value. This operation retrieves a single variable value; given its name, subscription it was created at and the variable it's created for.

SELECT
id,
name,
systemData,
type,
values
FROM azure.resource.variable_values
WHERE variable_name = '{{ variable_name }}' -- required
AND variable_value_name = '{{ variable_value_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a variable value. This operation creates or updates a variable value with the given subscription and name for a given variable. Variable values are scoped to the variable for which they are created for.

INSERT INTO azure.resource.variable_values (
properties,
variable_name,
variable_value_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ variable_name }}',
'{{ variable_value_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

Creates or updates a variable value. This operation creates or updates a variable value with the given subscription and name for a given variable. Variable values are scoped to the variable for which they are created for.

REPLACE azure.resource.variable_values
SET
properties = '{{ properties }}'
WHERE
variable_name = '{{ variable_name }}' --required
AND variable_value_name = '{{ variable_value_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Deletes a variable value. This operation deletes a variable value, given its name, the subscription it was created in, and the variable it belongs to. The scope of a variable value is the part of its ID preceding '/providers/Microsoft.Authorization/variables/{variableName}'.

DELETE FROM azure.resource.variable_values
WHERE variable_name = '{{ variable_name }}' --required
AND variable_value_name = '{{ variable_value_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;