We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.compute.getImages
Explore with Pulumi AI
Use this data source to access information about existing Images within a Resource Group.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.compute.getImages({
    resourceGroupName: "example-resources",
});
import pulumi
import pulumi_azure as azure
example = azure.compute.get_images(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.GetImages(ctx, &compute.GetImagesArgs{
			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.GetImages.Invoke(new()
    {
        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.GetImagesArgs;
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.getImages(GetImagesArgs.builder()
            .resourceGroupName("example-resources")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: azure:compute:getImages
      arguments:
        resourceGroupName: example-resources
Using getImages
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 getImages(args: GetImagesArgs, opts?: InvokeOptions): Promise<GetImagesResult>
function getImagesOutput(args: GetImagesOutputArgs, opts?: InvokeOptions): Output<GetImagesResult>def get_images(resource_group_name: Optional[str] = None,
               tags_filter: Optional[Mapping[str, str]] = None,
               opts: Optional[InvokeOptions] = None) -> GetImagesResult
def get_images_output(resource_group_name: Optional[pulumi.Input[str]] = None,
               tags_filter: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetImagesResult]func GetImages(ctx *Context, args *GetImagesArgs, opts ...InvokeOption) (*GetImagesResult, error)
func GetImagesOutput(ctx *Context, args *GetImagesOutputArgs, opts ...InvokeOption) GetImagesResultOutput> Note: This function is named GetImages in the Go SDK.
public static class GetImages 
{
    public static Task<GetImagesResult> InvokeAsync(GetImagesArgs args, InvokeOptions? opts = null)
    public static Output<GetImagesResult> Invoke(GetImagesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetImagesResult> getImages(GetImagesArgs args, InvokeOptions options)
public static Output<GetImagesResult> getImages(GetImagesArgs args, InvokeOptions options)
fn::invoke:
  function: azure:compute/getImages:getImages
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ResourceGroup stringName 
- The name of the Resource Group in which the Image exists.
- Dictionary<string, string>
- A mapping of tags to filter the list of images against.
- ResourceGroup stringName 
- The name of the Resource Group in which the Image exists.
- map[string]string
- A mapping of tags to filter the list of images against.
- resourceGroup StringName 
- The name of the Resource Group in which the Image exists.
- Map<String,String>
- A mapping of tags to filter the list of images against.
- resourceGroup stringName 
- The name of the Resource Group in which the Image exists.
- {[key: string]: string}
- A mapping of tags to filter the list of images against.
- resource_group_ strname 
- The name of the Resource Group in which the Image exists.
- Mapping[str, str]
- A mapping of tags to filter the list of images against.
- resourceGroup StringName 
- The name of the Resource Group in which the Image exists.
- Map<String>
- A mapping of tags to filter the list of images against.
getImages Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Images
List<GetImages Image> 
- One or more imagesblocks as defined below:
- ResourceGroup stringName 
- Dictionary<string, string>
- Id string
- The provider-assigned unique ID for this managed resource.
- Images
[]GetImages Image 
- One or more imagesblocks as defined below:
- ResourceGroup stringName 
- map[string]string
- id String
- The provider-assigned unique ID for this managed resource.
- images
List<GetImages Image> 
- One or more imagesblocks as defined below:
- resourceGroup StringName 
- Map<String,String>
- id string
- The provider-assigned unique ID for this managed resource.
- images
GetImages Image[] 
- One or more imagesblocks as defined below:
- resourceGroup stringName 
- {[key: string]: string}
- id str
- The provider-assigned unique ID for this managed resource.
- images
Sequence[GetImages Image] 
- One or more imagesblocks as defined below:
- resource_group_ strname 
- Mapping[str, str]
- id String
- The provider-assigned unique ID for this managed resource.
- images List<Property Map>
- One or more imagesblocks as defined below:
- resourceGroup StringName 
- Map<String>
Supporting Types
GetImagesImage  
- DataDisks List<GetImages Image Data Disk> 
- One or more data_diskblocks as defined below.
- Location string
- The supported Azure location where the Image exists.
- Name string
- The name of the Image.
- OsDisks List<GetImages Image Os Disk> 
- An os_diskblock as defined below.
- Dictionary<string, string>
- A mapping of tags assigned to the Image.
- ZoneResilient bool
- Is zone resiliency enabled?
- DataDisks []GetImages Image Data Disk 
- One or more data_diskblocks as defined below.
- Location string
- The supported Azure location where the Image exists.
- Name string
- The name of the Image.
- OsDisks []GetImages Image Os Disk 
- An os_diskblock as defined below.
- map[string]string
- A mapping of tags assigned to the Image.
- ZoneResilient bool
- Is zone resiliency enabled?
- dataDisks List<GetImages Image Data Disk> 
- One or more data_diskblocks as defined below.
- location String
- The supported Azure location where the Image exists.
- name String
- The name of the Image.
- osDisks List<GetImages Image Os Disk> 
- An os_diskblock as defined below.
- Map<String,String>
- A mapping of tags assigned to the Image.
- zoneResilient Boolean
- Is zone resiliency enabled?
- dataDisks GetImages Image Data Disk[] 
- One or more data_diskblocks as defined below.
- location string
- The supported Azure location where the Image exists.
- name string
- The name of the Image.
- osDisks GetImages Image Os Disk[] 
- An os_diskblock as defined below.
- {[key: string]: string}
- A mapping of tags assigned to the Image.
- zoneResilient boolean
- Is zone resiliency enabled?
- data_disks Sequence[GetImages Image Data Disk] 
- One or more data_diskblocks as defined below.
- location str
- The supported Azure location where the Image exists.
- name str
- The name of the Image.
- os_disks Sequence[GetImages Image Os Disk] 
- An os_diskblock as defined below.
- Mapping[str, str]
- A mapping of tags assigned to the Image.
- zone_resilient bool
- Is zone resiliency enabled?
- dataDisks List<Property Map>
- One or more data_diskblocks as defined below.
- location String
- The supported Azure location where the Image exists.
- name String
- The name of the Image.
- osDisks List<Property Map>
- An os_diskblock as defined below.
- Map<String>
- A mapping of tags assigned to the Image.
- zoneResilient Boolean
- Is zone resiliency enabled?
GetImagesImageDataDisk    
- BlobUri string
- the URI in Azure storage of the blob used to create the image.
- Caching string
- the caching mode for the Data Disk.
- Lun int
- the logical unit number of the data disk.
- ManagedDisk stringId 
- the ID of the Managed Disk used as the Data Disk Image.
- SizeGb int
- the size of this Data Disk in GB.
- BlobUri string
- the URI in Azure storage of the blob used to create the image.
- Caching string
- the caching mode for the Data Disk.
- Lun int
- the logical unit number of the data disk.
- ManagedDisk stringId 
- the ID of the Managed Disk used as the Data Disk Image.
- SizeGb int
- the size of this Data Disk in GB.
- blobUri String
- the URI in Azure storage of the blob used to create the image.
- caching String
- the caching mode for the Data Disk.
- lun Integer
- the logical unit number of the data disk.
- managedDisk StringId 
- the ID of the Managed Disk used as the Data Disk Image.
- sizeGb Integer
- the size of this Data Disk in GB.
- blobUri string
- the URI in Azure storage of the blob used to create the image.
- caching string
- the caching mode for the Data Disk.
- lun number
- the logical unit number of the data disk.
- managedDisk stringId 
- the ID of the Managed Disk used as the Data Disk Image.
- sizeGb number
- the size of this Data Disk in GB.
- blob_uri str
- the URI in Azure storage of the blob used to create the image.
- caching str
- the caching mode for the Data Disk.
- lun int
- the logical unit number of the data disk.
- managed_disk_ strid 
- the ID of the Managed Disk used as the Data Disk Image.
- size_gb int
- the size of this Data Disk in GB.
- blobUri String
- the URI in Azure storage of the blob used to create the image.
- caching String
- the caching mode for the Data Disk.
- lun Number
- the logical unit number of the data disk.
- managedDisk StringId 
- the ID of the Managed Disk used as the Data Disk Image.
- sizeGb Number
- the size of this Data Disk in GB.
GetImagesImageOsDisk    
- BlobUri string
- the URI in Azure storage of the blob used to create the image.
- Caching string
- the caching mode for the Data Disk.
- DiskEncryption stringSet Id 
- the ID of the Disk Encryption Set used to encrypt this image.
- ManagedDisk stringId 
- the ID of the Managed Disk used as the Data Disk Image.
- OsState string
- the State of the OS used in the Image.
- OsType string
- the type of Operating System used on the OS Disk.
- SizeGb int
- the size of this Data Disk in GB.
- BlobUri string
- the URI in Azure storage of the blob used to create the image.
- Caching string
- the caching mode for the Data Disk.
- DiskEncryption stringSet Id 
- the ID of the Disk Encryption Set used to encrypt this image.
- ManagedDisk stringId 
- the ID of the Managed Disk used as the Data Disk Image.
- OsState string
- the State of the OS used in the Image.
- OsType string
- the type of Operating System used on the OS Disk.
- SizeGb int
- the size of this Data Disk in GB.
- blobUri String
- the URI in Azure storage of the blob used to create the image.
- caching String
- the caching mode for the Data Disk.
- diskEncryption StringSet Id 
- the ID of the Disk Encryption Set used to encrypt this image.
- managedDisk StringId 
- the ID of the Managed Disk used as the Data Disk Image.
- osState String
- the State of the OS used in the Image.
- osType String
- the type of Operating System used on the OS Disk.
- sizeGb Integer
- the size of this Data Disk in GB.
- blobUri string
- the URI in Azure storage of the blob used to create the image.
- caching string
- the caching mode for the Data Disk.
- diskEncryption stringSet Id 
- the ID of the Disk Encryption Set used to encrypt this image.
- managedDisk stringId 
- the ID of the Managed Disk used as the Data Disk Image.
- osState string
- the State of the OS used in the Image.
- osType string
- the type of Operating System used on the OS Disk.
- sizeGb number
- the size of this Data Disk in GB.
- blob_uri str
- the URI in Azure storage of the blob used to create the image.
- caching str
- the caching mode for the Data Disk.
- disk_encryption_ strset_ id 
- the ID of the Disk Encryption Set used to encrypt this image.
- managed_disk_ strid 
- the ID of the Managed Disk used as the Data Disk Image.
- os_state str
- the State of the OS used in the Image.
- os_type str
- the type of Operating System used on the OS Disk.
- size_gb int
- the size of this Data Disk in GB.
- blobUri String
- the URI in Azure storage of the blob used to create the image.
- caching String
- the caching mode for the Data Disk.
- diskEncryption StringSet Id 
- the ID of the Disk Encryption Set used to encrypt this image.
- managedDisk StringId 
- the ID of the Managed Disk used as the Data Disk Image.
- osState String
- the State of the OS used in the Image.
- osType String
- the type of Operating System used on the OS Disk.
- sizeGb Number
- the size of this Data Disk in GB.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.