import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../../types/output"; /** * Gets the state of a Cloud Spanner database. */ export declare function getDatabase(args: GetDatabaseArgs, opts?: pulumi.InvokeOptions): Promise; export interface GetDatabaseArgs { databaseId: string; instanceId: string; project?: string; } export interface GetDatabaseResult { /** * If exists, the time at which the database creation started. */ readonly createTime: string; /** * The dialect of the Cloud Spanner Database. */ readonly databaseDialect: string; /** * The read-write region which contains the database's leader replicas. This is the same as the value of default_leader database option set using DatabaseAdmin.CreateDatabase or DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty. */ readonly defaultLeader: string; /** * 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: string; /** * Whether drop protection is enabled for this database. Defaults to false, if not set. For more details, please see how to [prevent accidental database deletion](https://cloud.google.com/spanner/docs/prevent-database-deletion). */ readonly enableDropProtection: boolean; /** * 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: outputs.spanner.v1.EncryptionConfigResponse; /** * For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The `encryption_status' field inside of each `EncryptionInfo` is not populated. 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: outputs.spanner.v1.EncryptionInfoResponse[]; /** * 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: string; /** * If true, the database is being updated. If false, there are no ongoing update operations for the database. */ readonly reconciling: boolean; /** * Applicable only for restored databases. Contains information about the restore source. */ readonly restoreInfo: outputs.spanner.v1.RestoreInfoResponse; /** * The current database state. */ readonly state: string; /** * 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: string; } /** * Gets the state of a Cloud Spanner database. */ export declare function getDatabaseOutput(args: GetDatabaseOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output; export interface GetDatabaseOutputArgs { databaseId: pulumi.Input; instanceId: pulumi.Input; project?: pulumi.Input; }