labs
Creates, updates, deletes, gets or lists a labs
resource.
Overview
Name | labs |
Type | Resource |
Id | azure.dev_test_labs.labs |
Fields
- vw_labs
- labs
Name | Datatype | Description |
---|---|---|
id | text | The identifier of the resource. |
name | text | The name of the resource. |
announcement | text | field from the properties object |
artifacts_storage_account | text | field from the properties object |
created_date | text | field from the properties object |
default_premium_storage_account | text | field from the properties object |
default_storage_account | text | field from the properties object |
environment_permission | text | field from the properties object |
extended_properties | text | field from the properties object |
lab_storage_type | text | field from the properties object |
load_balancer_id | text | field from the properties object |
location | text | The location of the resource. |
mandatory_artifacts_resource_ids_linux | text | field from the properties object |
mandatory_artifacts_resource_ids_windows | text | field from the properties object |
network_security_group_id | text | field from the properties object |
premium_data_disk_storage_account | text | field from the properties object |
premium_data_disks | text | field from the properties object |
provisioning_state | text | field from the properties object |
public_ip_id | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
support | text | field from the properties object |
tags | text | The tags of the resource. |
type | text | The type of the resource. |
unique_identifier | text | field from the properties object |
vault_name | text | field from the properties object |
vm_creation_resource_group | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | The identifier of the resource. |
name | string | The name of the resource. |
location | string | The location of the resource. |
properties | object | Properties of a lab. |
tags | object | The tags of the resource. |
type | string | The type of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | name, resourceGroupName, subscriptionId | Get lab. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | List labs in a resource group. |
list_by_subscription | SELECT | subscriptionId | List labs in a subscription. |
create_or_update | INSERT | name, resourceGroupName, subscriptionId | Create or replace an existing lab. This operation can take a while to complete. |
delete | DELETE | name, resourceGroupName, subscriptionId | Delete lab. This operation can take a while to complete. |
update | UPDATE | name, resourceGroupName, subscriptionId | Allows modifying tags of labs. All other properties will be ignored. |
claim_any_vm | EXEC | name, resourceGroupName, subscriptionId | Claim a random claimable virtual machine in the lab. This operation can take a while to complete. |
export_resource_usage | EXEC | name, resourceGroupName, subscriptionId | Exports the lab resource usage into a storage account This operation can take a while to complete. |
generate_upload_uri | EXEC | name, resourceGroupName, subscriptionId | Generate a URI for uploading custom disk images to a Lab. |
import_virtual_machine | EXEC | name, resourceGroupName, subscriptionId | Import a virtual machine into a different lab. This operation can take a while to complete. |
SELECT
examples
List labs in a subscription.
- vw_labs
- labs
SELECT
id,
name,
announcement,
artifacts_storage_account,
created_date,
default_premium_storage_account,
default_storage_account,
environment_permission,
extended_properties,
lab_storage_type,
load_balancer_id,
location,
mandatory_artifacts_resource_ids_linux,
mandatory_artifacts_resource_ids_windows,
network_security_group_id,
premium_data_disk_storage_account,
premium_data_disks,
provisioning_state,
public_ip_id,
resourceGroupName,
subscriptionId,
support,
tags,
type,
unique_identifier,
vault_name,
vm_creation_resource_group
FROM azure.dev_test_labs.vw_labs
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
location,
properties,
tags,
type
FROM azure.dev_test_labs.labs
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new labs
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.dev_test_labs.labs (
name,
resourceGroupName,
subscriptionId,
location,
tags,
properties
)
SELECT
'{{ name }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: properties
value:
- name: defaultStorageAccount
value: string
- name: defaultPremiumStorageAccount
value: string
- name: artifactsStorageAccount
value: string
- name: premiumDataDiskStorageAccount
value: string
- name: vaultName
value: string
- name: labStorageType
value: string
- name: mandatoryArtifactsResourceIdsLinux
value:
- string
- name: mandatoryArtifactsResourceIdsWindows
value:
- string
- name: createdDate
value: string
- name: premiumDataDisks
value: string
- name: environmentPermission
value: string
- name: announcement
value:
- name: title
value: string
- name: markdown
value: string
- name: enabled
value: string
- name: expirationDate
value: string
- name: expired
value: boolean
- name: provisioningState
value: string
- name: uniqueIdentifier
value: string
- name: support
value:
- name: enabled
value: string
- name: markdown
value: string
- name: vmCreationResourceGroup
value: string
- name: publicIpId
value: string
- name: loadBalancerId
value: string
- name: networkSecurityGroupId
value: string
- name: extendedProperties
value: object
- name: provisioningState
value: string
- name: uniqueIdentifier
value: string
UPDATE
example
Updates a labs
resource.
/*+ update */
UPDATE azure.dev_test_labs.labs
SET
tags = '{{ tags }}'
WHERE
name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified labs
resource.
/*+ delete */
DELETE FROM azure.dev_test_labs.labs
WHERE name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';