@pulumi/digitalocean
Version:
A Pulumi package for creating and managing DigitalOcean cloud resources.
128 lines (127 loc) • 4.43 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a resource which can be used to create a snapshot from an existing DigitalOcean Droplet.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as digitalocean from "@pulumi/digitalocean";
*
* const web = new digitalocean.Droplet("web", {
* name: "web-01",
* size: digitalocean.DropletSlug.DropletS1VCPU1GB,
* image: "ubuntu-22-04-x64",
* region: digitalocean.Region.NYC3,
* });
* const web_snapshot = new digitalocean.DropletSnapshot("web-snapshot", {
* dropletId: web.id,
* name: "web-snapshot-01",
* });
* const from_snapshot = new digitalocean.Droplet("from-snapshot", {
* image: web_snapshot.id,
* name: "web-02",
* region: digitalocean.Region.NYC3,
* size: digitalocean.DropletSlug.DropletS2VCPU4GB,
* });
* ```
*
* ## Import
*
* Droplet Snapshots can be imported using the `snapshot id`, e.g.
*
* ```sh
* $ pulumi import digitalocean:index/dropletSnapshot:DropletSnapshot mysnapshot 123456
* ```
*/
export declare class DropletSnapshot extends pulumi.CustomResource {
/**
* Get an existing DropletSnapshot 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?: DropletSnapshotState, opts?: pulumi.CustomResourceOptions): DropletSnapshot;
/**
* Returns true if the given object is an instance of DropletSnapshot. 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 DropletSnapshot;
/**
* The date and time the Droplet snapshot was created.
*/
readonly createdAt: pulumi.Output<string>;
/**
* The ID of the Droplet from which the snapshot will be taken.
*/
readonly dropletId: pulumi.Output<string>;
/**
* The minimum size in gigabytes required for a Droplet to be created based on this snapshot.
*/
readonly minDiskSize: pulumi.Output<number>;
/**
* A name for the Droplet snapshot.
*/
readonly name: pulumi.Output<string>;
/**
* A list of DigitalOcean region "slugs" indicating where the droplet snapshot is available.
*/
readonly regions: pulumi.Output<string[]>;
/**
* The billable size of the Droplet snapshot in gigabytes.
*/
readonly size: pulumi.Output<number>;
/**
* Create a DropletSnapshot 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: DropletSnapshotArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering DropletSnapshot resources.
*/
export interface DropletSnapshotState {
/**
* The date and time the Droplet snapshot was created.
*/
createdAt?: pulumi.Input<string>;
/**
* The ID of the Droplet from which the snapshot will be taken.
*/
dropletId?: pulumi.Input<string>;
/**
* The minimum size in gigabytes required for a Droplet to be created based on this snapshot.
*/
minDiskSize?: pulumi.Input<number>;
/**
* A name for the Droplet snapshot.
*/
name?: pulumi.Input<string>;
/**
* A list of DigitalOcean region "slugs" indicating where the droplet snapshot is available.
*/
regions?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The billable size of the Droplet snapshot in gigabytes.
*/
size?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a DropletSnapshot resource.
*/
export interface DropletSnapshotArgs {
/**
* The ID of the Droplet from which the snapshot will be taken.
*/
dropletId: pulumi.Input<string>;
/**
* A name for the Droplet snapshot.
*/
name?: pulumi.Input<string>;
}