custom_images
Creates, updates, deletes, gets or lists a custom_images
resource.
Overview
Name | custom_images |
Type | Resource |
Id | azure.dev_test_labs.custom_images |
Fields
- vw_custom_images
- custom_images
Name | Datatype | Description |
---|---|---|
id | text | The identifier of the resource. |
name | text | The name of the resource. |
description | text | field from the properties object |
author | text | field from the properties object |
creation_date | text | field from the properties object |
custom_image_plan | text | field from the properties object |
data_disk_storage_info | text | field from the properties object |
is_plan_authorized | text | field from the properties object |
labName | text | field from the properties object |
location | text | The location of the resource. |
managed_image_id | text | field from the properties object |
managed_snapshot_id | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | 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 |
vhd | text | field from the properties object |
vm | 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 custom image. |
tags | object | The tags of the resource. |
type | string | The type of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | labName, name, resourceGroupName, subscriptionId | Get custom image. |
list | SELECT | labName, resourceGroupName, subscriptionId | List custom images in a given lab. |
create_or_update | INSERT | labName, name, resourceGroupName, subscriptionId, data__properties | Create or replace an existing custom image. This operation can take a while to complete. |
delete | DELETE | labName, name, resourceGroupName, subscriptionId | Delete custom image. This operation can take a while to complete. |
update | UPDATE | labName, name, resourceGroupName, subscriptionId | Allows modifying tags of custom images. All other properties will be ignored. |
SELECT
examples
List custom images in a given lab.
- vw_custom_images
- custom_images
SELECT
id,
name,
description,
author,
creation_date,
custom_image_plan,
data_disk_storage_info,
is_plan_authorized,
labName,
location,
managed_image_id,
managed_snapshot_id,
provisioning_state,
resourceGroupName,
subscriptionId,
tags,
type,
unique_identifier,
vhd,
vm
FROM azure.dev_test_labs.vw_custom_images
WHERE labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
location,
properties,
tags,
type
FROM azure.dev_test_labs.custom_images
WHERE labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new custom_images
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.dev_test_labs.custom_images (
labName,
name,
resourceGroupName,
subscriptionId,
data__properties,
location,
tags,
properties
)
SELECT
'{{ labName }}',
'{{ name }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ 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: vm
value:
- name: sourceVmId
value: string
- name: windowsOsInfo
value:
- name: windowsOsState
value: string
- name: linuxOsInfo
value:
- name: linuxOsState
value: string
- name: vhd
value:
- name: imageName
value: string
- name: sysPrep
value: boolean
- name: osType
value: string
- name: description
value: string
- name: author
value: string
- name: creationDate
value: string
- name: managedImageId
value: string
- name: managedSnapshotId
value: string
- name: dataDiskStorageInfo
value:
- - name: lun
value: string
- name: storageType
value: string
- name: customImagePlan
value:
- name: id
value: string
- name: publisher
value: string
- name: offer
value: string
- name: isPlanAuthorized
value: boolean
- name: provisioningState
value: string
- name: uniqueIdentifier
value: string
UPDATE
example
Updates a custom_images
resource.
/*+ update */
UPDATE azure.dev_test_labs.custom_images
SET
tags = '{{ tags }}'
WHERE
labName = '{{ labName }}'
AND name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified custom_images
resource.
/*+ delete */
DELETE FROM azure.dev_test_labs.custom_images
WHERE labName = '{{ labName }}'
AND name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';