Skip to main content

galleries

Creates, updates, deletes, gets or lists a galleries resource.

Overview

Namegalleries
TypeResource
Idazure.compute.galleries

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.
descriptionstringThe description of this Shared Image Gallery resource. This property is updatable.
identifierobjectDescribes the gallery unique name.
identityobjectThe identity of the gallery, if configured.
locationstringThe geo-location where the resource lives. Required.
provisioningStatestringThe provisioning state, which only appears in the response. Known values are: "Creating", "Updating", "Failed", "Succeeded", "Deleting", and "Migrating". (Creating, Updating, Failed, Succeeded, Deleting, Migrating)
sharingProfileobjectProfile for gallery sharing to subscription or tenant.
sharingStatusobjectSharing status of current gallery.
softDeletePolicyobjectContains information about the soft deletion policy of the gallery.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, gallery_name, subscription_id$select, $expandRetrieves information about a Shared Image Gallery.
list_by_resource_groupselectresource_group_name, subscription_idList galleries under a resource group.
listselectsubscription_idList galleries under a subscription.
create_or_updateinsertresource_group_name, gallery_name, subscription_id, locationCreate or update a Shared Image Gallery.
updateupdateresource_group_name, gallery_name, subscription_idUpdate a Shared Image Gallery.
create_or_updatereplaceresource_group_name, gallery_name, subscription_id, locationCreate or update a Shared Image Gallery.
deletedeleteresource_group_name, gallery_name, subscription_idDelete a Shared Image Gallery.

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
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$expandstringThe expand query option to apply on the operation. "SharingProfile/Groups" Default value is None.
$selectstringThe select expression to apply on the operation. "Permissions" Default value is None.

SELECT examples

Retrieves information about a Shared Image Gallery.

SELECT
id,
name,
description,
identifier,
identity,
location,
provisioningState,
sharingProfile,
sharingStatus,
softDeletePolicy,
systemData,
tags,
type
FROM azure.compute.galleries
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND gallery_name = '{{ gallery_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $select = '{{ $select }}'
AND $expand = '{{ $expand }}'
;

INSERT examples

Create or update a Shared Image Gallery.

INSERT INTO azure.compute.galleries (
tags,
location,
properties,
identity,
resource_group_name,
gallery_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ identity }}',
'{{ resource_group_name }}',
'{{ gallery_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Update a Shared Image Gallery.

UPDATE azure.compute.galleries
SET
tags = '{{ tags }}',
properties = '{{ properties }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND gallery_name = '{{ gallery_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Create or update a Shared Image Gallery.

REPLACE azure.compute.galleries
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND gallery_name = '{{ gallery_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete a Shared Image Gallery.

DELETE FROM azure.compute.galleries
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND gallery_name = '{{ gallery_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;