images
Creates, updates, deletes, gets or lists an images resource.
Overview
| Name | images |
| Type | Resource |
| Id | azure_extras.lab_services.images |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_lab_plan
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
author | string | The image author. |
availableRegions | array | The available regions of the image in the shared gallery. |
description | string | A description of the image. |
displayName | string | The image display name. |
enabledState | string | Is the image enabled. Known values are: "Enabled" and "Disabled". |
iconUrl | string | URL of the image icon. |
offer | string | The ID of an offer associated with the image. |
osState | string | The OS State of the image. Known values are: "Generalized" and "Specialized". |
osType | string | The OS Type of the image. Known values are: "Windows" and "Linux". |
plan | string | The ID of marketplace plan associated with the image (optional). |
provisioningState | string | Current provisioning state of the image. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Locked". |
publisher | string | The ID of the publisher of the image. |
sharedGalleryId | string | The ID for the image in the shared gallery. |
sku | string | The image SKU. |
systemData | object | Metadata pertaining to creation and last modification of the image. |
termsStatus | string | The status of image terms of use (enabled = accepted, disabled = not accepted). Known values are: "Enabled" and "Disabled". |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
version | string | The image version. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
author | string | The image author. |
availableRegions | array | The available regions of the image in the shared gallery. |
description | string | A description of the image. |
displayName | string | The image display name. |
enabledState | string | Is the image enabled. Known values are: "Enabled" and "Disabled". |
iconUrl | string | URL of the image icon. |
offer | string | The ID of an offer associated with the image. |
osState | string | The OS State of the image. Known values are: "Generalized" and "Specialized". |
osType | string | The OS Type of the image. Known values are: "Windows" and "Linux". |
plan | string | The ID of marketplace plan associated with the image (optional). |
provisioningState | string | Current provisioning state of the image. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Locked". |
publisher | string | The ID of the publisher of the image. |
sharedGalleryId | string | The ID for the image in the shared gallery. |
sku | string | The image SKU. |
systemData | object | Metadata pertaining to creation and last modification of the image. |
termsStatus | string | The status of image terms of use (enabled = accepted, disabled = not accepted). Known values are: "Enabled" and "Disabled". |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
version | string | The image version. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, lab_plan_name, image_name, subscription_id | Gets an image. Gets an image resource. | |
list_by_lab_plan | select | resource_group_name, lab_plan_name, subscription_id | $filter | Gets all images. Gets all images from galleries attached to a lab plan. |
create_or_update | insert | resource_group_name, lab_plan_name, image_name, subscription_id | Updates an image via PUT. Updates an image resource via PUT. Creating new resources via PUT will not function. | |
update | update | resource_group_name, lab_plan_name, image_name, subscription_id | Updates an image. Updates an image resource. | |
create_or_update | replace | resource_group_name, lab_plan_name, image_name, subscription_id | Updates 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.
| Name | Datatype | Description |
|---|---|---|
image_name | string | The image name. Required. |
lab_plan_name | string | The name of the lab plan that uniquely identifies it within containing resource group. Used in resource URIs and in UI. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
$filter | string | The filter to apply to the operation. Default value is None. |
SELECT examples
- get
- list_by_lab_plan
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
;
Gets all images. Gets all images from galleries attached to a lab plan.
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 subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: images
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the images resource.
- name: lab_plan_name
value: "{{ lab_plan_name }}"
description: Required parameter for the images resource.
- name: image_name
value: "{{ image_name }}"
description: Required parameter for the images resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the images resource.
- name: properties
value:
enabledState: "{{ enabledState }}"
availableRegions:
- "{{ availableRegions }}"
UPDATE examples
- update
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
- create_or_update
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;