import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../../types"; /** * Creates a new Cloud Spanner database and starts to prepare it for serving. The returned long-running operation will have a name of the format `/operations/` and can be used to track preparation of the database. The metadata field type is CreateDatabaseMetadata. The response field type is Database, if successful. */ export declare class InstanceDatabase extends pulumi.CustomResource { /** * Get an existing InstanceDatabase 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): InstanceDatabase; /** * Returns true if the given object is an instance of InstanceDatabase. 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 InstanceDatabase; /** * If exists, the time at which the database creation started. */ readonly createTime: pulumi.Output; /** * Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery. */ readonly earliestVersionTime: pulumi.Output; /** * For databases that are using customer managed encryption, this field contains the encryption configuration for the database. For databases that are using Google default or other types of encryption, this field is empty. */ readonly encryptionConfig: pulumi.Output; /** * For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use. For databases that are using Google default or other types of encryption, this field is empty. This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field. */ readonly encryptionInfo: pulumi.Output; /** * Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database. */ readonly name: pulumi.Output; /** * Applicable only for restored databases. Contains information about the restore source. */ readonly restoreInfo: pulumi.Output; /** * The current database state. */ readonly state: pulumi.Output; /** * The period in which Cloud Spanner retains all versions of data for the database. This is the same as the value of version_retention_period database option set using UpdateDatabaseDdl. Defaults to 1 hour, if not set. */ readonly versionRetentionPeriod: pulumi.Output; /** * Create a InstanceDatabase 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: InstanceDatabaseArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a InstanceDatabase resource. */ export interface InstanceDatabaseArgs { /** * Required. A `CREATE DATABASE` statement, which specifies the ID of the new database. The database ID must conform to the regular expression `a-z*[a-z0-9]` and be between 2 and 30 characters in length. If the database ID is a reserved word or if it contains a hyphen, the database ID must be enclosed in backticks (`` ` ``). */ readonly createStatement?: pulumi.Input; readonly databasesId: pulumi.Input; /** * Optional. The encryption configuration for the database. If this field is not specified, Cloud Spanner will encrypt/decrypt all data at rest using Google default encryption. */ readonly encryptionConfig?: pulumi.Input; /** * Optional. A list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database: if there is an error in any statement, the database is not created. */ readonly extraStatements?: pulumi.Input[]>; readonly instancesId: pulumi.Input; readonly projectsId: pulumi.Input; }