UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

217 lines (216 loc) 7.38 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides an EVS snapshot resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const testVolume = new huaweicloud.evs.Volume("testVolume", { * description: "my volume", * volumeType: "SATA", * size: 20, * availabilityZone: "cn-north-4a", * tags: { * foo: "bar", * key: "value", * }, * }); * const testSnapshot = new huaweicloud.evs.Snapshot("testSnapshot", { * description: "Daily backup", * volumeId: testVolume.id, * }); * ``` * * ## Import * * EVS snapshot can be imported using the `id`, e.g. bash * * ```sh * $ pulumi import huaweicloud:Evs/snapshot:Snapshot test <id> * ``` * * Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`metadata`, `force`. It is generally recommended running `terraform plan` after importing the resource. You can then decide if changes should be applied to the resource, or the resource definition should be updated to align with the snapshot. Also, you can ignore changes as below. hcl resource "huaweicloud_evs_snapshot" "test" { * * ... * * lifecycle { * * ignore_changes = [ * * metadata, force, * * ] * * } } */ 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 time when the snapshot was created. */ readonly createdAt: pulumi.Output<string>; /** * The description of the snapshot. The value can contain a maximum of 255 bytes. */ readonly description: pulumi.Output<string | undefined>; /** * Specifies the flag for forcibly creating a snapshot. Default to false. */ readonly force: pulumi.Output<boolean | undefined>; /** * Specifies the user-defined metadata key-value pair. Changing the parameter * creates a new snapshot. */ readonly metadata: pulumi.Output<{ [key: string]: string; }>; /** * The script configuration value of this change is also the original value used for comparison with the new value next * time the change is made. The corresponding parameter name is 'metadata'. */ readonly metadataOrigin: pulumi.Output<{ [key: string]: string; }>; /** * The name of the snapshot. The value can contain a maximum of 255 bytes. */ readonly name: pulumi.Output<string>; /** * The region in which to create the evs snapshot resource. If omitted, the * provider-level region will be used. Changing this creates a new EVS snapshot resource. */ readonly region: pulumi.Output<string>; /** * The size of the snapshot in GB. */ readonly size: pulumi.Output<number>; /** * The status of the snapshot. */ readonly status: pulumi.Output<string>; /** * The time when the snapshot was updated. */ readonly updatedAt: pulumi.Output<string>; /** * The id of the snapshot's source disk. Changing the parameter creates a new * snapshot. */ readonly volumeId: 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 time when the snapshot was created. */ createdAt?: pulumi.Input<string>; /** * The description of the snapshot. The value can contain a maximum of 255 bytes. */ description?: pulumi.Input<string>; /** * Specifies the flag for forcibly creating a snapshot. Default to false. */ force?: pulumi.Input<boolean>; /** * Specifies the user-defined metadata key-value pair. Changing the parameter * creates a new snapshot. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The script configuration value of this change is also the original value used for comparison with the new value next * time the change is made. The corresponding parameter name is 'metadata'. */ metadataOrigin?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The name of the snapshot. The value can contain a maximum of 255 bytes. */ name?: pulumi.Input<string>; /** * The region in which to create the evs snapshot resource. If omitted, the * provider-level region will be used. Changing this creates a new EVS snapshot resource. */ region?: pulumi.Input<string>; /** * The size of the snapshot in GB. */ size?: pulumi.Input<number>; /** * The status of the snapshot. */ status?: pulumi.Input<string>; /** * The time when the snapshot was updated. */ updatedAt?: pulumi.Input<string>; /** * The id of the snapshot's source disk. Changing the parameter creates a new * snapshot. */ volumeId?: pulumi.Input<string>; } /** * The set of arguments for constructing a Snapshot resource. */ export interface SnapshotArgs { /** * The description of the snapshot. The value can contain a maximum of 255 bytes. */ description?: pulumi.Input<string>; /** * Specifies the flag for forcibly creating a snapshot. Default to false. */ force?: pulumi.Input<boolean>; /** * Specifies the user-defined metadata key-value pair. Changing the parameter * creates a new snapshot. */ metadata?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * The name of the snapshot. The value can contain a maximum of 255 bytes. */ name?: pulumi.Input<string>; /** * The region in which to create the evs snapshot resource. If omitted, the * provider-level region will be used. Changing this creates a new EVS snapshot resource. */ region?: pulumi.Input<string>; /** * The id of the snapshot's source disk. Changing the parameter creates a new * snapshot. */ volumeId: pulumi.Input<string>; }