UNPKG

@pulumi/yandex

Version:

A Pulumi package for creating and managing yandex cloud resources.

98 lines 5.31 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.MdbElasticSearchCluster = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages a Elasticsearch cluster within the Yandex.Cloud. For more information, see * [the official documentation](https://cloud.yandex.com/docs/managed-elasticsearch/concepts). * * ## Import * * A cluster can be imported using the `id` of the resource, e.g. * * ```sh * $ pulumi import yandex:index/mdbElasticSearchCluster:MdbElasticSearchCluster foo cluster_id * ``` */ class MdbElasticSearchCluster extends pulumi.CustomResource { constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["config"] = state ? state.config : undefined; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["deletionProtection"] = state ? state.deletionProtection : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["environment"] = state ? state.environment : undefined; resourceInputs["folderId"] = state ? state.folderId : undefined; resourceInputs["health"] = state ? state.health : undefined; resourceInputs["hosts"] = state ? state.hosts : undefined; resourceInputs["labels"] = state ? state.labels : undefined; resourceInputs["maintenanceWindow"] = state ? state.maintenanceWindow : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["networkId"] = state ? state.networkId : undefined; resourceInputs["securityGroupIds"] = state ? state.securityGroupIds : undefined; resourceInputs["serviceAccountId"] = state ? state.serviceAccountId : undefined; resourceInputs["status"] = state ? state.status : undefined; } else { const args = argsOrState; if ((!args || args.config === undefined) && !opts.urn) { throw new Error("Missing required property 'config'"); } if ((!args || args.environment === undefined) && !opts.urn) { throw new Error("Missing required property 'environment'"); } if ((!args || args.networkId === undefined) && !opts.urn) { throw new Error("Missing required property 'networkId'"); } resourceInputs["config"] = args ? args.config : undefined; resourceInputs["deletionProtection"] = args ? args.deletionProtection : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["environment"] = args ? args.environment : undefined; resourceInputs["folderId"] = args ? args.folderId : undefined; resourceInputs["hosts"] = args ? args.hosts : undefined; resourceInputs["labels"] = args ? args.labels : undefined; resourceInputs["maintenanceWindow"] = args ? args.maintenanceWindow : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["networkId"] = args ? args.networkId : undefined; resourceInputs["securityGroupIds"] = args ? args.securityGroupIds : undefined; resourceInputs["serviceAccountId"] = args ? args.serviceAccountId : undefined; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["health"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MdbElasticSearchCluster.__pulumiType, name, resourceInputs, opts); } /** * Get an existing MdbElasticSearchCluster 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 MdbElasticSearchCluster(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MdbElasticSearchCluster. 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'] === MdbElasticSearchCluster.__pulumiType; } } exports.MdbElasticSearchCluster = MdbElasticSearchCluster; /** @internal */ MdbElasticSearchCluster.__pulumiType = 'yandex:index/mdbElasticSearchCluster:MdbElasticSearchCluster'; //# sourceMappingURL=mdbElasticSearchCluster.js.map