1. Registry
  2. Packages
  3. Databricks Provider
  4. API Docs
  5. getWorkspaceIamWorkspaceAssignmentV2
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, scoped to the workspace, identified by principal ID.

    Example Usage

    Example usage:

    Look up a single workspace assignment by principal ID, using a workspace-scoped provider (the workspace is taken from the provider context).

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const _this = databricks.getWorkspaceIamWorkspaceAssignmentV2({
        principalId: "987654321",
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    this = databricks.get_workspace_iam_workspace_assignment_v2(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.GetWorkspaceIamWorkspaceAssignmentV2(ctx, &databricks.LookupWorkspaceIamWorkspaceAssignmentV2Args{
    			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.GetWorkspaceIamWorkspaceAssignmentV2.Invoke(new()
        {
            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.GetWorkspaceIamWorkspaceAssignmentV2Args;
    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.getWorkspaceIamWorkspaceAssignmentV2(GetWorkspaceIamWorkspaceAssignmentV2Args.builder()
                .principalId("987654321")
                .build());
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          function: databricks:getWorkspaceIamWorkspaceAssignmentV2
          arguments:
            principalId: 9.87654321e+08
    
    pulumi {
      required_providers {
        databricks = {
          source = "pulumi/databricks"
        }
      }
    }
    
    data "databricks_getworkspaceiamworkspaceassignmentv2" "this" {
      principal_id = 987654321
    }
    

    Using getWorkspaceIamWorkspaceAssignmentV2

    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 getWorkspaceIamWorkspaceAssignmentV2(args: GetWorkspaceIamWorkspaceAssignmentV2Args, opts?: InvokeOptions): Promise<GetWorkspaceIamWorkspaceAssignmentV2Result>
    function getWorkspaceIamWorkspaceAssignmentV2Output(args: GetWorkspaceIamWorkspaceAssignmentV2OutputArgs, opts?: InvokeOutputOptions): Output<GetWorkspaceIamWorkspaceAssignmentV2Result>
    def get_workspace_iam_workspace_assignment_v2(principal_id: Optional[str] = None,
                                                  provider_config: Optional[GetWorkspaceIamWorkspaceAssignmentV2ProviderConfig] = None,
                                                  opts: Optional[InvokeOptions] = None) -> GetWorkspaceIamWorkspaceAssignmentV2Result
    def get_workspace_iam_workspace_assignment_v2_output(principal_id: pulumi.Input[Optional[str]] = None,
                                                  provider_config: pulumi.Input[Optional[GetWorkspaceIamWorkspaceAssignmentV2ProviderConfigArgs]] = None,
                                                  opts: Optional[InvokeOutputOptions] = None) -> Output[GetWorkspaceIamWorkspaceAssignmentV2Result]
    func LookupWorkspaceIamWorkspaceAssignmentV2(ctx *Context, args *LookupWorkspaceIamWorkspaceAssignmentV2Args, opts ...InvokeOption) (*LookupWorkspaceIamWorkspaceAssignmentV2Result, error)
    func LookupWorkspaceIamWorkspaceAssignmentV2Output(ctx *Context, args *LookupWorkspaceIamWorkspaceAssignmentV2OutputArgs, opts ...InvokeOption) LookupWorkspaceIamWorkspaceAssignmentV2ResultOutput

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

    public static class GetWorkspaceIamWorkspaceAssignmentV2 
    {
        public static Task<GetWorkspaceIamWorkspaceAssignmentV2Result> InvokeAsync(GetWorkspaceIamWorkspaceAssignmentV2Args args, InvokeOptions? opts = null)
        public static Output<GetWorkspaceIamWorkspaceAssignmentV2Result> Invoke(GetWorkspaceIamWorkspaceAssignmentV2InvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkspaceIamWorkspaceAssignmentV2Result> Invoke(GetWorkspaceIamWorkspaceAssignmentV2InvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetWorkspaceIamWorkspaceAssignmentV2Result> getWorkspaceIamWorkspaceAssignmentV2(GetWorkspaceIamWorkspaceAssignmentV2Args args, InvokeOptions options)
    public static Output<GetWorkspaceIamWorkspaceAssignmentV2Result> getWorkspaceIamWorkspaceAssignmentV2(GetWorkspaceIamWorkspaceAssignmentV2Args args, InvokeOptions options)
    public static Output<GetWorkspaceIamWorkspaceAssignmentV2Result> getWorkspaceIamWorkspaceAssignmentV2(GetWorkspaceIamWorkspaceAssignmentV2Args args, InvokeOutputOptions options)
    
    fn::invoke:
      function: databricks:index/getWorkspaceIamWorkspaceAssignmentV2:getWorkspaceIamWorkspaceAssignmentV2
      arguments:
        # arguments dictionary
    data "databricks_get_workspace_iam_workspace_assignment_v2" "name" {
        # arguments
    }

    The following arguments are supported:

    PrincipalId string
    The internal ID of the principal (user/sp/group) in Databricks
    ProviderConfig GetWorkspaceIamWorkspaceAssignmentV2ProviderConfig
    Configure the provider for management through account provider.
    PrincipalId string
    The internal ID of the principal (user/sp/group) in Databricks
    ProviderConfig GetWorkspaceIamWorkspaceAssignmentV2ProviderConfig
    Configure the provider for management through account provider.
    principal_id string
    The internal ID of the principal (user/sp/group) in Databricks
    provider_config object
    Configure the provider for management through account provider.
    principalId String
    The internal ID of the principal (user/sp/group) in Databricks
    providerConfig GetWorkspaceIamWorkspaceAssignmentV2ProviderConfig
    Configure the provider for management through account provider.
    principalId string
    The internal ID of the principal (user/sp/group) in Databricks
    providerConfig GetWorkspaceIamWorkspaceAssignmentV2ProviderConfig
    Configure the provider for management through account provider.
    principal_id str
    The internal ID of the principal (user/sp/group) in Databricks
    provider_config GetWorkspaceIamWorkspaceAssignmentV2ProviderConfig
    Configure the provider for management through account provider.
    principalId String
    The internal ID of the principal (user/sp/group) in Databricks
    providerConfig Property Map
    Configure the provider for management through account provider.

    getWorkspaceIamWorkspaceAssignmentV2 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
    ProviderConfig GetWorkspaceIamWorkspaceAssignmentV2ProviderConfig
    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
    ProviderConfig GetWorkspaceIamWorkspaceAssignmentV2ProviderConfig
    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
    provider_config object
    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
    providerConfig GetWorkspaceIamWorkspaceAssignmentV2ProviderConfig
    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
    providerConfig GetWorkspaceIamWorkspaceAssignmentV2ProviderConfig
    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
    provider_config GetWorkspaceIamWorkspaceAssignmentV2ProviderConfig
    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
    providerConfig Property Map

    Supporting Types

    GetWorkspaceIamWorkspaceAssignmentV2ProviderConfig

    WorkspaceId string
    (integer) - The workspace ID where the principal is assigned
    WorkspaceId string
    (integer) - The workspace ID where the principal is assigned
    workspace_id string
    (integer) - The workspace ID where the principal is assigned
    workspaceId String
    (integer) - The workspace ID where the principal is assigned
    workspaceId string
    (integer) - The workspace ID where the principal is assigned
    workspace_id str
    (integer) - The workspace ID where the principal is assigned
    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