Skip to main content

images

Creates, updates, deletes, gets or lists an images resource.

Overview

Nameimages
TypeResource
Idazure_extras.lab_services.images

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.
authorstringThe image author.
availableRegionsarrayThe available regions of the image in the shared gallery.
descriptionstringA description of the image.
displayNamestringThe image display name.
enabledStatestringIs the image enabled. Known values are: "Enabled" and "Disabled".
iconUrlstringURL of the image icon.
offerstringThe ID of an offer associated with the image.
osStatestringThe OS State of the image. Known values are: "Generalized" and "Specialized".
osTypestringThe OS Type of the image. Known values are: "Windows" and "Linux".
planstringThe ID of marketplace plan associated with the image (optional).
provisioningStatestringCurrent provisioning state of the image. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Locked".
publisherstringThe ID of the publisher of the image.
sharedGalleryIdstringThe ID for the image in the shared gallery.
skustringThe image SKU.
systemDataobjectMetadata pertaining to creation and last modification of the image.
termsStatusstringThe status of image terms of use (enabled = accepted, disabled = not accepted). Known values are: "Enabled" and "Disabled".
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
versionstringThe image version.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, lab_plan_name, image_name, subscription_idGets an image. Gets an image resource.
list_by_lab_planselectresource_group_name, lab_plan_name, subscription_id$filterGets all images. Gets all images from galleries attached to a lab plan.
create_or_updateinsertresource_group_name, lab_plan_name, image_name, subscription_idUpdates an image via PUT. Updates an image resource via PUT. Creating new resources via PUT will not function.
updateupdateresource_group_name, lab_plan_name, image_name, subscription_idUpdates an image. Updates an image resource.
create_or_updatereplaceresource_group_name, lab_plan_name, image_name, subscription_idUpdates an image via PUT. Updates an image resource via PUT. Creating new resources via PUT will not function.

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
image_namestringThe image name. Required.
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

Gets an image. Gets an image resource.

SELECT
id,
name,
author,
availableRegions,
description,
displayName,
enabledState,
iconUrl,
offer,
osState,
osType,
plan,
provisioningState,
publisher,
sharedGalleryId,
sku,
systemData,
termsStatus,
type,
version
FROM azure_extras.lab_services.images
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND lab_plan_name = '{{ lab_plan_name }}' -- required
AND image_name = '{{ image_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Updates an image via PUT. Updates an image resource via PUT. Creating new resources via PUT will not function.

INSERT INTO azure_extras.lab_services.images (
properties,
resource_group_name,
lab_plan_name,
image_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ lab_plan_name }}',
'{{ image_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

UPDATE examples

Updates an image. Updates an image resource.

UPDATE azure_extras.lab_services.images
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND lab_plan_name = '{{ lab_plan_name }}' --required
AND image_name = '{{ image_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

REPLACE examples

Updates an image via PUT. Updates an image resource via PUT. Creating new resources via PUT will not function.

REPLACE azure_extras.lab_services.images
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND lab_plan_name = '{{ lab_plan_name }}' --required
AND image_name = '{{ image_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;