UNPKG

@pulumi/yandex

Version:

A Pulumi package for creating and managing yandex cloud resources.

219 lines 10.9 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.MdbGreenplumCluster = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages a Greenplum cluster within the Yandex.Cloud. For more information, see * [the official documentation](https://cloud.yandex.ru/docs/managed-greenplum/). * * Please read [Pricing for Managed Service for Greenplum](https://cloud.yandex.ru/docs/managed-greenplum/) before using Greenplum cluster. * * Yandex Managed Service for Greenplum® is now in preview * * ## Example Usage * * Example of creating a Single Node Greenplum. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as yandex from "@pulumi/yandex"; * * const fooVpcNetwork = new yandex.VpcNetwork("fooVpcNetwork", {}); * const fooVpcSubnet = new yandex.VpcSubnet("fooVpcSubnet", { * zone: "ru-central1-a", * networkId: fooVpcNetwork.id, * v4CidrBlocks: ["10.5.0.0/24"], * }); * const test_sg_x = new yandex.VpcSecurityGroup("test-sg-x", { * networkId: fooVpcNetwork.id, * ingresses: [{ * protocol: "ANY", * description: "Allow incoming traffic from members of the same security group", * fromPort: 0, * toPort: 65535, * v4CidrBlocks: ["0.0.0.0/0"], * }], * egresses: [{ * protocol: "ANY", * description: "Allow outgoing traffic to members of the same security group", * fromPort: 0, * toPort: 65535, * v4CidrBlocks: ["0.0.0.0/0"], * }], * }); * const fooMdbGreenplumCluster = new yandex.MdbGreenplumCluster("fooMdbGreenplumCluster", { * description: "test greenplum cluster", * environment: "PRESTABLE", * networkId: fooVpcNetwork.id, * zoneId: "ru-central1-a", * subnetId: fooVpcSubnet.id, * assignPublicIp: true, * version: "6.17", * masterHostCount: 2, * segmentHostCount: 5, * segmentInHost: 1, * masterSubcluster: { * resources: { * resourcePresetId: "s2.micro", * diskSize: 24, * diskTypeId: "network-ssd", * }, * }, * segmentSubcluster: { * resources: { * resourcePresetId: "s2.micro", * diskSize: 24, * diskTypeId: "network-ssd", * }, * }, * access: { * webSql: true, * }, * userName: "admin_user", * userPassword: "your_super_secret_password", * securityGroupIds: [test_sg_x.id], * }); * ``` * * ## Import * * A cluster can be imported using the `id` of the resource, e.g. * * ```sh * $ pulumi import yandex:index/mdbGreenplumCluster:MdbGreenplumCluster foo cluster_id * ``` */ class MdbGreenplumCluster extends pulumi.CustomResource { constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["access"] = state ? state.access : undefined; resourceInputs["assignPublicIp"] = state ? state.assignPublicIp : undefined; resourceInputs["backupWindowStart"] = state ? state.backupWindowStart : 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["labels"] = state ? state.labels : undefined; resourceInputs["masterHostCount"] = state ? state.masterHostCount : undefined; resourceInputs["masterHosts"] = state ? state.masterHosts : undefined; resourceInputs["masterSubcluster"] = state ? state.masterSubcluster : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["networkId"] = state ? state.networkId : undefined; resourceInputs["securityGroupIds"] = state ? state.securityGroupIds : undefined; resourceInputs["segmentHostCount"] = state ? state.segmentHostCount : undefined; resourceInputs["segmentHosts"] = state ? state.segmentHosts : undefined; resourceInputs["segmentInHost"] = state ? state.segmentInHost : undefined; resourceInputs["segmentSubcluster"] = state ? state.segmentSubcluster : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["subnetId"] = state ? state.subnetId : undefined; resourceInputs["userName"] = state ? state.userName : undefined; resourceInputs["userPassword"] = state ? state.userPassword : undefined; resourceInputs["version"] = state ? state.version : undefined; resourceInputs["zone"] = state ? state.zone : undefined; } else { const args = argsOrState; if ((!args || args.assignPublicIp === undefined) && !opts.urn) { throw new Error("Missing required property 'assignPublicIp'"); } if ((!args || args.environment === undefined) && !opts.urn) { throw new Error("Missing required property 'environment'"); } if ((!args || args.masterHostCount === undefined) && !opts.urn) { throw new Error("Missing required property 'masterHostCount'"); } if ((!args || args.masterSubcluster === undefined) && !opts.urn) { throw new Error("Missing required property 'masterSubcluster'"); } if ((!args || args.networkId === undefined) && !opts.urn) { throw new Error("Missing required property 'networkId'"); } if ((!args || args.segmentHostCount === undefined) && !opts.urn) { throw new Error("Missing required property 'segmentHostCount'"); } if ((!args || args.segmentInHost === undefined) && !opts.urn) { throw new Error("Missing required property 'segmentInHost'"); } if ((!args || args.segmentSubcluster === undefined) && !opts.urn) { throw new Error("Missing required property 'segmentSubcluster'"); } if ((!args || args.subnetId === undefined) && !opts.urn) { throw new Error("Missing required property 'subnetId'"); } if ((!args || args.userName === undefined) && !opts.urn) { throw new Error("Missing required property 'userName'"); } if ((!args || args.userPassword === undefined) && !opts.urn) { throw new Error("Missing required property 'userPassword'"); } if ((!args || args.version === undefined) && !opts.urn) { throw new Error("Missing required property 'version'"); } if ((!args || args.zone === undefined) && !opts.urn) { throw new Error("Missing required property 'zone'"); } resourceInputs["access"] = args ? args.access : undefined; resourceInputs["assignPublicIp"] = args ? args.assignPublicIp : undefined; resourceInputs["backupWindowStart"] = args ? args.backupWindowStart : 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["labels"] = args ? args.labels : undefined; resourceInputs["masterHostCount"] = args ? args.masterHostCount : undefined; resourceInputs["masterSubcluster"] = args ? args.masterSubcluster : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["networkId"] = args ? args.networkId : undefined; resourceInputs["securityGroupIds"] = args ? args.securityGroupIds : undefined; resourceInputs["segmentHostCount"] = args ? args.segmentHostCount : undefined; resourceInputs["segmentInHost"] = args ? args.segmentInHost : undefined; resourceInputs["segmentSubcluster"] = args ? args.segmentSubcluster : undefined; resourceInputs["subnetId"] = args ? args.subnetId : undefined; resourceInputs["userName"] = args ? args.userName : undefined; resourceInputs["userPassword"] = args ? args.userPassword : undefined; resourceInputs["version"] = args ? args.version : undefined; resourceInputs["zone"] = args ? args.zone : undefined; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["health"] = undefined /*out*/; resourceInputs["masterHosts"] = undefined /*out*/; resourceInputs["segmentHosts"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MdbGreenplumCluster.__pulumiType, name, resourceInputs, opts); } /** * Get an existing MdbGreenplumCluster 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 MdbGreenplumCluster(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MdbGreenplumCluster. 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'] === MdbGreenplumCluster.__pulumiType; } } exports.MdbGreenplumCluster = MdbGreenplumCluster; /** @internal */ MdbGreenplumCluster.__pulumiType = 'yandex:index/mdbGreenplumCluster:MdbGreenplumCluster'; //# sourceMappingURL=mdbGreenplumCluster.js.map