UNPKG

@piclemx/pulumi-opensearch

Version:

A Pulumi package for creating and managing Opensearch resources. Based on terraform-provider-opensearch: version v2.2.1

204 lines 14.6 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Index = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides an OpenSearch index resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as opensearch from "@piclemx/pulumi-opensearch"; * * // Create a simple index * const test_simple_index = new opensearch.Index("test-simple-index", { * mappings: `{ * "properties": { * "name": { * "type": "text" * } * } * } * * `, * numberOfReplicas: "1", * numberOfShards: "1", * }); * ``` * * ## Import * * Import by name * * ```sh * $ pulumi import opensearch:index/index:Index test terraform-test * ``` */ class Index extends pulumi.CustomResource { /** * Get an existing Index 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 Index(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Index. 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'] === Index.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["aliases"] = state ? state.aliases : undefined; resourceInputs["analysisAnalyzer"] = state ? state.analysisAnalyzer : undefined; resourceInputs["analysisCharFilter"] = state ? state.analysisCharFilter : undefined; resourceInputs["analysisFilter"] = state ? state.analysisFilter : undefined; resourceInputs["analysisNormalizer"] = state ? state.analysisNormalizer : undefined; resourceInputs["analysisTokenizer"] = state ? state.analysisTokenizer : undefined; resourceInputs["analyzeMaxTokenCount"] = state ? state.analyzeMaxTokenCount : undefined; resourceInputs["autoExpandReplicas"] = state ? state.autoExpandReplicas : undefined; resourceInputs["blocksMetadata"] = state ? state.blocksMetadata : undefined; resourceInputs["blocksRead"] = state ? state.blocksRead : undefined; resourceInputs["blocksReadOnly"] = state ? state.blocksReadOnly : undefined; resourceInputs["blocksReadOnlyAllowDelete"] = state ? state.blocksReadOnlyAllowDelete : undefined; resourceInputs["blocksWrite"] = state ? state.blocksWrite : undefined; resourceInputs["codec"] = state ? state.codec : undefined; resourceInputs["defaultPipeline"] = state ? state.defaultPipeline : undefined; resourceInputs["forceDestroy"] = state ? state.forceDestroy : undefined; resourceInputs["gcDeletes"] = state ? state.gcDeletes : undefined; resourceInputs["highlightMaxAnalyzedOffset"] = state ? state.highlightMaxAnalyzedOffset : undefined; resourceInputs["includeTypeName"] = state ? state.includeTypeName : undefined; resourceInputs["indexKnn"] = state ? state.indexKnn : undefined; resourceInputs["indexKnnAlgoParamEfSearch"] = state ? state.indexKnnAlgoParamEfSearch : undefined; resourceInputs["indexSimilarityDefault"] = state ? state.indexSimilarityDefault : undefined; resourceInputs["indexingSlowlogLevel"] = state ? state.indexingSlowlogLevel : undefined; resourceInputs["indexingSlowlogSource"] = state ? state.indexingSlowlogSource : undefined; resourceInputs["indexingSlowlogThresholdIndexDebug"] = state ? state.indexingSlowlogThresholdIndexDebug : undefined; resourceInputs["indexingSlowlogThresholdIndexInfo"] = state ? state.indexingSlowlogThresholdIndexInfo : undefined; resourceInputs["indexingSlowlogThresholdIndexTrace"] = state ? state.indexingSlowlogThresholdIndexTrace : undefined; resourceInputs["indexingSlowlogThresholdIndexWarn"] = state ? state.indexingSlowlogThresholdIndexWarn : undefined; resourceInputs["loadFixedBitsetFiltersEagerly"] = state ? state.loadFixedBitsetFiltersEagerly : undefined; resourceInputs["mappings"] = state ? state.mappings : undefined; resourceInputs["maxDocvalueFieldsSearch"] = state ? state.maxDocvalueFieldsSearch : undefined; resourceInputs["maxInnerResultWindow"] = state ? state.maxInnerResultWindow : undefined; resourceInputs["maxNgramDiff"] = state ? state.maxNgramDiff : undefined; resourceInputs["maxRefreshListeners"] = state ? state.maxRefreshListeners : undefined; resourceInputs["maxRegexLength"] = state ? state.maxRegexLength : undefined; resourceInputs["maxRescoreWindow"] = state ? state.maxRescoreWindow : undefined; resourceInputs["maxResultWindow"] = state ? state.maxResultWindow : undefined; resourceInputs["maxScriptFields"] = state ? state.maxScriptFields : undefined; resourceInputs["maxShingleDiff"] = state ? state.maxShingleDiff : undefined; resourceInputs["maxTermsCount"] = state ? state.maxTermsCount : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["numberOfReplicas"] = state ? state.numberOfReplicas : undefined; resourceInputs["numberOfRoutingShards"] = state ? state.numberOfRoutingShards : undefined; resourceInputs["numberOfShards"] = state ? state.numberOfShards : undefined; resourceInputs["refreshInterval"] = state ? state.refreshInterval : undefined; resourceInputs["rolloverAlias"] = state ? state.rolloverAlias : undefined; resourceInputs["routingAllocationEnable"] = state ? state.routingAllocationEnable : undefined; resourceInputs["routingPartitionSize"] = state ? state.routingPartitionSize : undefined; resourceInputs["routingRebalanceEnable"] = state ? state.routingRebalanceEnable : undefined; resourceInputs["searchIdleAfter"] = state ? state.searchIdleAfter : undefined; resourceInputs["searchSlowlogLevel"] = state ? state.searchSlowlogLevel : undefined; resourceInputs["searchSlowlogThresholdFetchDebug"] = state ? state.searchSlowlogThresholdFetchDebug : undefined; resourceInputs["searchSlowlogThresholdFetchInfo"] = state ? state.searchSlowlogThresholdFetchInfo : undefined; resourceInputs["searchSlowlogThresholdFetchTrace"] = state ? state.searchSlowlogThresholdFetchTrace : undefined; resourceInputs["searchSlowlogThresholdFetchWarn"] = state ? state.searchSlowlogThresholdFetchWarn : undefined; resourceInputs["searchSlowlogThresholdQueryDebug"] = state ? state.searchSlowlogThresholdQueryDebug : undefined; resourceInputs["searchSlowlogThresholdQueryInfo"] = state ? state.searchSlowlogThresholdQueryInfo : undefined; resourceInputs["searchSlowlogThresholdQueryTrace"] = state ? state.searchSlowlogThresholdQueryTrace : undefined; resourceInputs["searchSlowlogThresholdQueryWarn"] = state ? state.searchSlowlogThresholdQueryWarn : undefined; resourceInputs["shardCheckOnStartup"] = state ? state.shardCheckOnStartup : undefined; resourceInputs["sortField"] = state ? state.sortField : undefined; resourceInputs["sortOrder"] = state ? state.sortOrder : undefined; } else { const args = argsOrState; resourceInputs["aliases"] = args ? args.aliases : undefined; resourceInputs["analysisAnalyzer"] = args ? args.analysisAnalyzer : undefined; resourceInputs["analysisCharFilter"] = args ? args.analysisCharFilter : undefined; resourceInputs["analysisFilter"] = args ? args.analysisFilter : undefined; resourceInputs["analysisNormalizer"] = args ? args.analysisNormalizer : undefined; resourceInputs["analysisTokenizer"] = args ? args.analysisTokenizer : undefined; resourceInputs["analyzeMaxTokenCount"] = args ? args.analyzeMaxTokenCount : undefined; resourceInputs["autoExpandReplicas"] = args ? args.autoExpandReplicas : undefined; resourceInputs["blocksMetadata"] = args ? args.blocksMetadata : undefined; resourceInputs["blocksRead"] = args ? args.blocksRead : undefined; resourceInputs["blocksReadOnly"] = args ? args.blocksReadOnly : undefined; resourceInputs["blocksReadOnlyAllowDelete"] = args ? args.blocksReadOnlyAllowDelete : undefined; resourceInputs["blocksWrite"] = args ? args.blocksWrite : undefined; resourceInputs["codec"] = args ? args.codec : undefined; resourceInputs["defaultPipeline"] = args ? args.defaultPipeline : undefined; resourceInputs["forceDestroy"] = args ? args.forceDestroy : undefined; resourceInputs["gcDeletes"] = args ? args.gcDeletes : undefined; resourceInputs["highlightMaxAnalyzedOffset"] = args ? args.highlightMaxAnalyzedOffset : undefined; resourceInputs["includeTypeName"] = args ? args.includeTypeName : undefined; resourceInputs["indexKnn"] = args ? args.indexKnn : undefined; resourceInputs["indexKnnAlgoParamEfSearch"] = args ? args.indexKnnAlgoParamEfSearch : undefined; resourceInputs["indexSimilarityDefault"] = args ? args.indexSimilarityDefault : undefined; resourceInputs["indexingSlowlogLevel"] = args ? args.indexingSlowlogLevel : undefined; resourceInputs["indexingSlowlogSource"] = args ? args.indexingSlowlogSource : undefined; resourceInputs["indexingSlowlogThresholdIndexDebug"] = args ? args.indexingSlowlogThresholdIndexDebug : undefined; resourceInputs["indexingSlowlogThresholdIndexInfo"] = args ? args.indexingSlowlogThresholdIndexInfo : undefined; resourceInputs["indexingSlowlogThresholdIndexTrace"] = args ? args.indexingSlowlogThresholdIndexTrace : undefined; resourceInputs["indexingSlowlogThresholdIndexWarn"] = args ? args.indexingSlowlogThresholdIndexWarn : undefined; resourceInputs["loadFixedBitsetFiltersEagerly"] = args ? args.loadFixedBitsetFiltersEagerly : undefined; resourceInputs["mappings"] = args ? args.mappings : undefined; resourceInputs["maxDocvalueFieldsSearch"] = args ? args.maxDocvalueFieldsSearch : undefined; resourceInputs["maxInnerResultWindow"] = args ? args.maxInnerResultWindow : undefined; resourceInputs["maxNgramDiff"] = args ? args.maxNgramDiff : undefined; resourceInputs["maxRefreshListeners"] = args ? args.maxRefreshListeners : undefined; resourceInputs["maxRegexLength"] = args ? args.maxRegexLength : undefined; resourceInputs["maxRescoreWindow"] = args ? args.maxRescoreWindow : undefined; resourceInputs["maxResultWindow"] = args ? args.maxResultWindow : undefined; resourceInputs["maxScriptFields"] = args ? args.maxScriptFields : undefined; resourceInputs["maxShingleDiff"] = args ? args.maxShingleDiff : undefined; resourceInputs["maxTermsCount"] = args ? args.maxTermsCount : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["numberOfReplicas"] = args ? args.numberOfReplicas : undefined; resourceInputs["numberOfRoutingShards"] = args ? args.numberOfRoutingShards : undefined; resourceInputs["numberOfShards"] = args ? args.numberOfShards : undefined; resourceInputs["refreshInterval"] = args ? args.refreshInterval : undefined; resourceInputs["rolloverAlias"] = args ? args.rolloverAlias : undefined; resourceInputs["routingAllocationEnable"] = args ? args.routingAllocationEnable : undefined; resourceInputs["routingPartitionSize"] = args ? args.routingPartitionSize : undefined; resourceInputs["routingRebalanceEnable"] = args ? args.routingRebalanceEnable : undefined; resourceInputs["searchIdleAfter"] = args ? args.searchIdleAfter : undefined; resourceInputs["searchSlowlogLevel"] = args ? args.searchSlowlogLevel : undefined; resourceInputs["searchSlowlogThresholdFetchDebug"] = args ? args.searchSlowlogThresholdFetchDebug : undefined; resourceInputs["searchSlowlogThresholdFetchInfo"] = args ? args.searchSlowlogThresholdFetchInfo : undefined; resourceInputs["searchSlowlogThresholdFetchTrace"] = args ? args.searchSlowlogThresholdFetchTrace : undefined; resourceInputs["searchSlowlogThresholdFetchWarn"] = args ? args.searchSlowlogThresholdFetchWarn : undefined; resourceInputs["searchSlowlogThresholdQueryDebug"] = args ? args.searchSlowlogThresholdQueryDebug : undefined; resourceInputs["searchSlowlogThresholdQueryInfo"] = args ? args.searchSlowlogThresholdQueryInfo : undefined; resourceInputs["searchSlowlogThresholdQueryTrace"] = args ? args.searchSlowlogThresholdQueryTrace : undefined; resourceInputs["searchSlowlogThresholdQueryWarn"] = args ? args.searchSlowlogThresholdQueryWarn : undefined; resourceInputs["shardCheckOnStartup"] = args ? args.shardCheckOnStartup : undefined; resourceInputs["sortField"] = args ? args.sortField : undefined; resourceInputs["sortOrder"] = args ? args.sortOrder : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Index.__pulumiType, name, resourceInputs, opts); } } exports.Index = Index; /** @internal */ Index.__pulumiType = 'opensearch:index/index:Index'; //# sourceMappingURL=index_.js.map