Skip to main content

lab_plans

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

Overview

Namelab_plans
TypeResource
Idazure.lab_services.lab_plans

Fields

The following fields are returned by SELECT queries:

The request was successful; response contains the Lab Plan.

NameDatatypeDescription
identityobjectIdentity for the resource.
locationstringThe geo-location where the resource lives
propertiesobjectLab plan resource properties
systemDataobjectMetadata pertaining to creation and last modification of the lab plan.
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectRetrieves the properties of a Lab Plan.
list_by_resource_groupselectReturns a list of all lab plans for a subscription and resource group.
list_by_subscriptionselectReturns a list of all lab plans within a subscription
create_or_updateinsertdata__propertiesOperation to create or update a Lab Plan resource.
updateupdateOperation to update a Lab Plan resource.
deletedeleteOperation 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_imageexecSaves 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

SELECT examples

Retrieves the properties of a Lab Plan.

SELECT
identity,
location,
properties,
systemData,
tags
FROM azure.lab_services.lab_plans
;

INSERT examples

Operation to create or update a Lab Plan resource.

INSERT INTO azure.lab_services.lab_plans (
data__tags,
data__location,
data__properties,
data__identity
)
SELECT
'{{ tags }}',
'{{ location }}',
'{{ properties }}' /* required */,
'{{ identity }}'
RETURNING
identity,
location,
properties,
systemData,
tags
;

UPDATE examples

Operation to update a Lab Plan resource.

UPDATE azure.lab_services.lab_plans
SET
data__tags = '{{ tags }}',
data__properties = '{{ properties }}',
data__identity = '{{ identity }}'
RETURNING
identity,
location,
properties,
systemData,
tags;

DELETE examples

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.lab_services.lab_plans
;

Lifecycle Methods

Saves an image from a lab VM to the attached shared image gallery.

EXEC azure.lab_services.lab_plans.save_image 
@@json=
'{
"name": "{{ name }}",
"labVirtualMachineId": "{{ labVirtualMachineId }}"
}'
;