import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * An AlloyDB Backup. * * To get more information about Backup, see: * * * [API documentation](https://cloud.google.com/alloydb/docs/reference/rest/v1/projects.locations.backups/create) * * How-to Guides * * [AlloyDB](https://cloud.google.com/alloydb/docs/) * * ## Example Usage * * ### Alloydb Backup Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const defaultNetwork = new gcp.compute.Network("default", {name: "alloydb-network"}); * const defaultCluster = new gcp.alloydb.Cluster("default", { * clusterId: "alloydb-cluster", * location: "us-central1", * networkConfig: { * network: defaultNetwork.id, * }, * deletionProtection: false, * }); * const privateIpAlloc = new gcp.compute.GlobalAddress("private_ip_alloc", { * name: "alloydb-cluster", * addressType: "INTERNAL", * purpose: "VPC_PEERING", * prefixLength: 16, * network: defaultNetwork.id, * }); * const vpcConnection = new gcp.servicenetworking.Connection("vpc_connection", { * network: defaultNetwork.id, * service: "servicenetworking.googleapis.com", * reservedPeeringRanges: [privateIpAlloc.name], * }); * const defaultInstance = new gcp.alloydb.Instance("default", { * cluster: defaultCluster.name, * instanceId: "alloydb-instance", * instanceType: "PRIMARY", * }, { * dependsOn: [vpcConnection], * }); * const _default = new gcp.alloydb.Backup("default", { * location: "us-central1", * backupId: "alloydb-backup", * clusterName: defaultCluster.name, * }, { * dependsOn: [defaultInstance], * }); * ``` * ### Alloydb Backup Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const defaultNetwork = new gcp.compute.Network("default", {name: "alloydb-network"}); * const defaultCluster = new gcp.alloydb.Cluster("default", { * clusterId: "alloydb-cluster", * location: "us-central1", * networkConfig: { * network: defaultNetwork.id, * }, * deletionProtection: false, * }); * const privateIpAlloc = new gcp.compute.GlobalAddress("private_ip_alloc", { * name: "alloydb-cluster", * addressType: "INTERNAL", * purpose: "VPC_PEERING", * prefixLength: 16, * network: defaultNetwork.id, * }); * const vpcConnection = new gcp.servicenetworking.Connection("vpc_connection", { * network: defaultNetwork.id, * service: "servicenetworking.googleapis.com", * reservedPeeringRanges: [privateIpAlloc.name], * }); * const defaultInstance = new gcp.alloydb.Instance("default", { * cluster: defaultCluster.name, * instanceId: "alloydb-instance", * instanceType: "PRIMARY", * }, { * dependsOn: [vpcConnection], * }); * const _default = new gcp.alloydb.Backup("default", { * location: "us-central1", * backupId: "alloydb-backup", * clusterName: defaultCluster.name, * description: "example description", * type: "ON_DEMAND", * labels: { * label: "key", * }, * }, { * dependsOn: [defaultInstance], * }); * ``` * * ## Import * * Backup can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/backups/{{backup_id}}` * * `{{project}}/{{location}}/{{backup_id}}` * * `{{location}}/{{backup_id}}` * * When using the `pulumi import` command, Backup can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:alloydb/backup:Backup default projects/{{project}}/locations/{{location}}/backups/{{backup_id}} * $ pulumi import gcp:alloydb/backup:Backup default {{project}}/{{location}}/{{backup_id}} * $ pulumi import gcp:alloydb/backup:Backup default {{location}}/{{backup_id}} * ``` */ 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, 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; /** * Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128 * An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. * Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource. */ readonly annotations: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The ID of the alloydb backup. */ readonly backupId: pulumi.Output; /** * The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}). */ readonly clusterName: pulumi.Output; /** * Output only. The system-generated UID of the cluster which was used to create this resource. */ readonly clusterUid: pulumi.Output; /** * Output only. Create time stamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. * Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". */ readonly createTime: pulumi.Output; /** * Output only. Delete time stamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. * Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". */ readonly deleteTime: pulumi.Output; /** * User-provided description of the backup. */ readonly description: pulumi.Output; /** * User-settable and human-readable display name for the Backup. */ readonly displayName: pulumi.Output; /** * All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services. */ readonly effectiveAnnotations: pulumi.Output<{ [key: string]: 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; }>; /** * EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key). * Structure is documented below. */ readonly encryptionConfig: pulumi.Output; /** * EncryptionInfo describes the encryption information of a cluster or a backup. * Structure is documented below. */ readonly encryptionInfos: pulumi.Output; /** * For Resource freshness validation (https://google.aip.dev/154) */ readonly etag: pulumi.Output; /** * Output only. The QuantityBasedExpiry of the backup, specified by the backup's retention policy. * Once the expiry quantity is over retention, the backup is eligible to be garbage collected. * Structure is documented below. */ readonly expiryQuantities: pulumi.Output; /** * Output only. The time at which after the backup is eligible to be garbage collected. * It is the duration specified by the backup's retention policy, added to the backup's createTime. */ readonly expiryTime: pulumi.Output; /** * User-defined labels for the alloydb backup. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * * **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 location where the alloydb backup should reside. */ readonly location: pulumi.Output; /** * Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId} */ readonly name: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * Output only. Reconciling (https://google.aip.dev/128#reconciliation), if true, indicates that the service is actively updating the resource. * This can happen due to user-triggered updates or system actions like failover or maintenance. */ readonly reconciling: pulumi.Output; /** * Output only. The size of the backup in bytes. */ readonly sizeBytes: pulumi.Output; /** * Output only. The current state of the backup. */ readonly state: pulumi.Output; /** * The backup type, which suggests the trigger for the backup. * Possible values are: `TYPE_UNSPECIFIED`, `ON_DEMAND`, `AUTOMATED`, `CONTINUOUS`. */ readonly type: pulumi.Output; /** * Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted. */ readonly uid: pulumi.Output; /** * Output only. Update time stamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. * Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". */ readonly updateTime: pulumi.Output; /** * 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 { /** * Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128 * An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. * Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource. */ annotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The ID of the alloydb backup. */ backupId?: pulumi.Input; /** * The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}). */ clusterName?: pulumi.Input; /** * Output only. The system-generated UID of the cluster which was used to create this resource. */ clusterUid?: pulumi.Input; /** * Output only. Create time stamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. * Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". */ createTime?: pulumi.Input; /** * Output only. Delete time stamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. * Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". */ deleteTime?: pulumi.Input; /** * User-provided description of the backup. */ description?: pulumi.Input; /** * User-settable and human-readable display name for the Backup. */ displayName?: pulumi.Input; /** * All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services. */ effectiveAnnotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * 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; }>; /** * EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key). * Structure is documented below. */ encryptionConfig?: pulumi.Input; /** * EncryptionInfo describes the encryption information of a cluster or a backup. * Structure is documented below. */ encryptionInfos?: pulumi.Input[]>; /** * For Resource freshness validation (https://google.aip.dev/154) */ etag?: pulumi.Input; /** * Output only. The QuantityBasedExpiry of the backup, specified by the backup's retention policy. * Once the expiry quantity is over retention, the backup is eligible to be garbage collected. * Structure is documented below. */ expiryQuantities?: pulumi.Input[]>; /** * Output only. The time at which after the backup is eligible to be garbage collected. * It is the duration specified by the backup's retention policy, added to the backup's createTime. */ expiryTime?: pulumi.Input; /** * User-defined labels for the alloydb backup. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * * **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; }>; /** * The location where the alloydb backup should reside. */ location?: pulumi.Input; /** * Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId} */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Output only. Reconciling (https://google.aip.dev/128#reconciliation), if true, indicates that the service is actively updating the resource. * This can happen due to user-triggered updates or system actions like failover or maintenance. */ reconciling?: pulumi.Input; /** * Output only. The size of the backup in bytes. */ sizeBytes?: pulumi.Input; /** * Output only. The current state of the backup. */ state?: pulumi.Input; /** * The backup type, which suggests the trigger for the backup. * Possible values are: `TYPE_UNSPECIFIED`, `ON_DEMAND`, `AUTOMATED`, `CONTINUOUS`. */ type?: pulumi.Input; /** * Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted. */ uid?: pulumi.Input; /** * Output only. Update time stamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. * Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". */ updateTime?: pulumi.Input; } /** * The set of arguments for constructing a Backup resource. */ export interface BackupArgs { /** * Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128 * An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. * Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource. */ annotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The ID of the alloydb backup. */ backupId: pulumi.Input; /** * The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}). */ clusterName: pulumi.Input; /** * User-provided description of the backup. */ description?: pulumi.Input; /** * User-settable and human-readable display name for the Backup. */ displayName?: pulumi.Input; /** * EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key). * Structure is documented below. */ encryptionConfig?: pulumi.Input; /** * User-defined labels for the alloydb backup. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. * * **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; }>; /** * The location where the alloydb backup should reside. */ location: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The backup type, which suggests the trigger for the backup. * Possible values are: `TYPE_UNSPECIFIED`, `ON_DEMAND`, `AUTOMATED`, `CONTINUOUS`. */ type?: pulumi.Input; }