@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
87 lines • 4.21 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.SecretScope = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Sometimes accessing data requires that you authenticate to external data sources through JDBC. Instead of directly entering your credentials into a notebook, use Databricks secrets to store your credentials and reference them in notebooks and jobs. Please consult [Secrets User Guide](https://docs.databricks.com/security/secrets/index.html#secrets-user-guide) for more details.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const _this = new databricks.SecretScope("this", {name: "terraform-demo-scope"});
* ```
*
* ## Related Resources
*
* The following resources are often used in the same context:
*
* * End to end workspace management guide.
* * databricks.Notebook to manage [Databricks Notebooks](https://docs.databricks.com/notebooks/index.html).
* * databricks.Repo to manage [Databricks Repos](https://docs.databricks.com/repos.html).
* * databricks.Secret to manage [secrets](https://docs.databricks.com/security/secrets/index.html#secrets-user-guide) in Databricks workspace.
* * databricks.SecretAcl to manage access to [secrets](https://docs.databricks.com/security/secrets/index.html#secrets-user-guide) in Databricks workspace.
*
* ## Import
*
* The secret resource scope can be imported using the scope name. `initial_manage_principal` state won't be imported, because the underlying API doesn't include it in the response.
*
* bash
*
* ```sh
* $ pulumi import databricks:index/secretScope:SecretScope object <scopeName>
* ```
*/
class SecretScope extends pulumi.CustomResource {
/**
* Get an existing SecretScope 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 SecretScope(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SecretScope. 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'] === SecretScope.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["backendType"] = state ? state.backendType : undefined;
resourceInputs["initialManagePrincipal"] = state ? state.initialManagePrincipal : undefined;
resourceInputs["keyvaultMetadata"] = state ? state.keyvaultMetadata : undefined;
resourceInputs["name"] = state ? state.name : undefined;
}
else {
const args = argsOrState;
resourceInputs["backendType"] = args ? args.backendType : undefined;
resourceInputs["initialManagePrincipal"] = args ? args.initialManagePrincipal : undefined;
resourceInputs["keyvaultMetadata"] = args ? args.keyvaultMetadata : undefined;
resourceInputs["name"] = args ? args.name : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SecretScope.__pulumiType, name, resourceInputs, opts);
}
}
exports.SecretScope = SecretScope;
/** @internal */
SecretScope.__pulumiType = 'databricks:index/secretScope:SecretScope';
//# sourceMappingURL=secretScope.js.map
;