images
Creates, updates, deletes, gets or lists a images
resource.
Overview
Name | images |
Type | Resource |
Id | azure.compute.images |
Fields
- vw_images
- images
Name | Datatype | Description |
---|---|---|
id | text | Resource Id |
name | text | Resource name |
extended_location | text | field from the properties object |
hyper_v_generation | text | field from the properties object |
imageName | text | field from the properties object |
location | text | Resource location |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
source_virtual_machine | text | field from the properties object |
storage_profile | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags |
type | text | Resource type |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id |
name | string | Resource name |
extendedLocation | object | The complex type of the extended location. |
location | string | Resource location |
properties | object | Describes the properties of an Image. |
tags | object | Resource tags |
type | string | Resource type |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | imageName, resourceGroupName, subscriptionId | Gets an image. |
list | SELECT | subscriptionId | Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Gets the list of images under a resource group. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images. |
create_or_update | INSERT | imageName, resourceGroupName, subscriptionId | Create or update an image. |
delete | DELETE | imageName, resourceGroupName, subscriptionId | Deletes an Image. |
update | UPDATE | imageName, resourceGroupName, subscriptionId | Update an image. |
SELECT
examples
Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.
- vw_images
- images
SELECT
id,
name,
extended_location,
hyper_v_generation,
imageName,
location,
provisioning_state,
resourceGroupName,
source_virtual_machine,
storage_profile,
subscriptionId,
tags,
type
FROM azure.compute.vw_images
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
extendedLocation,
location,
properties,
tags,
type
FROM azure.compute.images
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new images
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.compute.images (
imageName,
resourceGroupName,
subscriptionId,
properties,
extendedLocation,
location,
tags
)
SELECT
'{{ imageName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ extendedLocation }}',
'{{ location }}',
'{{ tags }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: sourceVirtualMachine
value:
- name: id
value: string
- name: storageProfile
value:
- name: osDisk
value:
- name: osType
value: string
- name: osState
value: string
- name: blobUri
value: string
- name: caching
value: string
- name: diskSizeGB
value: integer
- name: storageAccountType
value: []
- name: diskEncryptionSet
value:
- name: id
value: string
- name: dataDisks
value:
- - name: lun
value: integer
- name: blobUri
value: string
- name: caching
value: string
- name: diskSizeGB
value: integer
- name: zoneResilient
value: boolean
- name: provisioningState
value: string
- name: hyperVGeneration
value: []
- name: extendedLocation
value:
- name: name
value: string
- name: type
value: []
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
UPDATE
example
Updates a images
resource.
/*+ update */
UPDATE azure.compute.images
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
imageName = '{{ imageName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified images
resource.
/*+ delete */
DELETE FROM azure.compute.images
WHERE imageName = '{{ imageName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';