Skip to main content

lab_plans

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

Overview

Namelab_plans
TypeResource
Idazure_extras.lab_services.lab_plans

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
allowedRegionsarrayThe allowed regions for the lab creator to use when creating labs using this lab plan.
defaultAutoShutdownProfileobjectThe default lab shutdown profile. This can be changed on a lab resource and only provides a default profile.
defaultConnectionProfileobjectThe default lab connection profile. This can be changed on a lab resource and only provides a default profile.
defaultNetworkProfileobjectThe 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.
identityobjectManaged Identity Information.
linkedLmsInstancestringBase Url of the lms instance this lab plan can link lab rosters against.
locationstringThe geo-location where the resource lives. Required.
provisioningStatestringCurrent provisioning state of the lab plan. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Locked".
sharedGalleryIdstringResource 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.
supportInfoobjectSupport 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.
systemDataobjectMetadata pertaining to creation and last modification of the lab plan.
tagsobjectResource tags.
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
getselectresource_group_name, lab_plan_name, subscription_idRetrieves a Lab Plan resource. Retrieves the properties of a Lab Plan.
list_by_resource_groupselectresource_group_name, subscription_idGet all lab plans for a subscription and resource group. Returns a list of all lab plans for a subscription and resource group.
list_by_subscriptionselectsubscription_id$filterGet all lab plans for a subscription. Returns a list of all lab plans within a subscription.
create_or_updateinsertresource_group_name, lab_plan_name, subscription_id, locationUpdates or creates a Lab Plan resource. Operation to create or update a Lab Plan resource.
updateupdateresource_group_name, lab_plan_name, subscription_idUpdates a Lab Plan resource. Operation to update a Lab Plan resource.
create_or_updatereplaceresource_group_name, lab_plan_name, subscription_id, locationUpdates or creates a Lab Plan resource. Operation to create or update a Lab Plan resource.
deletedeleteresource_group_name, lab_plan_name, subscription_idDeletes 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_imageexecresource_group_name, lab_plan_name, subscription_idSave 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.

NameDatatypeDescription
lab_plan_namestringThe name of the lab plan that uniquely identifies it within containing resource group. Used in resource URIs and in UI. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$filterstringThe filter to apply to the operation. Default value is None.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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

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 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 }}"
}'
;