UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

107 lines 5.04 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.GroupMember = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * This resource allows you to attach users, service_principal, and groups as group members. * * To attach members to groups in the Databricks account, the provider must be configured with `host = "https://accounts.cloud.databricks.com"` on AWS deployments or `host = "https://accounts.azuredatabricks.net"` and authenticate using AAD tokens on Azure deployments * * ## Example Usage * * After the following example, Bradley would have direct membership in group B and transitive membership in group A. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const a = new databricks.Group("a", {displayName: "A"}); * const b = new databricks.Group("b", {displayName: "B"}); * const ab = new databricks.GroupMember("ab", { * groupId: a.id, * memberId: b.id, * }); * const bradley = new databricks.User("bradley", {userName: "bradley@example.com"}); * const bb = new databricks.GroupMember("bb", { * groupId: b.id, * memberId: bradley.id, * }); * ``` * * ## Related Resources * * The following resources are often used in the same context: * * * End to end workspace management guide. * * databricks.Group to manage [groups in Databricks Workspace](https://docs.databricks.com/administration-guide/users-groups/groups.html) or [Account Console](https://accounts.cloud.databricks.com/) (for AWS deployments). * * databricks.Group data to retrieve information about databricks.Group members, entitlements and instance profiles. * * databricks.GroupInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_group. * * databricks.IpAccessList to allow access from [predefined IP ranges](https://docs.databricks.com/security/network/ip-access-list.html). * * databricks.ServicePrincipal to grant access to a workspace to an automation tool or application. * * databricks.User to [manage users](https://docs.databricks.com/administration-guide/users-groups/users.html), that could be added to databricks.Group within the workspace. * * databricks.User data to retrieve information about databricks_user. * * databricks.UserInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_user. * * ## Import * * You can import a `databricks_group_member` resource with name `my_group_member` like the following: * * bash * * ```sh * $ pulumi import databricks:index/groupMember:GroupMember my_group_member "<group_id>|<member_id>" * ``` */ class GroupMember extends pulumi.CustomResource { /** * Get an existing GroupMember 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 GroupMember(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of GroupMember. 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'] === GroupMember.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["groupId"] = state ? state.groupId : undefined; resourceInputs["memberId"] = state ? state.memberId : undefined; } else { const args = argsOrState; if ((!args || args.groupId === undefined) && !opts.urn) { throw new Error("Missing required property 'groupId'"); } if ((!args || args.memberId === undefined) && !opts.urn) { throw new Error("Missing required property 'memberId'"); } resourceInputs["groupId"] = args ? args.groupId : undefined; resourceInputs["memberId"] = args ? args.memberId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(GroupMember.__pulumiType, name, resourceInputs, opts); } } exports.GroupMember = GroupMember; /** @internal */ GroupMember.__pulumiType = 'databricks:index/groupMember:GroupMember'; //# sourceMappingURL=groupMember.js.map