labs
Creates, updates, deletes, gets or lists a labs resource.
Overview
| Name | labs |
| Type | Resource |
| Id | azure_extras.lab_services.labs |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list_by_subscription
| 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. |
autoShutdownProfile | object | The resource auto shutdown configuration for the lab. This controls whether actions are taken on resources that are sitting idle. |
connectionProfile | object | The connection profile for the lab. This controls settings such as web access to lab resources or whether RDP or SSH ports are open. |
description | string | The description of the lab. |
labPlanId | string | The ID of the lab plan. Used during resource creation to provide defaults and acts as a permission container when creating a lab via labs.azure.com. Setting a labPlanId on an existing lab provides organization.. |
location | string | The geo-location where the resource lives. Required. |
networkProfile | object | The network profile for the lab, typically applied via a lab plan. This profile cannot be modified once a lab has been created. |
provisioningState | string | Current provisioning state of the lab. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Locked". |
rosterProfile | object | The lab user list management profile. |
securityProfile | object | The lab security profile. |
state | string | The lab state. Known values are: "Draft", "Publishing", "Scaling", "Syncing", and "Published". |
systemData | object | Metadata pertaining to creation and last modification of the lab. |
tags | object | Resource tags. |
title | string | The title of the lab. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
virtualMachineProfile | object | The profile used for creating lab virtual machines. |
| 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. |
autoShutdownProfile | object | The resource auto shutdown configuration for the lab. This controls whether actions are taken on resources that are sitting idle. |
connectionProfile | object | The connection profile for the lab. This controls settings such as web access to lab resources or whether RDP or SSH ports are open. |
description | string | The description of the lab. |
labPlanId | string | The ID of the lab plan. Used during resource creation to provide defaults and acts as a permission container when creating a lab via labs.azure.com. Setting a labPlanId on an existing lab provides organization.. |
location | string | The geo-location where the resource lives. Required. |
networkProfile | object | The network profile for the lab, typically applied via a lab plan. This profile cannot be modified once a lab has been created. |
provisioningState | string | Current provisioning state of the lab. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Locked". |
rosterProfile | object | The lab user list management profile. |
securityProfile | object | The lab security profile. |
state | string | The lab state. Known values are: "Draft", "Publishing", "Scaling", "Syncing", and "Published". |
systemData | object | Metadata pertaining to creation and last modification of the lab. |
tags | object | Resource tags. |
title | string | The title of the lab. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
virtualMachineProfile | object | The profile used for creating lab virtual machines. |
| 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. |
autoShutdownProfile | object | The resource auto shutdown configuration for the lab. This controls whether actions are taken on resources that are sitting idle. |
connectionProfile | object | The connection profile for the lab. This controls settings such as web access to lab resources or whether RDP or SSH ports are open. |
description | string | The description of the lab. |
labPlanId | string | The ID of the lab plan. Used during resource creation to provide defaults and acts as a permission container when creating a lab via labs.azure.com. Setting a labPlanId on an existing lab provides organization.. |
location | string | The geo-location where the resource lives. Required. |
networkProfile | object | The network profile for the lab, typically applied via a lab plan. This profile cannot be modified once a lab has been created. |
provisioningState | string | Current provisioning state of the lab. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Locked". |
rosterProfile | object | The lab user list management profile. |
securityProfile | object | The lab security profile. |
state | string | The lab state. Known values are: "Draft", "Publishing", "Scaling", "Syncing", and "Published". |
systemData | object | Metadata pertaining to creation and last modification of the lab. |
tags | object | Resource tags. |
title | string | The title of the lab. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
virtualMachineProfile | object | The profile used for creating lab virtual machines. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, lab_name, subscription_id | Get a lab resource. Returns the properties of a lab resource. | |
list_by_resource_group | select | resource_group_name, subscription_id | Get all labs for a subscription and resource group. Returns a list of all labs in a resource group. | |
list_by_subscription | select | subscription_id | $filter | Get all labs for a subscription. Returns a list of all labs for a subscription. |
create_or_update | insert | resource_group_name, lab_name, subscription_id, location | Create or update a lab resource. Operation to create or update a lab resource. | |
update | update | resource_group_name, lab_name, subscription_id | Update a lab resource. Operation to update a lab resource. | |
create_or_update | replace | resource_group_name, lab_name, subscription_id, location | Create or update a lab resource. Operation to create or update a lab resource. | |
delete | delete | resource_group_name, lab_name, subscription_id | Deletes a lab resource. Operation to delete a lab resource. | |
publish | exec | resource_group_name, lab_name, subscription_id | Publish or re-publish a lab. Publish or re-publish a lab. This will create or update all lab resources, such as virtual machines. | |
sync_group | exec | resource_group_name, lab_name, subscription_id | Manually sync the lab group. Action 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.
| Name | Datatype | Description |
|---|---|---|
lab_name | string | The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
$filter | string | The filter to apply to the operation. Default value is None. |
SELECT examples
- get
- list_by_resource_group
- list_by_subscription
Get a lab resource. Returns the properties of a lab resource.
SELECT
id,
name,
autoShutdownProfile,
connectionProfile,
description,
labPlanId,
location,
networkProfile,
provisioningState,
rosterProfile,
securityProfile,
state,
systemData,
tags,
title,
type,
virtualMachineProfile
FROM azure_extras.lab_services.labs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND lab_name = '{{ lab_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get all labs for a subscription and resource group. Returns a list of all labs in a resource group.
SELECT
id,
name,
autoShutdownProfile,
connectionProfile,
description,
labPlanId,
location,
networkProfile,
provisioningState,
rosterProfile,
securityProfile,
state,
systemData,
tags,
title,
type,
virtualMachineProfile
FROM azure_extras.lab_services.labs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get all labs for a subscription. Returns a list of all labs for a subscription.
SELECT
id,
name,
autoShutdownProfile,
connectionProfile,
description,
labPlanId,
location,
networkProfile,
provisioningState,
rosterProfile,
securityProfile,
state,
systemData,
tags,
title,
type,
virtualMachineProfile
FROM azure_extras.lab_services.labs
WHERE subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
;
INSERT examples
- create_or_update
- Manifest
Create or update a lab resource. Operation to create or update a lab resource.
INSERT INTO azure_extras.lab_services.labs (
tags,
location,
properties,
resource_group_name,
lab_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ lab_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: labs
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the labs resource.
- name: lab_name
value: "{{ lab_name }}"
description: Required parameter for the labs resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the labs resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
value:
autoShutdownProfile:
shutdownOnDisconnect: "{{ shutdownOnDisconnect }}"
shutdownWhenNotConnected: "{{ shutdownWhenNotConnected }}"
shutdownOnIdle: "{{ shutdownOnIdle }}"
disconnectDelay: "{{ disconnectDelay }}"
noConnectDelay: "{{ noConnectDelay }}"
idleDelay: "{{ idleDelay }}"
connectionProfile:
webSshAccess: "{{ webSshAccess }}"
webRdpAccess: "{{ webRdpAccess }}"
clientSshAccess: "{{ clientSshAccess }}"
clientRdpAccess: "{{ clientRdpAccess }}"
virtualMachineProfile:
createOption: "{{ createOption }}"
imageReference:
id: "{{ id }}"
offer: "{{ offer }}"
publisher: "{{ publisher }}"
sku: "{{ sku }}"
version: "{{ version }}"
exactVersion: "{{ exactVersion }}"
osType: "{{ osType }}"
sku:
name: "{{ name }}"
tier: "{{ tier }}"
size: "{{ size }}"
family: "{{ family }}"
capacity: {{ capacity }}
additionalCapabilities:
installGpuDrivers: "{{ installGpuDrivers }}"
usageQuota: "{{ usageQuota }}"
useSharedPassword: "{{ useSharedPassword }}"
adminUser:
username: "{{ username }}"
password: "{{ password }}"
nonAdminUser:
username: "{{ username }}"
password: "{{ password }}"
securityProfile:
registrationCode: "{{ registrationCode }}"
openAccess: "{{ openAccess }}"
rosterProfile:
activeDirectoryGroupId: "{{ activeDirectoryGroupId }}"
ltiContextId: "{{ ltiContextId }}"
lmsInstance: "{{ lmsInstance }}"
ltiClientId: "{{ ltiClientId }}"
ltiRosterEndpoint: "{{ ltiRosterEndpoint }}"
labPlanId: "{{ labPlanId }}"
title: "{{ title }}"
description: "{{ description }}"
networkProfile:
subnetId: "{{ subnetId }}"
loadBalancerId: "{{ loadBalancerId }}"
publicIpId: "{{ publicIpId }}"
UPDATE examples
- update
Update a lab resource. Operation to update a lab resource.
UPDATE azure_extras.lab_services.labs
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND lab_name = '{{ lab_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;
REPLACE examples
- create_or_update
Create or update a lab resource. Operation to create or update a lab resource.
REPLACE azure_extras.lab_services.labs
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND lab_name = '{{ lab_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Deletes a lab resource. Operation to delete a lab resource.
DELETE FROM azure_extras.lab_services.labs
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND lab_name = '{{ lab_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- publish
- sync_group
Publish or re-publish a lab. Publish or re-publish a lab. This will create or update all lab resources, such as virtual machines.
EXEC azure_extras.lab_services.labs.publish
@resource_group_name='{{ resource_group_name }}' --required,
@lab_name='{{ lab_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Manually sync the lab group. Action used to manually kick off an AAD group sync job.
EXEC azure_extras.lab_services.labs.sync_group
@resource_group_name='{{ resource_group_name }}' --required,
@lab_name='{{ lab_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;