Skip to main content

labs

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

Overview

Namelabs
TypeResource
Idazure_extras.education.labs

Fields

The following fields are returned by SELECT queries:

Lab details.

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
namestringThe name of the resource
propertiesobjectGet lab response properties.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectbillingAccountName, billingProfileName, invoiceSectionNameincludeBudgetGet the details for a specific lab associated with the provided billing account name, billing profile name, and invoice section name.
getselectbillingAccountName, billingProfileName, invoiceSectionNameincludeBudgetGet the details for a specific lab associated with the provided billing account name, billing profile name, and invoice section name.
list_allselectbillingAccountName, billingProfileNameincludeBudget, includeDeletedGet a list of labs associated with the provided billing account name and billing profile name.
create_or_updateinsertbillingAccountName, billingProfileName, invoiceSectionNameCreate a new lab or update a previously created lab.
deletedeletebillingAccountName, billingProfileName, invoiceSectionNameDelete a specific lab associated with the provided billing account name, billing profile name, and invoice section name. Note all students must be removed from the lab in order to delete the lab.
generate_invite_codeexecbillingAccountName, billingProfileName, invoiceSectionNameonlyUpdateStudentCountParameterGenerate invite code for a lab

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
billingAccountNamestringThe ID that uniquely identifies a billing account.
billingProfileNamestringThe ID that uniquely identifies a billing profile.
invoiceSectionNamestringThe ID that uniquely identifies an invoice section.
includeBudgetbooleanMay be used to include budget information.
includeDeletedbooleanMay be used to show deleted items.
onlyUpdateStudentCountParameterbooleanset this flag to true if you want to update student count without generating a new invite code

SELECT examples

Get the details for a specific lab associated with the provided billing account name, billing profile name, and invoice section name.

SELECT
id,
name,
properties,
systemData,
type
FROM azure_extras.education.labs
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND billingProfileName = '{{ billingProfileName }}' -- required
AND invoiceSectionName = '{{ invoiceSectionName }}' -- required
AND includeBudget = '{{ includeBudget }}'
;

INSERT examples

Create a new lab or update a previously created lab.

INSERT INTO azure_extras.education.labs (
data__properties,
billingAccountName,
billingProfileName,
invoiceSectionName
)
SELECT
'{{ properties }}',
'{{ billingAccountName }}',
'{{ billingProfileName }}',
'{{ invoiceSectionName }}'
RETURNING
id,
name,
properties,
systemData,
type
;

DELETE examples

Delete a specific lab associated with the provided billing account name, billing profile name, and invoice section name. Note all students must be removed from the lab in order to delete the lab.

DELETE FROM azure_extras.education.labs
WHERE billingAccountName = '{{ billingAccountName }}' --required
AND billingProfileName = '{{ billingProfileName }}' --required
AND invoiceSectionName = '{{ invoiceSectionName }}' --required
;

Lifecycle Methods

Generate invite code for a lab

EXEC azure_extras.education.labs.generate_invite_code 
@billingAccountName='{{ billingAccountName }}' --required,
@billingProfileName='{{ billingProfileName }}' --required,
@invoiceSectionName='{{ invoiceSectionName }}' --required,
@onlyUpdateStudentCountParameter={{ onlyUpdateStudentCountParameter }}
@@json=
'{
"maxStudentCount": {{ maxStudentCount }}
}'
;