Skip to main content

formulas

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

Overview

Nameformulas
TypeResource
Idazure.dev_test_labs.formulas

Fields

NameDatatypeDescription
idtextThe identifier of the resource.
nametextThe name of the resource.
descriptiontextfield from the properties object
authortextfield from the properties object
creation_datetextfield from the properties object
formula_contenttextfield from the properties object
labNametextfield from the properties object
locationtextThe location of the resource.
os_typetextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextThe tags of the resource.
typetextThe type of the resource.
unique_identifiertextfield from the properties object
vmtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTlabName, name, resourceGroupName, subscriptionIdGet formula.
listSELECTlabName, resourceGroupName, subscriptionIdList formulas in a given lab.
create_or_updateINSERTlabName, name, resourceGroupName, subscriptionId, data__propertiesCreate or replace an existing formula. This operation can take a while to complete.
deleteDELETElabName, name, resourceGroupName, subscriptionIdDelete formula.
updateUPDATElabName, name, resourceGroupName, subscriptionIdAllows modifying tags of formulas. All other properties will be ignored.

SELECT examples

List formulas in a given lab.

SELECT
id,
name,
description,
author,
creation_date,
formula_content,
labName,
location,
os_type,
provisioning_state,
resourceGroupName,
subscriptionId,
tags,
type,
unique_identifier,
vm
FROM azure.dev_test_labs.vw_formulas
WHERE labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.dev_test_labs.formulas (
labName,
name,
resourceGroupName,
subscriptionId,
data__properties,
location,
tags,
properties
)
SELECT
'{{ labName }}',
'{{ name }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}'
;

UPDATE example

Updates a formulas resource.

/*+ update */
UPDATE azure.dev_test_labs.formulas
SET
tags = '{{ tags }}'
WHERE
labName = '{{ labName }}'
AND name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified formulas resource.

/*+ delete */
DELETE FROM azure.dev_test_labs.formulas
WHERE labName = '{{ labName }}'
AND name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';