UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

224 lines (223 loc) 7.11 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a resource to manage ebs snapshot * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@pulumi/volcengine"; * import * as volcengine from "@volcengine/pulumi"; * * const fooZones = volcengine.ecs.getZones({}); * const fooVolume = new volcengine.ebs.Volume("fooVolume", { * volumeName: "acc-test-volume", * volumeType: "ESSD_PL0", * description: "acc-test", * kind: "data", * size: 500, * zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id), * volumeChargeType: "PostPaid", * projectName: "default", * }); * const fooSnapshot = new volcengine.ebs.Snapshot("fooSnapshot", { * volumeId: fooVolume.id, * snapshotName: "acc-test-snapshot", * description: "acc-test", * retentionDays: 3, * projectName: "default", * tags: [{ * key: "k1", * value: "v1", * }], * }); * ``` * * ## Import * * EbsSnapshot can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:ebs/snapshot:Snapshot default resource_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; /** * The creation time of the snapshot. */ readonly creationTime: pulumi.Output<string>; /** * The description of the snapshot. */ readonly description: pulumi.Output<string | undefined>; /** * The project name of the snapshot. */ readonly projectName: pulumi.Output<string>; /** * The retention days of the snapshot. Valid values: 1~65536. Not specifying this field means permanently preserving the snapshot.When modifying this field, the retention days only supports extension and not shortening. The value range is N+1~65536, where N is the retention days set during snapshot creation. */ readonly retentionDays: pulumi.Output<number>; /** * The name of the snapshot. */ readonly snapshotName: pulumi.Output<string>; /** * The type of the snapshot. */ readonly snapshotType: pulumi.Output<string>; /** * The status of the snapshot. */ readonly status: pulumi.Output<string>; /** * Tags. */ readonly tags: pulumi.Output<outputs.ebs.SnapshotTag[] | undefined>; /** * The volume id to create snapshot. */ readonly volumeId: pulumi.Output<string>; /** * The volume kind of the snapshot. */ readonly volumeKind: pulumi.Output<string>; /** * The volume name of the snapshot. */ readonly volumeName: pulumi.Output<string>; /** * The volume size of the snapshot. */ readonly volumeSize: pulumi.Output<number>; /** * The volume status of the snapshot. */ readonly volumeStatus: pulumi.Output<string>; /** * The volume type of the snapshot. */ readonly volumeType: pulumi.Output<string>; /** * The zone id of the snapshot. */ readonly zoneId: pulumi.Output<string>; /** * 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 { /** * The creation time of the snapshot. */ creationTime?: pulumi.Input<string>; /** * The description of the snapshot. */ description?: pulumi.Input<string>; /** * The project name of the snapshot. */ projectName?: pulumi.Input<string>; /** * The retention days of the snapshot. Valid values: 1~65536. Not specifying this field means permanently preserving the snapshot.When modifying this field, the retention days only supports extension and not shortening. The value range is N+1~65536, where N is the retention days set during snapshot creation. */ retentionDays?: pulumi.Input<number>; /** * The name of the snapshot. */ snapshotName?: pulumi.Input<string>; /** * The type of the snapshot. */ snapshotType?: pulumi.Input<string>; /** * The status of the snapshot. */ status?: pulumi.Input<string>; /** * Tags. */ tags?: pulumi.Input<pulumi.Input<inputs.ebs.SnapshotTag>[]>; /** * The volume id to create snapshot. */ volumeId?: pulumi.Input<string>; /** * The volume kind of the snapshot. */ volumeKind?: pulumi.Input<string>; /** * The volume name of the snapshot. */ volumeName?: pulumi.Input<string>; /** * The volume size of the snapshot. */ volumeSize?: pulumi.Input<number>; /** * The volume status of the snapshot. */ volumeStatus?: pulumi.Input<string>; /** * The volume type of the snapshot. */ volumeType?: pulumi.Input<string>; /** * The zone id of the snapshot. */ zoneId?: pulumi.Input<string>; } /** * The set of arguments for constructing a Snapshot resource. */ export interface SnapshotArgs { /** * The description of the snapshot. */ description?: pulumi.Input<string>; /** * The project name of the snapshot. */ projectName?: pulumi.Input<string>; /** * The retention days of the snapshot. Valid values: 1~65536. Not specifying this field means permanently preserving the snapshot.When modifying this field, the retention days only supports extension and not shortening. The value range is N+1~65536, where N is the retention days set during snapshot creation. */ retentionDays?: pulumi.Input<number>; /** * The name of the snapshot. */ snapshotName: pulumi.Input<string>; /** * Tags. */ tags?: pulumi.Input<pulumi.Input<inputs.ebs.SnapshotTag>[]>; /** * The volume id to create snapshot. */ volumeId: pulumi.Input<string>; }