@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
100 lines • 4.01 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.DefaultNamespaceSetting = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* The `databricks.DefaultNamespaceSetting` resource allows you to operate the setting configuration for the default namespace in the Databricks workspace.
*
* > This resource can only be used with a workspace-level provider!
*
* 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`:
*
* hcl
*
* import {
*
* to = databricks_default_namespace_setting.this
*
* id = "global"
*
* }
*
* Alternatively, when using `terraform` version 1.4 or earlier, import using the `pulumi import` command:
*
* 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, { ...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?.etag;
resourceInputs["namespace"] = state?.namespace;
resourceInputs["settingName"] = state?.settingName;
}
else {
const args = argsOrState;
if (args?.namespace === undefined && !opts.urn) {
throw new Error("Missing required property 'namespace'");
}
resourceInputs["etag"] = args?.etag;
resourceInputs["namespace"] = args?.namespace;
resourceInputs["settingName"] = args?.settingName;
}
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