import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a custom virtual machine image that can be used to create virtual machines. * * ## Example Usage * * > **Note:** For a more complete example, see the `examples/image` directory within the GitHub Repository. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = azure.compute.getVirtualMachine({ * name: "examplevm", * resourceGroupName: "example-resources", * }); * const exampleImage = new azure.compute.Image("example", { * name: "exampleimage", * location: example.then(example => example.location), * resourceGroupName: example.then(example => example.name), * sourceVirtualMachineId: example.then(example => example.id), * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Compute` - 2022-03-01 * * ## Import * * Images can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:compute/image:Image example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/images/image1 * ``` */ export declare class Image extends pulumi.CustomResource { /** * Get an existing Image resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ImageState, opts?: pulumi.CustomResourceOptions): Image; /** * Returns true if the given object is an instance of Image. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Image; /** * One or more `dataDisk` blocks as defined below. * * > **Note:** `dataDisk` cannot be set together with `sourceVirtualMachineId`. */ readonly dataDisks: pulumi.Output; /** * The Hyper-V Generation Type of the Virtual Machine created from the image as `V1`, `V2`. Defaults to `V1`. Changing this forces a new resource to be created. */ readonly hyperVGeneration: pulumi.Output; /** * Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * Specifies the name of the image. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * One or more `osDisk` blocks as defined below. Changing this forces a new resource to be created. * * > **Note:** `osDisk` cannot be set together with `sourceVirtualMachineId`. */ readonly osDisk: pulumi.Output; /** * The name of the resource group in which to create the image. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * The Virtual Machine ID from which to create the image. */ readonly sourceVirtualMachineId: pulumi.Output; /** * A mapping of tags to assign to the resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Is zone resiliency enabled? Defaults to `false`. Changing this forces a new resource to be created. * * > **Note:** `zoneResilient` can only be set to `true` if the image is stored in a region that supports availability zones. * * > **Note:** `zoneResilient` cannot be set together with `sourceVirtualMachineId`. */ readonly zoneResilient: pulumi.Output; /** * Create a Image resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ImageArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Image resources. */ export interface ImageState { /** * One or more `dataDisk` blocks as defined below. * * > **Note:** `dataDisk` cannot be set together with `sourceVirtualMachineId`. */ dataDisks?: pulumi.Input[]>; /** * The Hyper-V Generation Type of the Virtual Machine created from the image as `V1`, `V2`. Defaults to `V1`. Changing this forces a new resource to be created. */ hyperVGeneration?: pulumi.Input; /** * Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the name of the image. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * One or more `osDisk` blocks as defined below. Changing this forces a new resource to be created. * * > **Note:** `osDisk` cannot be set together with `sourceVirtualMachineId`. */ osDisk?: pulumi.Input; /** * The name of the resource group in which to create the image. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * The Virtual Machine ID from which to create the image. */ sourceVirtualMachineId?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Is zone resiliency enabled? Defaults to `false`. Changing this forces a new resource to be created. * * > **Note:** `zoneResilient` can only be set to `true` if the image is stored in a region that supports availability zones. * * > **Note:** `zoneResilient` cannot be set together with `sourceVirtualMachineId`. */ zoneResilient?: pulumi.Input; } /** * The set of arguments for constructing a Image resource. */ export interface ImageArgs { /** * One or more `dataDisk` blocks as defined below. * * > **Note:** `dataDisk` cannot be set together with `sourceVirtualMachineId`. */ dataDisks?: pulumi.Input[]>; /** * The Hyper-V Generation Type of the Virtual Machine created from the image as `V1`, `V2`. Defaults to `V1`. Changing this forces a new resource to be created. */ hyperVGeneration?: pulumi.Input; /** * Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the name of the image. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * One or more `osDisk` blocks as defined below. Changing this forces a new resource to be created. * * > **Note:** `osDisk` cannot be set together with `sourceVirtualMachineId`. */ osDisk?: pulumi.Input; /** * The name of the resource group in which to create the image. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * The Virtual Machine ID from which to create the image. */ sourceVirtualMachineId?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Is zone resiliency enabled? Defaults to `false`. Changing this forces a new resource to be created. * * > **Note:** `zoneResilient` can only be set to `true` if the image is stored in a region that supports availability zones. * * > **Note:** `zoneResilient` cannot be set together with `sourceVirtualMachineId`. */ zoneResilient?: pulumi.Input; }