Skip to main content

labs

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

Overview

Namelabs
TypeResource
Idazure.lab_services.labs

Fields

The following fields are returned by SELECT queries:

The request was successful; response contains the Lab.

NameDatatypeDescription
locationstringThe geo-location where the resource lives
propertiesobjectLab resource properties
systemDataobjectMetadata pertaining to creation and last modification of the lab.
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectReturns the properties of a lab resource.
list_by_resource_groupselectReturns a list of all labs in a resource group.
list_by_subscriptionselectReturns a list of all labs for a subscription.
create_or_updateinsertdata__propertiesOperation to create or update a lab resource.
updateupdateOperation to update a lab resource.
deletedeleteOperation to delete a lab resource.
publishexecPublish or re-publish a lab. This will create or update all lab resources, such as virtual machines.
sync_groupexecAction used to manually kick off an AAD group sync job.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription

SELECT examples

Returns the properties of a lab resource.

SELECT
location,
properties,
systemData,
tags
FROM azure.lab_services.labs
;

INSERT examples

Operation to create or update a lab resource.

INSERT INTO azure.lab_services.labs (
data__tags,
data__location,
data__properties
)
SELECT
'{{ tags }}',
'{{ location }}',
'{{ properties }}' /* required */
RETURNING
location,
properties,
systemData,
tags
;

UPDATE examples

Operation to update a lab resource.

UPDATE azure.lab_services.labs
SET
data__tags = '{{ tags }}',
data__properties = '{{ properties }}'
RETURNING
location,
properties,
systemData,
tags;

DELETE examples

Operation to delete a lab resource.

DELETE FROM azure.lab_services.labs
;

Lifecycle Methods

Publish or re-publish a lab. This will create or update all lab resources, such as virtual machines.

EXEC azure.lab_services.labs.publish 

;