Files
pulumi-incus/sdk/nodejs/getImage.ts
2025-12-08 10:47:09 -05:00

157 lines
4.4 KiB
TypeScript
Generated

// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "./utilities";
/**
* ## # incus.Image
*
* Provides information about an Incus image.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as incus from "@kiterun/incus";
*
* const debianCustom = incus.getImage({
* name: "debian_custom",
* });
* const d1 = new incus.Instance("d1", {
* image: debianCustom.then(debianCustom => debianCustom.fingerprint),
* name: "d1",
* });
* ```
*/
export function getImage(args?: GetImageArgs, opts?: pulumi.InvokeOptions): Promise<GetImageResult> {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("incus:index/getImage:getImage", {
"architecture": args.architecture,
"fingerprint": args.fingerprint,
"name": args.name,
"project": args.project,
"remote": args.remote,
"type": args.type,
}, opts);
}
/**
* A collection of arguments for invoking getImage.
*/
export interface GetImageArgs {
/**
* *Optional* - The image architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values.
*/
architecture?: string;
/**
* *Optional* - Fingerprint of the image.
*/
fingerprint?: string;
/**
* *Optional* - Name of the image.
*/
name?: string;
/**
* *Optional* - Name of the project where the image is stored.
*/
project?: string;
/**
* *Optional* - The remote in which the resource was created. If
* not provided, the provider's default remote will be used.
*/
remote?: string;
/**
* *Optional* - Type of image. Must be one of `container` or `virtual-machine`.
*/
type?: string;
}
/**
* A collection of values returned by getImage.
*/
export interface GetImageResult {
/**
* The list of aliases for the image.
*/
readonly aliases: string[];
readonly architecture: string;
/**
* The datetime of image creation, in Unix time.
*/
readonly createdAt: number;
readonly fingerprint: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly name?: string;
readonly project?: string;
readonly remote?: string;
readonly type: string;
}
/**
* ## # incus.Image
*
* Provides information about an Incus image.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as incus from "@kiterun/incus";
*
* const debianCustom = incus.getImage({
* name: "debian_custom",
* });
* const d1 = new incus.Instance("d1", {
* image: debianCustom.then(debianCustom => debianCustom.fingerprint),
* name: "d1",
* });
* ```
*/
export function getImageOutput(args?: GetImageOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetImageResult> {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("incus:index/getImage:getImage", {
"architecture": args.architecture,
"fingerprint": args.fingerprint,
"name": args.name,
"project": args.project,
"remote": args.remote,
"type": args.type,
}, opts);
}
/**
* A collection of arguments for invoking getImage.
*/
export interface GetImageOutputArgs {
/**
* *Optional* - The image architecture (e.g. x86_64, aarch64). See [Architectures](https://linuxcontainers.org/incus/docs/main/architectures/) for all possible values.
*/
architecture?: pulumi.Input<string>;
/**
* *Optional* - Fingerprint of the image.
*/
fingerprint?: pulumi.Input<string>;
/**
* *Optional* - Name of the image.
*/
name?: pulumi.Input<string>;
/**
* *Optional* - Name of the project where the image is stored.
*/
project?: pulumi.Input<string>;
/**
* *Optional* - The remote in which the resource was created. If
* not provided, the provider's default remote will be used.
*/
remote?: pulumi.Input<string>;
/**
* *Optional* - Type of image. Must be one of `container` or `virtual-machine`.
*/
type?: pulumi.Input<string>;
}