Bicep resource definition
The galleries/images/versions resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Compute/galleries/images/versions resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Compute/galleries/images/versions@2018-06-01' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
publishingProfile: {
endOfLifeDate: 'string'
excludeFromLatest: bool
replicaCount: int
source: {
managedImage: {
id: 'string'
}
}
targetRegions: [
{
name: 'string'
regionalReplicaCount: int
}
]
}
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.Compute/galleries/images/versions
Name |
Description |
Value |
location |
Resource location |
string (required) |
name |
The resource name |
string (required) |
parent |
In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.
For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: galleries/images |
properties |
Describes the properties of a gallery Image Version. |
GalleryImageVersionProperties |
tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
GalleryArtifactSource
Name |
Description |
Value |
managedImage |
The managed artifact. |
ManagedArtifact (required) |
GalleryImageVersionProperties
GalleryImageVersionPublishingProfile
Name |
Description |
Value |
endOfLifeDate |
The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable. |
string |
excludeFromLatest |
If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. |
bool |
replicaCount |
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. |
int |
source |
The source image from which the Image Version is going to be created. |
GalleryArtifactSource (required) |
targetRegions |
The target regions where the Image Version is going to be replicated to. This property is updatable. |
TargetRegion[] |
ManagedArtifact
Name |
Description |
Value |
id |
The managed artifact id. |
string (required) |
TargetRegion
Name |
Description |
Value |
name |
The name of the region. |
string (required) |
regionalReplicaCount |
The number of replicas of the Image Version to be created per region. This property is updatable. |
int |
ARM template resource definition
The galleries/images/versions resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Compute/galleries/images/versions resource, add the following JSON to your template.
{
"type": "Microsoft.Compute/galleries/images/versions",
"apiVersion": "2018-06-01",
"name": "string",
"location": "string",
"properties": {
"publishingProfile": {
"endOfLifeDate": "string",
"excludeFromLatest": "bool",
"replicaCount": "int",
"source": {
"managedImage": {
"id": "string"
}
},
"targetRegions": [
{
"name": "string",
"regionalReplicaCount": "int"
}
]
}
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.Compute/galleries/images/versions
Name |
Description |
Value |
apiVersion |
The api version |
'2018-06-01' |
location |
Resource location |
string (required) |
name |
The resource name |
string (required) |
properties |
Describes the properties of a gallery Image Version. |
GalleryImageVersionProperties |
tags |
Resource tags |
Dictionary of tag names and values. See Tags in templates |
type |
The resource type |
'Microsoft.Compute/galleries/images/versions' |
GalleryArtifactSource
Name |
Description |
Value |
managedImage |
The managed artifact. |
ManagedArtifact (required) |
GalleryImageVersionProperties
GalleryImageVersionPublishingProfile
Name |
Description |
Value |
endOfLifeDate |
The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable. |
string |
excludeFromLatest |
If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. |
bool |
replicaCount |
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. |
int |
source |
The source image from which the Image Version is going to be created. |
GalleryArtifactSource (required) |
targetRegions |
The target regions where the Image Version is going to be replicated to. This property is updatable. |
TargetRegion[] |
ManagedArtifact
Name |
Description |
Value |
id |
The managed artifact id. |
string (required) |
TargetRegion
Name |
Description |
Value |
name |
The name of the region. |
string (required) |
regionalReplicaCount |
The number of replicas of the Image Version to be created per region. This property is updatable. |
int |
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
Template |
Description |
Create an Image Version in a Azure Compute Gallery
 |
This template allows you to create a simple Image Version in a Azure Compute Gallery. Please ensure that you have run the Azure Compute Gallery 101 Template and the Image Definition 101 Template before you deploy this. |
The galleries/images/versions resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.Compute/galleries/images/versions resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Compute/galleries/images/versions@2018-06-01"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
publishingProfile = {
endOfLifeDate = "string"
excludeFromLatest = bool
replicaCount = int
source = {
managedImage = {
id = "string"
}
}
targetRegions = [
{
name = "string"
regionalReplicaCount = int
}
]
}
}
}
}
Property Values
Microsoft.Compute/galleries/images/versions
Name |
Description |
Value |
location |
Resource location |
string (required) |
name |
The resource name |
string (required) |
parent_id |
The ID of the resource that is the parent for this resource. |
ID for resource of type: galleries/images |
properties |
Describes the properties of a gallery Image Version. |
GalleryImageVersionProperties |
tags |
Resource tags |
Dictionary of tag names and values. |
type |
The resource type |
"Microsoft.Compute/galleries/images/versions@2018-06-01" |
GalleryArtifactSource
Name |
Description |
Value |
managedImage |
The managed artifact. |
ManagedArtifact (required) |
GalleryImageVersionProperties
GalleryImageVersionPublishingProfile
Name |
Description |
Value |
endOfLifeDate |
The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable. |
string |
excludeFromLatest |
If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. |
bool |
replicaCount |
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. |
int |
source |
The source image from which the Image Version is going to be created. |
GalleryArtifactSource (required) |
targetRegions |
The target regions where the Image Version is going to be replicated to. This property is updatable. |
TargetRegion[] |
ManagedArtifact
Name |
Description |
Value |
id |
The managed artifact id. |
string (required) |
TargetRegion
Name |
Description |
Value |
name |
The name of the region. |
string (required) |
regionalReplicaCount |
The number of replicas of the Image Version to be created per region. This property is updatable. |
int |