@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
87 lines • 3.95 kB
JavaScript
// *** 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.DefaultNamespaceSetting = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* > This resource can only be used with a workspace-level provider!
*
* The `databricks.DefaultNamespaceSetting` resource allows you to operate the setting configuration for the default namespace in the Databricks workspace.
* Setting the default catalog for the workspace determines the catalog that is used when queries do not reference
* a fully qualified 3 level name. For example, if the default catalog is set to 'retail_prod' then a query
* 'SELECT * FROM myTable' would reference the object 'retail_prod.default.myTable'
* (the schema 'default' is always assumed).
* This setting requires a restart of clusters and SQL warehouses to take effect. Additionally, the default namespace only applies when using Unity Catalog-enabled compute.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const _this = new databricks.DefaultNamespaceSetting("this", {namespace: {
* value: "namespace_value",
* }});
* ```
*
* ## Import
*
* This resource can be imported by predefined name `global`:
*
* bash
*
* ```sh
* $ pulumi import databricks:index/defaultNamespaceSetting:DefaultNamespaceSetting this global
* ```
*/
class DefaultNamespaceSetting extends pulumi.CustomResource {
/**
* Get an existing DefaultNamespaceSetting 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 DefaultNamespaceSetting(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of DefaultNamespaceSetting. 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'] === DefaultNamespaceSetting.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["etag"] = state ? state.etag : undefined;
resourceInputs["namespace"] = state ? state.namespace : undefined;
resourceInputs["settingName"] = state ? state.settingName : undefined;
}
else {
const args = argsOrState;
if ((!args || args.namespace === undefined) && !opts.urn) {
throw new Error("Missing required property 'namespace'");
}
resourceInputs["etag"] = args ? args.etag : undefined;
resourceInputs["namespace"] = args ? args.namespace : undefined;
resourceInputs["settingName"] = args ? args.settingName : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(DefaultNamespaceSetting.__pulumiType, name, resourceInputs, opts);
}
}
exports.DefaultNamespaceSetting = DefaultNamespaceSetting;
/** @internal */
DefaultNamespaceSetting.__pulumiType = 'databricks:index/defaultNamespaceSetting:DefaultNamespaceSetting';
//# sourceMappingURL=defaultNamespaceSetting.js.map
;