@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
485 lines (484 loc) • 19.5 kB
TypeScript
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,
* },
* });
* 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,
* },
* });
* 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}}
* ```
*
* ```sh
* $ pulumi import gcp:alloydb/backup:Backup default {{project}}/{{location}}/{{backup_id}}
* ```
*
* ```sh
* $ 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<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;
/**
* 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<string>;
/**
* The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
*/
readonly clusterName: pulumi.Output<string>;
/**
* Output only. The system-generated UID of the cluster which was used to create this resource.
*/
readonly clusterUid: pulumi.Output<string>;
/**
* 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<string>;
/**
* 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<string>;
/**
* User-provided description of the backup.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* User-settable and human-readable display name for the Backup.
*/
readonly displayName: pulumi.Output<string | undefined>;
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<outputs.alloydb.BackupEncryptionConfig | undefined>;
/**
* EncryptionInfo describes the encryption information of a cluster or a backup.
* Structure is documented below.
*/
readonly encryptionInfos: pulumi.Output<outputs.alloydb.BackupEncryptionInfo[]>;
/**
* For Resource freshness validation (https://google.aip.dev/154)
*/
readonly etag: pulumi.Output<string>;
/**
* 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<outputs.alloydb.BackupExpiryQuantity[]>;
/**
* 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<string>;
/**
* 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<string>;
/**
* Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}
*/
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;
}>;
/**
* 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<boolean>;
/**
* Output only. The size of the backup in bytes.
*/
readonly sizeBytes: pulumi.Output<string>;
/**
* Output only. The current state of the backup.
*/
readonly state: pulumi.Output<string>;
/**
* The backup type, which suggests the trigger for the backup.
* Possible values are: `TYPE_UNSPECIFIED`, `ON_DEMAND`, `AUTOMATED`, `CONTINUOUS`.
*/
readonly type: pulumi.Output<string>;
/**
* 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<string>;
/**
* 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<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 {
/**
* 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<string>;
}>;
/**
* The ID of the alloydb backup.
*/
backupId?: pulumi.Input<string>;
/**
* The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
*/
clusterName?: pulumi.Input<string>;
/**
* Output only. The system-generated UID of the cluster which was used to create this resource.
*/
clusterUid?: pulumi.Input<string>;
/**
* 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<string>;
/**
* 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<string>;
/**
* User-provided description of the backup.
*/
description?: pulumi.Input<string>;
/**
* User-settable and human-readable display name for the Backup.
*/
displayName?: pulumi.Input<string>;
effectiveAnnotations?: pulumi.Input<{
[key: string]: 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>;
}>;
/**
* 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<inputs.alloydb.BackupEncryptionConfig>;
/**
* EncryptionInfo describes the encryption information of a cluster or a backup.
* Structure is documented below.
*/
encryptionInfos?: pulumi.Input<pulumi.Input<inputs.alloydb.BackupEncryptionInfo>[]>;
/**
* For Resource freshness validation (https://google.aip.dev/154)
*/
etag?: pulumi.Input<string>;
/**
* 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<pulumi.Input<inputs.alloydb.BackupExpiryQuantity>[]>;
/**
* 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<string>;
/**
* 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<string>;
}>;
/**
* The location where the alloydb backup should reside.
*
*
* - - -
*/
location?: pulumi.Input<string>;
/**
* Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}
*/
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>;
}>;
/**
* 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<boolean>;
/**
* Output only. The size of the backup in bytes.
*/
sizeBytes?: pulumi.Input<string>;
/**
* Output only. The current state of the backup.
*/
state?: pulumi.Input<string>;
/**
* The backup type, which suggests the trigger for the backup.
* Possible values are: `TYPE_UNSPECIFIED`, `ON_DEMAND`, `AUTOMATED`, `CONTINUOUS`.
*/
type?: pulumi.Input<string>;
/**
* 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<string>;
/**
* 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<string>;
}
/**
* 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<string>;
}>;
/**
* The ID of the alloydb backup.
*/
backupId: pulumi.Input<string>;
/**
* The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
*/
clusterName: pulumi.Input<string>;
/**
* User-provided description of the backup.
*/
description?: pulumi.Input<string>;
/**
* User-settable and human-readable display name for the Backup.
*/
displayName?: pulumi.Input<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.
*/
encryptionConfig?: pulumi.Input<inputs.alloydb.BackupEncryptionConfig>;
/**
* 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<string>;
}>;
/**
* The location where the alloydb backup should reside.
*
*
* - - -
*/
location: 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 backup type, which suggests the trigger for the backup.
* Possible values are: `TYPE_UNSPECIFIED`, `ON_DEMAND`, `AUTOMATED`, `CONTINUOUS`.
*/
type?: pulumi.Input<string>;
}