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

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

azure.compute.getSharedImageVersions

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

    Use this data source to access information about existing Versions 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.getSharedImageVersions({
        imageName: "my-image",
        galleryName: "my-image-gallery",
        resourceGroupName: "example-resources",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.compute.get_shared_image_versions(image_name="my-image",
        gallery_name="my-image-gallery",
        resource_group_name="example-resources")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.GetSharedImageVersions(ctx, &compute.GetSharedImageVersionsArgs{
    			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.GetSharedImageVersions.Invoke(new()
        {
            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.GetSharedImageVersionsArgs;
    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.getSharedImageVersions(GetSharedImageVersionsArgs.builder()
                .imageName("my-image")
                .galleryName("my-image-gallery")
                .resourceGroupName("example-resources")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:compute:getSharedImageVersions
          Arguments:
            imageName: my-image
            galleryName: my-image-gallery
            resourceGroupName: example-resources
    

    Using getSharedImageVersions

    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 getSharedImageVersions(args: GetSharedImageVersionsArgs, opts?: InvokeOptions): Promise<GetSharedImageVersionsResult>
    function getSharedImageVersionsOutput(args: GetSharedImageVersionsOutputArgs, opts?: InvokeOptions): Output<GetSharedImageVersionsResult>
    def get_shared_image_versions(gallery_name: Optional[str] = None,
                                  image_name: Optional[str] = None,
                                  resource_group_name: Optional[str] = None,
                                  tags_filter: Optional[Mapping[str, str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetSharedImageVersionsResult
    def get_shared_image_versions_output(gallery_name: Optional[pulumi.Input[str]] = None,
                                  image_name: Optional[pulumi.Input[str]] = None,
                                  resource_group_name: Optional[pulumi.Input[str]] = None,
                                  tags_filter: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetSharedImageVersionsResult]
    func GetSharedImageVersions(ctx *Context, args *GetSharedImageVersionsArgs, opts ...InvokeOption) (*GetSharedImageVersionsResult, error)
    func GetSharedImageVersionsOutput(ctx *Context, args *GetSharedImageVersionsOutputArgs, opts ...InvokeOption) GetSharedImageVersionsResultOutput

    > Note: This function is named GetSharedImageVersions in the Go SDK.

    public static class GetSharedImageVersions 
    {
        public static Task<GetSharedImageVersionsResult> InvokeAsync(GetSharedImageVersionsArgs args, InvokeOptions? opts = null)
        public static Output<GetSharedImageVersionsResult> Invoke(GetSharedImageVersionsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSharedImageVersionsResult> getSharedImageVersions(GetSharedImageVersionsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:compute/getSharedImageVersions:getSharedImageVersions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    GalleryName string
    The name of the Shared Image in which the Shared Image exists.
    ImageName string
    The name of the Shared Image in which this Version exists.
    ResourceGroupName string
    The name of the Resource Group in which the Shared Image Gallery exists.
    TagsFilter Dictionary<string, string>
    A mapping of tags to filter the list of images against.
    GalleryName string
    The name of the Shared Image in which the Shared Image exists.
    ImageName string
    The name of the Shared Image in which this Version exists.
    ResourceGroupName string
    The name of the Resource Group in which the Shared Image Gallery exists.
    TagsFilter map[string]string
    A mapping of tags to filter the list of images against.
    galleryName String
    The name of the Shared Image in which the Shared Image exists.
    imageName String
    The name of the Shared Image in which this Version exists.
    resourceGroupName String
    The name of the Resource Group in which the Shared Image Gallery exists.
    tagsFilter Map<String,String>
    A mapping of tags to filter the list of images against.
    galleryName string
    The name of the Shared Image in which the Shared Image exists.
    imageName string
    The name of the Shared Image in which this Version exists.
    resourceGroupName string
    The name of the Resource Group in which the Shared Image Gallery exists.
    tagsFilter {[key: string]: string}
    A mapping of tags to filter the list of images against.
    gallery_name str
    The name of the Shared Image in which the Shared Image exists.
    image_name str
    The name of the Shared Image in which this Version exists.
    resource_group_name str
    The name of the Resource Group in which the Shared Image Gallery exists.
    tags_filter Mapping[str, str]
    A mapping of tags to filter the list of images against.
    galleryName String
    The name of the Shared Image in which the Shared Image exists.
    imageName String
    The name of the Shared Image in which this Version exists.
    resourceGroupName String
    The name of the Resource Group in which the Shared Image Gallery exists.
    tagsFilter Map<String>
    A mapping of tags to filter the list of images against.

    getSharedImageVersions Result

    The following output properties are available:

    GalleryName string
    Id string
    The provider-assigned unique ID for this managed resource.
    ImageName string
    Images List<GetSharedImageVersionsImage>
    An images block as defined below:
    ResourceGroupName string
    TagsFilter Dictionary<string, string>
    GalleryName string
    Id string
    The provider-assigned unique ID for this managed resource.
    ImageName string
    Images []GetSharedImageVersionsImage
    An images block as defined below:
    ResourceGroupName string
    TagsFilter map[string]string
    galleryName String
    id String
    The provider-assigned unique ID for this managed resource.
    imageName String
    images List<GetSharedImageVersionsImage>
    An images block as defined below:
    resourceGroupName String
    tagsFilter Map<String,String>
    galleryName string
    id string
    The provider-assigned unique ID for this managed resource.
    imageName string
    images GetSharedImageVersionsImage[]
    An images block as defined below:
    resourceGroupName string
    tagsFilter {[key: string]: string}
    gallery_name str
    id str
    The provider-assigned unique ID for this managed resource.
    image_name str
    images Sequence[GetSharedImageVersionsImage]
    An images block as defined below:
    resource_group_name str
    tags_filter Mapping[str, str]
    galleryName String
    id String
    The provider-assigned unique ID for this managed resource.
    imageName String
    images List<Property Map>
    An images block as defined below:
    resourceGroupName String
    tagsFilter Map<String>

    Supporting Types

    GetSharedImageVersionsImage

    ExcludeFromLatest bool
    Is this Image Version excluded from the latest filter?
    Id string
    The ID of this Shared Image Version.
    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.
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Shared Image.
    TargetRegions List<GetSharedImageVersionsImageTargetRegion>
    One or more target_region blocks as documented below.
    ExcludeFromLatest bool
    Is this Image Version excluded from the latest filter?
    Id string
    The ID of this Shared Image Version.
    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.
    Tags map[string]string
    A mapping of tags assigned to the Shared Image.
    TargetRegions []GetSharedImageVersionsImageTargetRegion
    One or more target_region blocks as documented below.
    excludeFromLatest Boolean
    Is this Image Version excluded from the latest filter?
    id String
    The ID of this Shared Image Version.
    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.
    tags Map<String,String>
    A mapping of tags assigned to the Shared Image.
    targetRegions List<GetSharedImageVersionsImageTargetRegion>
    One or more target_region blocks as documented below.
    excludeFromLatest boolean
    Is this Image Version excluded from the latest filter?
    id string
    The ID of this Shared Image Version.
    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.
    tags {[key: string]: string}
    A mapping of tags assigned to the Shared Image.
    targetRegions GetSharedImageVersionsImageTargetRegion[]
    One or more target_region blocks as documented below.
    exclude_from_latest bool
    Is this Image Version excluded from the latest filter?
    id str
    The ID of this Shared Image Version.
    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.
    tags Mapping[str, str]
    A mapping of tags assigned to the Shared Image.
    target_regions Sequence[GetSharedImageVersionsImageTargetRegion]
    One or more target_region blocks as documented below.
    excludeFromLatest Boolean
    Is this Image Version excluded from the latest filter?
    id String
    The ID of this Shared Image Version.
    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.
    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.

    GetSharedImageVersionsImageTargetRegion

    Name string
    The Azure Region in which this Image Version exists.
    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 Azure Region in which this Image Version exists.
    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 Azure Region in which this Image Version exists.
    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 Azure Region in which this Image Version exists.
    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 Azure Region in which this Image Version exists.
    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 Azure Region in which this Image Version exists.
    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.

    Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi