import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../../types"; /** * Creates a snapshot in the specified project using the data included in the request. */ 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, 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; /** * [Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk. */ readonly autoCreated: pulumi.Output; /** * Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name must be 1-63 characters long and comply with RFC1035. This is an uncommon option only for advanced service owners who needs to create separate snapshot chains, for example, for chargeback tracking. When you describe your snapshot resource, this field is visible only if it has a non-empty value. */ readonly chainName: pulumi.Output; /** * [Output Only] Creation timestamp in RFC3339 text format. */ readonly creationTimestamp: pulumi.Output; /** * An optional description of this resource. Provide this property when you create the resource. */ readonly description: pulumi.Output; /** * [Output Only] Size of the source disk, specified in GB. */ readonly diskSizeGb: pulumi.Output; /** * [Output Only] Number of bytes downloaded to restore a snapshot to a disk. */ readonly downloadBytes: pulumi.Output; /** * [Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process. Currently only supported on Windows instances using the Volume Shadow Copy Service (VSS). */ readonly guestFlush: pulumi.Output; /** * [Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options. */ readonly guestOsFeatures: pulumi.Output; /** * [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources. */ readonly kind: pulumi.Output; /** * A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. * * To see the latest fingerprint, make a get() request to retrieve a snapshot. */ readonly labelFingerprint: pulumi.Output; /** * Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty. */ readonly labels: pulumi.Output<{ [key: string]: string; }>; /** * [Output Only] Integer license codes indicating which licenses are attached to this snapshot. */ readonly licenseCodes: pulumi.Output; /** * [Output Only] A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image). */ readonly licenses: pulumi.Output; /** * An opaque location hint used to place the snapshot close to other resources. This field is for use by internal tools that use the public API. */ readonly locationHint: pulumi.Output; /** * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. */ readonly name: pulumi.Output; /** * [Output Only] Reserved for future use. */ readonly satisfiesPzs: pulumi.Output; /** * [Output Only] Server-defined URL for the resource. */ readonly selfLink: pulumi.Output; /** * [Output Only] Server-defined URL for this resource's resource id. */ readonly selfLinkWithId: pulumi.Output; /** * Encrypts the snapshot using a customer-supplied encryption key. * * After you encrypt a snapshot using a customer-supplied key, you must provide the same key if you use the snapshot later. For example, you must provide the encryption key when you create a disk from the encrypted snapshot in a future request. * * Customer-supplied encryption keys do not protect access to metadata of the snapshot. * * If you do not provide an encryption key when creating the snapshot, then the snapshot will be encrypted using an automatically generated key and you do not need to provide a key to use the snapshot later. */ readonly snapshotEncryptionKey: pulumi.Output; /** * The source disk used to create this snapshot. */ readonly sourceDisk: pulumi.Output; /** * The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key. */ readonly sourceDiskEncryptionKey: pulumi.Output; /** * [Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name. */ readonly sourceDiskId: pulumi.Output; /** * [Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING. */ readonly status: pulumi.Output; /** * [Output Only] A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion. */ readonly storageBytes: pulumi.Output; /** * [Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date. */ readonly storageBytesStatus: pulumi.Output; /** * Cloud Storage bucket storage location of the snapshot (regional or multi-regional). */ readonly storageLocations: pulumi.Output; /** * 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); } /** * The set of arguments for constructing a Snapshot resource. */ export interface SnapshotArgs { /** * [Output Only] Set to true if snapshots are automatically created by applying resource policy on the target disk. */ readonly autoCreated?: pulumi.Input; /** * Creates the new snapshot in the snapshot chain labeled with the specified name. The chain name must be 1-63 characters long and comply with RFC1035. This is an uncommon option only for advanced service owners who needs to create separate snapshot chains, for example, for chargeback tracking. When you describe your snapshot resource, this field is visible only if it has a non-empty value. */ readonly chainName?: pulumi.Input; /** * [Output Only] Creation timestamp in RFC3339 text format. */ readonly creationTimestamp?: pulumi.Input; /** * An optional description of this resource. Provide this property when you create the resource. */ readonly description?: pulumi.Input; /** * [Output Only] Size of the source disk, specified in GB. */ readonly diskSizeGb?: pulumi.Input; /** * [Output Only] Number of bytes downloaded to restore a snapshot to a disk. */ readonly downloadBytes?: pulumi.Input; /** * [Input Only] Whether to attempt an application consistent snapshot by informing the OS to prepare for the snapshot process. Currently only supported on Windows instances using the Volume Shadow Copy Service (VSS). */ readonly guestFlush?: pulumi.Input; /** * [Output Only] A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options. */ readonly guestOsFeatures?: pulumi.Input[]>; /** * [Output Only] The unique identifier for the resource. This identifier is defined by the server. */ readonly id?: pulumi.Input; /** * [Output Only] Type of the resource. Always compute#snapshot for Snapshot resources. */ readonly kind?: pulumi.Input; /** * A fingerprint for the labels being applied to this snapshot, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. * * To see the latest fingerprint, make a get() request to retrieve a snapshot. */ readonly labelFingerprint?: pulumi.Input; /** * Labels to apply to this snapshot. These can be later modified by the setLabels method. Label values may be empty. */ readonly labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * [Output Only] Integer license codes indicating which licenses are attached to this snapshot. */ readonly licenseCodes?: pulumi.Input[]>; /** * [Output Only] A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image). */ readonly licenses?: pulumi.Input[]>; /** * An opaque location hint used to place the snapshot close to other resources. This field is for use by internal tools that use the public API. */ readonly locationHint?: pulumi.Input; /** * Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. */ readonly name?: pulumi.Input; readonly project: pulumi.Input; /** * [Output Only] Reserved for future use. */ readonly satisfiesPzs?: pulumi.Input; /** * [Output Only] Server-defined URL for the resource. */ readonly selfLink?: pulumi.Input; /** * [Output Only] Server-defined URL for this resource's resource id. */ readonly selfLinkWithId?: pulumi.Input; readonly snapshot: pulumi.Input; /** * Encrypts the snapshot using a customer-supplied encryption key. * * After you encrypt a snapshot using a customer-supplied key, you must provide the same key if you use the snapshot later. For example, you must provide the encryption key when you create a disk from the encrypted snapshot in a future request. * * Customer-supplied encryption keys do not protect access to metadata of the snapshot. * * If you do not provide an encryption key when creating the snapshot, then the snapshot will be encrypted using an automatically generated key and you do not need to provide a key to use the snapshot later. */ readonly snapshotEncryptionKey?: pulumi.Input; /** * The source disk used to create this snapshot. */ readonly sourceDisk?: pulumi.Input; /** * The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key. */ readonly sourceDiskEncryptionKey?: pulumi.Input; /** * [Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name. */ readonly sourceDiskId?: pulumi.Input; /** * [Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING. */ readonly status?: pulumi.Input; /** * [Output Only] A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion. */ readonly storageBytes?: pulumi.Input; /** * [Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date. */ readonly storageBytesStatus?: pulumi.Input; /** * Cloud Storage bucket storage location of the snapshot (regional or multi-regional). */ readonly storageLocations?: pulumi.Input[]>; }