UNPKG

@pulumi/databricks

Version:

A Pulumi package for creating and managing databricks cloud resources.

107 lines 5.03 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.GroupRole = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * This resource allows you to attach a role to databricks_group. This role could be a pre-defined role such as account admin, or an instance profile ARN. * * ## Example Usage * * Attach an instance profile to a group * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const instanceProfile = new databricks.InstanceProfile("instance_profile", {instanceProfileArn: "my_instance_profile_arn"}); * const myGroup = new databricks.Group("my_group", {displayName: "my_group_name"}); * const myGroupInstanceProfile = new databricks.GroupRole("my_group_instance_profile", { * groupId: myGroup.id, * role: instanceProfile.id, * }); * ``` * * Attach account admin role to an account-level group * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as databricks from "@pulumi/databricks"; * * const myGroup = new databricks.Group("my_group", {displayName: "my_group_name"}); * const myGroupAccountAdmin = new databricks.GroupRole("my_group_account_admin", { * groupId: myGroup.id, * role: "account_admin", * }); * ``` * * ## Related Resources * * The following resources are often used in the same context: * * * End to end workspace management guide. * * databricks.getAwsBucketPolicy data to configure a simple access policy for AWS S3 buckets, so that Databricks can access data in it. * * databricks.ClusterPolicy to create a databricks.Cluster policy, which limits the ability to create clusters based on a set of rules. * * 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.GroupMember to attach users and groups as group members. * * databricks.InstancePool to manage [instance pools](https://docs.databricks.com/clusters/instance-pools/index.html) to reduce cluster start and auto-scaling times by maintaining a set of idle, ready-to-use instances. * * databricks.InstanceProfile to manage AWS EC2 instance profiles that users can launch databricks.Cluster and access data, like databricks_mount. * * databricks.UserInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_user. * * ## Import * * !> Importing this resource is not currently supported. */ class GroupRole extends pulumi.CustomResource { /** * Get an existing GroupRole 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 GroupRole(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of GroupRole. 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'] === GroupRole.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["groupId"] = state ? state.groupId : undefined; resourceInputs["role"] = state ? state.role : undefined; } else { const args = argsOrState; if ((!args || args.groupId === undefined) && !opts.urn) { throw new Error("Missing required property 'groupId'"); } if ((!args || args.role === undefined) && !opts.urn) { throw new Error("Missing required property 'role'"); } resourceInputs["groupId"] = args ? args.groupId : undefined; resourceInputs["role"] = args ? args.role : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(GroupRole.__pulumiType, name, resourceInputs, opts); } } exports.GroupRole = GroupRole; /** @internal */ GroupRole.__pulumiType = 'databricks:index/groupRole:GroupRole'; //# sourceMappingURL=groupRole.js.map