UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

191 lines • 13.5 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.DatabasePostgresqlConfig = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a virtual resource that can be used to change advanced configuration * options for a DigitalOcean managed PostgreSQL database cluster. * * > **Note** PostgreSQL configurations are only removed from state when destroyed. The remote configuration is not unset. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as digitalocean from "@pulumi/digitalocean"; * * const exampleDatabaseCluster = new digitalocean.DatabaseCluster("example", { * name: "example-postgresql-cluster", * engine: "pg", * version: "15", * size: digitalocean.DatabaseSlug.DB_1VPCU1GB, * region: digitalocean.Region.NYC1, * nodeCount: 1, * }); * const example = new digitalocean.DatabasePostgresqlConfig("example", { * clusterId: exampleDatabaseCluster.id, * timezone: "UTC", * workMem: 16, * }); * ``` * * ## Import * * A PostgreSQL database cluster's configuration can be imported using the `id` the parent cluster, e.g. * * bash * * ```sh * $ pulumi import digitalocean:index/databasePostgresqlConfig:DatabasePostgresqlConfig example 52556c07-788e-4d41-b8a7-c796432197d1 * ``` */ class DatabasePostgresqlConfig extends pulumi.CustomResource { /** * Get an existing DatabasePostgresqlConfig 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. */ static get(name, id, state, opts) { return new DatabasePostgresqlConfig(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of DatabasePostgresqlConfig. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === DatabasePostgresqlConfig.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["autovacuumAnalyzeScaleFactor"] = state ? state.autovacuumAnalyzeScaleFactor : undefined; resourceInputs["autovacuumAnalyzeThreshold"] = state ? state.autovacuumAnalyzeThreshold : undefined; resourceInputs["autovacuumFreezeMaxAge"] = state ? state.autovacuumFreezeMaxAge : undefined; resourceInputs["autovacuumMaxWorkers"] = state ? state.autovacuumMaxWorkers : undefined; resourceInputs["autovacuumNaptime"] = state ? state.autovacuumNaptime : undefined; resourceInputs["autovacuumVacuumCostDelay"] = state ? state.autovacuumVacuumCostDelay : undefined; resourceInputs["autovacuumVacuumCostLimit"] = state ? state.autovacuumVacuumCostLimit : undefined; resourceInputs["autovacuumVacuumScaleFactor"] = state ? state.autovacuumVacuumScaleFactor : undefined; resourceInputs["autovacuumVacuumThreshold"] = state ? state.autovacuumVacuumThreshold : undefined; resourceInputs["backupHour"] = state ? state.backupHour : undefined; resourceInputs["backupMinute"] = state ? state.backupMinute : undefined; resourceInputs["bgwriterDelay"] = state ? state.bgwriterDelay : undefined; resourceInputs["bgwriterFlushAfter"] = state ? state.bgwriterFlushAfter : undefined; resourceInputs["bgwriterLruMaxpages"] = state ? state.bgwriterLruMaxpages : undefined; resourceInputs["bgwriterLruMultiplier"] = state ? state.bgwriterLruMultiplier : undefined; resourceInputs["clusterId"] = state ? state.clusterId : undefined; resourceInputs["deadlockTimeout"] = state ? state.deadlockTimeout : undefined; resourceInputs["defaultToastCompression"] = state ? state.defaultToastCompression : undefined; resourceInputs["idleInTransactionSessionTimeout"] = state ? state.idleInTransactionSessionTimeout : undefined; resourceInputs["jit"] = state ? state.jit : undefined; resourceInputs["logAutovacuumMinDuration"] = state ? state.logAutovacuumMinDuration : undefined; resourceInputs["logErrorVerbosity"] = state ? state.logErrorVerbosity : undefined; resourceInputs["logLinePrefix"] = state ? state.logLinePrefix : undefined; resourceInputs["logMinDurationStatement"] = state ? state.logMinDurationStatement : undefined; resourceInputs["maxFilesPerProcess"] = state ? state.maxFilesPerProcess : undefined; resourceInputs["maxLocksPerTransaction"] = state ? state.maxLocksPerTransaction : undefined; resourceInputs["maxLogicalReplicationWorkers"] = state ? state.maxLogicalReplicationWorkers : undefined; resourceInputs["maxParallelWorkers"] = state ? state.maxParallelWorkers : undefined; resourceInputs["maxParallelWorkersPerGather"] = state ? state.maxParallelWorkersPerGather : undefined; resourceInputs["maxPredLocksPerTransaction"] = state ? state.maxPredLocksPerTransaction : undefined; resourceInputs["maxPreparedTransactions"] = state ? state.maxPreparedTransactions : undefined; resourceInputs["maxReplicationSlots"] = state ? state.maxReplicationSlots : undefined; resourceInputs["maxStackDepth"] = state ? state.maxStackDepth : undefined; resourceInputs["maxStandbyArchiveDelay"] = state ? state.maxStandbyArchiveDelay : undefined; resourceInputs["maxStandbyStreamingDelay"] = state ? state.maxStandbyStreamingDelay : undefined; resourceInputs["maxWalSenders"] = state ? state.maxWalSenders : undefined; resourceInputs["maxWorkerProcesses"] = state ? state.maxWorkerProcesses : undefined; resourceInputs["pgPartmanBgwInterval"] = state ? state.pgPartmanBgwInterval : undefined; resourceInputs["pgPartmanBgwRole"] = state ? state.pgPartmanBgwRole : undefined; resourceInputs["pgStatStatementsTrack"] = state ? state.pgStatStatementsTrack : undefined; resourceInputs["pgbouncers"] = state ? state.pgbouncers : undefined; resourceInputs["sharedBuffersPercentage"] = state ? state.sharedBuffersPercentage : undefined; resourceInputs["tempFileLimit"] = state ? state.tempFileLimit : undefined; resourceInputs["timescaledbs"] = state ? state.timescaledbs : undefined; resourceInputs["timezone"] = state ? state.timezone : undefined; resourceInputs["trackActivityQuerySize"] = state ? state.trackActivityQuerySize : undefined; resourceInputs["trackCommitTimestamp"] = state ? state.trackCommitTimestamp : undefined; resourceInputs["trackFunctions"] = state ? state.trackFunctions : undefined; resourceInputs["trackIoTiming"] = state ? state.trackIoTiming : undefined; resourceInputs["walSenderTimeout"] = state ? state.walSenderTimeout : undefined; resourceInputs["walWriterDelay"] = state ? state.walWriterDelay : undefined; resourceInputs["workMem"] = state ? state.workMem : undefined; } else { const args = argsOrState; if ((!args || args.clusterId === undefined) && !opts.urn) { throw new Error("Missing required property 'clusterId'"); } resourceInputs["autovacuumAnalyzeScaleFactor"] = args ? args.autovacuumAnalyzeScaleFactor : undefined; resourceInputs["autovacuumAnalyzeThreshold"] = args ? args.autovacuumAnalyzeThreshold : undefined; resourceInputs["autovacuumFreezeMaxAge"] = args ? args.autovacuumFreezeMaxAge : undefined; resourceInputs["autovacuumMaxWorkers"] = args ? args.autovacuumMaxWorkers : undefined; resourceInputs["autovacuumNaptime"] = args ? args.autovacuumNaptime : undefined; resourceInputs["autovacuumVacuumCostDelay"] = args ? args.autovacuumVacuumCostDelay : undefined; resourceInputs["autovacuumVacuumCostLimit"] = args ? args.autovacuumVacuumCostLimit : undefined; resourceInputs["autovacuumVacuumScaleFactor"] = args ? args.autovacuumVacuumScaleFactor : undefined; resourceInputs["autovacuumVacuumThreshold"] = args ? args.autovacuumVacuumThreshold : undefined; resourceInputs["backupHour"] = args ? args.backupHour : undefined; resourceInputs["backupMinute"] = args ? args.backupMinute : undefined; resourceInputs["bgwriterDelay"] = args ? args.bgwriterDelay : undefined; resourceInputs["bgwriterFlushAfter"] = args ? args.bgwriterFlushAfter : undefined; resourceInputs["bgwriterLruMaxpages"] = args ? args.bgwriterLruMaxpages : undefined; resourceInputs["bgwriterLruMultiplier"] = args ? args.bgwriterLruMultiplier : undefined; resourceInputs["clusterId"] = args ? args.clusterId : undefined; resourceInputs["deadlockTimeout"] = args ? args.deadlockTimeout : undefined; resourceInputs["defaultToastCompression"] = args ? args.defaultToastCompression : undefined; resourceInputs["idleInTransactionSessionTimeout"] = args ? args.idleInTransactionSessionTimeout : undefined; resourceInputs["jit"] = args ? args.jit : undefined; resourceInputs["logAutovacuumMinDuration"] = args ? args.logAutovacuumMinDuration : undefined; resourceInputs["logErrorVerbosity"] = args ? args.logErrorVerbosity : undefined; resourceInputs["logLinePrefix"] = args ? args.logLinePrefix : undefined; resourceInputs["logMinDurationStatement"] = args ? args.logMinDurationStatement : undefined; resourceInputs["maxFilesPerProcess"] = args ? args.maxFilesPerProcess : undefined; resourceInputs["maxLocksPerTransaction"] = args ? args.maxLocksPerTransaction : undefined; resourceInputs["maxLogicalReplicationWorkers"] = args ? args.maxLogicalReplicationWorkers : undefined; resourceInputs["maxParallelWorkers"] = args ? args.maxParallelWorkers : undefined; resourceInputs["maxParallelWorkersPerGather"] = args ? args.maxParallelWorkersPerGather : undefined; resourceInputs["maxPredLocksPerTransaction"] = args ? args.maxPredLocksPerTransaction : undefined; resourceInputs["maxPreparedTransactions"] = args ? args.maxPreparedTransactions : undefined; resourceInputs["maxReplicationSlots"] = args ? args.maxReplicationSlots : undefined; resourceInputs["maxStackDepth"] = args ? args.maxStackDepth : undefined; resourceInputs["maxStandbyArchiveDelay"] = args ? args.maxStandbyArchiveDelay : undefined; resourceInputs["maxStandbyStreamingDelay"] = args ? args.maxStandbyStreamingDelay : undefined; resourceInputs["maxWalSenders"] = args ? args.maxWalSenders : undefined; resourceInputs["maxWorkerProcesses"] = args ? args.maxWorkerProcesses : undefined; resourceInputs["pgPartmanBgwInterval"] = args ? args.pgPartmanBgwInterval : undefined; resourceInputs["pgPartmanBgwRole"] = args ? args.pgPartmanBgwRole : undefined; resourceInputs["pgStatStatementsTrack"] = args ? args.pgStatStatementsTrack : undefined; resourceInputs["pgbouncers"] = args ? args.pgbouncers : undefined; resourceInputs["sharedBuffersPercentage"] = args ? args.sharedBuffersPercentage : undefined; resourceInputs["tempFileLimit"] = args ? args.tempFileLimit : undefined; resourceInputs["timescaledbs"] = args ? args.timescaledbs : undefined; resourceInputs["timezone"] = args ? args.timezone : undefined; resourceInputs["trackActivityQuerySize"] = args ? args.trackActivityQuerySize : undefined; resourceInputs["trackCommitTimestamp"] = args ? args.trackCommitTimestamp : undefined; resourceInputs["trackFunctions"] = args ? args.trackFunctions : undefined; resourceInputs["trackIoTiming"] = args ? args.trackIoTiming : undefined; resourceInputs["walSenderTimeout"] = args ? args.walSenderTimeout : undefined; resourceInputs["walWriterDelay"] = args ? args.walWriterDelay : undefined; resourceInputs["workMem"] = args ? args.workMem : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DatabasePostgresqlConfig.__pulumiType, name, resourceInputs, opts); } } exports.DatabasePostgresqlConfig = DatabasePostgresqlConfig; /** @internal */ DatabasePostgresqlConfig.__pulumiType = 'digitalocean:index/databasePostgresqlConfig:DatabasePostgresqlConfig'; //# sourceMappingURL=databasePostgresqlConfig.js.map