users
Creates, updates, deletes, gets or lists a users
resource.
Overview
Name | users |
Type | Resource |
Id | azure.lab_services.users |
Fields
- vw_users
- users
Name | Datatype | Description |
---|---|---|
additional_usage_quota | text | field from the properties object |
display_name | text | field from the properties object |
email | text | field from the properties object |
invitation_sent | text | field from the properties object |
invitation_state | text | field from the properties object |
labName | text | field from the properties object |
provisioning_state | text | field from the properties object |
registration_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
resource_operation_error | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
total_usage | text | field from the properties object |
userName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | User resource properties |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | labName, resourceGroupName, subscriptionId, userName | Returns the properties of a lab user. |
list_by_lab | SELECT | labName, resourceGroupName, subscriptionId | Returns a list of all users for a lab. |
create_or_update | INSERT | labName, resourceGroupName, subscriptionId, userName, data__properties | Operation to create or update a lab user. |
delete | DELETE | labName, resourceGroupName, subscriptionId, userName | Operation to delete a user resource. |
update | UPDATE | labName, resourceGroupName, subscriptionId, userName | Operation to update a lab user. |
invite | EXEC | labName, resourceGroupName, subscriptionId, userName | Operation to invite a user to a lab. |
SELECT
examples
Returns a list of all users for a lab.
- vw_users
- users
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 }}';
SELECT
properties,
systemData
FROM azure.lab_services.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.lab_services.users (
labName,
resourceGroupName,
subscriptionId,
userName,
data__properties,
properties
)
SELECT
'{{ labName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ userName }}',
'{{ data__properties }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: properties
value:
- name: additionalUsageQuota
value: string
- name: provisioningState
value: []
- name: resourceOperationError
value:
- name: timestamp
value: string
- name: code
value: string
- name: message
value: string
- name: action
value: string
- name: displayName
value: string
- name: email
value: []
- name: registrationState
value: []
- name: invitationState
value: []
- name: invitationSent
value: string
- name: totalUsage
value: string
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 }}';