Skip to main content

environments

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

Overview

Nameenvironments
TypeResource
Idazure.dev_test_labs.environments

Fields

NameDatatypeDescription
idtextThe identifier of the resource.
nametextThe name of the resource.
arm_template_display_nametextfield from the properties object
created_by_usertextfield from the properties object
deployment_propertiestextfield from the properties object
labNametextfield from the properties object
locationtextThe location of the resource.
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
resource_group_idtextfield 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
userNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTlabName, name, resourceGroupName, subscriptionId, userNameGet environment.
listSELECTlabName, resourceGroupName, subscriptionId, userNameList environments in a given user profile.
create_or_updateINSERTlabName, name, resourceGroupName, subscriptionId, userName, data__propertiesCreate or replace an existing environment. This operation can take a while to complete.
deleteDELETElabName, name, resourceGroupName, subscriptionId, userNameDelete environment. This operation can take a while to complete.
updateUPDATElabName, name, resourceGroupName, subscriptionId, userNameAllows modifying tags of environments. All other properties will be ignored.

SELECT examples

List environments in a given user profile.

SELECT
id,
name,
arm_template_display_name,
created_by_user,
deployment_properties,
labName,
location,
provisioning_state,
resourceGroupName,
resource_group_id,
subscriptionId,
tags,
type,
unique_identifier,
userName
FROM azure.dev_test_labs.vw_environments
WHERE labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND userName = '{{ userName }}';

INSERT example

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

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

UPDATE example

Updates a environments resource.

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

DELETE example

Deletes the specified environments resource.

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