UNPKG

@piclemx/pulumi-opensearch

Version:

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

127 lines 4.44 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.AuditConfig = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as opensearch from "@piclemx/pulumi-opensearch"; * * const test = new opensearch.AuditConfig("test", { * audit: { * disabledRestCategories: [ * "GRANTED_PRIVILEGES", * "AUTHENTICATED", * ], * disabledTransportCategories: [ * "GRANTED_PRIVILEGES", * "AUTHENTICATED", * ], * enableRest: true, * enableTransport: true, * excludeSensitiveHeaders: true, * ignoreRequests: [ * "SearchRequest", * "indices:data/read/*", * "/_cluster/health", * ], * ignoreUsers: ["dashboardserver"], * logRequestBody: true, * resolveBulkRequests: true, * resolveIndices: true, * }, * compliance: { * enabled: true, * externalConfig: false, * internalConfig: true, * readIgnoreUsers: ["read-ignore-1"], * readMetadataOnly: true, * readWatchedFields: [ * { * fields: [ * "field-1", * "field-2", * ], * index: "read-index-1", * }, * { * fields: ["field-3"], * index: "read-index-2", * }, * ], * writeIgnoreUsers: ["write-ignore-1"], * writeLogDiffs: false, * writeMetadataOnly: true, * writeWatchedIndices: [ * "write-index-1", * "write-index-2", * "log-*", * "*", * ], * }, * enabled: true, * }); * ``` * * ## Import * * Import by name * * ```sh * $ pulumi import opensearch:index/auditConfig:AuditConfig test_config my-config * ``` */ class AuditConfig extends pulumi.CustomResource { /** * Get an existing AuditConfig 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 AuditConfig(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of AuditConfig. 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'] === AuditConfig.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["audit"] = state ? state.audit : undefined; resourceInputs["compliance"] = state ? state.compliance : undefined; resourceInputs["enabled"] = state ? state.enabled : undefined; } else { const args = argsOrState; if ((!args || args.enabled === undefined) && !opts.urn) { throw new Error("Missing required property 'enabled'"); } resourceInputs["audit"] = args ? args.audit : undefined; resourceInputs["compliance"] = args ? args.compliance : undefined; resourceInputs["enabled"] = args ? args.enabled : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(AuditConfig.__pulumiType, name, resourceInputs, opts); } } exports.AuditConfig = AuditConfig; /** @internal */ AuditConfig.__pulumiType = 'opensearch:index/auditConfig:AuditConfig'; //# sourceMappingURL=auditConfig.js.map