1. Packages
  2. Databricks Provider
  3. API Docs
  4. AccountSettingUserPreferenceV2
Databricks v1.83.0 published on Friday, Jan 23, 2026 by Pulumi
databricks logo
Databricks v1.83.0 published on Friday, Jan 23, 2026 by Pulumi

    Private Preview

    User preference is a configurable value that determines how a feature or behavior works for a specific user within the Databricks platform.

    See user settings-metadata API for list of user preferences that can be modified using this resource.

    Example Usage

    Setting an account user preference:

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const themeSetting = new databricks.index.AccountUserSettingV2("theme_setting", {
        userId: "<user-id>",
        name: "enableDarkMode",
        stringVal: {
            value: "dark",
        },
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    theme_setting = databricks.index.AccountUserSettingV2("theme_setting",
        user_id=<user-id>,
        name=enableDarkMode,
        string_val={
            value: dark,
        })
    
    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 {
    		_, err := databricks.NewAccountUserSettingV2(ctx, "theme_setting", &databricks.AccountUserSettingV2Args{
    			UserId: "<user-id>",
    			Name:   "enableDarkMode",
    			StringVal: map[string]interface{}{
    				"value": "dark",
    			},
    		})
    		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 themeSetting = new Databricks.Index.AccountUserSettingV2("theme_setting", new()
        {
            UserId = "<user-id>",
            Name = "enableDarkMode",
            StringVal = 
            {
                { "value", "dark" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.AccountUserSettingV2;
    import com.pulumi.databricks.AccountUserSettingV2Args;
    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 themeSetting = new AccountUserSettingV2("themeSetting", AccountUserSettingV2Args.builder()
                .userId("<user-id>")
                .name("enableDarkMode")
                .stringVal(Map.of("value", "dark"))
                .build());
    
        }
    }
    
    resources:
      themeSetting:
        type: databricks:AccountUserSettingV2
        name: theme_setting
        properties:
          userId: <user-id>
          name: enableDarkMode
          stringVal:
            value: dark
    

    Setting a boolean user preference:

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const enableLineNumbers = new databricks.index.AccountUserSettingV2("enable_line_numbers", {
        userId: "<user-id>",
        name: "enableLineNumbers",
        booleanVal: {
            value: true,
        },
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    enable_line_numbers = databricks.index.AccountUserSettingV2("enable_line_numbers",
        user_id=<user-id>,
        name=enableLineNumbers,
        boolean_val={
            value: True,
        })
    
    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 {
    		_, err := databricks.NewAccountUserSettingV2(ctx, "enable_line_numbers", &databricks.AccountUserSettingV2Args{
    			UserId: "<user-id>",
    			Name:   "enableLineNumbers",
    			BooleanVal: map[string]interface{}{
    				"value": true,
    			},
    		})
    		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 enableLineNumbers = new Databricks.Index.AccountUserSettingV2("enable_line_numbers", new()
        {
            UserId = "<user-id>",
            Name = "enableLineNumbers",
            BooleanVal = 
            {
                { "value", true },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.AccountUserSettingV2;
    import com.pulumi.databricks.AccountUserSettingV2Args;
    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 enableLineNumbers = new AccountUserSettingV2("enableLineNumbers", AccountUserSettingV2Args.builder()
                .userId("<user-id>")
                .name("enableLineNumbers")
                .booleanVal(Map.of("value", true))
                .build());
    
        }
    }
    
    resources:
      enableLineNumbers:
        type: databricks:AccountUserSettingV2
        name: enable_line_numbers
        properties:
          userId: <user-id>
          name: enableLineNumbers
          booleanVal:
            value: true
    

    Create AccountSettingUserPreferenceV2 Resource

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

    Constructor syntax

    new AccountSettingUserPreferenceV2(name: string, args?: AccountSettingUserPreferenceV2Args, opts?: CustomResourceOptions);
    @overload
    def AccountSettingUserPreferenceV2(resource_name: str,
                                       args: Optional[AccountSettingUserPreferenceV2Args] = None,
                                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def AccountSettingUserPreferenceV2(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       boolean_val: Optional[AccountSettingUserPreferenceV2BooleanValArgs] = None,
                                       name: Optional[str] = None,
                                       string_val: Optional[AccountSettingUserPreferenceV2StringValArgs] = None,
                                       user_id: Optional[str] = None)
    func NewAccountSettingUserPreferenceV2(ctx *Context, name string, args *AccountSettingUserPreferenceV2Args, opts ...ResourceOption) (*AccountSettingUserPreferenceV2, error)
    public AccountSettingUserPreferenceV2(string name, AccountSettingUserPreferenceV2Args? args = null, CustomResourceOptions? opts = null)
    public AccountSettingUserPreferenceV2(String name, AccountSettingUserPreferenceV2Args args)
    public AccountSettingUserPreferenceV2(String name, AccountSettingUserPreferenceV2Args args, CustomResourceOptions options)
    
    type: databricks:AccountSettingUserPreferenceV2
    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 AccountSettingUserPreferenceV2Args
    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 AccountSettingUserPreferenceV2Args
    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 AccountSettingUserPreferenceV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccountSettingUserPreferenceV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccountSettingUserPreferenceV2Args
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var accountSettingUserPreferenceV2Resource = new Databricks.AccountSettingUserPreferenceV2("accountSettingUserPreferenceV2Resource", new()
    {
        BooleanVal = new Databricks.Inputs.AccountSettingUserPreferenceV2BooleanValArgs
        {
            Value = false,
        },
        Name = "string",
        StringVal = new Databricks.Inputs.AccountSettingUserPreferenceV2StringValArgs
        {
            Value = "string",
        },
        UserId = "string",
    });
    
    example, err := databricks.NewAccountSettingUserPreferenceV2(ctx, "accountSettingUserPreferenceV2Resource", &databricks.AccountSettingUserPreferenceV2Args{
    	BooleanVal: &databricks.AccountSettingUserPreferenceV2BooleanValArgs{
    		Value: pulumi.Bool(false),
    	},
    	Name: pulumi.String("string"),
    	StringVal: &databricks.AccountSettingUserPreferenceV2StringValArgs{
    		Value: pulumi.String("string"),
    	},
    	UserId: pulumi.String("string"),
    })
    
    var accountSettingUserPreferenceV2Resource = new AccountSettingUserPreferenceV2("accountSettingUserPreferenceV2Resource", AccountSettingUserPreferenceV2Args.builder()
        .booleanVal(AccountSettingUserPreferenceV2BooleanValArgs.builder()
            .value(false)
            .build())
        .name("string")
        .stringVal(AccountSettingUserPreferenceV2StringValArgs.builder()
            .value("string")
            .build())
        .userId("string")
        .build());
    
    account_setting_user_preference_v2_resource = databricks.AccountSettingUserPreferenceV2("accountSettingUserPreferenceV2Resource",
        boolean_val={
            "value": False,
        },
        name="string",
        string_val={
            "value": "string",
        },
        user_id="string")
    
    const accountSettingUserPreferenceV2Resource = new databricks.AccountSettingUserPreferenceV2("accountSettingUserPreferenceV2Resource", {
        booleanVal: {
            value: false,
        },
        name: "string",
        stringVal: {
            value: "string",
        },
        userId: "string",
    });
    
    type: databricks:AccountSettingUserPreferenceV2
    properties:
        booleanVal:
            value: false
        name: string
        stringVal:
            value: string
        userId: string
    

    AccountSettingUserPreferenceV2 Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The AccountSettingUserPreferenceV2 resource accepts the following input properties:

    booleanVal Property Map
    name String
    Name of the setting
    stringVal Property Map
    userId String
    User ID of the user

    Outputs

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

    EffectiveBooleanVal AccountSettingUserPreferenceV2EffectiveBooleanVal
    (BooleanMessage)
    EffectiveStringVal AccountSettingUserPreferenceV2EffectiveStringVal
    (StringMessage)
    Id string
    The provider-assigned unique ID for this managed resource.
    EffectiveBooleanVal AccountSettingUserPreferenceV2EffectiveBooleanVal
    (BooleanMessage)
    EffectiveStringVal AccountSettingUserPreferenceV2EffectiveStringVal
    (StringMessage)
    Id string
    The provider-assigned unique ID for this managed resource.
    effectiveBooleanVal AccountSettingUserPreferenceV2EffectiveBooleanVal
    (BooleanMessage)
    effectiveStringVal AccountSettingUserPreferenceV2EffectiveStringVal
    (StringMessage)
    id String
    The provider-assigned unique ID for this managed resource.
    effectiveBooleanVal AccountSettingUserPreferenceV2EffectiveBooleanVal
    (BooleanMessage)
    effectiveStringVal AccountSettingUserPreferenceV2EffectiveStringVal
    (StringMessage)
    id string
    The provider-assigned unique ID for this managed resource.
    effective_boolean_val AccountSettingUserPreferenceV2EffectiveBooleanVal
    (BooleanMessage)
    effective_string_val AccountSettingUserPreferenceV2EffectiveStringVal
    (StringMessage)
    id str
    The provider-assigned unique ID for this managed resource.
    effectiveBooleanVal Property Map
    (BooleanMessage)
    effectiveStringVal Property Map
    (StringMessage)
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AccountSettingUserPreferenceV2 Resource

    Get an existing AccountSettingUserPreferenceV2 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?: AccountSettingUserPreferenceV2State, opts?: CustomResourceOptions): AccountSettingUserPreferenceV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            boolean_val: Optional[AccountSettingUserPreferenceV2BooleanValArgs] = None,
            effective_boolean_val: Optional[AccountSettingUserPreferenceV2EffectiveBooleanValArgs] = None,
            effective_string_val: Optional[AccountSettingUserPreferenceV2EffectiveStringValArgs] = None,
            name: Optional[str] = None,
            string_val: Optional[AccountSettingUserPreferenceV2StringValArgs] = None,
            user_id: Optional[str] = None) -> AccountSettingUserPreferenceV2
    func GetAccountSettingUserPreferenceV2(ctx *Context, name string, id IDInput, state *AccountSettingUserPreferenceV2State, opts ...ResourceOption) (*AccountSettingUserPreferenceV2, error)
    public static AccountSettingUserPreferenceV2 Get(string name, Input<string> id, AccountSettingUserPreferenceV2State? state, CustomResourceOptions? opts = null)
    public static AccountSettingUserPreferenceV2 get(String name, Output<String> id, AccountSettingUserPreferenceV2State state, CustomResourceOptions options)
    resources:  _:    type: databricks:AccountSettingUserPreferenceV2    get:      id: ${id}
    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:
    booleanVal Property Map
    effectiveBooleanVal Property Map
    (BooleanMessage)
    effectiveStringVal Property Map
    (StringMessage)
    name String
    Name of the setting
    stringVal Property Map
    userId String
    User ID of the user

    Supporting Types

    AccountSettingUserPreferenceV2BooleanVal, AccountSettingUserPreferenceV2BooleanValArgs

    Value bool
    Value bool
    value Boolean
    value boolean
    value bool
    value Boolean

    AccountSettingUserPreferenceV2EffectiveBooleanVal, AccountSettingUserPreferenceV2EffectiveBooleanValArgs

    Value bool
    Value bool
    value Boolean
    value boolean
    value bool
    value Boolean

    AccountSettingUserPreferenceV2EffectiveStringVal, AccountSettingUserPreferenceV2EffectiveStringValArgs

    Value string
    Value string
    value String
    value string
    value str
    value String

    AccountSettingUserPreferenceV2StringVal, AccountSettingUserPreferenceV2StringValArgs

    Value string
    Value string
    value String
    value string
    value str
    value String

    Import

    As of Pulumi v1.5, resources can be imported through configuration.

    hcl

    import {

    id = “name,user_id”

    to = databricks_account_setting_user_preference_v2.this

    }

    If you are using an older version of Pulumi, import the resource using the pulumi import command as follows:

    $ pulumi import databricks:index/accountSettingUserPreferenceV2:AccountSettingUserPreferenceV2 this "name,user_id"
    

    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.83.0 published on Friday, Jan 23, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate