UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

111 lines 5.15 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.DatabaseValkeyConfig = 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 Valkey database cluster. * * > **Note** Valkey 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-valkey-cluster", * engine: "valkey", * version: "8", * size: digitalocean.DatabaseSlug.DB_1VPCU1GB, * region: digitalocean.Region.NYC1, * nodeCount: 1, * }); * const example = new digitalocean.DatabaseValkeyConfig("example", { * clusterId: exampleDatabaseCluster.id, * notifyKeyspaceEvents: "KEA", * timeout: 90, * }); * ``` * * ## Import * * A Valkey database cluster's configuration can be imported using the `id` the parent cluster, e.g. * * ```sh * $ pulumi import digitalocean:index/databaseValkeyConfig:DatabaseValkeyConfig example 245bcfd0-7f31-4ce6-a2bc-475a116cca97 * ``` */ class DatabaseValkeyConfig extends pulumi.CustomResource { /** * Get an existing DatabaseValkeyConfig 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 DatabaseValkeyConfig(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of DatabaseValkeyConfig. 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'] === DatabaseValkeyConfig.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["aclChannelsDefault"] = state?.aclChannelsDefault; resourceInputs["clusterId"] = state?.clusterId; resourceInputs["frequentSnapshots"] = state?.frequentSnapshots; resourceInputs["ioThreads"] = state?.ioThreads; resourceInputs["lfuDecayTime"] = state?.lfuDecayTime; resourceInputs["lfuLogFactor"] = state?.lfuLogFactor; resourceInputs["notifyKeyspaceEvents"] = state?.notifyKeyspaceEvents; resourceInputs["numberOfDatabases"] = state?.numberOfDatabases; resourceInputs["persistence"] = state?.persistence; resourceInputs["pubsubClientOutputBufferLimit"] = state?.pubsubClientOutputBufferLimit; resourceInputs["ssl"] = state?.ssl; resourceInputs["timeout"] = state?.timeout; resourceInputs["valkeyActiveExpireEffort"] = state?.valkeyActiveExpireEffort; } else { const args = argsOrState; if (args?.clusterId === undefined && !opts.urn) { throw new Error("Missing required property 'clusterId'"); } resourceInputs["aclChannelsDefault"] = args?.aclChannelsDefault; resourceInputs["clusterId"] = args?.clusterId; resourceInputs["frequentSnapshots"] = args?.frequentSnapshots; resourceInputs["ioThreads"] = args?.ioThreads; resourceInputs["lfuDecayTime"] = args?.lfuDecayTime; resourceInputs["lfuLogFactor"] = args?.lfuLogFactor; resourceInputs["notifyKeyspaceEvents"] = args?.notifyKeyspaceEvents; resourceInputs["numberOfDatabases"] = args?.numberOfDatabases; resourceInputs["persistence"] = args?.persistence; resourceInputs["pubsubClientOutputBufferLimit"] = args?.pubsubClientOutputBufferLimit; resourceInputs["ssl"] = args?.ssl; resourceInputs["timeout"] = args?.timeout; resourceInputs["valkeyActiveExpireEffort"] = args?.valkeyActiveExpireEffort; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DatabaseValkeyConfig.__pulumiType, name, resourceInputs, opts); } } exports.DatabaseValkeyConfig = DatabaseValkeyConfig; /** @internal */ DatabaseValkeyConfig.__pulumiType = 'digitalocean:index/databaseValkeyConfig:DatabaseValkeyConfig'; //# sourceMappingURL=databaseValkeyConfig.js.map