@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
210 lines (209 loc) • 7.57 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Within a metastore, Unity Catalog provides a 3-level namespace for organizing data: Catalogs, Databases (also called Schemas), and Tables / Views.
*
* > This resource can only be used with a workspace-level provider!
*
* A `databricks.Schema` is contained within databricks.Catalog and can contain tables & views.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const sandbox = new databricks.Catalog("sandbox", {
* name: "sandbox",
* comment: "this catalog is managed by terraform",
* properties: {
* purpose: "testing",
* },
* });
* const things = new databricks.Schema("things", {
* catalogName: sandbox.id,
* name: "things",
* comment: "this database is managed by terraform",
* properties: {
* kind: "various",
* },
* });
* ```
*
* ## Related Resources
*
* The following resources are used in the same context:
*
* * databricks.getTables data to list tables within Unity Catalog.
* * databricks.getSchemas data to list schemas within Unity Catalog.
* * databricks.getCatalogs data to list catalogs within Unity Catalog.
*
* ## Import
*
* This resource can be imported by its full name:
*
* hcl
*
* import {
*
* to = databricks_schema.this
*
* id = "<catalog_name>.<name>"
*
* }
*
* Alternatively, when using `terraform` version 1.4 or earlier, import using the `pulumi import` command:
*
* bash
*
* ```sh
* $ pulumi import databricks:index/schema:Schema this "<catalog_name>.<name>"
* ```
*/
export declare class Schema extends pulumi.CustomResource {
/**
* Get an existing Schema resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SchemaState, opts?: pulumi.CustomResourceOptions): Schema;
/**
* Returns true if the given object is an instance of Schema. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Schema;
/**
* Name of parent catalog. Change forces creation of a new resource.
*/
readonly catalogName: pulumi.Output<string>;
/**
* User-supplied free-form text.
*/
readonly comment: pulumi.Output<string | undefined>;
/**
* Whether predictive optimization should be enabled for this object and objects under it. Can be `ENABLE`, `DISABLE` or `INHERIT`
*/
readonly enablePredictiveOptimization: pulumi.Output<string>;
/**
* Delete schema regardless of its contents.
*/
readonly forceDestroy: pulumi.Output<boolean | undefined>;
readonly metastoreId: pulumi.Output<string>;
/**
* Name of Schema relative to parent catalog. Change forces creation of a new resource.
*/
readonly name: pulumi.Output<string>;
/**
* Username/groupname/sp applicationId of the schema owner.
*/
readonly owner: pulumi.Output<string>;
/**
* Extensible Schema properties.
*/
readonly properties: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* The unique identifier of the schema.
*/
readonly schemaId: pulumi.Output<string>;
/**
* Managed location of the schema. Location in cloud storage where data for managed tables will be stored. If the URL contains special characters, such as space, `&`, etc., they should be percent-encoded (space > `%20`, etc.). If not specified, the location will default to the catalog root location. Change forces creation of a new resource.
*/
readonly storageRoot: pulumi.Output<string | undefined>;
/**
* Create a Schema resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: SchemaArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Schema resources.
*/
export interface SchemaState {
/**
* Name of parent catalog. Change forces creation of a new resource.
*/
catalogName?: pulumi.Input<string>;
/**
* User-supplied free-form text.
*/
comment?: pulumi.Input<string>;
/**
* Whether predictive optimization should be enabled for this object and objects under it. Can be `ENABLE`, `DISABLE` or `INHERIT`
*/
enablePredictiveOptimization?: pulumi.Input<string>;
/**
* Delete schema regardless of its contents.
*/
forceDestroy?: pulumi.Input<boolean>;
metastoreId?: pulumi.Input<string>;
/**
* Name of Schema relative to parent catalog. Change forces creation of a new resource.
*/
name?: pulumi.Input<string>;
/**
* Username/groupname/sp applicationId of the schema owner.
*/
owner?: pulumi.Input<string>;
/**
* Extensible Schema properties.
*/
properties?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The unique identifier of the schema.
*/
schemaId?: pulumi.Input<string>;
/**
* Managed location of the schema. Location in cloud storage where data for managed tables will be stored. If the URL contains special characters, such as space, `&`, etc., they should be percent-encoded (space > `%20`, etc.). If not specified, the location will default to the catalog root location. Change forces creation of a new resource.
*/
storageRoot?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Schema resource.
*/
export interface SchemaArgs {
/**
* Name of parent catalog. Change forces creation of a new resource.
*/
catalogName: pulumi.Input<string>;
/**
* User-supplied free-form text.
*/
comment?: pulumi.Input<string>;
/**
* Whether predictive optimization should be enabled for this object and objects under it. Can be `ENABLE`, `DISABLE` or `INHERIT`
*/
enablePredictiveOptimization?: pulumi.Input<string>;
/**
* Delete schema regardless of its contents.
*/
forceDestroy?: pulumi.Input<boolean>;
metastoreId?: pulumi.Input<string>;
/**
* Name of Schema relative to parent catalog. Change forces creation of a new resource.
*/
name?: pulumi.Input<string>;
/**
* Username/groupname/sp applicationId of the schema owner.
*/
owner?: pulumi.Input<string>;
/**
* Extensible Schema properties.
*/
properties?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Managed location of the schema. Location in cloud storage where data for managed tables will be stored. If the URL contains special characters, such as space, `&`, etc., they should be percent-encoded (space > `%20`, etc.). If not specified, the location will default to the catalog root location. Change forces creation of a new resource.
*/
storageRoot?: pulumi.Input<string>;
}