// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; export class Database extends pulumi.CustomResource { /** * Get an existing Database 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. */ public static get(name: string, id: pulumi.Input, state?: DatabaseState, opts?: pulumi.CustomResourceOptions): Database { return new Database(name, state, { ...opts, id: id }); } /** * If false then no one can connect to this database */ public readonly allowConnections: pulumi.Output; /** * How many concurrent connections can be made to this database */ public readonly connectionLimit: pulumi.Output; /** * Character set encoding to use in the new database */ public readonly encoding: pulumi.Output; /** * If true, then this database can be cloned by any user with CREATEDB privileges */ public readonly isTemplate: pulumi.Output; /** * Collation order (LC_COLLATE) to use in the new database */ public readonly lcCollate: pulumi.Output; /** * Character classification (LC_CTYPE) to use in the new database */ public readonly lcCtype: pulumi.Output; /** * The PostgreSQL database name to connect to */ public readonly name: pulumi.Output; /** * The ROLE which owns the database */ public readonly owner: pulumi.Output; /** * The name of the tablespace that will be associated with the new database */ public readonly tablespaceName: pulumi.Output; /** * The name of the template from which to create the new database */ public readonly template: pulumi.Output; /** * Create a Database 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?: DatabaseArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: DatabaseArgs | DatabaseState, opts?: pulumi.CustomResourceOptions) { let inputs: pulumi.Inputs = {}; if (opts && opts.id) { const state: DatabaseState = argsOrState as DatabaseState | undefined; inputs["allowConnections"] = state ? state.allowConnections : undefined; inputs["connectionLimit"] = state ? state.connectionLimit : undefined; inputs["encoding"] = state ? state.encoding : undefined; inputs["isTemplate"] = state ? state.isTemplate : undefined; inputs["lcCollate"] = state ? state.lcCollate : undefined; inputs["lcCtype"] = state ? state.lcCtype : undefined; inputs["name"] = state ? state.name : undefined; inputs["owner"] = state ? state.owner : undefined; inputs["tablespaceName"] = state ? state.tablespaceName : undefined; inputs["template"] = state ? state.template : undefined; } else { const args = argsOrState as DatabaseArgs | undefined; inputs["allowConnections"] = args ? args.allowConnections : undefined; inputs["connectionLimit"] = args ? args.connectionLimit : undefined; inputs["encoding"] = args ? args.encoding : undefined; inputs["isTemplate"] = args ? args.isTemplate : undefined; inputs["lcCollate"] = args ? args.lcCollate : undefined; inputs["lcCtype"] = args ? args.lcCtype : undefined; inputs["name"] = args ? args.name : undefined; inputs["owner"] = args ? args.owner : undefined; inputs["tablespaceName"] = args ? args.tablespaceName : undefined; inputs["template"] = args ? args.template : undefined; } super("postgresql:index/database:Database", name, inputs, opts); } } /** * Input properties used for looking up and filtering Database resources. */ export interface DatabaseState { /** * If false then no one can connect to this database */ readonly allowConnections?: pulumi.Input; /** * How many concurrent connections can be made to this database */ readonly connectionLimit?: pulumi.Input; /** * Character set encoding to use in the new database */ readonly encoding?: pulumi.Input; /** * If true, then this database can be cloned by any user with CREATEDB privileges */ readonly isTemplate?: pulumi.Input; /** * Collation order (LC_COLLATE) to use in the new database */ readonly lcCollate?: pulumi.Input; /** * Character classification (LC_CTYPE) to use in the new database */ readonly lcCtype?: pulumi.Input; /** * The PostgreSQL database name to connect to */ readonly name?: pulumi.Input; /** * The ROLE which owns the database */ readonly owner?: pulumi.Input; /** * The name of the tablespace that will be associated with the new database */ readonly tablespaceName?: pulumi.Input; /** * The name of the template from which to create the new database */ readonly template?: pulumi.Input; } /** * The set of arguments for constructing a Database resource. */ export interface DatabaseArgs { /** * If false then no one can connect to this database */ readonly allowConnections?: pulumi.Input; /** * How many concurrent connections can be made to this database */ readonly connectionLimit?: pulumi.Input; /** * Character set encoding to use in the new database */ readonly encoding?: pulumi.Input; /** * If true, then this database can be cloned by any user with CREATEDB privileges */ readonly isTemplate?: pulumi.Input; /** * Collation order (LC_COLLATE) to use in the new database */ readonly lcCollate?: pulumi.Input; /** * Character classification (LC_CTYPE) to use in the new database */ readonly lcCtype?: pulumi.Input; /** * The PostgreSQL database name to connect to */ readonly name?: pulumi.Input; /** * The ROLE which owns the database */ readonly owner?: pulumi.Input; /** * The name of the tablespace that will be associated with the new database */ readonly tablespaceName?: pulumi.Input; /** * The name of the template from which to create the new database */ readonly template?: pulumi.Input; }