@pulumi/yandex
Version:
A Pulumi package for creating and managing yandex cloud resources.
156 lines (155 loc) • 4.91 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Creates a new snapshot of a disk. For more information, see
* [the official documentation](https://cloud.yandex.com/docs/compute/concepts/snapshot).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as yandex from "@pulumi/yandex";
*
* const defaultComputeSnapshot = new yandex.ComputeSnapshot("default", {
* labels: {
* "my-label": "my-label-value",
* },
* sourceDiskId: "test_disk_id",
* });
* ```
*
* ## Import
*
* A snapshot can be imported using the `id` of the resource, e.g.
*
* ```sh
* $ pulumi import yandex:index/computeSnapshot:ComputeSnapshot disk-snapshot shapshot_id
* ```
*/
export declare class ComputeSnapshot extends pulumi.CustomResource {
/**
* Get an existing ComputeSnapshot 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?: ComputeSnapshotState, opts?: pulumi.CustomResourceOptions): ComputeSnapshot;
/**
* Returns true if the given object is an instance of ComputeSnapshot. 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 ComputeSnapshot;
/**
* Creation timestamp of the snapshot.
*/
readonly createdAt: pulumi.Output<string>;
/**
* Description of the resource.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Size of the disk when the snapshot was created, specified in GB.
*/
readonly diskSize: pulumi.Output<number>;
/**
* The ID of the folder that the resource belongs to. If it
* is not provided, the default provider folder is used.
*/
readonly folderId: pulumi.Output<string>;
/**
* A set of key/value label pairs to assign to the snapshot.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* A name for the resource.
*/
readonly name: pulumi.Output<string>;
/**
* ID of the disk to create a snapshot from.
*/
readonly sourceDiskId: pulumi.Output<string>;
/**
* Size of the snapshot, specified in GB.
*/
readonly storageSize: pulumi.Output<number>;
/**
* Create a ComputeSnapshot 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: ComputeSnapshotArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ComputeSnapshot resources.
*/
export interface ComputeSnapshotState {
/**
* Creation timestamp of the snapshot.
*/
createdAt?: pulumi.Input<string>;
/**
* Description of the resource.
*/
description?: pulumi.Input<string>;
/**
* Size of the disk when the snapshot was created, specified in GB.
*/
diskSize?: pulumi.Input<number>;
/**
* The ID of the folder that the resource belongs to. If it
* is not provided, the default provider folder is used.
*/
folderId?: pulumi.Input<string>;
/**
* A set of key/value label pairs to assign to the snapshot.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* A name for the resource.
*/
name?: pulumi.Input<string>;
/**
* ID of the disk to create a snapshot from.
*/
sourceDiskId?: pulumi.Input<string>;
/**
* Size of the snapshot, specified in GB.
*/
storageSize?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a ComputeSnapshot resource.
*/
export interface ComputeSnapshotArgs {
/**
* Description of the resource.
*/
description?: pulumi.Input<string>;
/**
* The ID of the folder that the resource belongs to. If it
* is not provided, the default provider folder is used.
*/
folderId?: pulumi.Input<string>;
/**
* A set of key/value label pairs to assign to the snapshot.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* A name for the resource.
*/
name?: pulumi.Input<string>;
/**
* ID of the disk to create a snapshot from.
*/
sourceDiskId: pulumi.Input<string>;
}