UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

329 lines (328 loc) • 13.1 kB
import * as pulumi from "@pulumi/pulumi"; /** * NetApp Volumes supports volume backups, which are copies of your volumes * stored independently from the volume. Backups are stored in backup vaults, * which are containers for backups. If a volume is lost or deleted, you can * use backups to restore your data to a new volume. * * When you create the first backup of a volume, all of the volume's used * data is sent to the backup vault. Subsequent backups of the same volume * only include data that has changed from the previous backup. This allows * for fast incremental-forever backups and reduces the required capacity * inside the backup vault. * * You can create manual and scheduled backups. Manual backups can be taken * from a volume or from an existing volume snapshot. Scheduled backups * require a backup policy. * * To get more information about Backup, see: * * * [API documentation](https://cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.backupVaults.backups) * * How-to Guides * * [Documentation](https://cloud.google.com/netapp/volumes/docs/protect-data/about-volume-backups) * * ## Example Usage * * ### Netapp Backup * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = gcp.compute.getNetwork({ * name: "network", * }); * const defaultStoragePool = new gcp.netapp.StoragePool("default", { * name: "backup-pool", * location: "us-central1", * serviceLevel: "PREMIUM", * capacityGib: "2048", * network: _default.then(_default => _default.id), * }); * const defaultBackupVault = new gcp.netapp.BackupVault("default", { * name: "backup-vault", * location: defaultStoragePool.location, * }); * const defaultVolume = new gcp.netapp.Volume("default", { * name: "backup-volume", * location: defaultStoragePool.location, * capacityGib: "100", * shareName: "backup-volume", * storagePool: defaultStoragePool.name, * protocols: ["NFSV3"], * deletionPolicy: "FORCE", * backupConfig: { * backupVault: defaultBackupVault.id, * }, * }); * const testBackup = new gcp.netapp.Backup("test_backup", { * name: "test-backup", * location: defaultBackupVault.location, * vaultName: defaultBackupVault.name, * sourceVolume: defaultVolume.id, * }); * ``` * * ## Import * * Backup can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/backupVaults/{{vault_name}}/backups/{{name}}` * * * `{{project}}/{{location}}/{{vault_name}}/{{name}}` * * * `{{location}}/{{vault_name}}/{{name}}` * * When using the `pulumi import` command, Backup can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:netapp/backup:Backup default projects/{{project}}/locations/{{location}}/backupVaults/{{vault_name}}/backups/{{name}} * ``` * * ```sh * $ pulumi import gcp:netapp/backup:Backup default {{project}}/{{location}}/{{vault_name}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:netapp/backup:Backup default {{location}}/{{vault_name}}/{{name}} * ``` */ export declare class Backup extends pulumi.CustomResource { /** * Get an existing Backup 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?: BackupState, opts?: pulumi.CustomResourceOptions): Backup; /** * Returns true if the given object is an instance of Backup. 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 Backup; /** * Region in which backup is stored. */ readonly backupRegion: pulumi.Output<string>; /** * Type of backup, manually created or created by a backup policy. Possible Values : [TYPE_UNSPECIFIED, MANUAL, SCHEDULED] */ readonly backupType: pulumi.Output<string>; /** * Backups of a volume build incrementally on top of each other. They form a "backup chain". * Total size of all backups in a chain in bytes = baseline backup size + sum(incremental backup size) */ readonly chainStorageBytes: pulumi.Output<string>; /** * Create time of the backup. A timestamp in RFC3339 UTC "Zulu" format. Examples: "2023-06-22T09:13:01.617Z". */ readonly createTime: pulumi.Output<string>; /** * A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected. */ readonly description: pulumi.Output<string | undefined>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ readonly effectiveLabels: pulumi.Output<{ [key: string]: string; }>; /** * Labels as key value pairs. Example: `{ "owner": "Bob", "department": "finance", "purpose": "testing" }`. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Location of the backup. */ readonly location: pulumi.Output<string>; /** * The resource name of the backup. Needs to be unique per location. */ readonly name: pulumi.Output<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output<string>; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * If specified, backup will be created from the given snapshot. If not specified, * there will be a new snapshot taken to initiate the backup creation. * Format: `projects/{{projectId}}/locations/{{location}}/volumes/{{volumename}}/snapshots/{{snapshotname}}`` */ readonly sourceSnapshot: pulumi.Output<string | undefined>; /** * ID of volumes this backup belongs to. Format: `projects/{{projects_id}}/locations/{{location}}/volumes/{{name}}`` */ readonly sourceVolume: pulumi.Output<string | undefined>; /** * The state of the Backup Vault. Possible Values : [STATE_UNSPECIFIED, CREATING, UPLOADING, READY, DELETING, ERROR, UPDATING] */ readonly state: pulumi.Output<string>; /** * Name of the backup vault to store the backup in. */ readonly vaultName: pulumi.Output<string>; /** * Region of the volume from which the backup was created. */ readonly volumeRegion: pulumi.Output<string>; /** * Size of the file system when the backup was created. When creating a new volume from the backup, the volume capacity will have to be at least as big. */ readonly volumeUsageBytes: pulumi.Output<string>; /** * Create a Backup 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: BackupArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Backup resources. */ export interface BackupState { /** * Region in which backup is stored. */ backupRegion?: pulumi.Input<string>; /** * Type of backup, manually created or created by a backup policy. Possible Values : [TYPE_UNSPECIFIED, MANUAL, SCHEDULED] */ backupType?: pulumi.Input<string>; /** * Backups of a volume build incrementally on top of each other. They form a "backup chain". * Total size of all backups in a chain in bytes = baseline backup size + sum(incremental backup size) */ chainStorageBytes?: pulumi.Input<string>; /** * Create time of the backup. A timestamp in RFC3339 UTC "Zulu" format. Examples: "2023-06-22T09:13:01.617Z". */ createTime?: pulumi.Input<string>; /** * A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected. */ description?: pulumi.Input<string>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Labels as key value pairs. Example: `{ "owner": "Bob", "department": "finance", "purpose": "testing" }`. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Location of the backup. */ location?: pulumi.Input<string>; /** * The resource name of the backup. Needs to be unique per location. */ name?: pulumi.Input<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string>; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * If specified, backup will be created from the given snapshot. If not specified, * there will be a new snapshot taken to initiate the backup creation. * Format: `projects/{{projectId}}/locations/{{location}}/volumes/{{volumename}}/snapshots/{{snapshotname}}`` */ sourceSnapshot?: pulumi.Input<string>; /** * ID of volumes this backup belongs to. Format: `projects/{{projects_id}}/locations/{{location}}/volumes/{{name}}`` */ sourceVolume?: pulumi.Input<string>; /** * The state of the Backup Vault. Possible Values : [STATE_UNSPECIFIED, CREATING, UPLOADING, READY, DELETING, ERROR, UPDATING] */ state?: pulumi.Input<string>; /** * Name of the backup vault to store the backup in. */ vaultName?: pulumi.Input<string>; /** * Region of the volume from which the backup was created. */ volumeRegion?: pulumi.Input<string>; /** * Size of the file system when the backup was created. When creating a new volume from the backup, the volume capacity will have to be at least as big. */ volumeUsageBytes?: pulumi.Input<string>; } /** * The set of arguments for constructing a Backup resource. */ export interface BackupArgs { /** * A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected. */ description?: pulumi.Input<string>; /** * Labels as key value pairs. Example: `{ "owner": "Bob", "department": "finance", "purpose": "testing" }`. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Location of the backup. */ location: pulumi.Input<string>; /** * The resource name of the backup. Needs to be unique per location. */ name?: pulumi.Input<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string>; /** * If specified, backup will be created from the given snapshot. If not specified, * there will be a new snapshot taken to initiate the backup creation. * Format: `projects/{{projectId}}/locations/{{location}}/volumes/{{volumename}}/snapshots/{{snapshotname}}`` */ sourceSnapshot?: pulumi.Input<string>; /** * ID of volumes this backup belongs to. Format: `projects/{{projects_id}}/locations/{{location}}/volumes/{{name}}`` */ sourceVolume?: pulumi.Input<string>; /** * Name of the backup vault to store the backup in. */ vaultName: pulumi.Input<string>; }