This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi
azure-native.compute.getImage
Explore with Pulumi AI
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi
Gets an image. Azure REST API version: 2023-03-01.
Other available API versions: 2023-07-01, 2023-09-01, 2024-03-01, 2024-07-01.
Using getImage
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 getImage(args: GetImageArgs, opts?: InvokeOptions): Promise<GetImageResult>
function getImageOutput(args: GetImageOutputArgs, opts?: InvokeOptions): Output<GetImageResult>def get_image(expand: Optional[str] = None,
              image_name: Optional[str] = None,
              resource_group_name: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetImageResult
def get_image_output(expand: Optional[pulumi.Input[str]] = None,
              image_name: Optional[pulumi.Input[str]] = None,
              resource_group_name: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetImageResult]func LookupImage(ctx *Context, args *LookupImageArgs, opts ...InvokeOption) (*LookupImageResult, error)
func LookupImageOutput(ctx *Context, args *LookupImageOutputArgs, opts ...InvokeOption) LookupImageResultOutput> Note: This function is named LookupImage in the Go SDK.
public static class GetImage 
{
    public static Task<GetImageResult> InvokeAsync(GetImageArgs args, InvokeOptions? opts = null)
    public static Output<GetImageResult> Invoke(GetImageInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetImageResult> getImage(GetImageArgs args, InvokeOptions options)
public static Output<GetImageResult> getImage(GetImageArgs args, InvokeOptions options)
fn::invoke:
  function: azure-native:compute:getImage
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ImageName string
- The name of the image.
- ResourceGroup stringName 
- The name of the resource group.
- Expand string
- The expand expression to apply on the operation.
- ImageName string
- The name of the image.
- ResourceGroup stringName 
- The name of the resource group.
- Expand string
- The expand expression to apply on the operation.
- imageName String
- The name of the image.
- resourceGroup StringName 
- The name of the resource group.
- expand String
- The expand expression to apply on the operation.
- imageName string
- The name of the image.
- resourceGroup stringName 
- The name of the resource group.
- expand string
- The expand expression to apply on the operation.
- image_name str
- The name of the image.
- resource_group_ strname 
- The name of the resource group.
- expand str
- The expand expression to apply on the operation.
- imageName String
- The name of the image.
- resourceGroup StringName 
- The name of the resource group.
- expand String
- The expand expression to apply on the operation.
getImage Result
The following output properties are available:
- Id string
- Resource Id
- Location string
- Resource location
- Name string
- Resource name
- ProvisioningState string
- The provisioning state.
- Type string
- Resource type
- ExtendedLocation Pulumi.Azure Native. Compute. Outputs. Extended Location Response 
- The extended location of the Image.
- HyperVGeneration string
- Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
- SourceVirtual Pulumi.Machine Azure Native. Compute. Outputs. Sub Resource Response 
- The source virtual machine from which Image is created.
- StorageProfile Pulumi.Azure Native. Compute. Outputs. Image Storage Profile Response 
- Specifies the storage settings for the virtual machine disks.
- Dictionary<string, string>
- Resource tags
- Id string
- Resource Id
- Location string
- Resource location
- Name string
- Resource name
- ProvisioningState string
- The provisioning state.
- Type string
- Resource type
- ExtendedLocation ExtendedLocation Response 
- The extended location of the Image.
- HyperVGeneration string
- Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
- SourceVirtual SubMachine Resource Response 
- The source virtual machine from which Image is created.
- StorageProfile ImageStorage Profile Response 
- Specifies the storage settings for the virtual machine disks.
- map[string]string
- Resource tags
- id String
- Resource Id
- location String
- Resource location
- name String
- Resource name
- provisioningState String
- The provisioning state.
- type String
- Resource type
- extendedLocation ExtendedLocation Response 
- The extended location of the Image.
- hyperVGeneration String
- Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
- sourceVirtual SubMachine Resource Response 
- The source virtual machine from which Image is created.
- storageProfile ImageStorage Profile Response 
- Specifies the storage settings for the virtual machine disks.
- Map<String,String>
- Resource tags
- id string
- Resource Id
- location string
- Resource location
- name string
- Resource name
- provisioningState string
- The provisioning state.
- type string
- Resource type
- extendedLocation ExtendedLocation Response 
- The extended location of the Image.
- hyperVGeneration string
- Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
- sourceVirtual SubMachine Resource Response 
- The source virtual machine from which Image is created.
- storageProfile ImageStorage Profile Response 
- Specifies the storage settings for the virtual machine disks.
- {[key: string]: string}
- Resource tags
- id str
- Resource Id
- location str
- Resource location
- name str
- Resource name
- provisioning_state str
- The provisioning state.
- type str
- Resource type
- extended_location ExtendedLocation Response 
- The extended location of the Image.
- hyper_v_ strgeneration 
- Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
- source_virtual_ Submachine Resource Response 
- The source virtual machine from which Image is created.
- storage_profile ImageStorage Profile Response 
- Specifies the storage settings for the virtual machine disks.
- Mapping[str, str]
- Resource tags
- id String
- Resource Id
- location String
- Resource location
- name String
- Resource name
- provisioningState String
- The provisioning state.
- type String
- Resource type
- extendedLocation Property Map
- The extended location of the Image.
- hyperVGeneration String
- Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
- sourceVirtual Property MapMachine 
- The source virtual machine from which Image is created.
- storageProfile Property Map
- Specifies the storage settings for the virtual machine disks.
- Map<String>
- Resource tags
Supporting Types
DiskEncryptionSetParametersResponse    
- Id string
- Resource Id
- Id string
- Resource Id
- id String
- Resource Id
- id string
- Resource Id
- id str
- Resource Id
- id String
- Resource Id
ExtendedLocationResponse  
ImageDataDiskResponse   
- Lun int
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- BlobUri string
- The Virtual Hard Disk.
- Caching string
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- DiskEncryption Pulumi.Set Azure Native. Compute. Inputs. Disk Encryption Set Parameters Response 
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- DiskSize intGB 
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- ManagedDisk Pulumi.Azure Native. Compute. Inputs. Sub Resource Response 
- The managedDisk.
- Snapshot
Pulumi.Azure Native. Compute. Inputs. Sub Resource Response 
- The snapshot.
- StorageAccount stringType 
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- Lun int
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- BlobUri string
- The Virtual Hard Disk.
- Caching string
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- DiskEncryption DiskSet Encryption Set Parameters Response 
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- DiskSize intGB 
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- ManagedDisk SubResource Response 
- The managedDisk.
- Snapshot
SubResource Response 
- The snapshot.
- StorageAccount stringType 
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- lun Integer
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- blobUri String
- The Virtual Hard Disk.
- caching String
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryption DiskSet Encryption Set Parameters Response 
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSize IntegerGB 
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk SubResource Response 
- The managedDisk.
- snapshot
SubResource Response 
- The snapshot.
- storageAccount StringType 
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- lun number
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- blobUri string
- The Virtual Hard Disk.
- caching string
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryption DiskSet Encryption Set Parameters Response 
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSize numberGB 
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk SubResource Response 
- The managedDisk.
- snapshot
SubResource Response 
- The snapshot.
- storageAccount stringType 
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- lun int
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- blob_uri str
- The Virtual Hard Disk.
- caching str
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- disk_encryption_ Diskset Encryption Set Parameters Response 
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- disk_size_ intgb 
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managed_disk SubResource Response 
- The managedDisk.
- snapshot
SubResource Response 
- The snapshot.
- storage_account_ strtype 
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- lun Number
- Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
- blobUri String
- The Virtual Hard Disk.
- caching String
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryption Property MapSet 
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSize NumberGB 
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk Property Map
- The managedDisk.
- snapshot Property Map
- The snapshot.
- storageAccount StringType 
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
ImageOSDiskResponse  
- OsState string
- The OS State. For managed images, use Generalized.
- OsType string
- This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.
- BlobUri string
- The Virtual Hard Disk.
- Caching string
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- DiskEncryption Pulumi.Set Azure Native. Compute. Inputs. Disk Encryption Set Parameters Response 
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- DiskSize intGB 
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- ManagedDisk Pulumi.Azure Native. Compute. Inputs. Sub Resource Response 
- The managedDisk.
- Snapshot
Pulumi.Azure Native. Compute. Inputs. Sub Resource Response 
- The snapshot.
- StorageAccount stringType 
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- OsState string
- The OS State. For managed images, use Generalized.
- OsType string
- This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.
- BlobUri string
- The Virtual Hard Disk.
- Caching string
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- DiskEncryption DiskSet Encryption Set Parameters Response 
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- DiskSize intGB 
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- ManagedDisk SubResource Response 
- The managedDisk.
- Snapshot
SubResource Response 
- The snapshot.
- StorageAccount stringType 
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- osState String
- The OS State. For managed images, use Generalized.
- osType String
- This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.
- blobUri String
- The Virtual Hard Disk.
- caching String
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryption DiskSet Encryption Set Parameters Response 
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSize IntegerGB 
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk SubResource Response 
- The managedDisk.
- snapshot
SubResource Response 
- The snapshot.
- storageAccount StringType 
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- osState string
- The OS State. For managed images, use Generalized.
- osType string
- This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.
- blobUri string
- The Virtual Hard Disk.
- caching string
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryption DiskSet Encryption Set Parameters Response 
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSize numberGB 
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk SubResource Response 
- The managedDisk.
- snapshot
SubResource Response 
- The snapshot.
- storageAccount stringType 
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- os_state str
- The OS State. For managed images, use Generalized.
- os_type str
- This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.
- blob_uri str
- The Virtual Hard Disk.
- caching str
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- disk_encryption_ Diskset Encryption Set Parameters Response 
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- disk_size_ intgb 
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managed_disk SubResource Response 
- The managedDisk.
- snapshot
SubResource Response 
- The snapshot.
- storage_account_ strtype 
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
- osState String
- The OS State. For managed images, use Generalized.
- osType String
- This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: Windows, Linux.
- blobUri String
- The Virtual Hard Disk.
- caching String
- Specifies the caching requirements. Possible values are: None, ReadOnly, ReadWrite. The default values are: None for Standard storage. ReadOnly for Premium storage.
- diskEncryption Property MapSet 
- Specifies the customer managed disk encryption set resource id for the managed image disk.
- diskSize NumberGB 
- Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
- managedDisk Property Map
- The managedDisk.
- snapshot Property Map
- The snapshot.
- storageAccount StringType 
- Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.
ImageStorageProfileResponse   
- DataDisks List<Pulumi.Azure Native. Compute. Inputs. Image Data Disk Response> 
- Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines.
- OsDisk Pulumi.Azure Native. Compute. Inputs. Image OSDisk Response 
- Specifies information about the operating system disk used by the virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines.
- ZoneResilient bool
- Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).
- DataDisks []ImageData Disk Response 
- Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines.
- OsDisk ImageOSDisk Response 
- Specifies information about the operating system disk used by the virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines.
- ZoneResilient bool
- Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).
- dataDisks List<ImageData Disk Response> 
- Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines.
- osDisk ImageOSDisk Response 
- Specifies information about the operating system disk used by the virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines.
- zoneResilient Boolean
- Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).
- dataDisks ImageData Disk Response[] 
- Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines.
- osDisk ImageOSDisk Response 
- Specifies information about the operating system disk used by the virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines.
- zoneResilient boolean
- Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).
- data_disks Sequence[ImageData Disk Response] 
- Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines.
- os_disk ImageOSDisk Response 
- Specifies information about the operating system disk used by the virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines.
- zone_resilient bool
- Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).
- dataDisks List<Property Map>
- Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines.
- osDisk Property Map
- Specifies information about the operating system disk used by the virtual machine. For more information about disks, see About disks and VHDs for Azure virtual machines.
- zoneResilient Boolean
- Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).
SubResourceResponse  
- Id string
- Resource Id
- Id string
- Resource Id
- id String
- Resource Id
- id string
- Resource Id
- id str
- Resource Id
- id String
- Resource Id
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.89.1 published on Sunday, Mar 2, 2025 by Pulumi