labs
Creates, updates, deletes, gets or lists a labs resource.
Overview
| Name | labs |
| Type | Resource |
| Id | azure_extras.education.labs |
Fields
The following fields are returned by SELECT queries:
- get
- list_all
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
budgetPerStudent | object | Default monetary cap for each student in this lab. Required. |
description | string | Detail description of this lab. Required. |
displayName | string | Lab Display Name. Required. |
effectiveDate | string (date-time) | Lab creation date. |
expirationDate | string (date-time) | Default expiration date for each student in this lab. Required. |
invitationCode | string | invitation code for redeemable lab. |
maxStudentCount | number | the total number of students that can be accepted to the lab. |
status | string | The status of this lab. Known values are: "Active", "Deleted", and "Pending". (Active, Deleted, Pending) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
totalAllocatedBudget | object | Total allocated budget. |
totalBudget | object | Total budget. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
budgetPerStudent | object | Default monetary cap for each student in this lab. Required. |
description | string | Detail description of this lab. Required. |
displayName | string | Lab Display Name. Required. |
effectiveDate | string (date-time) | Lab creation date. |
expirationDate | string (date-time) | Default expiration date for each student in this lab. Required. |
invitationCode | string | invitation code for redeemable lab. |
maxStudentCount | number | the total number of students that can be accepted to the lab. |
status | string | The status of this lab. Known values are: "Active", "Deleted", and "Pending". (Active, Deleted, Pending) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
totalAllocatedBudget | object | Total allocated budget. |
totalBudget | object | Total budget. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | billing_account_name, billing_profile_name, invoice_section_name | includeBudget | Get the details for a specific lab associated with the provided billing account name, billing profile name, and invoice section name. |
list_all | select | billing_account_name, billing_profile_name | includeBudget, includeDeleted | Get a list of labs associated with the provided billing account name and billing profile name. |
create_or_update | insert | billing_account_name, billing_profile_name, invoice_section_name | Create a new lab or update a previously created lab. | |
create_or_update | replace | billing_account_name, billing_profile_name, invoice_section_name | Create a new lab or update a previously created lab. | |
delete | delete | billing_account_name, billing_profile_name, invoice_section_name | 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. | |
generate_invite_code | exec | billing_account_name, billing_profile_name, invoice_section_name | onlyUpdateStudentCountParameter | Generate invite code for a lab. |
list_raw | exec | billing_account_name, billing_profile_name, invoice_section_name | includeBudget | Get the details for a specific lab associated with the provided billing account name, billing profile name, and invoice section name. |
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.
| Name | Datatype | Description |
|---|---|---|
billing_account_name | string | The name of the billing account. Required. |
billing_profile_name | string | The name of the billing profile. Required. |
invoice_section_name | string | The name of the invoice section. Required. |
includeBudget | boolean | May be used to include budget information. Default value is None. |
includeDeleted | boolean | May be used to show deleted items. Default value is None. |
onlyUpdateStudentCountParameter | boolean | set this flag to true if you want to update student count without generating a new invite code. Default value is None. |
SELECT examples
- get
- list_all
Get the details for a specific lab associated with the provided billing account name, billing profile name, and invoice section name.
SELECT
id,
name,
budgetPerStudent,
description,
displayName,
effectiveDate,
expirationDate,
invitationCode,
maxStudentCount,
status,
systemData,
totalAllocatedBudget,
totalBudget,
type
FROM azure_extras.education.labs
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND billing_profile_name = '{{ billing_profile_name }}' -- required
AND invoice_section_name = '{{ invoice_section_name }}' -- required
AND includeBudget = '{{ includeBudget }}'
;
Get a list of labs associated with the provided billing account name and billing profile name.
SELECT
id,
name,
budgetPerStudent,
description,
displayName,
effectiveDate,
expirationDate,
invitationCode,
maxStudentCount,
status,
systemData,
totalAllocatedBudget,
totalBudget,
type
FROM azure_extras.education.labs
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND billing_profile_name = '{{ billing_profile_name }}' -- required
AND includeBudget = '{{ includeBudget }}'
AND includeDeleted = '{{ includeDeleted }}'
;
INSERT examples
- create_or_update
- Manifest
Create a new lab or update a previously created lab.
INSERT INTO azure_extras.education.labs (
properties,
billing_account_name,
billing_profile_name,
invoice_section_name
)
SELECT
'{{ properties }}',
'{{ billing_account_name }}',
'{{ billing_profile_name }}',
'{{ invoice_section_name }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: labs
props:
- name: billing_account_name
value: "{{ billing_account_name }}"
description: Required parameter for the labs resource.
- name: billing_profile_name
value: "{{ billing_profile_name }}"
description: Required parameter for the labs resource.
- name: invoice_section_name
value: "{{ invoice_section_name }}"
description: Required parameter for the labs resource.
- name: properties
description: |
Get lab response properties.
value:
displayName: "{{ displayName }}"
budgetPerStudent:
currency: "{{ currency }}"
value: {{ value }}
description: "{{ description }}"
expirationDate: "{{ expirationDate }}"
effectiveDate: "{{ effectiveDate }}"
status: "{{ status }}"
maxStudentCount: {{ maxStudentCount }}
invitationCode: "{{ invitationCode }}"
totalBudget:
currency: "{{ currency }}"
value: {{ value }}
totalAllocatedBudget:
currency: "{{ currency }}"
value: {{ value }}
REPLACE examples
- create_or_update
Create a new lab or update a previously created lab.
REPLACE azure_extras.education.labs
SET
properties = '{{ properties }}'
WHERE
billing_account_name = '{{ billing_account_name }}' --required
AND billing_profile_name = '{{ billing_profile_name }}' --required
AND invoice_section_name = '{{ invoice_section_name }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
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 billing_account_name = '{{ billing_account_name }}' --required
AND billing_profile_name = '{{ billing_profile_name }}' --required
AND invoice_section_name = '{{ invoice_section_name }}' --required
;
Lifecycle Methods
- generate_invite_code
- list_raw
Generate invite code for a lab.
EXEC azure_extras.education.labs.generate_invite_code
@billing_account_name='{{ billing_account_name }}' --required,
@billing_profile_name='{{ billing_profile_name }}' --required,
@invoice_section_name='{{ invoice_section_name }}' --required,
@onlyUpdateStudentCountParameter={{ onlyUpdateStudentCountParameter }}
@@json=
'{
"maxStudentCount": {{ maxStudentCount }}
}'
;
Get the details for a specific lab associated with the provided billing account name, billing profile name, and invoice section name.
EXEC azure_extras.education.labs.list_raw
@billing_account_name='{{ billing_account_name }}' --required,
@billing_profile_name='{{ billing_profile_name }}' --required,
@invoice_section_name='{{ invoice_section_name }}' --required,
@includeBudget={{ includeBudget }}
;