UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

134 lines (133 loc) 4.59 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a DigitalOcean Volume Snapshot which can be used to create a snapshot from an existing volume. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const foobar = new digitalocean.Volume("foobar", { * region: digitalocean.Region.NYC1, * name: "baz", * size: 100, * description: "an example volume", * }); * const foobarVolumeSnapshot = new digitalocean.VolumeSnapshot("foobar", { * name: "foo", * volumeId: foobar.id, * }); * ``` * * ## Import * * Volume Snapshots can be imported using the `snapshot id`, e.g. * * ```sh * $ pulumi import digitalocean:index/volumeSnapshot:VolumeSnapshot snapshot 506f78a4-e098-11e5-ad9f-000f53306ae1 * ``` */ export declare class VolumeSnapshot extends pulumi.CustomResource { /** * Get an existing VolumeSnapshot 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?: VolumeSnapshotState, opts?: pulumi.CustomResourceOptions): VolumeSnapshot; /** * Returns true if the given object is an instance of VolumeSnapshot. 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 VolumeSnapshot; /** * The date and time the volume snapshot was created. */ readonly createdAt: pulumi.Output<string>; /** * The minimum size in gigabytes required for a volume to be created based on this volume snapshot. */ readonly minDiskSize: pulumi.Output<number>; /** * A name for the volume snapshot. */ readonly name: pulumi.Output<string>; /** * A list of DigitalOcean region "slugs" indicating where the volume snapshot is available. */ readonly regions: pulumi.Output<string[]>; /** * The billable size of the volume snapshot in gigabytes. */ readonly size: pulumi.Output<number>; /** * A list of the tags to be applied to this volume snapshot. */ readonly tags: pulumi.Output<string[] | undefined>; /** * The ID of the volume from which the volume snapshot originated. */ readonly volumeId: pulumi.Output<string>; /** * Create a VolumeSnapshot 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: VolumeSnapshotArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering VolumeSnapshot resources. */ export interface VolumeSnapshotState { /** * The date and time the volume snapshot was created. */ createdAt?: pulumi.Input<string>; /** * The minimum size in gigabytes required for a volume to be created based on this volume snapshot. */ minDiskSize?: pulumi.Input<number>; /** * A name for the volume snapshot. */ name?: pulumi.Input<string>; /** * A list of DigitalOcean region "slugs" indicating where the volume snapshot is available. */ regions?: pulumi.Input<pulumi.Input<string>[]>; /** * The billable size of the volume snapshot in gigabytes. */ size?: pulumi.Input<number>; /** * A list of the tags to be applied to this volume snapshot. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * The ID of the volume from which the volume snapshot originated. */ volumeId?: pulumi.Input<string>; } /** * The set of arguments for constructing a VolumeSnapshot resource. */ export interface VolumeSnapshotArgs { /** * A name for the volume snapshot. */ name?: pulumi.Input<string>; /** * A list of the tags to be applied to this volume snapshot. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * The ID of the volume from which the volume snapshot originated. */ volumeId: pulumi.Input<string>; }