Galleries - Get

Retrieves information about a Shared Image Gallery.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}?api-version=2025-03-03
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}?api-version=2025-03-03&$select=Permissions&$expand=SharingProfile/Groups

URI Parameters

Name In Required Type Description
galleryName
path True

string

pattern: ^[^_\W][\w-._]{0,79}(?

The name of the Shared Image Gallery.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

api-version
query True

string

minLength: 1

The API version to use for this operation.

$expand
query

GalleryExpandParams

The expand query option to apply on the operation.

$select
query

SelectPermissions

The select expression to apply on the operation.

Responses

Name Type Description
200 OK

Gallery

Azure operation completed successfully.

Other Status Codes

CloudError

An unexpected error response.

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

Get a community gallery.
Get a gallery with expand sharingProfile groups.
Get a gallery with select permissions.
Get a gallery with system-assigned and user-assigned managed identities.
Get a gallery.

Get a community gallery.

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName?api-version=2025-03-03&$select=Permissions&$expand=SharingProfile/Groups

Sample response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/communityGalleries/myGalleryName",
  "properties": {
    "description": "This is the gallery description.",
    "identifier": {
      "uniqueName": "{subscription-id}-MYGALLERYNAME"
    },
    "provisioningState": "Succeeded",
    "sharingProfile": {
      "permissions": "Community",
      "communityGalleryInfo": {
        "publisherUri": "uri",
        "publisherContact": "pir@microsoft.com",
        "eula": "eula",
        "publicNames": [
          "GalleryPublicName"
        ],
        "communityGalleryEnabled": true
      }
    },
    "sharingStatus": {
      "aggregatedState": "Succeeded",
      "summary": [
        {
          "region": "westus",
          "state": "Succeeded",
          "details": ""
        }
      ]
    }
  },
  "location": "West US",
  "name": "myGalleryName"
}

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName?api-version=2025-03-03&$select=Permissions&$expand=SharingProfile/Groups

Sample response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
  "properties": {
    "sharingProfile": {
      "permissions": "Groups",
      "groups": [
        {
          "type": "Subscriptions",
          "ids": [
            "34a4ab42-0d72-47d9-bd1a-aed207386dac",
            "380fd389-260b-41aa-bad9-0a83108c370b"
          ]
        },
        {
          "type": "AADTenants",
          "ids": [
            "c24c76aa-8897-4027-9b03-8f7928b54ff6"
          ]
        }
      ]
    }
  },
  "location": "West US",
  "name": "myGalleryName"
}

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName?api-version=2025-03-03&$select=Permissions&$expand=SharingProfile/Groups

Sample response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
  "properties": {
    "sharingProfile": {
      "permissions": "Groups",
      "groups": [
        {
          "type": "Subscriptions",
          "ids": [
            "34a4ab42-0d72-47d9-bd1a-aed207386dac",
            "380fd389-260b-41aa-bad9-0a83108c370b"
          ]
        },
        {
          "type": "AADTenants",
          "ids": [
            "c24c76aa-8897-4027-9b03-8f7928b54ff6"
          ]
        }
      ]
    }
  },
  "location": "West US",
  "name": "myGalleryName"
}

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName?api-version=2025-03-03&$select=Permissions&$expand=SharingProfile/Groups

Sample response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
  "identity": {
    "type": "SystemAssigned, UserAssigned",
    "principalId": "00000000-0000-0000-0000-000000000000",
    "tenantId": "00000000-0000-0000-0000-000000000000",
    "userAssignedIdentities": {
      "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity": {
        "principalId": "00000000-0000-0000-0000-000000000000",
        "clientId": "00000000-0000-0000-0000-000000000000"
      }
    }
  },
  "properties": {
    "description": "This is the gallery description.",
    "identifier": {
      "uniqueName": "{subscription-id}-MYGALLERYNAME"
    },
    "provisioningState": "Succeeded"
  },
  "location": "West US",
  "name": "myGalleryName"
}

Get a gallery.

Sample request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName?api-version=2025-03-03&$select=Permissions&$expand=SharingProfile/Groups

Sample response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName",
  "properties": {
    "description": "This is the gallery description.",
    "identifier": {
      "uniqueName": "{subscription-id}-MYGALLERYNAME"
    },
    "provisioningState": "Succeeded"
  },
  "location": "West US",
  "name": "myGalleryName"
}

Definitions

Name Description
ApiError

Api error.

ApiErrorBase

Api error base.

CloudError

An error response from the Compute service.

Common.UserAssignedIdentitiesValue
CommunityGalleryInfo

Information of community gallery if current gallery is shared to community

createdByType

The type of identity that created the resource.

Gallery

Specifies information about the Shared Image Gallery that you want to create or update.

GalleryExpandParams

The expand query option to apply on the operation.

GalleryIdentifier

Describes the gallery unique name.

GalleryIdentity

Identity for the virtual machine.

GalleryProvisioningState

The provisioning state, which only appears in the response.

GallerySharingPermissionTypes

This property allows you to specify the permission of sharing gallery. Possible values are: Private, Groups, Community.

InnerError

Inner error details.

RegionalSharingStatus

Gallery regional sharing status

ResourceIdentityType

The type of identity used for the gallery. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove all identities from the gallery.

SelectPermissions

The select expression to apply on the operation.

SharingProfile

Profile for gallery sharing to subscription or tenant

SharingProfileGroup

Group of the gallery sharing profile

SharingProfileGroupTypes

This property allows you to specify the type of sharing group. Possible values are: Subscriptions, AADTenants.

SharingState

The sharing state of the gallery, which only appears in the response.

SharingStatus

Sharing status of current gallery.

SoftDeletePolicy

Contains information about the soft deletion policy of the gallery.

systemData

Metadata pertaining to creation and last modification of the resource.

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.

Common.UserAssignedIdentitiesValue

Name Type Description
clientId

string

The client id of user assigned identity.

principalId

string

The principal id of user assigned identity.

CommunityGalleryInfo

Information of community gallery if current gallery is shared to community

Name Type Description
communityGalleryEnabled

boolean

Contains info about whether community gallery sharing is enabled.

eula

string

End-user license agreement for community gallery image.

publicNamePrefix

string

The prefix of the gallery name that will be displayed publicly. Visible to all users.

publicNames

string[]

Community gallery public name list.

publisherContact

string

Community gallery publisher support email. The email address of the publisher. Visible to all users.

publisherUri

string

The link to the publisher website. Visible to all users.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

Specifies information about the Shared Image Gallery that you want to create or update.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

identity

GalleryIdentity

The identity of the gallery, if configured.

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.description

string

The description of this Shared Image Gallery resource. This property is updatable.

properties.identifier

GalleryIdentifier

Describes the gallery unique name.

properties.provisioningState

GalleryProvisioningState

The provisioning state, which only appears in the response.

properties.sharingProfile

SharingProfile

Profile for gallery sharing to subscription or tenant

properties.sharingStatus

SharingStatus

Sharing status of current gallery.

properties.softDeletePolicy

SoftDeletePolicy

Contains information about the soft deletion policy of the gallery.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

GalleryExpandParams

The expand query option to apply on the operation.

Value Description
SharingProfile/Groups

GalleryIdentifier

Describes the gallery unique name.

Name Type Description
uniqueName

string

The unique name of the Shared Image Gallery. This name is generated automatically by Azure.

GalleryIdentity

Identity for the virtual machine.

Name Type Description
principalId

string

The principal id of the gallery identity. This property will only be provided for a system assigned identity.

tenantId

string

The AAD tenant id of the gallery identity. This property will only be provided for a system assigned identity.

type

ResourceIdentityType

The type of identity used for the gallery. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove all identities from the gallery.

userAssignedIdentities

<string,  Common.UserAssignedIdentitiesValue>

The list of user identities associated with the gallery. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

GalleryProvisioningState

The provisioning state, which only appears in the response.

Value Description
Creating
Updating
Failed
Succeeded
Deleting
Migrating

GallerySharingPermissionTypes

This property allows you to specify the permission of sharing gallery. Possible values are: Private, Groups, Community.

Value Description
Private
Groups
Community

InnerError

Inner error details.

Name Type Description
errordetail

string

The internal error message or exception dump.

exceptiontype

string

The exception type.

RegionalSharingStatus

Gallery regional sharing status

Name Type Description
details

string

Details of gallery regional sharing failure.

region

string

Region name

state

SharingState

Gallery sharing state in current region

ResourceIdentityType

The type of identity used for the gallery. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove all identities from the gallery.

Value Description
SystemAssigned
UserAssigned
SystemAssigned, UserAssigned
None

SelectPermissions

The select expression to apply on the operation.

Value Description
Permissions

SharingProfile

Profile for gallery sharing to subscription or tenant

Name Type Description
communityGalleryInfo

CommunityGalleryInfo

Information of community gallery if current gallery is shared to community.

groups

SharingProfileGroup[]

A list of sharing profile groups.

permissions

GallerySharingPermissionTypes

This property allows you to specify the permission of sharing gallery. Possible values are: Private, Groups, Community.

SharingProfileGroup

Group of the gallery sharing profile

Name Type Description
ids

string[]

A list of subscription/tenant ids the gallery is aimed to be shared to.

type

SharingProfileGroupTypes

This property allows you to specify the type of sharing group. Possible values are: Subscriptions, AADTenants.

SharingProfileGroupTypes

This property allows you to specify the type of sharing group. Possible values are: Subscriptions, AADTenants.

Value Description
Subscriptions
AADTenants

SharingState

The sharing state of the gallery, which only appears in the response.

Value Description
Succeeded
InProgress
Failed
Unknown

SharingStatus

Sharing status of current gallery.

Name Type Description
aggregatedState

SharingState

Aggregated sharing state of current gallery.

summary

RegionalSharingStatus[]

Summary of all regional sharing status.

SoftDeletePolicy

Contains information about the soft deletion policy of the gallery.

Name Type Description
isSoftDeleteEnabled

boolean

Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.