// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; import * as utilities from "./utilities"; /** * ## # incus.Image * * Manages a locally-stored Incus image. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as incus from "@kiterun/incus"; * * const alpine = new incus.Image("alpine", {sourceImage: { * remote: "images", * name: "alpine/edge", * }}); * const test1 = new incus.Instance("test1", { * name: "test1", * image: alpine.fingerprint, * ephemeral: false, * }); * ``` * * ## Notes * * * See the Incus [documentation](https://linuxcontainers.org/incus/docs/main/howto/images_remote) for more info on default image remotes. */ export 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. */ public static get(name: string, id: pulumi.Input, state?: ImageState, opts?: pulumi.CustomResourceOptions): Image { return new Image(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'incus:index/image: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. */ public static isInstance(obj: any): obj is Image { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Image.__pulumiType; } /** * *Optional* - A list of aliases to assign to the image after * pulling. */ public readonly aliases!: pulumi.Output; /** * The list of aliases that were copied from the * `sourceImage`. */ public /*out*/ readonly copiedAliases!: pulumi.Output; /** * The datetime of image creation, in Unix time. */ public /*out*/ readonly createdAt!: pulumi.Output; /** * The unique hash fingperint of the image. */ public /*out*/ readonly fingerprint!: pulumi.Output; /** * *Optional* - Name of the project where the image will be stored. */ public readonly project!: pulumi.Output; /** * *Optional* - The remote in which the resource will be created. If * not provided, the provider's default remote will be used. */ public readonly remote!: pulumi.Output; public /*out*/ readonly resourceId!: pulumi.Output; /** * *Optional* - The image file from the local file system from which the image will be created. See reference below. */ public readonly sourceFile!: pulumi.Output; /** * *Optional* - The source image from which the image will be created. See reference below. */ public readonly sourceImage!: pulumi.Output; /** * *Optional* - The source instance from which the image will be created. See reference below. */ public readonly sourceInstance!: 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) constructor(name: string, argsOrState?: ImageArgs | ImageState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as ImageState | undefined; resourceInputs["aliases"] = state ? state.aliases : undefined; resourceInputs["copiedAliases"] = state ? state.copiedAliases : undefined; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["fingerprint"] = state ? state.fingerprint : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["remote"] = state ? state.remote : undefined; resourceInputs["resourceId"] = state ? state.resourceId : undefined; resourceInputs["sourceFile"] = state ? state.sourceFile : undefined; resourceInputs["sourceImage"] = state ? state.sourceImage : undefined; resourceInputs["sourceInstance"] = state ? state.sourceInstance : undefined; } else { const args = argsOrState as ImageArgs | undefined; resourceInputs["aliases"] = args ? args.aliases : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["remote"] = args ? args.remote : undefined; resourceInputs["sourceFile"] = args ? args.sourceFile : undefined; resourceInputs["sourceImage"] = args ? args.sourceImage : undefined; resourceInputs["sourceInstance"] = args ? args.sourceInstance : undefined; resourceInputs["copiedAliases"] = undefined /*out*/; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["fingerprint"] = undefined /*out*/; resourceInputs["resourceId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Image.__pulumiType, name, resourceInputs, opts); } } /** * Input properties used for looking up and filtering Image resources. */ export interface ImageState { /** * *Optional* - A list of aliases to assign to the image after * pulling. */ aliases?: pulumi.Input[]>; /** * The list of aliases that were copied from the * `sourceImage`. */ copiedAliases?: pulumi.Input[]>; /** * The datetime of image creation, in Unix time. */ createdAt?: pulumi.Input; /** * The unique hash fingperint of the image. */ fingerprint?: pulumi.Input; /** * *Optional* - Name of the project where the image will be stored. */ project?: pulumi.Input; /** * *Optional* - The remote in which the resource will be created. If * not provided, the provider's default remote will be used. */ remote?: pulumi.Input; resourceId?: pulumi.Input; /** * *Optional* - The image file from the local file system from which the image will be created. See reference below. */ sourceFile?: pulumi.Input; /** * *Optional* - The source image from which the image will be created. See reference below. */ sourceImage?: pulumi.Input; /** * *Optional* - The source instance from which the image will be created. See reference below. */ sourceInstance?: pulumi.Input; } /** * The set of arguments for constructing a Image resource. */ export interface ImageArgs { /** * *Optional* - A list of aliases to assign to the image after * pulling. */ aliases?: pulumi.Input[]>; /** * *Optional* - Name of the project where the image will be stored. */ project?: pulumi.Input; /** * *Optional* - The remote in which the resource will be created. If * not provided, the provider's default remote will be used. */ remote?: pulumi.Input; /** * *Optional* - The image file from the local file system from which the image will be created. See reference below. */ sourceFile?: pulumi.Input; /** * *Optional* - The source image from which the image will be created. See reference below. */ sourceImage?: pulumi.Input; /** * *Optional* - The source instance from which the image will be created. See reference below. */ sourceInstance?: pulumi.Input; }