@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
102 lines • 4.26 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.DatabaseInstance = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Database Instances are managed Postgres instances, composed of a primary Postgres compute instance and 0 or more read replica instances.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const _this = new databricks.DatabaseInstance("this", {
* name: "my-database-instance",
* capacity: "CU_2",
* });
* ```
*
* ## Import
*
* As of Pulumi v1.5, resources can be imported through configuration.
*
* hcl
*
* import {
*
* id = name
*
* to = databricks_database_instance.this
*
* }
*
* If you are using an older version of Pulumi, import the resource using the `pulumi import` command as follows:
*
* ```sh
* $ pulumi import databricks:index/databaseInstance:DatabaseInstance databricks_database_instance name
* ```
*/
class DatabaseInstance extends pulumi.CustomResource {
/**
* Get an existing DatabaseInstance 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 DatabaseInstance(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of DatabaseInstance. 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'] === DatabaseInstance.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["capacity"] = state ? state.capacity : undefined;
resourceInputs["creationTime"] = state ? state.creationTime : undefined;
resourceInputs["creator"] = state ? state.creator : undefined;
resourceInputs["effectiveStopped"] = state ? state.effectiveStopped : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["pgVersion"] = state ? state.pgVersion : undefined;
resourceInputs["readWriteDns"] = state ? state.readWriteDns : undefined;
resourceInputs["state"] = state ? state.state : undefined;
resourceInputs["stopped"] = state ? state.stopped : undefined;
resourceInputs["uid"] = state ? state.uid : undefined;
}
else {
const args = argsOrState;
resourceInputs["capacity"] = args ? args.capacity : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["stopped"] = args ? args.stopped : undefined;
resourceInputs["creationTime"] = undefined /*out*/;
resourceInputs["creator"] = undefined /*out*/;
resourceInputs["effectiveStopped"] = undefined /*out*/;
resourceInputs["pgVersion"] = undefined /*out*/;
resourceInputs["readWriteDns"] = undefined /*out*/;
resourceInputs["state"] = undefined /*out*/;
resourceInputs["uid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(DatabaseInstance.__pulumiType, name, resourceInputs, opts);
}
}
exports.DatabaseInstance = DatabaseInstance;
/** @internal */
DatabaseInstance.__pulumiType = 'databricks:index/databaseInstance:DatabaseInstance';
//# sourceMappingURL=databaseInstance.js.map