@pulumi/hcloud
Version:
A Pulumi package for creating and managing hcloud cloud resources.
104 lines (103 loc) • 3.37 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a Hetzner Cloud snapshot to represent an image with type snapshot in the Hetzner Cloud. This resource makes it easy to create a snapshot of your server.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as hcloud from "@pulumi/hcloud";
*
* const node1 = new hcloud.Server("node1", {
* name: "node1",
* image: "debian-11",
* serverType: "cx22",
* });
* const my_snapshot = new hcloud.Snapshot("my-snapshot", {serverId: node1.id});
* ```
*
* ## Import
*
* Snapshots can be imported using its image `id`:
*
* ```sh
* $ pulumi import hcloud:index/snapshot:Snapshot example "$IMAGE_ID"
* ```
*/
export declare class Snapshot extends pulumi.CustomResource {
/**
* Get an existing Snapshot 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<pulumi.ID>, state?: SnapshotState, opts?: pulumi.CustomResourceOptions): Snapshot;
/**
* Returns true if the given object is an instance of Snapshot. 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 Snapshot;
/**
* Description of the snapshot.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* User-defined labels (key-value pairs) should be created with.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Server to the snapshot should be created from.
*/
readonly serverId: pulumi.Output<number>;
/**
* Create a Snapshot 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: SnapshotArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Snapshot resources.
*/
export interface SnapshotState {
/**
* Description of the snapshot.
*/
description?: pulumi.Input<string>;
/**
* User-defined labels (key-value pairs) should be created with.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Server to the snapshot should be created from.
*/
serverId?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a Snapshot resource.
*/
export interface SnapshotArgs {
/**
* Description of the snapshot.
*/
description?: pulumi.Input<string>;
/**
* User-defined labels (key-value pairs) should be created with.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Server to the snapshot should be created from.
*/
serverId: pulumi.Input<number>;
}