databricks.getCatalogs
Explore with Pulumi AI
Note This data source can only be used with a workspace-level provider!
Note If you have a fully automated setup with workspaces created by databricks.MwsWorkspaces or azurerm_databricks_workspace, please make sure to add depends_on attribute in order to prevent default auth: cannot configure default credentials errors.
Retrieves a list of databricks.Catalog ids, that were created by Pulumi or manually, so that special handling could be applied.
Example Usage
Listing all catalogs:
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const all = databricks.getCatalogs({});
export const allCatalogs = all;
import pulumi
import pulumi_databricks as databricks
all = databricks.get_catalogs()
pulumi.export("allCatalogs", all)
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.GetCatalogs(ctx, &databricks.GetCatalogsArgs{}, nil)
if err != nil {
return err
}
ctx.Export("allCatalogs", all)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var all = Databricks.GetCatalogs.Invoke();
return new Dictionary<string, object?>
{
["allCatalogs"] = all,
};
});
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.GetCatalogsArgs;
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) {
final var all = DatabricksFunctions.getCatalogs();
ctx.export("allCatalogs", all.applyValue(getCatalogsResult -> getCatalogsResult));
}
}
variables:
all:
fn::invoke:
Function: databricks:getCatalogs
Arguments: {}
outputs:
allCatalogs: ${all}
Related Resources
The following resources are used in the same context:
- databricks.Schema to manage schemas within Unity Catalog.
- databricks.Catalog to manage catalogs within Unity Catalog.
Using getCatalogs
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 getCatalogs(args: GetCatalogsArgs, opts?: InvokeOptions): Promise<GetCatalogsResult>
function getCatalogsOutput(args: GetCatalogsOutputArgs, opts?: InvokeOptions): Output<GetCatalogsResult>
def get_catalogs(ids: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetCatalogsResult
def get_catalogs_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCatalogsResult]
func GetCatalogs(ctx *Context, args *GetCatalogsArgs, opts ...InvokeOption) (*GetCatalogsResult, error)
func GetCatalogsOutput(ctx *Context, args *GetCatalogsOutputArgs, opts ...InvokeOption) GetCatalogsResultOutput
> Note: This function is named GetCatalogs
in the Go SDK.
public static class GetCatalogs
{
public static Task<GetCatalogsResult> InvokeAsync(GetCatalogsArgs args, InvokeOptions? opts = null)
public static Output<GetCatalogsResult> Invoke(GetCatalogsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCatalogsResult> getCatalogs(GetCatalogsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: databricks:index/getCatalogs:getCatalogs
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- set of databricks.Catalog names
- Ids []string
- set of databricks.Catalog names
- ids List<String>
- set of databricks.Catalog names
- ids string[]
- set of databricks.Catalog names
- ids Sequence[str]
- set of databricks.Catalog names
- ids List<String>
- set of databricks.Catalog names
getCatalogs Result
The following output properties are available:
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.