1. Registry
  2. Packages
  3. Databricks Provider
  4. API Docs
  5. getAccountIamWorkspaceAssignmentV2
Viewing docs for Databricks v1.109.0
published on Tuesday, Sep 8, 2026 by Pulumi
databricks logo databricks logo
Viewing docs for Databricks v1.109.0
published on Tuesday, Sep 8, 2026 by Pulumi

    Public Beta

    API Documentation

    Reads a single workspace assignment for an account principal, identified by workspace and principal ID.

    Example Usage

    Example usage:

    Look up a single workspace assignment by workspace and principal ID.

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const _this = databricks.getAccountIamWorkspaceAssignmentV2({
        workspaceId: "123456789",
        principalId: "987654321",
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    this = databricks.get_account_iam_workspace_assignment_v2(workspace_id="123456789",
        principal_id="987654321")
    
    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.GetAccountIamWorkspaceAssignmentV2(ctx, &databricks.LookupAccountIamWorkspaceAssignmentV2Args{
    			WorkspaceId: "123456789",
    			PrincipalId: "987654321",
    		}, nil)
    		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 @this = Databricks.GetAccountIamWorkspaceAssignmentV2.Invoke(new()
        {
            WorkspaceId = "123456789",
            PrincipalId = "987654321",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.DatabricksFunctions;
    import com.pulumi.databricks.inputs.GetAccountIamWorkspaceAssignmentV2Args;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            final var this = DatabricksFunctions.getAccountIamWorkspaceAssignmentV2(GetAccountIamWorkspaceAssignmentV2Args.builder()
                .workspaceId("123456789")
                .principalId("987654321")
                .build());
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          function: databricks:getAccountIamWorkspaceAssignmentV2
          arguments:
            workspaceId: 1.23456789e+08
            principalId: 9.87654321e+08
    
    pulumi {
      required_providers {
        databricks = {
          source = "pulumi/databricks"
        }
      }
    }
    
    data "databricks_getaccountiamworkspaceassignmentv2" "this" {
      workspace_id = 123456789
      principal_id = 987654321
    }
    

    Using getAccountIamWorkspaceAssignmentV2

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getAccountIamWorkspaceAssignmentV2(args: GetAccountIamWorkspaceAssignmentV2Args, opts?: InvokeOptions): Promise<GetAccountIamWorkspaceAssignmentV2Result>
    function getAccountIamWorkspaceAssignmentV2Output(args: GetAccountIamWorkspaceAssignmentV2OutputArgs, opts?: InvokeOutputOptions): Output<GetAccountIamWorkspaceAssignmentV2Result>
    def get_account_iam_workspace_assignment_v2(principal_id: Optional[str] = None,
                                                workspace_id: Optional[str] = None,
                                                opts: Optional[InvokeOptions] = None) -> GetAccountIamWorkspaceAssignmentV2Result
    def get_account_iam_workspace_assignment_v2_output(principal_id: pulumi.Input[Optional[str]] = None,
                                                workspace_id: pulumi.Input[Optional[str]] = None,
                                                opts: Optional[InvokeOutputOptions] = None) -> Output[GetAccountIamWorkspaceAssignmentV2Result]
    func LookupAccountIamWorkspaceAssignmentV2(ctx *Context, args *LookupAccountIamWorkspaceAssignmentV2Args, opts ...InvokeOption) (*LookupAccountIamWorkspaceAssignmentV2Result, error)
    func LookupAccountIamWorkspaceAssignmentV2Output(ctx *Context, args *LookupAccountIamWorkspaceAssignmentV2OutputArgs, opts ...InvokeOption) LookupAccountIamWorkspaceAssignmentV2ResultOutput

    > Note: This function is named LookupAccountIamWorkspaceAssignmentV2 in the Go SDK.

    public static class GetAccountIamWorkspaceAssignmentV2 
    {
        public static Task<GetAccountIamWorkspaceAssignmentV2Result> InvokeAsync(GetAccountIamWorkspaceAssignmentV2Args args, InvokeOptions? opts = null)
        public static Output<GetAccountIamWorkspaceAssignmentV2Result> Invoke(GetAccountIamWorkspaceAssignmentV2InvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetAccountIamWorkspaceAssignmentV2Result> Invoke(GetAccountIamWorkspaceAssignmentV2InvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetAccountIamWorkspaceAssignmentV2Result> getAccountIamWorkspaceAssignmentV2(GetAccountIamWorkspaceAssignmentV2Args args, InvokeOptions options)
    public static Output<GetAccountIamWorkspaceAssignmentV2Result> getAccountIamWorkspaceAssignmentV2(GetAccountIamWorkspaceAssignmentV2Args args, InvokeOptions options)
    public static Output<GetAccountIamWorkspaceAssignmentV2Result> getAccountIamWorkspaceAssignmentV2(GetAccountIamWorkspaceAssignmentV2Args args, InvokeOutputOptions options)
    
    fn::invoke:
      function: databricks:index/getAccountIamWorkspaceAssignmentV2:getAccountIamWorkspaceAssignmentV2
      arguments:
        # arguments dictionary
    data "databricks_get_account_iam_workspace_assignment_v2" "name" {
        # arguments
    }

    The following arguments are supported:

    PrincipalId string
    The internal ID of the principal (user/sp/group) in Databricks
    WorkspaceId string
    The workspace ID where the principal is assigned
    PrincipalId string
    The internal ID of the principal (user/sp/group) in Databricks
    WorkspaceId string
    The workspace ID where the principal is assigned
    principal_id string
    The internal ID of the principal (user/sp/group) in Databricks
    workspace_id string
    The workspace ID where the principal is assigned
    principalId String
    The internal ID of the principal (user/sp/group) in Databricks
    workspaceId String
    The workspace ID where the principal is assigned
    principalId string
    The internal ID of the principal (user/sp/group) in Databricks
    workspaceId string
    The workspace ID where the principal is assigned
    principal_id str
    The internal ID of the principal (user/sp/group) in Databricks
    workspace_id str
    The workspace ID where the principal is assigned
    principalId String
    The internal ID of the principal (user/sp/group) in Databricks
    workspaceId String
    The workspace ID where the principal is assigned

    getAccountIamWorkspaceAssignmentV2 Result

    The following output properties are available:

    AccountId string
    (string) - The account ID parent of the workspace where the principal is assigned
    EffectiveEntitlements List<string>
    (list of string) - Every entitlement the principal holds in this workspace, whether granted directly or through group membership. Get responses populate this field. List responses leave it empty
    Entitlements List<string>
    (list of string) - Entitlements granted directly to the principal on this workspace. This is the only client-settable field. Create and update manage exactly this set, including entitlements the principal also holds through a group. List responses leave this field empty. Get a single principal to read its entitlements
    PrincipalId string
    (integer) - The internal ID of the principal (user/sp/group) in Databricks
    PrincipalType string
    (string) - The type of the principal (user/service principal/group) that is assigned. Possible values are: GROUP, SERVICE_PRINCIPAL, USER
    WorkspaceId string
    (integer) - The workspace ID where the principal is assigned
    AccountId string
    (string) - The account ID parent of the workspace where the principal is assigned
    EffectiveEntitlements []string
    (list of string) - Every entitlement the principal holds in this workspace, whether granted directly or through group membership. Get responses populate this field. List responses leave it empty
    Entitlements []string
    (list of string) - Entitlements granted directly to the principal on this workspace. This is the only client-settable field. Create and update manage exactly this set, including entitlements the principal also holds through a group. List responses leave this field empty. Get a single principal to read its entitlements
    PrincipalId string
    (integer) - The internal ID of the principal (user/sp/group) in Databricks
    PrincipalType string
    (string) - The type of the principal (user/service principal/group) that is assigned. Possible values are: GROUP, SERVICE_PRINCIPAL, USER
    WorkspaceId string
    (integer) - The workspace ID where the principal is assigned
    account_id string
    (string) - The account ID parent of the workspace where the principal is assigned
    effective_entitlements list(string)
    (list of string) - Every entitlement the principal holds in this workspace, whether granted directly or through group membership. Get responses populate this field. List responses leave it empty
    entitlements list(string)
    (list of string) - Entitlements granted directly to the principal on this workspace. This is the only client-settable field. Create and update manage exactly this set, including entitlements the principal also holds through a group. List responses leave this field empty. Get a single principal to read its entitlements
    principal_id string
    (integer) - The internal ID of the principal (user/sp/group) in Databricks
    principal_type string
    (string) - The type of the principal (user/service principal/group) that is assigned. Possible values are: GROUP, SERVICE_PRINCIPAL, USER
    workspace_id string
    (integer) - The workspace ID where the principal is assigned
    accountId String
    (string) - The account ID parent of the workspace where the principal is assigned
    effectiveEntitlements List<String>
    (list of string) - Every entitlement the principal holds in this workspace, whether granted directly or through group membership. Get responses populate this field. List responses leave it empty
    entitlements List<String>
    (list of string) - Entitlements granted directly to the principal on this workspace. This is the only client-settable field. Create and update manage exactly this set, including entitlements the principal also holds through a group. List responses leave this field empty. Get a single principal to read its entitlements
    principalId String
    (integer) - The internal ID of the principal (user/sp/group) in Databricks
    principalType String
    (string) - The type of the principal (user/service principal/group) that is assigned. Possible values are: GROUP, SERVICE_PRINCIPAL, USER
    workspaceId String
    (integer) - The workspace ID where the principal is assigned
    accountId string
    (string) - The account ID parent of the workspace where the principal is assigned
    effectiveEntitlements string[]
    (list of string) - Every entitlement the principal holds in this workspace, whether granted directly or through group membership. Get responses populate this field. List responses leave it empty
    entitlements string[]
    (list of string) - Entitlements granted directly to the principal on this workspace. This is the only client-settable field. Create and update manage exactly this set, including entitlements the principal also holds through a group. List responses leave this field empty. Get a single principal to read its entitlements
    principalId string
    (integer) - The internal ID of the principal (user/sp/group) in Databricks
    principalType string
    (string) - The type of the principal (user/service principal/group) that is assigned. Possible values are: GROUP, SERVICE_PRINCIPAL, USER
    workspaceId string
    (integer) - The workspace ID where the principal is assigned
    account_id str
    (string) - The account ID parent of the workspace where the principal is assigned
    effective_entitlements Sequence[str]
    (list of string) - Every entitlement the principal holds in this workspace, whether granted directly or through group membership. Get responses populate this field. List responses leave it empty
    entitlements Sequence[str]
    (list of string) - Entitlements granted directly to the principal on this workspace. This is the only client-settable field. Create and update manage exactly this set, including entitlements the principal also holds through a group. List responses leave this field empty. Get a single principal to read its entitlements
    principal_id str
    (integer) - The internal ID of the principal (user/sp/group) in Databricks
    principal_type str
    (string) - The type of the principal (user/service principal/group) that is assigned. Possible values are: GROUP, SERVICE_PRINCIPAL, USER
    workspace_id str
    (integer) - The workspace ID where the principal is assigned
    accountId String
    (string) - The account ID parent of the workspace where the principal is assigned
    effectiveEntitlements List<String>
    (list of string) - Every entitlement the principal holds in this workspace, whether granted directly or through group membership. Get responses populate this field. List responses leave it empty
    entitlements List<String>
    (list of string) - Entitlements granted directly to the principal on this workspace. This is the only client-settable field. Create and update manage exactly this set, including entitlements the principal also holds through a group. List responses leave this field empty. Get a single principal to read its entitlements
    principalId String
    (integer) - The internal ID of the principal (user/sp/group) in Databricks
    principalType String
    (string) - The type of the principal (user/service principal/group) that is assigned. Possible values are: GROUP, SERVICE_PRINCIPAL, USER
    workspaceId String
    (integer) - The workspace ID where the principal is assigned

    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 logo
    Viewing docs for Databricks v1.109.0
    published on Tuesday, Sep 8, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial