1. Packages
  2. Azure Classic
  3. API Docs
  4. compute
  5. getSharedImageVersion

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Use this data source to access information about an existing Version of a Shared Image within a Shared Image Gallery.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var example = Output.Create(Azure.Compute.GetSharedImageVersion.InvokeAsync(new Azure.Compute.GetSharedImageVersionArgs
            {
                GalleryName = "my-image-gallery",
                ImageName = "my-image",
                Name = "1.0.0",
                ResourceGroupName = "example-resources",
            }));
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/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{
    			GalleryName:       "my-image-gallery",
    			ImageName:         "my-image",
    			Name:              "1.0.0",
    			ResourceGroupName: "example-resources",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = pulumi.output(azure.compute.getSharedImageVersion({
        galleryName: "my-image-gallery",
        imageName: "my-image",
        name: "1.0.0",
        resourceGroupName: "example-resources",
    }));
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.compute.get_shared_image_version(gallery_name="my-image-gallery",
        image_name="my-image",
        name="1.0.0",
        resource_group_name="example-resources")
    

    Example coming soon!

    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,
                                 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,
                                 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 dictionary

    The 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.
    ResourceGroupName string
    The name of the Resource Group in which the Shared Image Gallery exists.
    SortVersionsBySemver bool
    Sort available versions taking SemVer versioning scheme into account. Defaults to false.
    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.
    ResourceGroupName string
    The name of the Resource Group in which the Shared Image Gallery exists.
    SortVersionsBySemver bool
    Sort available versions taking SemVer versioning scheme into account. Defaults to false.
    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.
    resourceGroupName String
    The name of the Resource Group in which the Shared Image Gallery exists.
    sortVersionsBySemver Boolean
    Sort available versions taking SemVer versioning scheme into account. Defaults to false.
    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.
    resourceGroupName string
    The name of the Resource Group in which the Shared Image Gallery exists.
    sortVersionsBySemver boolean
    Sort available versions taking SemVer versioning scheme into account. Defaults to false.
    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.
    resource_group_name str
    The name of the Resource Group in which the Shared Image Gallery exists.
    sort_versions_by_semver bool
    Sort available versions taking SemVer versioning scheme into account. Defaults to false.
    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.
    resourceGroupName String
    The name of the Resource Group in which the Shared Image Gallery exists.
    sortVersionsBySemver Boolean
    Sort available versions taking SemVer versioning scheme into account. Defaults to false.

    getSharedImageVersion Result

    The following output properties are available:

    ExcludeFromLatest bool
    Is this Image Version excluded from the latest filter?
    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.
    ManagedImageId string
    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.
    OsDiskImageSizeGb int
    The size of the OS disk snapshot (in Gigabytes) which was the source of this Shared Image Version.
    OsDiskSnapshotId string
    The ID of the OS disk snapshot which was the source of this Shared Image Version.
    ResourceGroupName string
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Shared Image.
    TargetRegions List<GetSharedImageVersionTargetRegion>
    One or more target_region blocks as documented below.
    SortVersionsBySemver bool
    ExcludeFromLatest bool
    Is this Image Version excluded from the latest filter?
    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.
    ManagedImageId string
    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.
    OsDiskImageSizeGb int
    The size of the OS disk snapshot (in Gigabytes) which was the source of this Shared Image Version.
    OsDiskSnapshotId string
    The ID of the OS disk snapshot which was the source of this Shared Image Version.
    ResourceGroupName string
    Tags map[string]string
    A mapping of tags assigned to the Shared Image.
    TargetRegions []GetSharedImageVersionTargetRegion
    One or more target_region blocks as documented below.
    SortVersionsBySemver bool
    excludeFromLatest Boolean
    Is this Image Version excluded from the latest filter?
    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.
    managedImageId String
    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.
    osDiskImageSizeGb Integer
    The size of the OS disk snapshot (in Gigabytes) which was the source of this Shared Image Version.
    osDiskSnapshotId String
    The ID of the OS disk snapshot which was the source of this Shared Image Version.
    resourceGroupName String
    tags Map<String,String>
    A mapping of tags assigned to the Shared Image.
    targetRegions List<GetSharedImageVersionTargetRegion>
    One or more target_region blocks as documented below.
    sortVersionsBySemver Boolean
    excludeFromLatest boolean
    Is this Image Version excluded from the latest filter?
    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.
    managedImageId string
    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.
    osDiskImageSizeGb number
    The size of the OS disk snapshot (in Gigabytes) which was the source of this Shared Image Version.
    osDiskSnapshotId string
    The ID of the OS disk snapshot which was the source of this Shared Image Version.
    resourceGroupName string
    tags {[key: string]: string}
    A mapping of tags assigned to the Shared Image.
    targetRegions GetSharedImageVersionTargetRegion[]
    One or more target_region blocks as documented below.
    sortVersionsBySemver boolean
    exclude_from_latest bool
    Is this Image Version excluded from the latest filter?
    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_id str
    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_image_size_gb int
    The size of the OS disk snapshot (in Gigabytes) which was the source of this Shared Image Version.
    os_disk_snapshot_id str
    The ID of the OS disk snapshot which was the source of this Shared Image Version.
    resource_group_name str
    tags Mapping[str, str]
    A mapping of tags assigned to the Shared Image.
    target_regions Sequence[GetSharedImageVersionTargetRegion]
    One or more target_region blocks as documented below.
    sort_versions_by_semver bool
    excludeFromLatest Boolean
    Is this Image Version excluded from the latest filter?
    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.
    managedImageId String
    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.
    osDiskImageSizeGb Number
    The size of the OS disk snapshot (in Gigabytes) which was the source of this Shared Image Version.
    osDiskSnapshotId String
    The ID of the OS disk snapshot which was the source of this Shared Image Version.
    resourceGroupName String
    tags Map<String>
    A mapping of tags assigned to the Shared Image.
    targetRegions List<Property Map>
    One or more target_region blocks as documented below.
    sortVersionsBySemver Boolean

    Supporting Types

    GetSharedImageVersionTargetRegion

    Name string
    The name of the Image Version.
    RegionalReplicaCount int
    The number of replicas of the Image Version to be created per region.
    StorageAccountType string
    The storage account type for the image version.
    Name string
    The name of the Image Version.
    RegionalReplicaCount int
    The number of replicas of the Image Version to be created per region.
    StorageAccountType string
    The storage account type for the image version.
    name String
    The name of the Image Version.
    regionalReplicaCount Integer
    The number of replicas of the Image Version to be created per region.
    storageAccountType String
    The storage account type for the image version.
    name string
    The name of the Image Version.
    regionalReplicaCount number
    The number of replicas of the Image Version to be created per region.
    storageAccountType string
    The storage account type for the image version.
    name str
    The name of the Image Version.
    regional_replica_count int
    The number of replicas of the Image Version to be created per region.
    storage_account_type str
    The storage account type for the image version.
    name String
    The name of the Image Version.
    regionalReplicaCount Number
    The number of replicas of the Image Version to be created per region.
    storageAccountType String
    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 azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.