1. Packages
  2. Databricks
  3. API Docs
  4. getCatalogs
Databricks v1.33.0 published on Thursday, Feb 22, 2024 by Pulumi

databricks.getCatalogs

Explore with Pulumi AI

databricks logo
Databricks v1.33.0 published on Thursday, Feb 22, 2024 by Pulumi

    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.

    Example Usage

    Listing all catalogs

    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 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, nil, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("allCatalogs", all)
    		return nil
    	})
    }
    
    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));
        }
    }
    
    import pulumi
    import pulumi_databricks as databricks
    
    all = databricks.get_catalogs()
    pulumi.export("allCatalogs", all)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const all = databricks.getCatalogs({});
    export const allCatalogs = all;
    
    variables:
      all:
        fn::invoke:
          Function: databricks:getCatalogs
          Arguments: {}
    outputs:
      allCatalogs: ${all}
    

    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:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    set of databricks.Catalog names
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    set of databricks.Catalog names
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    set of databricks.Catalog names
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    set of databricks.Catalog names
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    set of databricks.Catalog names
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    set of databricks.Catalog names

    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.33.0 published on Thursday, Feb 22, 2024 by Pulumi