UNPKG

@pulumi/digitalocean

Version:

A Pulumi package for creating and managing DigitalOcean cloud resources.

199 lines • 13.8 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, Object.assign(Object.assign({}, 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 ? state.actionAutoCreateIndexEnabled : undefined; resourceInputs["actionDestructiveRequiresName"] = state ? state.actionDestructiveRequiresName : undefined; resourceInputs["clusterId"] = state ? state.clusterId : undefined; resourceInputs["clusterMaxShardsPerNode"] = state ? state.clusterMaxShardsPerNode : undefined; resourceInputs["clusterRoutingAllocationNodeConcurrentRecoveries"] = state ? state.clusterRoutingAllocationNodeConcurrentRecoveries : undefined; resourceInputs["enableSecurityAudit"] = state ? state.enableSecurityAudit : undefined; resourceInputs["httpMaxContentLengthBytes"] = state ? state.httpMaxContentLengthBytes : undefined; resourceInputs["httpMaxHeaderSizeBytes"] = state ? state.httpMaxHeaderSizeBytes : undefined; resourceInputs["httpMaxInitialLineLengthBytes"] = state ? state.httpMaxInitialLineLengthBytes : undefined; resourceInputs["indicesFielddataCacheSizePercentage"] = state ? state.indicesFielddataCacheSizePercentage : undefined; resourceInputs["indicesMemoryIndexBufferSizePercentage"] = state ? state.indicesMemoryIndexBufferSizePercentage : undefined; resourceInputs["indicesMemoryMaxIndexBufferSizeMb"] = state ? state.indicesMemoryMaxIndexBufferSizeMb : undefined; resourceInputs["indicesMemoryMinIndexBufferSizeMb"] = state ? state.indicesMemoryMinIndexBufferSizeMb : undefined; resourceInputs["indicesQueriesCacheSizePercentage"] = state ? state.indicesQueriesCacheSizePercentage : undefined; resourceInputs["indicesQueryBoolMaxClauseCount"] = state ? state.indicesQueryBoolMaxClauseCount : undefined; resourceInputs["indicesRecoveryMaxConcurrentFileChunks"] = state ? state.indicesRecoveryMaxConcurrentFileChunks : undefined; resourceInputs["indicesRecoveryMaxMbPerSec"] = state ? state.indicesRecoveryMaxMbPerSec : undefined; resourceInputs["ismEnabled"] = state ? state.ismEnabled : undefined; resourceInputs["ismHistoryEnabled"] = state ? state.ismHistoryEnabled : undefined; resourceInputs["ismHistoryMaxAgeHours"] = state ? state.ismHistoryMaxAgeHours : undefined; resourceInputs["ismHistoryMaxDocs"] = state ? state.ismHistoryMaxDocs : undefined; resourceInputs["ismHistoryRolloverCheckPeriodHours"] = state ? state.ismHistoryRolloverCheckPeriodHours : undefined; resourceInputs["ismHistoryRolloverRetentionPeriodDays"] = state ? state.ismHistoryRolloverRetentionPeriodDays : undefined; resourceInputs["overrideMainResponseVersion"] = state ? state.overrideMainResponseVersion : undefined; resourceInputs["pluginsAlertingFilterByBackendRolesEnabled"] = state ? state.pluginsAlertingFilterByBackendRolesEnabled : undefined; resourceInputs["reindexRemoteWhitelists"] = state ? state.reindexRemoteWhitelists : undefined; resourceInputs["scriptMaxCompilationsRate"] = state ? state.scriptMaxCompilationsRate : undefined; resourceInputs["searchMaxBuckets"] = state ? state.searchMaxBuckets : undefined; resourceInputs["threadPoolAnalyzeQueueSize"] = state ? state.threadPoolAnalyzeQueueSize : undefined; resourceInputs["threadPoolAnalyzeSize"] = state ? state.threadPoolAnalyzeSize : undefined; resourceInputs["threadPoolForceMergeSize"] = state ? state.threadPoolForceMergeSize : undefined; resourceInputs["threadPoolGetQueueSize"] = state ? state.threadPoolGetQueueSize : undefined; resourceInputs["threadPoolGetSize"] = state ? state.threadPoolGetSize : undefined; resourceInputs["threadPoolSearchQueueSize"] = state ? state.threadPoolSearchQueueSize : undefined; resourceInputs["threadPoolSearchSize"] = state ? state.threadPoolSearchSize : undefined; resourceInputs["threadPoolSearchThrottledQueueSize"] = state ? state.threadPoolSearchThrottledQueueSize : undefined; resourceInputs["threadPoolSearchThrottledSize"] = state ? state.threadPoolSearchThrottledSize : undefined; resourceInputs["threadPoolWriteQueueSize"] = state ? state.threadPoolWriteQueueSize : undefined; resourceInputs["threadPoolWriteSize"] = state ? state.threadPoolWriteSize : undefined; } else { const args = argsOrState; if ((!args || args.clusterId === undefined) && !opts.urn) { throw new Error("Missing required property 'clusterId'"); } resourceInputs["actionAutoCreateIndexEnabled"] = args ? args.actionAutoCreateIndexEnabled : undefined; resourceInputs["actionDestructiveRequiresName"] = args ? args.actionDestructiveRequiresName : undefined; resourceInputs["clusterId"] = args ? args.clusterId : undefined; resourceInputs["clusterMaxShardsPerNode"] = args ? args.clusterMaxShardsPerNode : undefined; resourceInputs["clusterRoutingAllocationNodeConcurrentRecoveries"] = args ? args.clusterRoutingAllocationNodeConcurrentRecoveries : undefined; resourceInputs["enableSecurityAudit"] = args ? args.enableSecurityAudit : undefined; resourceInputs["httpMaxContentLengthBytes"] = args ? args.httpMaxContentLengthBytes : undefined; resourceInputs["httpMaxHeaderSizeBytes"] = args ? args.httpMaxHeaderSizeBytes : undefined; resourceInputs["httpMaxInitialLineLengthBytes"] = args ? args.httpMaxInitialLineLengthBytes : undefined; resourceInputs["indicesFielddataCacheSizePercentage"] = args ? args.indicesFielddataCacheSizePercentage : undefined; resourceInputs["indicesMemoryIndexBufferSizePercentage"] = args ? args.indicesMemoryIndexBufferSizePercentage : undefined; resourceInputs["indicesMemoryMaxIndexBufferSizeMb"] = args ? args.indicesMemoryMaxIndexBufferSizeMb : undefined; resourceInputs["indicesMemoryMinIndexBufferSizeMb"] = args ? args.indicesMemoryMinIndexBufferSizeMb : undefined; resourceInputs["indicesQueriesCacheSizePercentage"] = args ? args.indicesQueriesCacheSizePercentage : undefined; resourceInputs["indicesQueryBoolMaxClauseCount"] = args ? args.indicesQueryBoolMaxClauseCount : undefined; resourceInputs["indicesRecoveryMaxConcurrentFileChunks"] = args ? args.indicesRecoveryMaxConcurrentFileChunks : undefined; resourceInputs["indicesRecoveryMaxMbPerSec"] = args ? args.indicesRecoveryMaxMbPerSec : undefined; resourceInputs["ismEnabled"] = args ? args.ismEnabled : undefined; resourceInputs["ismHistoryEnabled"] = args ? args.ismHistoryEnabled : undefined; resourceInputs["ismHistoryMaxAgeHours"] = args ? args.ismHistoryMaxAgeHours : undefined; resourceInputs["ismHistoryMaxDocs"] = args ? args.ismHistoryMaxDocs : undefined; resourceInputs["ismHistoryRolloverCheckPeriodHours"] = args ? args.ismHistoryRolloverCheckPeriodHours : undefined; resourceInputs["ismHistoryRolloverRetentionPeriodDays"] = args ? args.ismHistoryRolloverRetentionPeriodDays : undefined; resourceInputs["overrideMainResponseVersion"] = args ? args.overrideMainResponseVersion : undefined; resourceInputs["pluginsAlertingFilterByBackendRolesEnabled"] = args ? args.pluginsAlertingFilterByBackendRolesEnabled : undefined; resourceInputs["reindexRemoteWhitelists"] = args ? args.reindexRemoteWhitelists : undefined; resourceInputs["scriptMaxCompilationsRate"] = args ? args.scriptMaxCompilationsRate : undefined; resourceInputs["searchMaxBuckets"] = args ? args.searchMaxBuckets : undefined; resourceInputs["threadPoolAnalyzeQueueSize"] = args ? args.threadPoolAnalyzeQueueSize : undefined; resourceInputs["threadPoolAnalyzeSize"] = args ? args.threadPoolAnalyzeSize : undefined; resourceInputs["threadPoolForceMergeSize"] = args ? args.threadPoolForceMergeSize : undefined; resourceInputs["threadPoolGetQueueSize"] = args ? args.threadPoolGetQueueSize : undefined; resourceInputs["threadPoolGetSize"] = args ? args.threadPoolGetSize : undefined; resourceInputs["threadPoolSearchQueueSize"] = args ? args.threadPoolSearchQueueSize : undefined; resourceInputs["threadPoolSearchSize"] = args ? args.threadPoolSearchSize : undefined; resourceInputs["threadPoolSearchThrottledQueueSize"] = args ? args.threadPoolSearchThrottledQueueSize : undefined; resourceInputs["threadPoolSearchThrottledSize"] = args ? args.threadPoolSearchThrottledSize : undefined; resourceInputs["threadPoolWriteQueueSize"] = args ? args.threadPoolWriteQueueSize : undefined; resourceInputs["threadPoolWriteSize"] = args ? args.threadPoolWriteSize : undefined; } 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