@pulumi/hcloud
Version:
A Pulumi package for creating and managing hcloud cloud resources.
221 lines • 6.56 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides details about a Hetzner Cloud Image.
*
* It is recommended to always provide the image architecture (using ''with_architecture'').
*
* See the [Image API documentation](https://docs.hetzner.cloud/reference/cloud#images) for more details.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as hcloud from "@pulumi/hcloud";
*
* const byId = hcloud.getImage({
* id: 114690387,
* });
* const byNameX86 = hcloud.getImage({
* name: "debian-12",
* withArchitecture: "x86",
* });
* const byNameArm = hcloud.getImage({
* name: "debian-12",
* withArchitecture: "arm",
* });
* const byLabel = hcloud.getImage({
* withSelector: "key=value",
* mostRecent: true,
* });
* const main = new hcloud.Server("main", {image: byName.id});
* ```
*/
export declare function getImage(args?: GetImageArgs, opts?: pulumi.InvokeOptions): Promise<GetImageResult>;
/**
* A collection of arguments for invoking getImage.
*/
export interface GetImageArgs {
/**
* ID of the Image.
*/
id?: number;
/**
* Include deprecated images.
*/
includeDeprecated?: boolean;
/**
* Sort results by created date, and return the most recent result.
*/
mostRecent?: boolean;
/**
* Name of the Image, only present when the type is `system`.
*/
name?: string;
/**
* Filter results using a [Label Selector](https://docs.hetzner.cloud/reference/cloud#label-selector).
*
* @deprecated Please use the withSelector property instead.
*/
selector?: string;
/**
* Filter results by architecture, for example `x86` (default) or `arm`.
*/
withArchitecture?: string;
/**
* Filter results using a [Label Selector](https://docs.hetzner.cloud/reference/hetzner#label-selector).
*/
withSelector?: string;
/**
* Filter results by statuses, for example `creating` or `available`.
*/
withStatuses?: string[];
}
/**
* A collection of values returned by getImage.
*/
export interface GetImageResult {
/**
* CPU architecture compatible with the Image.
*/
readonly architecture: string;
/**
* Point in time when the Image was created (in RFC3339 format).
*/
readonly created: string;
/**
* Point in time when the Image was marked as deprecated (in RFC3339 format).
*/
readonly deprecated: string;
/**
* Description of the Image.
*/
readonly description: string;
/**
* ID of the Image.
*/
readonly id?: number;
/**
* Include deprecated images.
*/
readonly includeDeprecated?: boolean;
/**
* User-defined [labels](https://docs.hetzner.cloud/reference/cloud#labels) (key-value pairs) for the resource.
*/
readonly labels: {
[key: string]: string;
};
/**
* Sort results by created date, and return the most recent result.
*/
readonly mostRecent?: boolean;
/**
* Name of the Image, only present when the type is `system`.
*/
readonly name?: string;
/**
* Flavor of the operating system contained in the Image.
*/
readonly osFlavor: string;
/**
* Version of the operating system contained in the Image.
*/
readonly osVersion: string;
/**
* Whether the Image is optimized for a rapid deployment.
*/
readonly rapidDeploy: boolean;
/**
* Filter results using a [Label Selector](https://docs.hetzner.cloud/reference/cloud#label-selector).
*
* @deprecated Please use the withSelector property instead.
*/
readonly selector?: string;
/**
* Type of the Image, for example `system`, `backup` or `snapshot`.
*/
readonly type: string;
/**
* Filter results by architecture, for example `x86` (default) or `arm`.
*/
readonly withArchitecture?: string;
/**
* Filter results using a [Label Selector](https://docs.hetzner.cloud/reference/hetzner#label-selector).
*/
readonly withSelector?: string;
/**
* Filter results by statuses, for example `creating` or `available`.
*/
readonly withStatuses?: string[];
}
/**
* Provides details about a Hetzner Cloud Image.
*
* It is recommended to always provide the image architecture (using ''with_architecture'').
*
* See the [Image API documentation](https://docs.hetzner.cloud/reference/cloud#images) for more details.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as hcloud from "@pulumi/hcloud";
*
* const byId = hcloud.getImage({
* id: 114690387,
* });
* const byNameX86 = hcloud.getImage({
* name: "debian-12",
* withArchitecture: "x86",
* });
* const byNameArm = hcloud.getImage({
* name: "debian-12",
* withArchitecture: "arm",
* });
* const byLabel = hcloud.getImage({
* withSelector: "key=value",
* mostRecent: true,
* });
* const main = new hcloud.Server("main", {image: byName.id});
* ```
*/
export declare function getImageOutput(args?: GetImageOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetImageResult>;
/**
* A collection of arguments for invoking getImage.
*/
export interface GetImageOutputArgs {
/**
* ID of the Image.
*/
id?: pulumi.Input<number | undefined>;
/**
* Include deprecated images.
*/
includeDeprecated?: pulumi.Input<boolean | undefined>;
/**
* Sort results by created date, and return the most recent result.
*/
mostRecent?: pulumi.Input<boolean | undefined>;
/**
* Name of the Image, only present when the type is `system`.
*/
name?: pulumi.Input<string | undefined>;
/**
* Filter results using a [Label Selector](https://docs.hetzner.cloud/reference/cloud#label-selector).
*
* @deprecated Please use the withSelector property instead.
*/
selector?: pulumi.Input<string | undefined>;
/**
* Filter results by architecture, for example `x86` (default) or `arm`.
*/
withArchitecture?: pulumi.Input<string | undefined>;
/**
* Filter results using a [Label Selector](https://docs.hetzner.cloud/reference/hetzner#label-selector).
*/
withSelector?: pulumi.Input<string | undefined>;
/**
* Filter results by statuses, for example `creating` or `available`.
*/
withStatuses?: pulumi.Input<pulumi.Input<string>[] | undefined>;
}
//# sourceMappingURL=getImage.d.ts.map