// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; import * as utilities from "./utilities"; export class DatabaseCluster extends pulumi.CustomResource { /** * Get an existing DatabaseCluster 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. */ public static get(name: string, id: pulumi.Input, state?: DatabaseClusterState, opts?: pulumi.CustomResourceOptions): DatabaseCluster { return new DatabaseCluster(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'timeweb-cloud:index/databaseCluster:DatabaseCluster'; /** * Returns true if the given object is an instance of DatabaseCluster. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ public static isInstance(obj: any): obj is DatabaseCluster { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === DatabaseCluster.__pulumiType; } /** * Availability zone for database cluster */ declare public readonly availabilityZone: pulumi.Output; /** * Configuration parameters for database cluster */ declare public readonly configParameters: pulumi.Output<{[key: string]: string} | undefined>; declare public readonly databaseClusterId: pulumi.Output; /** * Description for project */ declare public readonly description: pulumi.Output; /** * Information about database disk stats */ declare public /*out*/ readonly diskStats: pulumi.Output; /** * Hash type for database */ declare public readonly hashType: pulumi.Output; /** * Flag that shows allowability database only by external IP address */ declare public readonly isExternalIp: pulumi.Output; /** * Location for the server (`ru-1`, `ru-2`, `pl-1`, `kz-1`, etc.) */ declare public /*out*/ readonly location: pulumi.Output; /** * Name for database cluster */ declare public readonly name: pulumi.Output; /** * Network for database cluster */ declare public readonly network: pulumi.Output; declare public /*out*/ readonly networks: pulumi.Output; /** * Configuration parameters for database cluster */ declare public /*out*/ readonly parameters: pulumi.Output<{[key: string]: string}>; /** * Listening port for incoming connections */ declare public /*out*/ readonly port: pulumi.Output; /** * Preset ID for database cluster */ declare public readonly presetId: pulumi.Output; /** * Project ID for managed resource */ declare public readonly projectId: pulumi.Output; /** * Number of replication instances */ declare public readonly replications: pulumi.Output; /** * Current status of database cluster (`started`, `starting`, `stopped`, `no_paid`) */ declare public /*out*/ readonly status: pulumi.Output; /** * Type of database cluster */ declare public readonly type: pulumi.Output; /** * Create a DatabaseCluster 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: DatabaseClusterArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: DatabaseClusterArgs | DatabaseClusterState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as DatabaseClusterState | undefined; resourceInputs["availabilityZone"] = state?.availabilityZone; resourceInputs["configParameters"] = state?.configParameters; resourceInputs["databaseClusterId"] = state?.databaseClusterId; resourceInputs["description"] = state?.description; resourceInputs["diskStats"] = state?.diskStats; resourceInputs["hashType"] = state?.hashType; resourceInputs["isExternalIp"] = state?.isExternalIp; resourceInputs["location"] = state?.location; resourceInputs["name"] = state?.name; resourceInputs["network"] = state?.network; resourceInputs["networks"] = state?.networks; resourceInputs["parameters"] = state?.parameters; resourceInputs["port"] = state?.port; resourceInputs["presetId"] = state?.presetId; resourceInputs["projectId"] = state?.projectId; resourceInputs["replications"] = state?.replications; resourceInputs["status"] = state?.status; resourceInputs["type"] = state?.type; } else { const args = argsOrState as DatabaseClusterArgs | undefined; if (args?.presetId === undefined && !opts.urn) { throw new Error("Missing required property 'presetId'"); } if (args?.type === undefined && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["availabilityZone"] = args?.availabilityZone; resourceInputs["configParameters"] = args?.configParameters; resourceInputs["databaseClusterId"] = args?.databaseClusterId; resourceInputs["description"] = args?.description; resourceInputs["hashType"] = args?.hashType; resourceInputs["isExternalIp"] = args?.isExternalIp; resourceInputs["name"] = args?.name; resourceInputs["network"] = args?.network; resourceInputs["presetId"] = args?.presetId; resourceInputs["projectId"] = args?.projectId; resourceInputs["replications"] = args?.replications; resourceInputs["type"] = args?.type; resourceInputs["diskStats"] = undefined /*out*/; resourceInputs["location"] = undefined /*out*/; resourceInputs["networks"] = undefined /*out*/; resourceInputs["parameters"] = undefined /*out*/; resourceInputs["port"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DatabaseCluster.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage()); } } /** * Input properties used for looking up and filtering DatabaseCluster resources. */ export interface DatabaseClusterState { /** * Availability zone for database cluster */ availabilityZone?: pulumi.Input; /** * Configuration parameters for database cluster */ configParameters?: pulumi.Input<{[key: string]: pulumi.Input}>; databaseClusterId?: pulumi.Input; /** * Description for project */ description?: pulumi.Input; /** * Information about database disk stats */ diskStats?: pulumi.Input[]>; /** * Hash type for database */ hashType?: pulumi.Input; /** * Flag that shows allowability database only by external IP address */ isExternalIp?: pulumi.Input; /** * Location for the server (`ru-1`, `ru-2`, `pl-1`, `kz-1`, etc.) */ location?: pulumi.Input; /** * Name for database cluster */ name?: pulumi.Input; /** * Network for database cluster */ network?: pulumi.Input; networks?: pulumi.Input[]>; /** * Configuration parameters for database cluster */ parameters?: pulumi.Input<{[key: string]: pulumi.Input}>; /** * Listening port for incoming connections */ port?: pulumi.Input; /** * Preset ID for database cluster */ presetId?: pulumi.Input; /** * Project ID for managed resource */ projectId?: pulumi.Input; /** * Number of replication instances */ replications?: pulumi.Input; /** * Current status of database cluster (`started`, `starting`, `stopped`, `no_paid`) */ status?: pulumi.Input; /** * Type of database cluster */ type?: pulumi.Input; } /** * The set of arguments for constructing a DatabaseCluster resource. */ export interface DatabaseClusterArgs { /** * Availability zone for database cluster */ availabilityZone?: pulumi.Input; /** * Configuration parameters for database cluster */ configParameters?: pulumi.Input<{[key: string]: pulumi.Input}>; databaseClusterId?: pulumi.Input; /** * Description for project */ description?: pulumi.Input; /** * Hash type for database */ hashType?: pulumi.Input; /** * Flag that shows allowability database only by external IP address */ isExternalIp?: pulumi.Input; /** * Name for database cluster */ name?: pulumi.Input; /** * Network for database cluster */ network?: pulumi.Input; /** * Preset ID for database cluster */ presetId: pulumi.Input; /** * Project ID for managed resource */ projectId?: pulumi.Input; /** * Number of replication instances */ replications?: pulumi.Input; /** * Type of database cluster */ type: pulumi.Input; }