UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

95 lines (94 loc) 2.54 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Get a spanner database from Google Cloud by its name and instance name. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const foo = gcp.spanner.getDatabase({ * name: "foo", * instance: instance.name, * }); * ``` */ export declare function getDatabase(args: GetDatabaseArgs, opts?: pulumi.InvokeOptions): Promise<GetDatabaseResult>; /** * A collection of arguments for invoking getDatabase. */ export interface GetDatabaseArgs { /** * The name of the database's spanner instance. * * - - - */ instance: string; /** * The name of the spanner database. */ name: string; /** * The project in which the resource belongs. If it * is not provided, the provider project is used. */ project?: string; } /** * A collection of values returned by getDatabase. */ export interface GetDatabaseResult { readonly databaseDialect: string; readonly ddls: string[]; readonly defaultTimeZone: string; readonly deletionProtection: boolean; readonly enableDropProtection: boolean; readonly encryptionConfigs: outputs.spanner.GetDatabaseEncryptionConfig[]; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly instance: string; readonly name: string; readonly project?: string; readonly state: string; readonly versionRetentionPeriod: string; } /** * Get a spanner database from Google Cloud by its name and instance name. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const foo = gcp.spanner.getDatabase({ * name: "foo", * instance: instance.name, * }); * ``` */ export declare function getDatabaseOutput(args: GetDatabaseOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetDatabaseResult>; /** * A collection of arguments for invoking getDatabase. */ export interface GetDatabaseOutputArgs { /** * The name of the database's spanner instance. * * - - - */ instance: pulumi.Input<string>; /** * The name of the spanner database. */ name: pulumi.Input<string>; /** * The project in which the resource belongs. If it * is not provided, the provider project is used. */ project?: pulumi.Input<string>; }