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

NameDatatypeDescription
allowed_regionstextfield from the properties object
default_auto_shutdown_profiletextfield from the properties object
default_connection_profiletextfield from the properties object
default_network_profiletextfield from the properties object
identitytextIdentity for the resource.
labPlanNametextfield from the properties object
linked_lms_instancetextfield from the properties object
locationtextThe geo-location where the resource lives
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
resource_operation_errortextfield from the properties object
shared_gallery_idtextfield from the properties object
subscriptionIdtextfield from the properties object
support_infotextfield from the properties object
system_datatextfield from the properties object
tagstextResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlabPlanName, resourceGroupName, subscriptionIdRetrieves the properties of a Lab Plan.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdReturns a list of all lab plans for a subscription and resource group.
list_by_subscriptionSELECTsubscriptionIdReturns a list of all lab plans within a subscription
create_or_updateINSERTlabPlanName, resourceGroupName, subscriptionId, data__propertiesOperation to create or update a Lab Plan resource.
deleteDELETElabPlanName, resourceGroupName, subscriptionIdOperation 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.
updateUPDATElabPlanName, resourceGroupName, subscriptionIdOperation to update a Lab Plan resource.
save_imageEXEClabPlanName, resourceGroupName, subscriptionIdSaves an image from a lab VM to the attached shared image gallery.

SELECT examples

Returns a list of all lab plans within a subscription

SELECT
allowed_regions,
default_auto_shutdown_profile,
default_connection_profile,
default_network_profile,
identity,
labPlanName,
linked_lms_instance,
location,
provisioning_state,
resourceGroupName,
resource_operation_error,
shared_gallery_id,
subscriptionId,
support_info,
system_data,
tags
FROM azure.lab_services.vw_lab_plans
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new lab_plans resource.

/*+ create */
INSERT INTO azure.lab_services.lab_plans (
labPlanName,
resourceGroupName,
subscriptionId,
data__properties,
tags,
location,
properties,
identity
)
SELECT
'{{ labPlanName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ tags }}',
'{{ location }}',
'{{ properties }}',
'{{ identity }}'
;

UPDATE example

Updates a lab_plans resource.

/*+ update */
UPDATE azure.lab_services.lab_plans
SET
tags = '{{ tags }}',
properties = '{{ properties }}',
identity = '{{ identity }}'
WHERE
labPlanName = '{{ labPlanName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified lab_plans resource.

/*+ delete */
DELETE FROM azure.lab_services.lab_plans
WHERE labPlanName = '{{ labPlanName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';