UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

199 lines • 12.3 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.DatabaseOpensearchConfig = 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 Opensearch database cluster. * * > **Note** Opensearch 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-opensearch-cluster", * engine: "opensearch", * version: "2", * size: digitalocean.DatabaseSlug.DB_1VPCU2GB, * region: digitalocean.Region.NYC3, * nodeCount: 1, * }); * const example = new digitalocean.DatabaseOpensearchConfig("example", { * clusterId: exampleDatabaseCluster.id, * ismEnabled: true, * ismHistoryEnabled: true, * ismHistoryMaxAgeHours: 24, * ismHistoryMaxDocs: 2500000, * ismHistoryRolloverCheckPeriodHours: 8, * ismHistoryRolloverRetentionPeriodDays: 30, * httpMaxContentLengthBytes: 100000000, * httpMaxHeaderSizeBytes: 8192, * httpMaxInitialLineLengthBytes: 4096, * indicesQueryBoolMaxClauseCount: 1024, * searchMaxBuckets: 10000, * indicesFielddataCacheSizePercentage: 3, * indicesMemoryIndexBufferSizePercentage: 10, * indicesMemoryMinIndexBufferSizeMb: 48, * indicesMemoryMaxIndexBufferSizeMb: 3, * indicesQueriesCacheSizePercentage: 10, * indicesRecoveryMaxMbPerSec: 40, * indicesRecoveryMaxConcurrentFileChunks: 2, * actionAutoCreateIndexEnabled: true, * actionDestructiveRequiresName: false, * enableSecurityAudit: false, * threadPoolSearchSize: 1, * threadPoolSearchThrottledSize: 1, * threadPoolSearchThrottledQueueSize: 10, * threadPoolSearchQueueSize: 10, * threadPoolGetSize: 1, * threadPoolGetQueueSize: 10, * threadPoolAnalyzeSize: 1, * threadPoolAnalyzeQueueSize: 10, * threadPoolWriteSize: 1, * threadPoolWriteQueueSize: 10, * threadPoolForceMergeSize: 1, * overrideMainResponseVersion: false, * scriptMaxCompilationsRate: "use-context", * clusterMaxShardsPerNode: 100, * clusterRoutingAllocationNodeConcurrentRecoveries: 2, * pluginsAlertingFilterByBackendRolesEnabled: false, * reindexRemoteWhitelists: ["cloud.digitalocean.com:8080"], * }); * ``` * * ## Import * * A Opensearch database cluster's configuration can be imported using the `id` the parent cluster, e.g. * * ```sh * $ pulumi import digitalocean:index/databaseOpensearchConfig:DatabaseOpensearchConfig example 4b62829a-9c42-465b-aaa3-84051048e712 * ``` */ class DatabaseOpensearchConfig extends pulumi.CustomResource { /** * Get an existing DatabaseOpensearchConfig 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 DatabaseOpensearchConfig(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of DatabaseOpensearchConfig. 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'] === DatabaseOpensearchConfig.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["actionAutoCreateIndexEnabled"] = state?.actionAutoCreateIndexEnabled; resourceInputs["actionDestructiveRequiresName"] = state?.actionDestructiveRequiresName; resourceInputs["clusterId"] = state?.clusterId; resourceInputs["clusterMaxShardsPerNode"] = state?.clusterMaxShardsPerNode; resourceInputs["clusterRoutingAllocationNodeConcurrentRecoveries"] = state?.clusterRoutingAllocationNodeConcurrentRecoveries; resourceInputs["enableSecurityAudit"] = state?.enableSecurityAudit; resourceInputs["httpMaxContentLengthBytes"] = state?.httpMaxContentLengthBytes; resourceInputs["httpMaxHeaderSizeBytes"] = state?.httpMaxHeaderSizeBytes; resourceInputs["httpMaxInitialLineLengthBytes"] = state?.httpMaxInitialLineLengthBytes; resourceInputs["indicesFielddataCacheSizePercentage"] = state?.indicesFielddataCacheSizePercentage; resourceInputs["indicesMemoryIndexBufferSizePercentage"] = state?.indicesMemoryIndexBufferSizePercentage; resourceInputs["indicesMemoryMaxIndexBufferSizeMb"] = state?.indicesMemoryMaxIndexBufferSizeMb; resourceInputs["indicesMemoryMinIndexBufferSizeMb"] = state?.indicesMemoryMinIndexBufferSizeMb; resourceInputs["indicesQueriesCacheSizePercentage"] = state?.indicesQueriesCacheSizePercentage; resourceInputs["indicesQueryBoolMaxClauseCount"] = state?.indicesQueryBoolMaxClauseCount; resourceInputs["indicesRecoveryMaxConcurrentFileChunks"] = state?.indicesRecoveryMaxConcurrentFileChunks; resourceInputs["indicesRecoveryMaxMbPerSec"] = state?.indicesRecoveryMaxMbPerSec; resourceInputs["ismEnabled"] = state?.ismEnabled; resourceInputs["ismHistoryEnabled"] = state?.ismHistoryEnabled; resourceInputs["ismHistoryMaxAgeHours"] = state?.ismHistoryMaxAgeHours; resourceInputs["ismHistoryMaxDocs"] = state?.ismHistoryMaxDocs; resourceInputs["ismHistoryRolloverCheckPeriodHours"] = state?.ismHistoryRolloverCheckPeriodHours; resourceInputs["ismHistoryRolloverRetentionPeriodDays"] = state?.ismHistoryRolloverRetentionPeriodDays; resourceInputs["overrideMainResponseVersion"] = state?.overrideMainResponseVersion; resourceInputs["pluginsAlertingFilterByBackendRolesEnabled"] = state?.pluginsAlertingFilterByBackendRolesEnabled; resourceInputs["reindexRemoteWhitelists"] = state?.reindexRemoteWhitelists; resourceInputs["scriptMaxCompilationsRate"] = state?.scriptMaxCompilationsRate; resourceInputs["searchMaxBuckets"] = state?.searchMaxBuckets; resourceInputs["threadPoolAnalyzeQueueSize"] = state?.threadPoolAnalyzeQueueSize; resourceInputs["threadPoolAnalyzeSize"] = state?.threadPoolAnalyzeSize; resourceInputs["threadPoolForceMergeSize"] = state?.threadPoolForceMergeSize; resourceInputs["threadPoolGetQueueSize"] = state?.threadPoolGetQueueSize; resourceInputs["threadPoolGetSize"] = state?.threadPoolGetSize; resourceInputs["threadPoolSearchQueueSize"] = state?.threadPoolSearchQueueSize; resourceInputs["threadPoolSearchSize"] = state?.threadPoolSearchSize; resourceInputs["threadPoolSearchThrottledQueueSize"] = state?.threadPoolSearchThrottledQueueSize; resourceInputs["threadPoolSearchThrottledSize"] = state?.threadPoolSearchThrottledSize; resourceInputs["threadPoolWriteQueueSize"] = state?.threadPoolWriteQueueSize; resourceInputs["threadPoolWriteSize"] = state?.threadPoolWriteSize; } else { const args = argsOrState; if (args?.clusterId === undefined && !opts.urn) { throw new Error("Missing required property 'clusterId'"); } resourceInputs["actionAutoCreateIndexEnabled"] = args?.actionAutoCreateIndexEnabled; resourceInputs["actionDestructiveRequiresName"] = args?.actionDestructiveRequiresName; resourceInputs["clusterId"] = args?.clusterId; resourceInputs["clusterMaxShardsPerNode"] = args?.clusterMaxShardsPerNode; resourceInputs["clusterRoutingAllocationNodeConcurrentRecoveries"] = args?.clusterRoutingAllocationNodeConcurrentRecoveries; resourceInputs["enableSecurityAudit"] = args?.enableSecurityAudit; resourceInputs["httpMaxContentLengthBytes"] = args?.httpMaxContentLengthBytes; resourceInputs["httpMaxHeaderSizeBytes"] = args?.httpMaxHeaderSizeBytes; resourceInputs["httpMaxInitialLineLengthBytes"] = args?.httpMaxInitialLineLengthBytes; resourceInputs["indicesFielddataCacheSizePercentage"] = args?.indicesFielddataCacheSizePercentage; resourceInputs["indicesMemoryIndexBufferSizePercentage"] = args?.indicesMemoryIndexBufferSizePercentage; resourceInputs["indicesMemoryMaxIndexBufferSizeMb"] = args?.indicesMemoryMaxIndexBufferSizeMb; resourceInputs["indicesMemoryMinIndexBufferSizeMb"] = args?.indicesMemoryMinIndexBufferSizeMb; resourceInputs["indicesQueriesCacheSizePercentage"] = args?.indicesQueriesCacheSizePercentage; resourceInputs["indicesQueryBoolMaxClauseCount"] = args?.indicesQueryBoolMaxClauseCount; resourceInputs["indicesRecoveryMaxConcurrentFileChunks"] = args?.indicesRecoveryMaxConcurrentFileChunks; resourceInputs["indicesRecoveryMaxMbPerSec"] = args?.indicesRecoveryMaxMbPerSec; resourceInputs["ismEnabled"] = args?.ismEnabled; resourceInputs["ismHistoryEnabled"] = args?.ismHistoryEnabled; resourceInputs["ismHistoryMaxAgeHours"] = args?.ismHistoryMaxAgeHours; resourceInputs["ismHistoryMaxDocs"] = args?.ismHistoryMaxDocs; resourceInputs["ismHistoryRolloverCheckPeriodHours"] = args?.ismHistoryRolloverCheckPeriodHours; resourceInputs["ismHistoryRolloverRetentionPeriodDays"] = args?.ismHistoryRolloverRetentionPeriodDays; resourceInputs["overrideMainResponseVersion"] = args?.overrideMainResponseVersion; resourceInputs["pluginsAlertingFilterByBackendRolesEnabled"] = args?.pluginsAlertingFilterByBackendRolesEnabled; resourceInputs["reindexRemoteWhitelists"] = args?.reindexRemoteWhitelists; resourceInputs["scriptMaxCompilationsRate"] = args?.scriptMaxCompilationsRate; resourceInputs["searchMaxBuckets"] = args?.searchMaxBuckets; resourceInputs["threadPoolAnalyzeQueueSize"] = args?.threadPoolAnalyzeQueueSize; resourceInputs["threadPoolAnalyzeSize"] = args?.threadPoolAnalyzeSize; resourceInputs["threadPoolForceMergeSize"] = args?.threadPoolForceMergeSize; resourceInputs["threadPoolGetQueueSize"] = args?.threadPoolGetQueueSize; resourceInputs["threadPoolGetSize"] = args?.threadPoolGetSize; resourceInputs["threadPoolSearchQueueSize"] = args?.threadPoolSearchQueueSize; resourceInputs["threadPoolSearchSize"] = args?.threadPoolSearchSize; resourceInputs["threadPoolSearchThrottledQueueSize"] = args?.threadPoolSearchThrottledQueueSize; resourceInputs["threadPoolSearchThrottledSize"] = args?.threadPoolSearchThrottledSize; resourceInputs["threadPoolWriteQueueSize"] = args?.threadPoolWriteQueueSize; resourceInputs["threadPoolWriteSize"] = args?.threadPoolWriteSize; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DatabaseOpensearchConfig.__pulumiType, name, resourceInputs, opts); } } exports.DatabaseOpensearchConfig = DatabaseOpensearchConfig; /** @internal */ DatabaseOpensearchConfig.__pulumiType = 'digitalocean:index/databaseOpensearchConfig:DatabaseOpensearchConfig'; //# sourceMappingURL=databaseOpensearchConfig.js.map