import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "./types"; /** * Manages a MongoDB cluster within the Yandex.Cloud. For more information, see * [the official documentation](https://cloud.yandex.com/docs/managed-mongodb/concepts). * * ## Example Usage * * Example of creating a Single Node MongoDB. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as yandex from "@pulumi/yandex"; * * const fooVpcNetwork = new yandex.VpcNetwork("foo", {}); * const fooVpcSubnet = new yandex.VpcSubnet("foo", { * networkId: fooVpcNetwork.id, * v4CidrBlocks: ["10.1.0.0/24"], * zone: "ru-central1-a", * }); * const fooMdbMongodbCluster = new yandex.MdbMongodbCluster("foo", { * clusterConfig: { * version: "4.2", * }, * databases: [{ * name: "testdb", * }], * environment: "PRESTABLE", * hosts: [{ * subnetId: fooVpcSubnet.id, * zoneId: "ru-central1-a", * }], * labels: { * test_key: "test_value", * }, * maintenanceWindow: { * type: "ANYTIME", * }, * networkId: fooVpcNetwork.id, * resources: { * diskSize: 16, * diskTypeId: "network-hdd", * resourcePresetId: "b1.nano", * }, * users: [{ * name: "john", * password: "password", * permissions: [{ * databaseName: "testdb", * }], * }], * }); * ``` * * ## Import * * A cluster can be imported using the `id` of the resource, e.g. * * ```sh * $ pulumi import yandex:index/mdbMongodbCluster:MdbMongodbCluster foo cluster_id * ``` */ export declare class MdbMongodbCluster extends pulumi.CustomResource { /** * Get an existing MdbMongodbCluster 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: string, id: pulumi.Input, state?: MdbMongodbClusterState, opts?: pulumi.CustomResourceOptions): MdbMongodbCluster; /** * Returns true if the given object is an instance of MdbMongodbCluster. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is MdbMongodbCluster; /** * Configuration of the MongoDB subcluster. The structure is documented below. */ readonly clusterConfig: pulumi.Output; /** * The ID of the cluster. */ readonly clusterId: pulumi.Output; /** * Creation timestamp of the key. */ readonly createdAt: pulumi.Output; /** * A database of the MongoDB cluster. The structure is documented below. */ readonly databases: pulumi.Output; /** * Inhibits deletion of the cluster. Can be either `true` or `false`. * - - - */ readonly deletionProtection: pulumi.Output; /** * Description of the MongoDB cluster. */ readonly description: pulumi.Output; /** * Deployment environment of the MongoDB cluster. Can be either `PRESTABLE` or `PRODUCTION`. */ readonly environment: pulumi.Output; /** * The ID of the folder that the resource belongs to. If it * is not provided, the default provider folder is used. */ readonly folderId: pulumi.Output; /** * The health of the host. */ readonly health: pulumi.Output; /** * A host of the MongoDB cluster. The structure is documented below. */ readonly hosts: pulumi.Output; /** * A set of key/value label pairs to assign to the MongoDB cluster. */ readonly labels: pulumi.Output<{ [key: string]: string; }>; readonly maintenanceWindow: pulumi.Output; /** * The fully qualified domain name of the host. Computed on server side. */ readonly name: pulumi.Output; /** * ID of the network, to which the MongoDB cluster belongs. */ readonly networkId: pulumi.Output; /** * Resources allocated to hosts of the MongoDB cluster. The structure is documented below. */ readonly resources: pulumi.Output; /** * A set of ids of security groups assigned to hosts of the cluster. */ readonly securityGroupIds: pulumi.Output; /** * MongoDB Cluster mode enabled/disabled. */ readonly sharded: pulumi.Output; /** * Status of the cluster. Can be either `CREATING`, `STARTING`, `RUNNING`, `UPDATING`, `STOPPING`, `STOPPED`, `ERROR` or `STATUS_UNKNOWN`. * For more information see `status` field of JSON representation in [the official documentation](https://cloud.yandex.com/docs/managed-mongodb/api-ref/Cluster/). */ readonly status: pulumi.Output; /** * A user of the MongoDB cluster. The structure is documented below. */ readonly users: pulumi.Output; /** * Create a MdbMongodbCluster resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: MdbMongodbClusterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering MdbMongodbCluster resources. */ export interface MdbMongodbClusterState { /** * Configuration of the MongoDB subcluster. The structure is documented below. */ clusterConfig?: pulumi.Input; /** * The ID of the cluster. */ clusterId?: pulumi.Input; /** * Creation timestamp of the key. */ createdAt?: pulumi.Input; /** * A database of the MongoDB cluster. The structure is documented below. */ databases?: pulumi.Input[]>; /** * Inhibits deletion of the cluster. Can be either `true` or `false`. * - - - */ deletionProtection?: pulumi.Input; /** * Description of the MongoDB cluster. */ description?: pulumi.Input; /** * Deployment environment of the MongoDB cluster. Can be either `PRESTABLE` or `PRODUCTION`. */ environment?: pulumi.Input; /** * The ID of the folder that the resource belongs to. If it * is not provided, the default provider folder is used. */ folderId?: pulumi.Input; /** * The health of the host. */ health?: pulumi.Input; /** * A host of the MongoDB cluster. The structure is documented below. */ hosts?: pulumi.Input[]>; /** * A set of key/value label pairs to assign to the MongoDB cluster. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; maintenanceWindow?: pulumi.Input; /** * The fully qualified domain name of the host. Computed on server side. */ name?: pulumi.Input; /** * ID of the network, to which the MongoDB cluster belongs. */ networkId?: pulumi.Input; /** * Resources allocated to hosts of the MongoDB cluster. The structure is documented below. */ resources?: pulumi.Input; /** * A set of ids of security groups assigned to hosts of the cluster. */ securityGroupIds?: pulumi.Input[]>; /** * MongoDB Cluster mode enabled/disabled. */ sharded?: pulumi.Input; /** * Status of the cluster. Can be either `CREATING`, `STARTING`, `RUNNING`, `UPDATING`, `STOPPING`, `STOPPED`, `ERROR` or `STATUS_UNKNOWN`. * For more information see `status` field of JSON representation in [the official documentation](https://cloud.yandex.com/docs/managed-mongodb/api-ref/Cluster/). */ status?: pulumi.Input; /** * A user of the MongoDB cluster. The structure is documented below. */ users?: pulumi.Input[]>; } /** * The set of arguments for constructing a MdbMongodbCluster resource. */ export interface MdbMongodbClusterArgs { /** * Configuration of the MongoDB subcluster. The structure is documented below. */ clusterConfig: pulumi.Input; /** * The ID of the cluster. */ clusterId?: pulumi.Input; /** * A database of the MongoDB cluster. The structure is documented below. */ databases: pulumi.Input[]>; /** * Inhibits deletion of the cluster. Can be either `true` or `false`. * - - - */ deletionProtection?: pulumi.Input; /** * Description of the MongoDB cluster. */ description?: pulumi.Input; /** * Deployment environment of the MongoDB cluster. Can be either `PRESTABLE` or `PRODUCTION`. */ environment: pulumi.Input; /** * The ID of the folder that the resource belongs to. If it * is not provided, the default provider folder is used. */ folderId?: pulumi.Input; /** * A host of the MongoDB cluster. The structure is documented below. */ hosts: pulumi.Input[]>; /** * A set of key/value label pairs to assign to the MongoDB cluster. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; maintenanceWindow?: pulumi.Input; /** * The fully qualified domain name of the host. Computed on server side. */ name?: pulumi.Input; /** * ID of the network, to which the MongoDB cluster belongs. */ networkId: pulumi.Input; /** * Resources allocated to hosts of the MongoDB cluster. The structure is documented below. */ resources: pulumi.Input; /** * A set of ids of security groups assigned to hosts of the cluster. */ securityGroupIds?: pulumi.Input[]>; /** * A user of the MongoDB cluster. The structure is documented below. */ users: pulumi.Input[]>; }