databricks.getSchemas
Retrieves a list of databricks.Schema ids, that were created by Pulumi or manually, so that special handling could be applied.
This data source can only be used with a workspace-level provider!
Example Usage
Listing all schemas in a sandbox databricks_catalog:
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const sandbox = databricks.getSchemas({
catalogName: "sandbox",
});
export const allSandboxSchemas = sandbox;
import pulumi
import pulumi_databricks as databricks
sandbox = databricks.get_schemas(catalog_name="sandbox")
pulumi.export("allSandboxSchemas", sandbox)
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 {
sandbox, err := databricks.GetSchemas(ctx, &databricks.GetSchemasArgs{
CatalogName: "sandbox",
}, nil)
if err != nil {
return err
}
ctx.Export("allSandboxSchemas", sandbox)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var sandbox = Databricks.GetSchemas.Invoke(new()
{
CatalogName = "sandbox",
});
return new Dictionary<string, object?>
{
["allSandboxSchemas"] = sandbox,
};
});
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.GetSchemasArgs;
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 sandbox = DatabricksFunctions.getSchemas(GetSchemasArgs.builder()
.catalogName("sandbox")
.build());
ctx.export("allSandboxSchemas", sandbox);
}
}
variables:
sandbox:
fn::invoke:
function: databricks:getSchemas
arguments:
catalogName: sandbox
outputs:
allSandboxSchemas: ${sandbox}
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 getSchemas
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 getSchemas(args: GetSchemasArgs, opts?: InvokeOptions): Promise<GetSchemasResult>
function getSchemasOutput(args: GetSchemasOutputArgs, opts?: InvokeOptions): Output<GetSchemasResult>def get_schemas(catalog_name: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
provider_config: Optional[GetSchemasProviderConfig] = None,
opts: Optional[InvokeOptions] = None) -> GetSchemasResult
def get_schemas_output(catalog_name: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
provider_config: Optional[pulumi.Input[GetSchemasProviderConfigArgs]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSchemasResult]func GetSchemas(ctx *Context, args *GetSchemasArgs, opts ...InvokeOption) (*GetSchemasResult, error)
func GetSchemasOutput(ctx *Context, args *GetSchemasOutputArgs, opts ...InvokeOption) GetSchemasResultOutput> Note: This function is named GetSchemas in the Go SDK.
public static class GetSchemas
{
public static Task<GetSchemasResult> InvokeAsync(GetSchemasArgs args, InvokeOptions? opts = null)
public static Output<GetSchemasResult> Invoke(GetSchemasInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSchemasResult> getSchemas(GetSchemasArgs args, InvokeOptions options)
public static Output<GetSchemasResult> getSchemas(GetSchemasArgs args, InvokeOptions options)
fn::invoke:
function: databricks:index/getSchemas:getSchemas
arguments:
# arguments dictionaryThe following arguments are supported:
- Catalog
Name string - Name of databricks_catalog
- Ids List<string>
- set of databricks.Schema full names:
catalog.schema - Provider
Config GetSchemas Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- Catalog
Name string - Name of databricks_catalog
- Ids []string
- set of databricks.Schema full names:
catalog.schema - Provider
Config GetSchemas Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- catalog
Name String - Name of databricks_catalog
- ids List<String>
- set of databricks.Schema full names:
catalog.schema - provider
Config GetSchemas Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- catalog
Name string - Name of databricks_catalog
- ids string[]
- set of databricks.Schema full names:
catalog.schema - provider
Config GetSchemas Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- catalog_
name str - Name of databricks_catalog
- ids Sequence[str]
- set of databricks.Schema full names:
catalog.schema - provider_
config GetSchemas Provider Config - Configure the provider for management through account provider. This block consists of the following fields:
- catalog
Name String - Name of databricks_catalog
- ids List<String>
- set of databricks.Schema full names:
catalog.schema - provider
Config Property Map - Configure the provider for management through account provider. This block consists of the following fields:
getSchemas Result
The following output properties are available:
- Catalog
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- set of databricks.Schema full names:
catalog.schema - Provider
Config GetSchemas Provider Config
- Catalog
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- set of databricks.Schema full names:
catalog.schema - Provider
Config GetSchemas Provider Config
- catalog
Name String - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- set of databricks.Schema full names:
catalog.schema - provider
Config GetSchemas Provider Config
- catalog
Name string - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- set of databricks.Schema full names:
catalog.schema - provider
Config GetSchemas Provider Config
- catalog_
name str - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- set of databricks.Schema full names:
catalog.schema - provider_
config GetSchemas Provider Config
- catalog
Name String - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- set of databricks.Schema full names:
catalog.schema - provider
Config Property Map
Supporting Types
GetSchemasProviderConfig
- Workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- Workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id String - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace_
id str - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id String - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricksTerraform Provider.
