1. Packages
  2. Databricks
  3. API Docs
  4. UserInstanceProfile
Databricks v1.35.0 published on Friday, Mar 29, 2024 by Pulumi

databricks.UserInstanceProfile

Explore with Pulumi AI

databricks logo
Databricks v1.35.0 published on Friday, Mar 29, 2024 by Pulumi

    Deprecated Please rewrite with databricks_user_role. This resource will be removed in v0.5.x

    This resource allows you to attach databricks.InstanceProfile (AWS) to databricks_user.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const instanceProfile = new databricks.InstanceProfile("instanceProfile", {instanceProfileArn: "my_instance_profile_arn"});
    const myUser = new databricks.User("myUser", {userName: "me@example.com"});
    const myUserInstanceProfile = new databricks.UserInstanceProfile("myUserInstanceProfile", {
        userId: myUser.id,
        instanceProfileId: instanceProfile.id,
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    instance_profile = databricks.InstanceProfile("instanceProfile", instance_profile_arn="my_instance_profile_arn")
    my_user = databricks.User("myUser", user_name="me@example.com")
    my_user_instance_profile = databricks.UserInstanceProfile("myUserInstanceProfile",
        user_id=my_user.id,
        instance_profile_id=instance_profile.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		instanceProfile, err := databricks.NewInstanceProfile(ctx, "instanceProfile", &databricks.InstanceProfileArgs{
    			InstanceProfileArn: pulumi.String("my_instance_profile_arn"),
    		})
    		if err != nil {
    			return err
    		}
    		myUser, err := databricks.NewUser(ctx, "myUser", &databricks.UserArgs{
    			UserName: pulumi.String("me@example.com"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = databricks.NewUserInstanceProfile(ctx, "myUserInstanceProfile", &databricks.UserInstanceProfileArgs{
    			UserId:            myUser.ID(),
    			InstanceProfileId: instanceProfile.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var instanceProfile = new Databricks.InstanceProfile("instanceProfile", new()
        {
            InstanceProfileArn = "my_instance_profile_arn",
        });
    
        var myUser = new Databricks.User("myUser", new()
        {
            UserName = "me@example.com",
        });
    
        var myUserInstanceProfile = new Databricks.UserInstanceProfile("myUserInstanceProfile", new()
        {
            UserId = myUser.Id,
            InstanceProfileId = instanceProfile.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.InstanceProfile;
    import com.pulumi.databricks.InstanceProfileArgs;
    import com.pulumi.databricks.User;
    import com.pulumi.databricks.UserArgs;
    import com.pulumi.databricks.UserInstanceProfile;
    import com.pulumi.databricks.UserInstanceProfileArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var instanceProfile = new InstanceProfile("instanceProfile", InstanceProfileArgs.builder()        
                .instanceProfileArn("my_instance_profile_arn")
                .build());
    
            var myUser = new User("myUser", UserArgs.builder()        
                .userName("me@example.com")
                .build());
    
            var myUserInstanceProfile = new UserInstanceProfile("myUserInstanceProfile", UserInstanceProfileArgs.builder()        
                .userId(myUser.id())
                .instanceProfileId(instanceProfile.id())
                .build());
    
        }
    }
    
    resources:
      instanceProfile:
        type: databricks:InstanceProfile
        properties:
          instanceProfileArn: my_instance_profile_arn
      myUser:
        type: databricks:User
        properties:
          userName: me@example.com
      myUserInstanceProfile:
        type: databricks:UserInstanceProfile
        properties:
          userId: ${myUser.id}
          instanceProfileId: ${instanceProfile.id}
    

    The following resources are often used in the same context:

    • End to end workspace management guide.
    • databricks.GroupInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_group.
    • databricks.GroupMember to attach users and groups as group members.
    • databricks.InstanceProfile to manage AWS EC2 instance profiles that users can launch databricks.Cluster and access data, like databricks_mount.
    • databricks.User to manage users, that could be added to databricks.Group within the workspace.
    • databricks.User data to retrieve information about databricks_user.

    Create UserInstanceProfile Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new UserInstanceProfile(name: string, args: UserInstanceProfileArgs, opts?: CustomResourceOptions);
    @overload
    def UserInstanceProfile(resource_name: str,
                            args: UserInstanceProfileArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def UserInstanceProfile(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            instance_profile_id: Optional[str] = None,
                            user_id: Optional[str] = None)
    func NewUserInstanceProfile(ctx *Context, name string, args UserInstanceProfileArgs, opts ...ResourceOption) (*UserInstanceProfile, error)
    public UserInstanceProfile(string name, UserInstanceProfileArgs args, CustomResourceOptions? opts = null)
    public UserInstanceProfile(String name, UserInstanceProfileArgs args)
    public UserInstanceProfile(String name, UserInstanceProfileArgs args, CustomResourceOptions options)
    
    type: databricks:UserInstanceProfile
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args UserInstanceProfileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args UserInstanceProfileArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args UserInstanceProfileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UserInstanceProfileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UserInstanceProfileArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var userInstanceProfileResource = new Databricks.UserInstanceProfile("userInstanceProfileResource", new()
    {
        InstanceProfileId = "string",
        UserId = "string",
    });
    
    example, err := databricks.NewUserInstanceProfile(ctx, "userInstanceProfileResource", &databricks.UserInstanceProfileArgs{
    	InstanceProfileId: pulumi.String("string"),
    	UserId:            pulumi.String("string"),
    })
    
    var userInstanceProfileResource = new UserInstanceProfile("userInstanceProfileResource", UserInstanceProfileArgs.builder()        
        .instanceProfileId("string")
        .userId("string")
        .build());
    
    user_instance_profile_resource = databricks.UserInstanceProfile("userInstanceProfileResource",
        instance_profile_id="string",
        user_id="string")
    
    const userInstanceProfileResource = new databricks.UserInstanceProfile("userInstanceProfileResource", {
        instanceProfileId: "string",
        userId: "string",
    });
    
    type: databricks:UserInstanceProfile
    properties:
        instanceProfileId: string
        userId: string
    

    UserInstanceProfile Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The UserInstanceProfile resource accepts the following input properties:

    InstanceProfileId string
    This is the id of the instance profile resource.
    UserId string
    This is the id of the user resource.
    InstanceProfileId string
    This is the id of the instance profile resource.
    UserId string
    This is the id of the user resource.
    instanceProfileId String
    This is the id of the instance profile resource.
    userId String
    This is the id of the user resource.
    instanceProfileId string
    This is the id of the instance profile resource.
    userId string
    This is the id of the user resource.
    instance_profile_id str
    This is the id of the instance profile resource.
    user_id str
    This is the id of the user resource.
    instanceProfileId String
    This is the id of the instance profile resource.
    userId String
    This is the id of the user resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the UserInstanceProfile resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing UserInstanceProfile Resource

    Get an existing UserInstanceProfile resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: UserInstanceProfileState, opts?: CustomResourceOptions): UserInstanceProfile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            instance_profile_id: Optional[str] = None,
            user_id: Optional[str] = None) -> UserInstanceProfile
    func GetUserInstanceProfile(ctx *Context, name string, id IDInput, state *UserInstanceProfileState, opts ...ResourceOption) (*UserInstanceProfile, error)
    public static UserInstanceProfile Get(string name, Input<string> id, UserInstanceProfileState? state, CustomResourceOptions? opts = null)
    public static UserInstanceProfile get(String name, Output<String> id, UserInstanceProfileState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    InstanceProfileId string
    This is the id of the instance profile resource.
    UserId string
    This is the id of the user resource.
    InstanceProfileId string
    This is the id of the instance profile resource.
    UserId string
    This is the id of the user resource.
    instanceProfileId String
    This is the id of the instance profile resource.
    userId String
    This is the id of the user resource.
    instanceProfileId string
    This is the id of the instance profile resource.
    userId string
    This is the id of the user resource.
    instance_profile_id str
    This is the id of the instance profile resource.
    user_id str
    This is the id of the user resource.
    instanceProfileId String
    This is the id of the instance profile resource.
    userId String
    This is the id of the user resource.

    Import

    -> Note Importing this resource is not currently supported.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Databricks v1.35.0 published on Friday, Mar 29, 2024 by Pulumi