Skip to main content

users

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

Overview

Nameusers
TypeResource
Idazure.dev_test_labs.users

Fields

NameDatatypeDescription
idtextThe identifier of the resource.
nametextThe name of the resource.
created_datetextfield from the properties object
identitytextfield 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
secret_storetextfield 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

Methods

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

SELECT examples

List user profiles in a given lab.

SELECT
id,
name,
created_date,
identity,
labName,
location,
provisioning_state,
resourceGroupName,
secret_store,
subscriptionId,
tags,
type,
unique_identifier
FROM azure.dev_test_labs.vw_users
WHERE labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

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

UPDATE example

Updates a users resource.

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

DELETE example

Deletes the specified users resource.

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