lab_plans
Creates, updates, deletes, gets or lists a lab_plans resource.
Overview
| Name | lab_plans |
| Type | Resource |
| Id | azure_extras.lab_services.lab_plans |
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. |
allowedRegions | array | The allowed regions for the lab creator to use when creating labs using this lab plan. |
defaultAutoShutdownProfile | object | The default lab shutdown profile. This can be changed on a lab resource and only provides a default profile. |
defaultConnectionProfile | object | The default lab connection profile. This can be changed on a lab resource and only provides a default profile. |
defaultNetworkProfile | object | The lab plan network profile. To enforce lab network policies they must be defined here and cannot be changed when there are existing labs associated with this lab plan. |
identity | object | Managed Identity Information. |
linkedLmsInstance | string | Base Url of the lms instance this lab plan can link lab rosters against. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Current provisioning state of the lab plan. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Locked". |
sharedGalleryId | string | Resource ID of the Shared Image Gallery attached to this lab plan. When saving a lab template virtual machine image it will be persisted in this gallery. Shared images from the gallery can be made available to use when creating new labs. |
supportInfo | object | Support contact information and instructions for users of the lab plan. This information is displayed to lab owners and virtual machine users for all labs in the lab plan. |
systemData | object | Metadata pertaining to creation and last modification of the lab plan. |
tags | object | Resource tags. |
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. |
allowedRegions | array | The allowed regions for the lab creator to use when creating labs using this lab plan. |
defaultAutoShutdownProfile | object | The default lab shutdown profile. This can be changed on a lab resource and only provides a default profile. |
defaultConnectionProfile | object | The default lab connection profile. This can be changed on a lab resource and only provides a default profile. |
defaultNetworkProfile | object | The lab plan network profile. To enforce lab network policies they must be defined here and cannot be changed when there are existing labs associated with this lab plan. |
identity | object | Managed Identity Information. |
linkedLmsInstance | string | Base Url of the lms instance this lab plan can link lab rosters against. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Current provisioning state of the lab plan. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Locked". |
sharedGalleryId | string | Resource ID of the Shared Image Gallery attached to this lab plan. When saving a lab template virtual machine image it will be persisted in this gallery. Shared images from the gallery can be made available to use when creating new labs. |
supportInfo | object | Support contact information and instructions for users of the lab plan. This information is displayed to lab owners and virtual machine users for all labs in the lab plan. |
systemData | object | Metadata pertaining to creation and last modification of the lab plan. |
tags | object | Resource tags. |
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. |
allowedRegions | array | The allowed regions for the lab creator to use when creating labs using this lab plan. |
defaultAutoShutdownProfile | object | The default lab shutdown profile. This can be changed on a lab resource and only provides a default profile. |
defaultConnectionProfile | object | The default lab connection profile. This can be changed on a lab resource and only provides a default profile. |
defaultNetworkProfile | object | The lab plan network profile. To enforce lab network policies they must be defined here and cannot be changed when there are existing labs associated with this lab plan. |
identity | object | Managed Identity Information. |
linkedLmsInstance | string | Base Url of the lms instance this lab plan can link lab rosters against. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Current provisioning state of the lab plan. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Locked". |
sharedGalleryId | string | Resource ID of the Shared Image Gallery attached to this lab plan. When saving a lab template virtual machine image it will be persisted in this gallery. Shared images from the gallery can be made available to use when creating new labs. |
supportInfo | object | Support contact information and instructions for users of the lab plan. This information is displayed to lab owners and virtual machine users for all labs in the lab plan. |
systemData | object | Metadata pertaining to creation and last modification of the lab plan. |
tags | object | Resource tags. |
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 | resource_group_name, lab_plan_name, subscription_id | Retrieves a Lab Plan resource. Retrieves the properties of a Lab Plan. | |
list_by_resource_group | select | resource_group_name, subscription_id | Get all lab plans for a subscription and resource group. Returns a list of all lab plans for a subscription and resource group. | |
list_by_subscription | select | subscription_id | $filter | Get all lab plans for a subscription. Returns a list of all lab plans within a subscription. |
create_or_update | insert | resource_group_name, lab_plan_name, subscription_id, location | Updates or creates a Lab Plan resource. Operation to create or update a Lab Plan resource. | |
update | update | resource_group_name, lab_plan_name, subscription_id | Updates a Lab Plan resource. Operation to update a Lab Plan resource. | |
create_or_update | replace | resource_group_name, lab_plan_name, subscription_id, location | Updates or creates a Lab Plan resource. Operation to create or update a Lab Plan resource. | |
delete | delete | resource_group_name, lab_plan_name, subscription_id | Deletes a Lab Plan resource. Operation to delete a Lab Plan resource. Deleting a lab plan does not delete labs associated with a lab plan, nor does it delete shared images added to a gallery via the lab plan permission container. | |
save_image | exec | resource_group_name, lab_plan_name, subscription_id | Save an image from a lab VM to the attached shared image gallery. Saves an image from a lab VM to the attached shared image gallery. |
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_plan_name | string | The name of the lab plan that uniquely identifies it within containing resource group. Used in resource URIs and in UI. 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
Retrieves a Lab Plan resource. Retrieves the properties of a Lab Plan.
SELECT
id,
name,
allowedRegions,
defaultAutoShutdownProfile,
defaultConnectionProfile,
defaultNetworkProfile,
identity,
linkedLmsInstance,
location,
provisioningState,
sharedGalleryId,
supportInfo,
systemData,
tags,
type
FROM azure_extras.lab_services.lab_plans
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND lab_plan_name = '{{ lab_plan_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get all lab plans for a subscription and resource group. Returns a list of all lab plans for a subscription and resource group.
SELECT
id,
name,
allowedRegions,
defaultAutoShutdownProfile,
defaultConnectionProfile,
defaultNetworkProfile,
identity,
linkedLmsInstance,
location,
provisioningState,
sharedGalleryId,
supportInfo,
systemData,
tags,
type
FROM azure_extras.lab_services.lab_plans
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get all lab plans for a subscription. Returns a list of all lab plans within a subscription.
SELECT
id,
name,
allowedRegions,
defaultAutoShutdownProfile,
defaultConnectionProfile,
defaultNetworkProfile,
identity,
linkedLmsInstance,
location,
provisioningState,
sharedGalleryId,
supportInfo,
systemData,
tags,
type
FROM azure_extras.lab_services.lab_plans
WHERE subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
;
INSERT examples
- create_or_update
- Manifest
Updates or creates a Lab Plan resource. Operation to create or update a Lab Plan resource.
INSERT INTO azure_extras.lab_services.lab_plans (
tags,
location,
identity,
properties,
resource_group_name,
lab_plan_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ identity }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ lab_plan_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: lab_plans
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the lab_plans resource.
- name: lab_plan_name
value: "{{ lab_plan_name }}"
description: Required parameter for the lab_plans resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the lab_plans resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: identity
description: |
Managed Identity Information.
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
- name: properties
value:
defaultConnectionProfile:
webSshAccess: "{{ webSshAccess }}"
webRdpAccess: "{{ webRdpAccess }}"
clientSshAccess: "{{ clientSshAccess }}"
clientRdpAccess: "{{ clientRdpAccess }}"
defaultAutoShutdownProfile:
shutdownOnDisconnect: "{{ shutdownOnDisconnect }}"
shutdownWhenNotConnected: "{{ shutdownWhenNotConnected }}"
shutdownOnIdle: "{{ shutdownOnIdle }}"
disconnectDelay: "{{ disconnectDelay }}"
noConnectDelay: "{{ noConnectDelay }}"
idleDelay: "{{ idleDelay }}"
defaultNetworkProfile:
subnetId: "{{ subnetId }}"
allowedRegions:
- "{{ allowedRegions }}"
sharedGalleryId: "{{ sharedGalleryId }}"
supportInfo:
url: "{{ url }}"
email: "{{ email }}"
phone: "{{ phone }}"
instructions: "{{ instructions }}"
linkedLmsInstance: "{{ linkedLmsInstance }}"
UPDATE examples
- update
Updates a Lab Plan resource. Operation to update a Lab Plan resource.
UPDATE azure_extras.lab_services.lab_plans
SET
tags = '{{ tags }}',
identity = '{{ identity }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND lab_plan_name = '{{ lab_plan_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;
REPLACE examples
- create_or_update
Updates or creates a Lab Plan resource. Operation to create or update a Lab Plan resource.
REPLACE azure_extras.lab_services.lab_plans
SET
tags = '{{ tags }}',
location = '{{ location }}',
identity = '{{ identity }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND lab_plan_name = '{{ lab_plan_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Deletes a Lab Plan resource. Operation to delete a Lab Plan resource. Deleting a lab plan does not delete labs associated with a lab plan, nor does it delete shared images added to a gallery via the lab plan permission container.
DELETE FROM azure_extras.lab_services.lab_plans
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND lab_plan_name = '{{ lab_plan_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- save_image
Save an image from a lab VM to the attached shared image gallery. Saves an image from a lab VM to the attached shared image gallery.
EXEC azure_extras.lab_services.lab_plans.save_image
@resource_group_name='{{ resource_group_name }}' --required,
@lab_plan_name='{{ lab_plan_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"name": "{{ name }}",
"labVirtualMachineId": "{{ labVirtualMachineId }}"
}'
;