@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
344 lines (343 loc) • 13.1 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* A Google Cloud Filestore backup.
*
* To get more information about Backup, see:
*
* * [API documentation](https://cloud.google.com/filestore/docs/reference/rest/v1/projects.locations.instances.backups)
* * How-to Guides
* * [Creating Backups](https://cloud.google.com/filestore/docs/create-backups)
* * [Official Documentation](https://cloud.google.com/filestore/docs/backups)
*
* ## Example Usage
*
* ### Filestore Backup Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const instance = new gcp.filestore.Instance("instance", {
* name: "fs-inst",
* location: "us-central1-b",
* tier: "BASIC_HDD",
* fileShares: {
* capacityGb: 1024,
* name: "share1",
* },
* networks: [{
* network: "default",
* modes: ["MODE_IPV4"],
* connectMode: "DIRECT_PEERING",
* }],
* });
* const backup = new gcp.filestore.Backup("backup", {
* name: "fs-bkup",
* location: "us-central1",
* description: "This is a filestore backup for the test instance",
* sourceInstance: instance.id,
* sourceFileShare: "share1",
* labels: {
* files: "label1",
* "other-label": "label2",
* },
* });
* ```
*
* ## Import
*
* Backup can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/backups/{{name}}`
*
* * `{{project}}/{{location}}/{{name}}`
*
* * `{{location}}/{{name}}`
*
* When using the `pulumi import` command, Backup can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:filestore/backup:Backup default projects/{{project}}/locations/{{location}}/backups/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:filestore/backup:Backup default {{project}}/{{location}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:filestore/backup:Backup default {{location}}/{{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;
/**
* The amount of bytes needed to allocate a full copy of the snapshot content.
*/
readonly capacityGb: pulumi.Output<string>;
/**
* The time when the snapshot was created in RFC3339 text format.
*/
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>;
/**
* Amount of bytes that will be downloaded if the backup is restored.
*/
readonly downloadBytes: pulumi.Output<string>;
/**
* 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;
}>;
/**
* KMS key name used for data encryption.
*/
readonly kmsKeyName: pulumi.Output<string>;
/**
* Resource labels to represent user-provided metadata.
*
* **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>;
/**
* The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
*
*
* - - -
*/
readonly location: pulumi.Output<string>;
/**
* The resource name of the backup. The name must be unique within the specified instance.
* 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?` 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<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;
}>;
/**
* Name of the file share in the source Cloud Filestore instance that the backup is created from.
*/
readonly sourceFileShare: pulumi.Output<string>;
/**
* The resource name of the source Cloud Filestore instance, in the format projects/{projectId}/locations/{locationId}/instances/{instanceId}, used to create this backup.
*/
readonly sourceInstance: pulumi.Output<string>;
/**
* The service tier of the source Cloud Filestore instance that this backup is created from.
*/
readonly sourceInstanceTier: pulumi.Output<string>;
/**
* The backup state.
*/
readonly state: pulumi.Output<string>;
/**
* The size of the storage used by the backup. As backups share storage, this number is expected to change with backup creation/deletion.
*/
readonly storageBytes: pulumi.Output<string>;
/**
* A map of resource manager tags.
* Resource manager tag keys and values have the same definition as resource manager tags.
* Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/{tag_value_id}.
* The field is ignored (both PUT & PATCH) when empty.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* 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 {
/**
* The amount of bytes needed to allocate a full copy of the snapshot content.
*/
capacityGb?: pulumi.Input<string>;
/**
* The time when the snapshot was created in RFC3339 text format.
*/
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>;
/**
* Amount of bytes that will be downloaded if the backup is restored.
*/
downloadBytes?: 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>;
}>;
/**
* KMS key name used for data encryption.
*/
kmsKeyName?: pulumi.Input<string>;
/**
* Resource labels to represent user-provided metadata.
*
* **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>;
}>;
/**
* The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
*
*
* - - -
*/
location?: pulumi.Input<string>;
/**
* The resource name of the backup. The name must be unique within the specified instance.
* 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?` 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.
*/
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>;
}>;
/**
* Name of the file share in the source Cloud Filestore instance that the backup is created from.
*/
sourceFileShare?: pulumi.Input<string>;
/**
* The resource name of the source Cloud Filestore instance, in the format projects/{projectId}/locations/{locationId}/instances/{instanceId}, used to create this backup.
*/
sourceInstance?: pulumi.Input<string>;
/**
* The service tier of the source Cloud Filestore instance that this backup is created from.
*/
sourceInstanceTier?: pulumi.Input<string>;
/**
* The backup state.
*/
state?: pulumi.Input<string>;
/**
* The size of the storage used by the backup. As backups share storage, this number is expected to change with backup creation/deletion.
*/
storageBytes?: pulumi.Input<string>;
/**
* A map of resource manager tags.
* Resource manager tag keys and values have the same definition as resource manager tags.
* Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/{tag_value_id}.
* The field is ignored (both PUT & PATCH) when empty.
*/
tags?: pulumi.Input<{
[key: string]: 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>;
/**
* Resource labels to represent user-provided metadata.
*
* **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>;
}>;
/**
* The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
*
*
* - - -
*/
location: pulumi.Input<string>;
/**
* The resource name of the backup. The name must be unique within the specified instance.
* 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?` 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.
*/
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>;
/**
* Name of the file share in the source Cloud Filestore instance that the backup is created from.
*/
sourceFileShare: pulumi.Input<string>;
/**
* The resource name of the source Cloud Filestore instance, in the format projects/{projectId}/locations/{locationId}/instances/{instanceId}, used to create this backup.
*/
sourceInstance: pulumi.Input<string>;
/**
* A map of resource manager tags.
* Resource manager tag keys and values have the same definition as resource manager tags.
* Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/{tag_value_id}.
* The field is ignored (both PUT & PATCH) when empty.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}