Gallery Image Versions - List By Gallery Image

List gallery image versions in a gallery image definition.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions?api-version=2023-07-03

URI Parameters

Name In Required Type Description
galleryImageName
path True

string

The name of the Shared Image Gallery Image Definition from which the Image Versions are to be listed.

galleryName
path True

string

The name of the Shared Image Gallery in which the Image Definition resides.

resourceGroupName
path True

string

The name of the resource group.

subscriptionId
path True

string

Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Client Api Version.

Responses

Name Type Description
200 OK

GalleryImageVersionList

OK

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Sample Request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/images/myGalleryImageName/versions?api-version=2023-07-03

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/locations/westus/Galleries/myGalleryName/Images/myGalleryImageName/Versions/1.0.0",
      "properties": {
        "publishingProfile": {
          "targetRegions": [
            {
              "name": "West US",
              "regionalReplicaCount": 1,
              "storageAccountType": "Standard_LRS",
              "encryption": {
                "osDiskImage": {
                  "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet"
                },
                "dataDiskImages": [
                  {
                    "lun": 0,
                    "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet"
                  },
                  {
                    "lun": 1,
                    "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet"
                  }
                ]
              },
              "excludeFromLatest": false
            },
            {
              "name": "East US",
              "regionalReplicaCount": 2,
              "storageAccountType": "Standard_LRS",
              "excludeFromLatest": false
            }
          ],
          "replicaCount": 1,
          "publishedDate": "2018-01-01T00:00:00Z",
          "storageAccountType": "Standard_LRS"
        },
        "storageProfile": {
          "source": {
            "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}"
          },
          "osDiskImage": {
            "sizeInGB": 10,
            "hostCaching": "ReadOnly"
          },
          "dataDiskImages": [
            {
              "lun": 1,
              "sizeInGB": 10,
              "hostCaching": "None"
            }
          ]
        },
        "safetyProfile": {
          "allowDeletionOfReplicatedLocations": false,
          "reportedForPolicyViolation": true,
          "policyViolations": [
            {
              "category": "ImageFlaggedUnsafe",
              "details": "This is the policy violation details."
            }
          ]
        },
        "provisioningState": "Succeeded"
      },
      "location": "West US",
      "name": "1.0.0"
    }
  ],
  "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/images/myGalleryImageName/versions?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/galleries/myGalleryName/images/myGalleryImageName/versions/myGalleryImageVersionName"
}

Definitions

Name Description
AggregatedReplicationState

This is the aggregated replication status based on all the regional replication status flags.

ApiError

Api error.

ApiErrorBase

Api error base.

CloudError

An error response from the Compute service.

ConfidentialVMEncryptionType

confidential VM encryption types

DataDiskImageEncryption

Contains encryption settings for a data disk image.

EdgeZoneStorageAccountType

Specifies the storage account type to be used to store the image. This property is not updatable.

EncryptionImages

Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.

GalleryArtifactVersionFullSource

The source of the gallery artifact version.

GalleryDataDiskImage

This is the data disk image.

GalleryDiskImageSource

The source for the disk image.

GalleryExtendedLocation

The name of the extended location.

GalleryExtendedLocationType

It is type of the extended location.

GalleryImageVersion

Specifies information about the gallery image version that you want to create or update.

GalleryImageVersionList

The List Gallery Image version operation response.

GalleryImageVersionPublishingProfile

The publishing profile of a gallery image Version.

GalleryImageVersionSafetyProfile

This is the safety profile of the Gallery Image Version.

GalleryImageVersionStorageProfile

This is the storage profile of a Gallery Image Version.

GalleryImageVersionUefiSettings

Contains UEFI settings for the image version.

GalleryOSDiskImage

This is the OS disk image.

GalleryProvisioningState

The current state of the gallery or gallery artifact.

GalleryTargetExtendedLocation
HostCaching

The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'

ImageVersionSecurityProfile

The security profile of a gallery image version

InnerError

Inner error details.

OSDiskImageEncryption

Contains encryption settings for an OS disk image.

OSDiskImageSecurityProfile

Contains security profile for an OS disk image.

PolicyViolation

A policy violation reported against a gallery artifact.

PolicyViolationCategory

Describes the nature of the policy violation.

RegionalReplicationStatus

This is the regional replication status.

ReplicationMode

Optional parameter which specifies the mode to be used for replication. This property is not updatable.

ReplicationState

This is the regional replication state.

ReplicationStatus

This is the replication status of the gallery image version.

StorageAccountType

Specifies the storage account type to be used to store the image. This property is not updatable.

TargetRegion

Describes the target region information.

UefiKey

A UEFI key signature.

UefiKeySignatures

Additional UEFI key signatures that will be added to the image in addition to the signature templates

UefiKeyType

The type of key signature.

UefiSignatureTemplateName

The name of the signature template that contains default UEFI keys.

AggregatedReplicationState

This is the aggregated replication status based on all the regional replication status flags.

Name Type Description
Completed

string

Failed

string

InProgress

string

Unknown

string

ApiError

Api error.

Name Type Description
code

string

The error code.

details

ApiErrorBase[]

The Api error details

innererror

InnerError

The Api inner error

message

string

The error message.

target

string

The target of the particular error.

ApiErrorBase

Api error base.

Name Type Description
code

string

The error code.

message

string

The error message.

target

string

The target of the particular error.

CloudError

An error response from the Compute service.

Name Type Description
error

ApiError

Api error.

ConfidentialVMEncryptionType

confidential VM encryption types

Name Type Description
EncryptedVMGuestStateOnlyWithPmk

string

EncryptedWithCmk

string

EncryptedWithPmk

string

NonPersistedTPM

string

DataDiskImageEncryption

Contains encryption settings for a data disk image.

Name Type Description
diskEncryptionSetId

string

A relative URI containing the resource ID of the disk encryption set.

lun

integer

This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.

EdgeZoneStorageAccountType

Specifies the storage account type to be used to store the image. This property is not updatable.

Name Type Description
Premium_LRS

string

StandardSSD_LRS

string

Standard_LRS

string

Standard_ZRS

string

EncryptionImages

Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.

Name Type Description
dataDiskImages

DataDiskImageEncryption[]

A list of encryption specifications for data disk images.

osDiskImage

OSDiskImageEncryption

Contains encryption settings for an OS disk image.

GalleryArtifactVersionFullSource

The source of the gallery artifact version.

Name Type Description
communityGalleryImageId

string

The resource Id of the source Community Gallery Image. Only required when using Community Gallery Image as a source.

id

string

The id of the gallery artifact version source.

virtualMachineId

string

The resource Id of the source virtual machine. Only required when capturing a virtual machine to source this Gallery Image Version.

GalleryDataDiskImage

This is the data disk image.

Name Type Description
hostCaching

HostCaching

The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'

lun

integer

This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.

sizeInGB

integer

This property indicates the size of the VHD to be created.

source

GalleryDiskImageSource

The source for the disk image.

GalleryDiskImageSource

The source for the disk image.

Name Type Description
id

string

The id of the gallery artifact version source.

storageAccountId

string

The Storage Account Id that contains the vhd blob being used as a source for this artifact version.

uri

string

The uri of the gallery artifact version source. Currently used to specify vhd/blob source.

GalleryExtendedLocation

The name of the extended location.

Name Type Description
name

string

type

GalleryExtendedLocationType

It is type of the extended location.

GalleryExtendedLocationType

It is type of the extended location.

Name Type Description
EdgeZone

string

Unknown

string

GalleryImageVersion

Specifies information about the gallery image version that you want to create or update.

Name Type Description
id

string

Resource Id

location

string

Resource location

name

string

Resource name

properties.provisioningState

GalleryProvisioningState

The current state of the gallery or gallery artifact.
The provisioning state, which only appears in the response.

properties.publishingProfile

GalleryImageVersionPublishingProfile

The publishing profile of a gallery image Version.

properties.replicationStatus

ReplicationStatus

This is the replication status of the gallery image version.

properties.safetyProfile

GalleryImageVersionSafetyProfile

This is the safety profile of the Gallery Image Version.

properties.securityProfile

ImageVersionSecurityProfile

The security profile of a gallery image version

properties.storageProfile

GalleryImageVersionStorageProfile

This is the storage profile of a Gallery Image Version.

tags

object

Resource tags

type

string

Resource type

GalleryImageVersionList

The List Gallery Image version operation response.

Name Type Description
nextLink

string

The uri to fetch the next page of gallery image versions. Call ListNext() with this to fetch the next page of gallery image versions.

value

GalleryImageVersion[]

A list of gallery image versions.

GalleryImageVersionPublishingProfile

The publishing profile of a gallery image Version.

Name Type Description
endOfLifeDate

string

The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.

excludeFromLatest

boolean

If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.

publishedDate

string

The timestamp for when the gallery image version is published.

replicaCount

integer

The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.

replicationMode

ReplicationMode

Optional parameter which specifies the mode to be used for replication. This property is not updatable.

storageAccountType

StorageAccountType

Specifies the storage account type to be used to store the image. This property is not updatable.

targetExtendedLocations

GalleryTargetExtendedLocation[]

The target extended locations where the Image Version is going to be replicated to. This property is updatable.

targetRegions

TargetRegion[]

The target regions where the Image Version is going to be replicated to. This property is updatable.

GalleryImageVersionSafetyProfile

This is the safety profile of the Gallery Image Version.

Name Type Description
allowDeletionOfReplicatedLocations

boolean

Indicates whether or not removing this Gallery Image Version from replicated regions is allowed.

policyViolations

PolicyViolation[]

A list of Policy Violations that have been reported for this Gallery Image Version.

reportedForPolicyViolation

boolean

Indicates whether this image has been reported as violating Microsoft's policies.

GalleryImageVersionStorageProfile

This is the storage profile of a Gallery Image Version.

Name Type Description
dataDiskImages

GalleryDataDiskImage[]

A list of data disk images.

osDiskImage

GalleryOSDiskImage

This is the OS disk image.

source

GalleryArtifactVersionFullSource

The source of the gallery artifact version.

GalleryImageVersionUefiSettings

Contains UEFI settings for the image version.

Name Type Description
additionalSignatures

UefiKeySignatures

Additional UEFI key signatures that will be added to the image in addition to the signature templates

signatureTemplateNames

UefiSignatureTemplateName[]

The name of the template(s) that contains default UEFI key signatures that will be added to the image.

GalleryOSDiskImage

This is the OS disk image.

Name Type Description
hostCaching

HostCaching

The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'

sizeInGB

integer

This property indicates the size of the VHD to be created.

source

GalleryDiskImageSource

The source for the disk image.

GalleryProvisioningState

The current state of the gallery or gallery artifact.

Name Type Description
Creating

string

Deleting

string

Failed

string

Migrating

string

Succeeded

string

Updating

string

GalleryTargetExtendedLocation

Name Type Description
encryption

EncryptionImages

Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.

extendedLocation

GalleryExtendedLocation

The name of the extended location.

extendedLocationReplicaCount

integer

The number of replicas of the Image Version to be created per extended location. This property is updatable.

name

string

The name of the region.

storageAccountType

EdgeZoneStorageAccountType

Specifies the storage account type to be used to store the image. This property is not updatable.

HostCaching

The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'

Name Type Description
None

string

ReadOnly

string

ReadWrite

string

ImageVersionSecurityProfile

The security profile of a gallery image version

Name Type Description
uefiSettings

GalleryImageVersionUefiSettings

Contains UEFI settings for the image version.

InnerError

Inner error details.

Name Type Description
errordetail

string

The internal error message or exception dump.

exceptiontype

string

The exception type.

OSDiskImageEncryption

Contains encryption settings for an OS disk image.

Name Type Description
diskEncryptionSetId

string

A relative URI containing the resource ID of the disk encryption set.

securityProfile

OSDiskImageSecurityProfile

This property specifies the security profile of an OS disk image.

OSDiskImageSecurityProfile

Contains security profile for an OS disk image.

Name Type Description
confidentialVMEncryptionType

ConfidentialVMEncryptionType

confidential VM encryption types

secureVMDiskEncryptionSetId

string

secure VM disk encryption set id

PolicyViolation

A policy violation reported against a gallery artifact.

Name Type Description
category

PolicyViolationCategory

Describes the nature of the policy violation.

details

string

Describes specific details about why this policy violation was reported.

PolicyViolationCategory

Describes the nature of the policy violation.

Name Type Description
CopyrightValidation

string

ImageFlaggedUnsafe

string

IpTheft

string

Other

string

RegionalReplicationStatus

This is the regional replication status.

Name Type Description
details

string

The details of the replication status.

progress

integer

It indicates progress of the replication job.

region

string

The region to which the gallery image version is being replicated to.

state

ReplicationState

This is the regional replication state.

ReplicationMode

Optional parameter which specifies the mode to be used for replication. This property is not updatable.

Name Type Description
Full

string

Shallow

string

ReplicationState

This is the regional replication state.

Name Type Description
Completed

string

Failed

string

Replicating

string

Unknown

string

ReplicationStatus

This is the replication status of the gallery image version.

Name Type Description
aggregatedState

AggregatedReplicationState

This is the aggregated replication status based on all the regional replication status flags.

summary

RegionalReplicationStatus[]

This is a summary of replication status for each region.

StorageAccountType

Specifies the storage account type to be used to store the image. This property is not updatable.

Name Type Description
Premium_LRS

string

Standard_LRS

string

Standard_ZRS

string

TargetRegion

Describes the target region information.

Name Type Description
encryption

EncryptionImages

Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.

excludeFromLatest

boolean

Contains the flag setting to hide an image when users specify version='latest'

name

string

The name of the region.

regionalReplicaCount

integer

The number of replicas of the Image Version to be created per region. This property is updatable.

storageAccountType

StorageAccountType

Specifies the storage account type to be used to store the image. This property is not updatable.

UefiKey

A UEFI key signature.

Name Type Description
type

UefiKeyType

The type of key signature.

value

string[]

The value of the key signature.

UefiKeySignatures

Additional UEFI key signatures that will be added to the image in addition to the signature templates

Name Type Description
db

UefiKey[]

The database of UEFI keys for this image version.

dbx

UefiKey[]

The database of revoked UEFI keys for this image version.

kek

UefiKey[]

The Key Encryption Keys of this image version.

pk

UefiKey

The Platform Key of this image version.

UefiKeyType

The type of key signature.

Name Type Description
sha256

string

x509

string

UefiSignatureTemplateName

The name of the signature template that contains default UEFI keys.

Name Type Description
MicrosoftUefiCertificateAuthorityTemplate

string

MicrosoftWindowsTemplate

string

NoSignatureTemplate

string