Viewing docs for Databricks v1.92.0
published on Tuesday, May 12, 2026 by Pulumi
published on Tuesday, May 12, 2026 by Pulumi
Viewing docs for Databricks v1.92.0
published on Tuesday, May 12, 2026 by Pulumi
published on Tuesday, May 12, 2026 by Pulumi
Lists all databricks.MwsWorkspaces in Databricks Account.
This data source can only be used with an account-level provider!
Example Usage
Listing all workspaces in
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const all = databricks.getMwsWorkspaces({});
export const allMwsWorkspaces = all.then(all => all.ids);
import pulumi
import pulumi_databricks as databricks
all = databricks.get_mws_workspaces()
pulumi.export("allMwsWorkspaces", all.ids)
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 {
all, err := databricks.GetMwsWorkspaces(ctx, &databricks.LookupMwsWorkspacesArgs{}, nil)
if err != nil {
return err
}
ctx.Export("allMwsWorkspaces", all.Ids)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var all = Databricks.GetMwsWorkspaces.Invoke();
return new Dictionary<string, object?>
{
["allMwsWorkspaces"] = all.Apply(getMwsWorkspacesResult => getMwsWorkspacesResult.Ids),
};
});
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.GetMwsWorkspacesArgs;
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 all = DatabricksFunctions.getMwsWorkspaces(GetMwsWorkspacesArgs.builder()
.build());
ctx.export("allMwsWorkspaces", all.ids());
}
}
variables:
all:
fn::invoke:
function: databricks:getMwsWorkspaces
arguments: {}
outputs:
allMwsWorkspaces: ${all.ids}
Example coming soon!
Related Resources
The following resources are used in the same context:
- databricks.MwsWorkspaces to manage Databricks Workspaces on AWS and GCP.
- databricks.MetastoreAssignment to assign databricks.Metastore to databricks.MwsWorkspaces or azurermDatabricksWorkspace
Using getMwsWorkspaces
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 getMwsWorkspaces(args: GetMwsWorkspacesArgs, opts?: InvokeOptions): Promise<GetMwsWorkspacesResult>
function getMwsWorkspacesOutput(args: GetMwsWorkspacesOutputArgs, opts?: InvokeOptions): Output<GetMwsWorkspacesResult>def get_mws_workspaces(provider_config: Optional[GetMwsWorkspacesProviderConfig] = None,
opts: Optional[InvokeOptions] = None) -> GetMwsWorkspacesResult
def get_mws_workspaces_output(provider_config: pulumi.Input[Optional[GetMwsWorkspacesProviderConfigArgs]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMwsWorkspacesResult]func LookupMwsWorkspaces(ctx *Context, args *LookupMwsWorkspacesArgs, opts ...InvokeOption) (*LookupMwsWorkspacesResult, error)
func LookupMwsWorkspacesOutput(ctx *Context, args *LookupMwsWorkspacesOutputArgs, opts ...InvokeOption) LookupMwsWorkspacesResultOutput> Note: This function is named LookupMwsWorkspaces in the Go SDK.
public static class GetMwsWorkspaces
{
public static Task<GetMwsWorkspacesResult> InvokeAsync(GetMwsWorkspacesArgs args, InvokeOptions? opts = null)
public static Output<GetMwsWorkspacesResult> Invoke(GetMwsWorkspacesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMwsWorkspacesResult> getMwsWorkspaces(GetMwsWorkspacesArgs args, InvokeOptions options)
public static Output<GetMwsWorkspacesResult> getMwsWorkspaces(GetMwsWorkspacesArgs args, InvokeOptions options)
fn::invoke:
function: databricks:index/getMwsWorkspaces:getMwsWorkspaces
arguments:
# arguments dictionarydata "databricks_getmwsworkspaces" "name" {
# arguments
}The following arguments are supported:
- Provider
Config GetMws Workspaces Provider Config - This data source is account-only and has no workspace context, so
providerConfighas no effect and will be removed in a future major release. The block consists of the following field:
- Provider
Config GetMws Workspaces Provider Config - This data source is account-only and has no workspace context, so
providerConfighas no effect and will be removed in a future major release. The block consists of the following field:
- provider_
config object - This data source is account-only and has no workspace context, so
providerConfighas no effect and will be removed in a future major release. The block consists of the following field:
- provider
Config GetMws Workspaces Provider Config - This data source is account-only and has no workspace context, so
providerConfighas no effect and will be removed in a future major release. The block consists of the following field:
- provider
Config GetMws Workspaces Provider Config - This data source is account-only and has no workspace context, so
providerConfighas no effect and will be removed in a future major release. The block consists of the following field:
- provider_
config GetMws Workspaces Provider Config - This data source is account-only and has no workspace context, so
providerConfighas no effect and will be removed in a future major release. The block consists of the following field:
- provider
Config Property Map - This data source is account-only and has no workspace context, so
providerConfighas no effect and will be removed in a future major release. The block consists of the following field:
getMwsWorkspaces Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids Dictionary<string, string>
- name-to-id map for all of the workspaces in the account
- Provider
Config GetMws Workspaces Provider Config
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids map[string]string
- name-to-id map for all of the workspaces in the account
- Provider
Config GetMws Workspaces Provider Config
- id string
- The provider-assigned unique ID for this managed resource.
- ids map(string)
- name-to-id map for all of the workspaces in the account
- provider_
config object
- id String
- The provider-assigned unique ID for this managed resource.
- ids Map<String,String>
- name-to-id map for all of the workspaces in the account
- provider
Config GetMws Workspaces Provider Config
- id string
- The provider-assigned unique ID for this managed resource.
- ids {[key: string]: string}
- name-to-id map for all of the workspaces in the account
- provider
Config GetMws Workspaces Provider Config
- id str
- The provider-assigned unique ID for this managed resource.
- ids Mapping[str, str]
- name-to-id map for all of the workspaces in the account
- provider_
config GetMws Workspaces Provider Config
- id String
- The provider-assigned unique ID for this managed resource.
- ids Map<String>
- name-to-id map for all of the workspaces in the account
- provider
Config Property Map
Supporting Types
GetMwsWorkspacesProviderConfig
- Workspace
Id string - Ignored. This data source always operates against the account configured on the provider.
- Workspace
Id string - Ignored. This data source always operates against the account configured on the provider.
- workspace_
id string - Ignored. This data source always operates against the account configured on the provider.
- workspace
Id String - Ignored. This data source always operates against the account configured on the provider.
- workspace
Id string - Ignored. This data source always operates against the account configured on the provider.
- workspace_
id str - Ignored. This data source always operates against the account configured on the provider.
- workspace
Id String - Ignored. This data source always operates against the account configured on the provider.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricksTerraform Provider.
Viewing docs for Databricks v1.92.0
published on Tuesday, May 12, 2026 by Pulumi
published on Tuesday, May 12, 2026 by Pulumi
