@pulumi/azure-native
Version:
[](https://slack.pulumi.com) [](https://npmjs.com/package/@pulumi/azure-native) [ • 4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* Gets an image.
*
* Uses Azure REST API version 2024-11-01.
*
* Other available API versions: 2022-08-01, 2022-11-01, 2023-03-01, 2023-07-01, 2023-09-01, 2024-03-01, 2024-07-01, 2025-04-01. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native compute [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
*/
export declare function getImage(args: GetImageArgs, opts?: pulumi.InvokeOptions): Promise<GetImageResult>;
export interface GetImageArgs {
/**
* The expand expression to apply on the operation.
*/
expand?: string;
/**
* The name of the image.
*/
imageName: string;
/**
* The name of the resource group. The name is case insensitive.
*/
resourceGroupName: string;
}
/**
* The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.
*/
export interface GetImageResult {
/**
* The Azure API version of the resource.
*/
readonly azureApiVersion: string;
/**
* The extended location of the Image.
*/
readonly extendedLocation?: outputs.compute.ExtendedLocationResponse;
/**
* 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.
*/
readonly hyperVGeneration?: string;
/**
* Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
*/
readonly id: string;
/**
* The geo-location where the resource lives
*/
readonly location: string;
/**
* The name of the resource
*/
readonly name: string;
/**
* The provisioning state.
*/
readonly provisioningState: string;
/**
* The source virtual machine from which Image is created.
*/
readonly sourceVirtualMachine?: outputs.compute.SubResourceResponse;
/**
* Specifies the storage settings for the virtual machine disks.
*/
readonly storageProfile?: outputs.compute.ImageStorageProfileResponse;
/**
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
readonly systemData: outputs.compute.SystemDataResponse;
/**
* Resource tags.
*/
readonly tags?: {
[key: string]: string;
};
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*/
readonly type: string;
}
/**
* Gets an image.
*
* Uses Azure REST API version 2024-11-01.
*
* Other available API versions: 2022-08-01, 2022-11-01, 2023-03-01, 2023-07-01, 2023-09-01, 2024-03-01, 2024-07-01, 2025-04-01. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native compute [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
*/
export declare function getImageOutput(args: GetImageOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetImageResult>;
export interface GetImageOutputArgs {
/**
* The expand expression to apply on the operation.
*/
expand?: pulumi.Input<string>;
/**
* The name of the image.
*/
imageName: pulumi.Input<string>;
/**
* The name of the resource group. The name is case insensitive.
*/
resourceGroupName: pulumi.Input<string>;
}