Skip to main content

users

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

Overview

Nameusers
TypeResource
Idazure.lab_services.users

Fields

NameDatatypeDescription
additional_usage_quotatextfield from the properties object
display_nametextfield from the properties object
emailtextfield from the properties object
invitation_senttextfield from the properties object
invitation_statetextfield from the properties object
labNametextfield from the properties object
provisioning_statetextfield from the properties object
registration_statetextfield from the properties object
resourceGroupNametextfield from the properties object
resource_operation_errortextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
total_usagetextfield from the properties object
userNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTlabName, resourceGroupName, subscriptionId, userNameReturns the properties of a lab user.
list_by_labSELECTlabName, resourceGroupName, subscriptionIdReturns a list of all users for a lab.
create_or_updateINSERTlabName, resourceGroupName, subscriptionId, userName, data__propertiesOperation to create or update a lab user.
deleteDELETElabName, resourceGroupName, subscriptionId, userNameOperation to delete a user resource.
updateUPDATElabName, resourceGroupName, subscriptionId, userNameOperation to update a lab user.
inviteEXEClabName, resourceGroupName, subscriptionId, userNameOperation to invite a user to a lab.

SELECT examples

Returns a list of all users for a lab.

SELECT
additional_usage_quota,
display_name,
email,
invitation_sent,
invitation_state,
labName,
provisioning_state,
registration_state,
resourceGroupName,
resource_operation_error,
subscriptionId,
system_data,
total_usage,
userName
FROM azure.lab_services.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.lab_services.users (
labName,
resourceGroupName,
subscriptionId,
userName,
data__properties,
properties
)
SELECT
'{{ labName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ userName }}',
'{{ data__properties }}',
'{{ properties }}'
;

UPDATE example

Updates a users resource.

/*+ update */
UPDATE azure.lab_services.users
SET
properties = '{{ properties }}'
WHERE
labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND userName = '{{ userName }}';

DELETE example

Deletes the specified users resource.

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