labs
Creates, updates, deletes, gets or lists a labs
resource.
Overview
Name | labs |
Type | Resource |
Id | azure.lab_services.labs |
Fields
- vw_labs
- labs
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
auto_shutdown_profile | text | field from the properties object |
connection_profile | text | field from the properties object |
labName | text | field from the properties object |
lab_plan_id | text | field from the properties object |
location | text | The geo-location where the resource lives |
network_profile | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
resource_operation_error | text | field from the properties object |
roster_profile | text | field from the properties object |
security_profile | text | field from the properties object |
state | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
tags | text | Resource tags. |
title | text | field from the properties object |
virtual_machine_profile | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
location | string | The geo-location where the resource lives |
properties | object | Properties of a lab resource. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | labName, resourceGroupName, subscriptionId | Returns the properties of a lab resource. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Returns a list of all labs in a resource group. |
list_by_subscription | SELECT | subscriptionId | Returns a list of all labs for a subscription. |
create_or_update | INSERT | labName, resourceGroupName, subscriptionId, data__properties | Operation to create or update a lab resource. |
delete | DELETE | labName, resourceGroupName, subscriptionId | Operation to delete a lab resource. |
update | UPDATE | labName, resourceGroupName, subscriptionId | Operation to update a lab resource. |
publish | EXEC | labName, resourceGroupName, subscriptionId | Publish or re-publish a lab. This will create or update all lab resources, such as virtual machines. |
sync_group | EXEC | labName, resourceGroupName, subscriptionId | Action used to manually kick off an AAD group sync job. |
SELECT
examples
Returns a list of all labs for a subscription.
- vw_labs
- labs
SELECT
description,
auto_shutdown_profile,
connection_profile,
labName,
lab_plan_id,
location,
network_profile,
provisioning_state,
resourceGroupName,
resource_operation_error,
roster_profile,
security_profile,
state,
subscriptionId,
system_data,
tags,
title,
virtual_machine_profile
FROM azure.lab_services.vw_labs
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
location,
properties,
systemData,
tags
FROM azure.lab_services.labs
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new labs
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.lab_services.labs (
labName,
resourceGroupName,
subscriptionId,
data__properties,
tags,
location,
properties
)
SELECT
'{{ labName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ tags }}',
'{{ location }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: tags
value: object
- name: location
value: string
- 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: autoShutdownProfile
value:
- name: shutdownOnDisconnect
value: []
- name: shutdownOnIdle
value: []
- name: disconnectDelay
value: string
- name: noConnectDelay
value: string
- name: idleDelay
value: string
- name: connectionProfile
value:
- name: webSshAccess
value: []
- name: virtualMachineProfile
value:
- name: createOption
value: string
- name: imageReference
value:
- name: id
value: []
- name: offer
value: string
- name: publisher
value: string
- name: sku
value: string
- name: version
value: string
- name: exactVersion
value: string
- name: osType
value: []
- name: sku
value:
- name: name
value: string
- name: tier
value: string
- name: size
value: string
- name: family
value: string
- name: capacity
value: integer
- name: additionalCapabilities
value: []
- name: usageQuota
value: string
- name: adminUser
value:
- name: username
value: string
- name: password
value: string
- name: securityProfile
value:
- name: registrationCode
value: string
- name: rosterProfile
value:
- name: activeDirectoryGroupId
value: string
- name: ltiContextId
value: string
- name: lmsInstance
value: string
- name: ltiClientId
value: string
- name: ltiRosterEndpoint
value: string
- name: title
value: string
- name: description
value: string
- name: provisioningState
value: []
- name: networkProfile
value: []
- name: state
value: []
- name: resourceOperationError
value:
- name: timestamp
value: string
- name: code
value: string
- name: message
value: string
- name: action
value: string
UPDATE
example
Updates a labs
resource.
/*+ update */
UPDATE azure.lab_services.labs
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified labs
resource.
/*+ delete */
DELETE FROM azure.lab_services.labs
WHERE labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';