Gallery Application Versions - Create Or Update
Create or update a gallery Application Version.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}?api-version=2022-03-03
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
gallery
|
path | True |
string |
The name of the gallery Application Definition in which the Application Version is to be created. |
gallery
|
path | True |
string |
The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. |
gallery
|
path | True |
string |
The name of the Shared Application Gallery in which the Application Definition resides. |
resource
|
path | True |
string |
The name of the resource group. |
subscription
|
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. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
location | True |
string |
Resource location |
properties.publishingProfile | True |
The publishing profile of a gallery image version. |
|
properties.safetyProfile |
The safety profile of the Gallery Application Version. |
||
tags |
object |
Resource tags |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
201 Created |
Created |
|
202 Accepted |
Accepted |
|
Other Status Codes |
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
Create or update a simple gallery Application Version.
Sample Request
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications/myGalleryApplicationName/versions/1.0.0?api-version=2022-03-03
{
"location": "West US",
"properties": {
"publishingProfile": {
"source": {
"mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}"
},
"manageActions": {
"install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"",
"remove": "del C:\\package "
},
"targetRegions": [
{
"name": "West US",
"regionalReplicaCount": 1,
"storageAccountType": "Standard_LRS",
"excludeFromLatest": false
}
],
"replicaCount": 1,
"endOfLifeDate": "2019-07-01T07:00:00Z",
"storageAccountType": "Standard_LRS",
"customActions": [
{
"name": "myCustomAction",
"script": "myCustomActionScript",
"description": "This is the custom action description.",
"parameters": [
{
"name": "myCustomActionParameter",
"required": false,
"type": "String",
"defaultValue": "default value of parameter.",
"description": "This is the description of the parameter"
}
]
}
]
},
"safetyProfile": {
"allowDeletionOfReplicatedLocations": false
}
}
}
Sample Response
{
"location": "West US",
"name": "1.0.0",
"type": "Microsoft.Compute/galleries/applications/versions",
"id": "/subscriptions/01523d7c-60da-455e-adef-521b547922c4/resourceGroups/galleryPsTestRg98/providers/Microsoft.Compute/galleries/galleryPsTestGallery6165/applications/galleryPsTestGalleryApplication7825/versions/1.0.0",
"properties": {
"publishingProfile": {
"source": {
"mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}"
},
"manageActions": {
"install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"",
"remove": "del C:\\package "
},
"enableHealthCheck": false,
"settings": {
"packageFileName": "package.zip",
"configFileName": "configuration.cfg"
},
"advancedSettings": {
"timeout": "300",
"user": "root"
},
"targetRegions": [
{
"name": "West US",
"regionalReplicaCount": 1,
"storageAccountType": "Standard_LRS",
"excludeFromLatest": false
}
],
"replicaCount": 1,
"excludeFromLatest": false,
"publishedDate": "2019-06-21T17:13:57.5972568+00:00",
"endOfLifeDate": "2019-07-01T07:00:00+00:00",
"storageAccountType": "Standard_LRS",
"customActions": [
{
"name": "myCustomAction",
"script": "myCustomActionScript",
"description": "This is the custom action description.",
"parameters": [
{
"name": "myCustomActionParameter",
"required": false,
"type": "String",
"defaultValue": "default value of parameter.",
"description": "This is the description of the parameter"
}
]
}
]
},
"safetyProfile": {
"allowDeletionOfReplicatedLocations": false
},
"provisioningState": "Updating"
}
}
{
"location": "West US",
"name": "1.0.0",
"type": "Microsoft.Compute/galleries/applications/versions",
"id": "/subscriptions/01523d7c-60da-455e-adef-521b547922c4/resourceGroups/galleryPsTestRg98/providers/Microsoft.Compute/galleries/galleryPsTestGallery6165/applications/galleryPsTestGalleryApplication7825/versions/1.0.0",
"properties": {
"publishingProfile": {
"source": {
"mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}"
},
"manageActions": {
"install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"",
"remove": "del C:\\package "
},
"enableHealthCheck": false,
"settings": {
"packageFileName": "package.zip",
"configFileName": "configuration.cfg"
},
"advancedSettings": {
"timeout": "300",
"user": "root"
},
"targetRegions": [
{
"name": "West US",
"regionalReplicaCount": 1,
"storageAccountType": "Standard_LRS",
"excludeFromLatest": false
}
],
"replicaCount": 1,
"excludeFromLatest": false,
"publishedDate": "2019-06-21T17:13:57.5972568+00:00",
"endOfLifeDate": "2019-07-01T07:00:00+00:00",
"storageAccountType": "Standard_LRS",
"customActions": [
{
"name": "myCustomAction",
"script": "myCustomActionScript",
"description": "This is the custom action description.",
"parameters": [
{
"name": "myCustomActionParameter",
"required": false,
"type": "String",
"defaultValue": "default value of parameter.",
"description": "This is the description of the parameter"
}
]
}
]
},
"safetyProfile": {
"allowDeletionOfReplicatedLocations": false
},
"provisioningState": "Creating"
}
}
{
"location": "West US",
"name": "1.0.0",
"type": "Microsoft.Compute/galleries/applications/versions",
"id": "/subscriptions/01523d7c-60da-455e-adef-521b547922c4/resourceGroups/galleryPsTestRg98/providers/Microsoft.Compute/galleries/galleryPsTestGallery6165/applications/galleryPsTestGalleryApplication7825/versions/1.0.0",
"properties": {
"publishingProfile": {
"source": {
"mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}"
},
"manageActions": {
"install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"",
"remove": "del C:\\package "
},
"enableHealthCheck": false,
"targetRegions": [
{
"name": "West US",
"regionalReplicaCount": 1,
"storageAccountType": "Standard_LRS",
"excludeFromLatest": false
}
],
"replicaCount": 1,
"excludeFromLatest": false,
"publishedDate": "2019-06-21T17:13:57.5972568+00:00",
"endOfLifeDate": "2019-07-01T07:00:00+00:00",
"storageAccountType": "Standard_LRS",
"customActions": [
{
"name": "myCustomAction",
"script": "myCustomActionScript",
"description": "This is the custom action description.",
"parameters": [
{
"name": "myCustomActionParameter",
"required": false,
"type": "String",
"defaultValue": "default value of parameter.",
"description": "This is the description of the parameter"
}
]
}
]
},
"safetyProfile": {
"allowDeletionOfReplicatedLocations": false
},
"provisioningState": "Updating"
}
}
Definitions
Name | Description |
---|---|
Aggregated |
This is the aggregated replication status based on all the regional replication status flags. |
Api |
Api error. |
Api |
Api error base. |
Cloud |
An error response from the Compute service. |
Confidential |
confidential VM encryption types |
Data |
Contains encryption settings for a data disk image. |
Encryption |
Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. |
Gallery |
A custom action that can be performed with a Gallery Application Version. |
Gallery |
The definition of a parameter that can be passed to a custom action of a Gallery Application Version. |
Gallery |
Specifies the type of the custom action parameter. Possible values are: String, ConfigurationDataBlob or LogOutputBlob |
Gallery |
Specifies information about the gallery Application Version that you want to create or update. |
Gallery |
The publishing profile of a gallery image version. |
Gallery |
The safety profile of the Gallery Application Version. |
Gallery |
The name of the extended location. |
Gallery |
It is type of the extended location. |
Gallery |
The current state of the gallery or gallery artifact. |
Gallery |
|
Inner |
Inner error details. |
OSDisk |
Contains encryption settings for an OS disk image. |
OSDisk |
Contains security profile for an OS disk image. |
Regional |
This is the regional replication status. |
Replication |
Optional parameter which specifies the mode to be used for replication. This property is not updatable. |
Replication |
This is the regional replication state. |
Replication |
This is the replication status of the gallery image version. |
Storage |
Specifies the storage account type to be used to store the image. This property is not updatable. |
Target |
Describes the target region information. |
User |
|
User |
Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set. |
User |
The source image from which the Image Version is going to be created. |
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 |
The Api error details |
|
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 |
Api error. |
ConfidentialVMEncryptionType
confidential VM encryption types
Name | Type | Description |
---|---|---|
EncryptedVMGuestStateOnlyWithPmk |
string |
|
EncryptedWithCmk |
string |
|
EncryptedWithPmk |
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. |
EncryptionImages
Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.
Name | Type | Description |
---|---|---|
dataDiskImages |
A list of encryption specifications for data disk images. |
|
osDiskImage |
Contains encryption settings for an OS disk image. |
GalleryApplicationCustomAction
A custom action that can be performed with a Gallery Application Version.
Name | Type | Description |
---|---|---|
description |
string |
Description to help the users understand what this custom action does. |
name |
string |
The name of the custom action. Must be unique within the Gallery Application Version. |
parameters |
The parameters that this custom action uses |
|
script |
string |
The script to run when executing this custom action. |
GalleryApplicationCustomActionParameter
The definition of a parameter that can be passed to a custom action of a Gallery Application Version.
Name | Type | Description |
---|---|---|
defaultValue |
string |
The default value of the parameter. Only applies to string types |
description |
string |
A description to help users understand what this parameter means |
name |
string |
The name of the custom action. Must be unique within the Gallery Application Version. |
required |
boolean |
Indicates whether this parameter must be passed when running the custom action. |
type |
Specifies the type of the custom action parameter. Possible values are: String, ConfigurationDataBlob or LogOutputBlob |
GalleryApplicationCustomActionParameterType
Specifies the type of the custom action parameter. Possible values are: String, ConfigurationDataBlob or LogOutputBlob
Name | Type | Description |
---|---|---|
ConfigurationDataBlob |
string |
|
LogOutputBlob |
string |
|
String |
string |
GalleryApplicationVersion
Specifies information about the gallery Application 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 |
The current state of the gallery or gallery artifact. |
|
properties.publishingProfile |
The publishing profile of a gallery image version. |
|
properties.replicationStatus |
This is the replication status of the gallery image version. |
|
properties.safetyProfile |
The safety profile of the Gallery Application Version. |
|
tags |
object |
Resource tags |
type |
string |
Resource type |
GalleryApplicationVersionPublishingProfile
The publishing profile of a gallery image version.
Name | Type | Description |
---|---|---|
advancedSettings |
object |
Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. |
customActions |
A list of custom actions that can be performed with this Gallery Application Version. |
|
enableHealthCheck |
boolean |
Optional. Whether or not this application reports health. |
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. |
manageActions | ||
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 |
Optional parameter which specifies the mode to be used for replication. This property is not updatable. |
|
settings |
Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set. |
|
source |
The source image from which the Image Version is going to be created. |
|
storageAccountType |
Specifies the storage account type to be used to store the image. This property is not updatable. |
|
targetExtendedLocations |
The target extended locations where the Image Version is going to be replicated to. This property is updatable. |
|
targetRegions |
The target regions where the Image Version is going to be replicated to. This property is updatable. |
GalleryApplicationVersionSafetyProfile
The safety profile of the Gallery Application Version.
Name | Type | Description |
---|---|---|
allowDeletionOfReplicatedLocations |
boolean |
Indicates whether or not removing this Gallery Image Version from replicated regions is allowed. |
GalleryExtendedLocation
The name of the extended location.
Name | Type | Description |
---|---|---|
name |
string |
|
type |
It is type of the extended location. |
GalleryExtendedLocationType
It is type of the extended location.
Name | Type | Description |
---|---|---|
EdgeZone |
string |
|
Unknown |
string |
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 |
Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. |
|
extendedLocation |
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 |
Specifies the storage account type to be used to store the image. This property is not updatable. |
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 |
This property specifies the security profile of an OS disk image. |
OSDiskImageSecurityProfile
Contains security profile for an OS disk image.
Name | Type | Description |
---|---|---|
confidentialVMEncryptionType |
confidential VM encryption types |
|
secureVMDiskEncryptionSetId |
string |
secure VM disk encryption set id |
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 |
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 |
This is the aggregated replication status based on all the regional replication status flags. |
|
summary |
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 |
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 |
Specifies the storage account type to be used to store the image. This property is not updatable. |
UserArtifactManage
Name | Type | Description |
---|---|---|
install |
string |
Required. The path and arguments to install the gallery application. This is limited to 4096 characters. |
remove |
string |
Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. |
update |
string |
Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters. |
UserArtifactSettings
Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set.
Name | Type | Description |
---|---|---|
configFileName |
string |
Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with "_config". |
packageFileName |
string |
Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name. |
UserArtifactSource
The source image from which the Image Version is going to be created.
Name | Type | Description |
---|---|---|
defaultConfigurationLink |
string |
Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. |
mediaLink |
string |
Required. The mediaLink of the artifact, must be a readable storage page blob. |