// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; import * as utilities from "./utilities"; export class DbPostgres extends pulumi.CustomResource { /** * Get an existing DbPostgres 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. */ public static get(name: string, id: pulumi.Input, state?: DbPostgresState, opts?: pulumi.CustomResourceOptions): DbPostgres { return new DbPostgres(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'timeweb-cloud:index/dbPostgres:DbPostgres'; /** * Returns true if the given object is an instance of DbPostgres. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ public static isInstance(obj: any): obj is DbPostgres { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === DbPostgres.__pulumiType; } /** * Change ration before `ANALYZE` will be started */ declare public readonly autovacuumAnalyzeScaleFactor: pulumi.Output; /** * Interval between background writes runs */ declare public readonly bgwriterDelay: pulumi.Output; /** * Maximum pages cache count */ declare public readonly bgwriterLruMaxpages: pulumi.Output; declare public readonly dbPostgresId: pulumi.Output; /** * Timeout between deadlock checking */ declare public readonly deadlockTimeout: pulumi.Output; /** * Information about database disk stats */ declare public /*out*/ readonly diskStats: pulumi.Output; /** * Maximum write queue size of `GIN` index */ declare public readonly ginPendingListLimit: pulumi.Output; /** * Host for connection to database */ declare public /*out*/ readonly host: pulumi.Output; /** * Maximum idle time for opened transaction */ declare public readonly idleInTransactionSessionTimeout: pulumi.Output; /** * Maximum idle time for session */ declare public readonly idleSessionTimeout: pulumi.Output; /** * IP-address database of network interface */ declare public /*out*/ readonly ip: pulumi.Output; /** * Flag that shows allowability database only by external IP address */ declare public readonly isExternalIp: pulumi.Output; /** * Threshold of elements in `FROM` that will be transformed to explicit `JOIN` */ declare public readonly joinCollapseLimit: pulumi.Output; /** * Local IP-address database of network interface */ declare public /*out*/ readonly localIp: pulumi.Output; /** * Flag that enables local network for DB */ declare public readonly localNetwork: pulumi.Output; /** * Time for obtaining lock */ declare public readonly lockTimeout: pulumi.Output; /** * Login for database */ declare public readonly login: pulumi.Output; /** * Determines the maximum number of concurrent connections to the database server */ declare public readonly maxConnections: pulumi.Output; /** * Max count of stored prepared statements */ declare public readonly maxPreparedTransactions: pulumi.Output; /** * Name for database */ declare public readonly name: pulumi.Output; /** * Password for database */ declare public readonly password: pulumi.Output; /** * Port for connection to database */ declare public /*out*/ readonly port: pulumi.Output; /** * Preset ID for database */ declare public readonly presetId: pulumi.Output; /** * Project ID for created DB */ declare public readonly projectId: pulumi.Output; /** * Sets the number of shared memory buffers used by the server */ declare public readonly sharedBuffers: pulumi.Output; /** * Current status of database (`started`, `starting`, `stoped`, `no_paid`) */ declare public /*out*/ readonly status: pulumi.Output; /** * Sets the maximum number of temporary buffers used by each session */ declare public readonly tempBuffers: pulumi.Output; /** * Sets the number of disk-page buffers in shared memory for WAL */ declare public readonly walBuffers: pulumi.Output; /** * Sets the maximum memory to be used by each autovacuum worker process */ declare public readonly workMem: pulumi.Output; /** * Create a DbPostgres 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: DbPostgresArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: DbPostgresArgs | DbPostgresState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as DbPostgresState | undefined; resourceInputs["autovacuumAnalyzeScaleFactor"] = state?.autovacuumAnalyzeScaleFactor; resourceInputs["bgwriterDelay"] = state?.bgwriterDelay; resourceInputs["bgwriterLruMaxpages"] = state?.bgwriterLruMaxpages; resourceInputs["dbPostgresId"] = state?.dbPostgresId; resourceInputs["deadlockTimeout"] = state?.deadlockTimeout; resourceInputs["diskStats"] = state?.diskStats; resourceInputs["ginPendingListLimit"] = state?.ginPendingListLimit; resourceInputs["host"] = state?.host; resourceInputs["idleInTransactionSessionTimeout"] = state?.idleInTransactionSessionTimeout; resourceInputs["idleSessionTimeout"] = state?.idleSessionTimeout; resourceInputs["ip"] = state?.ip; resourceInputs["isExternalIp"] = state?.isExternalIp; resourceInputs["joinCollapseLimit"] = state?.joinCollapseLimit; resourceInputs["localIp"] = state?.localIp; resourceInputs["localNetwork"] = state?.localNetwork; resourceInputs["lockTimeout"] = state?.lockTimeout; resourceInputs["login"] = state?.login; resourceInputs["maxConnections"] = state?.maxConnections; resourceInputs["maxPreparedTransactions"] = state?.maxPreparedTransactions; resourceInputs["name"] = state?.name; resourceInputs["password"] = state?.password; resourceInputs["port"] = state?.port; resourceInputs["presetId"] = state?.presetId; resourceInputs["projectId"] = state?.projectId; resourceInputs["sharedBuffers"] = state?.sharedBuffers; resourceInputs["status"] = state?.status; resourceInputs["tempBuffers"] = state?.tempBuffers; resourceInputs["walBuffers"] = state?.walBuffers; resourceInputs["workMem"] = state?.workMem; } else { const args = argsOrState as DbPostgresArgs | undefined; if (args?.password === undefined && !opts.urn) { throw new Error("Missing required property 'password'"); } if (args?.presetId === undefined && !opts.urn) { throw new Error("Missing required property 'presetId'"); } resourceInputs["autovacuumAnalyzeScaleFactor"] = args?.autovacuumAnalyzeScaleFactor; resourceInputs["bgwriterDelay"] = args?.bgwriterDelay; resourceInputs["bgwriterLruMaxpages"] = args?.bgwriterLruMaxpages; resourceInputs["dbPostgresId"] = args?.dbPostgresId; resourceInputs["deadlockTimeout"] = args?.deadlockTimeout; resourceInputs["ginPendingListLimit"] = args?.ginPendingListLimit; resourceInputs["idleInTransactionSessionTimeout"] = args?.idleInTransactionSessionTimeout; resourceInputs["idleSessionTimeout"] = args?.idleSessionTimeout; resourceInputs["isExternalIp"] = args?.isExternalIp; resourceInputs["joinCollapseLimit"] = args?.joinCollapseLimit; resourceInputs["localNetwork"] = args?.localNetwork; resourceInputs["lockTimeout"] = args?.lockTimeout; resourceInputs["login"] = args?.login; resourceInputs["maxConnections"] = args?.maxConnections; resourceInputs["maxPreparedTransactions"] = args?.maxPreparedTransactions; resourceInputs["name"] = args?.name; resourceInputs["password"] = args?.password ? pulumi.secret(args.password) : undefined; resourceInputs["presetId"] = args?.presetId; resourceInputs["projectId"] = args?.projectId; resourceInputs["sharedBuffers"] = args?.sharedBuffers; resourceInputs["tempBuffers"] = args?.tempBuffers; resourceInputs["walBuffers"] = args?.walBuffers; resourceInputs["workMem"] = args?.workMem; resourceInputs["diskStats"] = undefined /*out*/; resourceInputs["host"] = undefined /*out*/; resourceInputs["ip"] = undefined /*out*/; resourceInputs["localIp"] = undefined /*out*/; resourceInputs["port"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["password"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(DbPostgres.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage()); } } /** * Input properties used for looking up and filtering DbPostgres resources. */ export interface DbPostgresState { /** * Change ration before `ANALYZE` will be started */ autovacuumAnalyzeScaleFactor?: pulumi.Input; /** * Interval between background writes runs */ bgwriterDelay?: pulumi.Input; /** * Maximum pages cache count */ bgwriterLruMaxpages?: pulumi.Input; dbPostgresId?: pulumi.Input; /** * Timeout between deadlock checking */ deadlockTimeout?: pulumi.Input; /** * Information about database disk stats */ diskStats?: pulumi.Input[]>; /** * Maximum write queue size of `GIN` index */ ginPendingListLimit?: pulumi.Input; /** * Host for connection to database */ host?: pulumi.Input; /** * Maximum idle time for opened transaction */ idleInTransactionSessionTimeout?: pulumi.Input; /** * Maximum idle time for session */ idleSessionTimeout?: pulumi.Input; /** * IP-address database of network interface */ ip?: pulumi.Input; /** * Flag that shows allowability database only by external IP address */ isExternalIp?: pulumi.Input; /** * Threshold of elements in `FROM` that will be transformed to explicit `JOIN` */ joinCollapseLimit?: pulumi.Input; /** * Local IP-address database of network interface */ localIp?: pulumi.Input; /** * Flag that enables local network for DB */ localNetwork?: pulumi.Input; /** * Time for obtaining lock */ lockTimeout?: pulumi.Input; /** * Login for database */ login?: pulumi.Input; /** * Determines the maximum number of concurrent connections to the database server */ maxConnections?: pulumi.Input; /** * Max count of stored prepared statements */ maxPreparedTransactions?: pulumi.Input; /** * Name for database */ name?: pulumi.Input; /** * Password for database */ password?: pulumi.Input; /** * Port for connection to database */ port?: pulumi.Input; /** * Preset ID for database */ presetId?: pulumi.Input; /** * Project ID for created DB */ projectId?: pulumi.Input; /** * Sets the number of shared memory buffers used by the server */ sharedBuffers?: pulumi.Input; /** * Current status of database (`started`, `starting`, `stoped`, `no_paid`) */ status?: pulumi.Input; /** * Sets the maximum number of temporary buffers used by each session */ tempBuffers?: pulumi.Input; /** * Sets the number of disk-page buffers in shared memory for WAL */ walBuffers?: pulumi.Input; /** * Sets the maximum memory to be used by each autovacuum worker process */ workMem?: pulumi.Input; } /** * The set of arguments for constructing a DbPostgres resource. */ export interface DbPostgresArgs { /** * Change ration before `ANALYZE` will be started */ autovacuumAnalyzeScaleFactor?: pulumi.Input; /** * Interval between background writes runs */ bgwriterDelay?: pulumi.Input; /** * Maximum pages cache count */ bgwriterLruMaxpages?: pulumi.Input; dbPostgresId?: pulumi.Input; /** * Timeout between deadlock checking */ deadlockTimeout?: pulumi.Input; /** * Maximum write queue size of `GIN` index */ ginPendingListLimit?: pulumi.Input; /** * Maximum idle time for opened transaction */ idleInTransactionSessionTimeout?: pulumi.Input; /** * Maximum idle time for session */ idleSessionTimeout?: pulumi.Input; /** * Flag that shows allowability database only by external IP address */ isExternalIp?: pulumi.Input; /** * Threshold of elements in `FROM` that will be transformed to explicit `JOIN` */ joinCollapseLimit?: pulumi.Input; /** * Flag that enables local network for DB */ localNetwork?: pulumi.Input; /** * Time for obtaining lock */ lockTimeout?: pulumi.Input; /** * Login for database */ login?: pulumi.Input; /** * Determines the maximum number of concurrent connections to the database server */ maxConnections?: pulumi.Input; /** * Max count of stored prepared statements */ maxPreparedTransactions?: pulumi.Input; /** * Name for database */ name?: pulumi.Input; /** * Password for database */ password: pulumi.Input; /** * Preset ID for database */ presetId: pulumi.Input; /** * Project ID for created DB */ projectId?: pulumi.Input; /** * Sets the number of shared memory buffers used by the server */ sharedBuffers?: pulumi.Input; /** * Sets the maximum number of temporary buffers used by each session */ tempBuffers?: pulumi.Input; /** * Sets the number of disk-page buffers in shared memory for WAL */ walBuffers?: pulumi.Input; /** * Sets the maximum memory to be used by each autovacuum worker process */ workMem?: pulumi.Input; }