We recommend using Azure Native.
azure.compute.getSharedImageVersion
Explore with Pulumi AI
Use this data source to access information about an existing Version of a Shared Image within a Shared Image Gallery.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.compute.getSharedImageVersion({
    name: "1.0.0",
    imageName: "my-image",
    galleryName: "my-image-gallery",
    resourceGroupName: "example-resources",
});
import pulumi
import pulumi_azure as azure
example = azure.compute.get_shared_image_version(name="1.0.0",
    image_name="my-image",
    gallery_name="my-image-gallery",
    resource_group_name="example-resources")
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := compute.LookupSharedImageVersion(ctx, &compute.LookupSharedImageVersionArgs{
			Name:              "1.0.0",
			ImageName:         "my-image",
			GalleryName:       "my-image-gallery",
			ResourceGroupName: "example-resources",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.Compute.GetSharedImageVersion.Invoke(new()
    {
        Name = "1.0.0",
        ImageName = "my-image",
        GalleryName = "my-image-gallery",
        ResourceGroupName = "example-resources",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.compute.ComputeFunctions;
import com.pulumi.azure.compute.inputs.GetSharedImageVersionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var example = ComputeFunctions.getSharedImageVersion(GetSharedImageVersionArgs.builder()
            .name("1.0.0")
            .imageName("my-image")
            .galleryName("my-image-gallery")
            .resourceGroupName("example-resources")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: azure:compute:getSharedImageVersion
      arguments:
        name: 1.0.0
        imageName: my-image
        galleryName: my-image-gallery
        resourceGroupName: example-resources
Using getSharedImageVersion
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getSharedImageVersion(args: GetSharedImageVersionArgs, opts?: InvokeOptions): Promise<GetSharedImageVersionResult>
function getSharedImageVersionOutput(args: GetSharedImageVersionOutputArgs, opts?: InvokeOptions): Output<GetSharedImageVersionResult>def get_shared_image_version(gallery_name: Optional[str] = None,
                             image_name: Optional[str] = None,
                             name: Optional[str] = None,
                             resource_group_name: Optional[str] = None,
                             sort_versions_by_semver: Optional[bool] = None,
                             tags: Optional[Mapping[str, str]] = None,
                             opts: Optional[InvokeOptions] = None) -> GetSharedImageVersionResult
def get_shared_image_version_output(gallery_name: Optional[pulumi.Input[str]] = None,
                             image_name: Optional[pulumi.Input[str]] = None,
                             name: Optional[pulumi.Input[str]] = None,
                             resource_group_name: Optional[pulumi.Input[str]] = None,
                             sort_versions_by_semver: Optional[pulumi.Input[bool]] = None,
                             tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetSharedImageVersionResult]func LookupSharedImageVersion(ctx *Context, args *LookupSharedImageVersionArgs, opts ...InvokeOption) (*LookupSharedImageVersionResult, error)
func LookupSharedImageVersionOutput(ctx *Context, args *LookupSharedImageVersionOutputArgs, opts ...InvokeOption) LookupSharedImageVersionResultOutput> Note: This function is named LookupSharedImageVersion in the Go SDK.
public static class GetSharedImageVersion 
{
    public static Task<GetSharedImageVersionResult> InvokeAsync(GetSharedImageVersionArgs args, InvokeOptions? opts = null)
    public static Output<GetSharedImageVersionResult> Invoke(GetSharedImageVersionInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSharedImageVersionResult> getSharedImageVersion(GetSharedImageVersionArgs args, InvokeOptions options)
public static Output<GetSharedImageVersionResult> getSharedImageVersion(GetSharedImageVersionArgs args, InvokeOptions options)
fn::invoke:
  function: azure:compute/getSharedImageVersion:getSharedImageVersion
  arguments:
    # arguments dictionaryThe following arguments are supported:
- GalleryName string
- The name of the Shared Image Gallery in which the Shared Image exists.
- ImageName string
- The name of the Shared Image in which this Version exists.
- Name string
- The name of the Image Version. - Note: You may specify - latestto obtain the latest version or- recentto obtain the most recently updated version.- Note: In 3.0, - latestmay return an image version with- exclude_from_latestset to- true. Starting from 4.0 onwards- latestwill not return image versions with- exlude_from_latestset to- true.
- ResourceGroup stringName 
- The name of the Resource Group in which the Shared Image Gallery exists.
- SortVersions boolBy Semver 
- Sort available versions taking SemVer versioning scheme into account. Defaults to false.
- Dictionary<string, string>
- A mapping of tags assigned to the Shared Image.
- GalleryName string
- The name of the Shared Image Gallery in which the Shared Image exists.
- ImageName string
- The name of the Shared Image in which this Version exists.
- Name string
- The name of the Image Version. - Note: You may specify - latestto obtain the latest version or- recentto obtain the most recently updated version.- Note: In 3.0, - latestmay return an image version with- exclude_from_latestset to- true. Starting from 4.0 onwards- latestwill not return image versions with- exlude_from_latestset to- true.
- ResourceGroup stringName 
- The name of the Resource Group in which the Shared Image Gallery exists.
- SortVersions boolBy Semver 
- Sort available versions taking SemVer versioning scheme into account. Defaults to false.
- map[string]string
- A mapping of tags assigned to the Shared Image.
- galleryName String
- The name of the Shared Image Gallery in which the Shared Image exists.
- imageName String
- The name of the Shared Image in which this Version exists.
- name String
- The name of the Image Version. - Note: You may specify - latestto obtain the latest version or- recentto obtain the most recently updated version.- Note: In 3.0, - latestmay return an image version with- exclude_from_latestset to- true. Starting from 4.0 onwards- latestwill not return image versions with- exlude_from_latestset to- true.
- resourceGroup StringName 
- The name of the Resource Group in which the Shared Image Gallery exists.
- sortVersions BooleanBy Semver 
- Sort available versions taking SemVer versioning scheme into account. Defaults to false.
- Map<String,String>
- A mapping of tags assigned to the Shared Image.
- galleryName string
- The name of the Shared Image Gallery in which the Shared Image exists.
- imageName string
- The name of the Shared Image in which this Version exists.
- name string
- The name of the Image Version. - Note: You may specify - latestto obtain the latest version or- recentto obtain the most recently updated version.- Note: In 3.0, - latestmay return an image version with- exclude_from_latestset to- true. Starting from 4.0 onwards- latestwill not return image versions with- exlude_from_latestset to- true.
- resourceGroup stringName 
- The name of the Resource Group in which the Shared Image Gallery exists.
- sortVersions booleanBy Semver 
- Sort available versions taking SemVer versioning scheme into account. Defaults to false.
- {[key: string]: string}
- A mapping of tags assigned to the Shared Image.
- gallery_name str
- The name of the Shared Image Gallery in which the Shared Image exists.
- image_name str
- The name of the Shared Image in which this Version exists.
- name str
- The name of the Image Version. - Note: You may specify - latestto obtain the latest version or- recentto obtain the most recently updated version.- Note: In 3.0, - latestmay return an image version with- exclude_from_latestset to- true. Starting from 4.0 onwards- latestwill not return image versions with- exlude_from_latestset to- true.
- resource_group_ strname 
- The name of the Resource Group in which the Shared Image Gallery exists.
- sort_versions_ boolby_ semver 
- Sort available versions taking SemVer versioning scheme into account. Defaults to false.
- Mapping[str, str]
- A mapping of tags assigned to the Shared Image.
- galleryName String
- The name of the Shared Image Gallery in which the Shared Image exists.
- imageName String
- The name of the Shared Image in which this Version exists.
- name String
- The name of the Image Version. - Note: You may specify - latestto obtain the latest version or- recentto obtain the most recently updated version.- Note: In 3.0, - latestmay return an image version with- exclude_from_latestset to- true. Starting from 4.0 onwards- latestwill not return image versions with- exlude_from_latestset to- true.
- resourceGroup StringName 
- The name of the Resource Group in which the Shared Image Gallery exists.
- sortVersions BooleanBy Semver 
- Sort available versions taking SemVer versioning scheme into account. Defaults to false.
- Map<String>
- A mapping of tags assigned to the Shared Image.
getSharedImageVersion Result
The following output properties are available:
- ExcludeFrom boolLatest 
- Is this Image Version excluded from the latestfilter?
- GalleryName string
- Id string
- The provider-assigned unique ID for this managed resource.
- ImageName string
- Location string
- The supported Azure location where the Shared Image Gallery exists.
- ManagedImage stringId 
- The ID of the Managed Image which was the source of this Shared Image Version.
- Name string
- The Azure Region in which this Image Version exists.
- OsDisk intImage Size Gb 
- The size of the OS disk snapshot (in Gigabytes) which was the source of this Shared Image Version.
- OsDisk stringSnapshot Id 
- The ID of the OS disk snapshot which was the source of this Shared Image Version.
- ResourceGroup stringName 
- TargetRegions List<GetShared Image Version Target Region> 
- One or more target_regionblocks as documented below.
- SortVersions boolBy Semver 
- Dictionary<string, string>
- A mapping of tags assigned to the Shared Image.
- ExcludeFrom boolLatest 
- Is this Image Version excluded from the latestfilter?
- GalleryName string
- Id string
- The provider-assigned unique ID for this managed resource.
- ImageName string
- Location string
- The supported Azure location where the Shared Image Gallery exists.
- ManagedImage stringId 
- The ID of the Managed Image which was the source of this Shared Image Version.
- Name string
- The Azure Region in which this Image Version exists.
- OsDisk intImage Size Gb 
- The size of the OS disk snapshot (in Gigabytes) which was the source of this Shared Image Version.
- OsDisk stringSnapshot Id 
- The ID of the OS disk snapshot which was the source of this Shared Image Version.
- ResourceGroup stringName 
- TargetRegions []GetShared Image Version Target Region 
- One or more target_regionblocks as documented below.
- SortVersions boolBy Semver 
- map[string]string
- A mapping of tags assigned to the Shared Image.
- excludeFrom BooleanLatest 
- Is this Image Version excluded from the latestfilter?
- galleryName String
- id String
- The provider-assigned unique ID for this managed resource.
- imageName String
- location String
- The supported Azure location where the Shared Image Gallery exists.
- managedImage StringId 
- The ID of the Managed Image which was the source of this Shared Image Version.
- name String
- The Azure Region in which this Image Version exists.
- osDisk IntegerImage Size Gb 
- The size of the OS disk snapshot (in Gigabytes) which was the source of this Shared Image Version.
- osDisk StringSnapshot Id 
- The ID of the OS disk snapshot which was the source of this Shared Image Version.
- resourceGroup StringName 
- targetRegions List<GetShared Image Version Target Region> 
- One or more target_regionblocks as documented below.
- sortVersions BooleanBy Semver 
- Map<String,String>
- A mapping of tags assigned to the Shared Image.
- excludeFrom booleanLatest 
- Is this Image Version excluded from the latestfilter?
- galleryName string
- id string
- The provider-assigned unique ID for this managed resource.
- imageName string
- location string
- The supported Azure location where the Shared Image Gallery exists.
- managedImage stringId 
- The ID of the Managed Image which was the source of this Shared Image Version.
- name string
- The Azure Region in which this Image Version exists.
- osDisk numberImage Size Gb 
- The size of the OS disk snapshot (in Gigabytes) which was the source of this Shared Image Version.
- osDisk stringSnapshot Id 
- The ID of the OS disk snapshot which was the source of this Shared Image Version.
- resourceGroup stringName 
- targetRegions GetShared Image Version Target Region[] 
- One or more target_regionblocks as documented below.
- sortVersions booleanBy Semver 
- {[key: string]: string}
- A mapping of tags assigned to the Shared Image.
- exclude_from_ boollatest 
- Is this Image Version excluded from the latestfilter?
- gallery_name str
- id str
- The provider-assigned unique ID for this managed resource.
- image_name str
- location str
- The supported Azure location where the Shared Image Gallery exists.
- managed_image_ strid 
- The ID of the Managed Image which was the source of this Shared Image Version.
- name str
- The Azure Region in which this Image Version exists.
- os_disk_ intimage_ size_ gb 
- The size of the OS disk snapshot (in Gigabytes) which was the source of this Shared Image Version.
- os_disk_ strsnapshot_ id 
- The ID of the OS disk snapshot which was the source of this Shared Image Version.
- resource_group_ strname 
- target_regions Sequence[GetShared Image Version Target Region] 
- One or more target_regionblocks as documented below.
- sort_versions_ boolby_ semver 
- Mapping[str, str]
- A mapping of tags assigned to the Shared Image.
- excludeFrom BooleanLatest 
- Is this Image Version excluded from the latestfilter?
- galleryName String
- id String
- The provider-assigned unique ID for this managed resource.
- imageName String
- location String
- The supported Azure location where the Shared Image Gallery exists.
- managedImage StringId 
- The ID of the Managed Image which was the source of this Shared Image Version.
- name String
- The Azure Region in which this Image Version exists.
- osDisk NumberImage Size Gb 
- The size of the OS disk snapshot (in Gigabytes) which was the source of this Shared Image Version.
- osDisk StringSnapshot Id 
- The ID of the OS disk snapshot which was the source of this Shared Image Version.
- resourceGroup StringName 
- targetRegions List<Property Map>
- One or more target_regionblocks as documented below.
- sortVersions BooleanBy Semver 
- Map<String>
- A mapping of tags assigned to the Shared Image.
Supporting Types
GetSharedImageVersionTargetRegion     
- Name string
- The name of the Image Version. - Note: You may specify - latestto obtain the latest version or- recentto obtain the most recently updated version.- Note: In 3.0, - latestmay return an image version with- exclude_from_latestset to- true. Starting from 4.0 onwards- latestwill not return image versions with- exlude_from_latestset to- true.
- RegionalReplica intCount 
- The number of replicas of the Image Version to be created per region.
- StorageAccount stringType 
- The storage account type for the image version.
- Name string
- The name of the Image Version. - Note: You may specify - latestto obtain the latest version or- recentto obtain the most recently updated version.- Note: In 3.0, - latestmay return an image version with- exclude_from_latestset to- true. Starting from 4.0 onwards- latestwill not return image versions with- exlude_from_latestset to- true.
- RegionalReplica intCount 
- The number of replicas of the Image Version to be created per region.
- StorageAccount stringType 
- The storage account type for the image version.
- name String
- The name of the Image Version. - Note: You may specify - latestto obtain the latest version or- recentto obtain the most recently updated version.- Note: In 3.0, - latestmay return an image version with- exclude_from_latestset to- true. Starting from 4.0 onwards- latestwill not return image versions with- exlude_from_latestset to- true.
- regionalReplica IntegerCount 
- The number of replicas of the Image Version to be created per region.
- storageAccount StringType 
- The storage account type for the image version.
- name string
- The name of the Image Version. - Note: You may specify - latestto obtain the latest version or- recentto obtain the most recently updated version.- Note: In 3.0, - latestmay return an image version with- exclude_from_latestset to- true. Starting from 4.0 onwards- latestwill not return image versions with- exlude_from_latestset to- true.
- regionalReplica numberCount 
- The number of replicas of the Image Version to be created per region.
- storageAccount stringType 
- The storage account type for the image version.
- name str
- The name of the Image Version. - Note: You may specify - latestto obtain the latest version or- recentto obtain the most recently updated version.- Note: In 3.0, - latestmay return an image version with- exclude_from_latestset to- true. Starting from 4.0 onwards- latestwill not return image versions with- exlude_from_latestset to- true.
- regional_replica_ intcount 
- The number of replicas of the Image Version to be created per region.
- storage_account_ strtype 
- The storage account type for the image version.
- name String
- The name of the Image Version. - Note: You may specify - latestto obtain the latest version or- recentto obtain the most recently updated version.- Note: In 3.0, - latestmay return an image version with- exclude_from_latestset to- true. Starting from 4.0 onwards- latestwill not return image versions with- exlude_from_latestset to- true.
- regionalReplica NumberCount 
- The number of replicas of the Image Version to be created per region.
- storageAccount StringType 
- The storage account type for the image version.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.