UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

108 lines 4.87 kB
"use strict"; // *** 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.SecretAcl = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Create or overwrite the ACL associated with the given principal (user or group) on the specified databricks_secret_scope. Please consult [Secrets User Guide](https://docs.databricks.com/security/secrets/index.html#secrets-user-guide) for more details. * * ## Example Usage * * This way, data scientists can read the Publishing API key that is synchronized from, for example, Azure Key Vault. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const ds = new databricks.Group("ds", {displayName: "data-scientists"}); * const app = new databricks.SecretScope("app", {name: "app-secret-scope"}); * const mySecretAcl = new databricks.SecretAcl("my_secret_acl", { * principal: ds.displayName, * permission: "READ", * scope: app.name, * }); * const publishingApi = new databricks.Secret("publishing_api", { * key: "publishing_api", * stringValue: example.value, * scope: app.name, * }); * ``` * * ## 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.Permissions to manage [access control](https://docs.databricks.com/security/access-control/index.html) in Databricks workspace. * * 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.SecretScope to create [secret scopes](https://docs.databricks.com/security/secrets/index.html#secrets-user-guide) in Databricks workspace. * * ## Import * * The resource secret acl can be imported using `scopeName|||principalName` combination. * * bash * * ```sh * $ pulumi import databricks:index/secretAcl:SecretAcl object `scopeName|||principalName` * ``` */ class SecretAcl extends pulumi.CustomResource { /** * Get an existing SecretAcl 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 SecretAcl(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of SecretAcl. 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'] === SecretAcl.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["permission"] = state ? state.permission : undefined; resourceInputs["principal"] = state ? state.principal : undefined; resourceInputs["scope"] = state ? state.scope : undefined; } else { const args = argsOrState; if ((!args || args.permission === undefined) && !opts.urn) { throw new Error("Missing required property 'permission'"); } if ((!args || args.principal === undefined) && !opts.urn) { throw new Error("Missing required property 'principal'"); } if ((!args || args.scope === undefined) && !opts.urn) { throw new Error("Missing required property 'scope'"); } resourceInputs["permission"] = args ? args.permission : undefined; resourceInputs["principal"] = args ? args.principal : undefined; resourceInputs["scope"] = args ? args.scope : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(SecretAcl.__pulumiType, name, resourceInputs, opts); } } exports.SecretAcl = SecretAcl; /** @internal */ SecretAcl.__pulumiType = 'databricks:index/secretAcl:SecretAcl'; //# sourceMappingURL=secretAcl.js.map