@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
326 lines (325 loc) • 12.7 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Within a metastore, Unity Catalog provides a 3-level namespace for organizing data: Catalogs, Databases (also called Schemas), and Tables / Views.
*
* A `databricks.Catalog` is contained within databricks.Metastore and can contain databricks_schema. By default, Databricks creates `default` schema for every new catalog, but Pulumi plugin is removing this auto-created schema, so that resource destruction could be done in a clean way.
*
* > This resource can only be used with a workspace-level provider!
*
* ## 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",
* },
* });
* ```
*
* ## 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 name:
*
* hcl
*
* import {
*
* to = databricks_catalog.this
*
* id = "<name>"
*
* }
*
* Alternatively, when using `terraform` version 1.4 or earlier, import using the `pulumi import` command:
*
* bash
*
* ```sh
* $ pulumi import databricks:index/catalog:Catalog this <name>
* ```
*/
export declare class Catalog extends pulumi.CustomResource {
/**
* Get an existing Catalog 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?: CatalogState, opts?: pulumi.CustomResourceOptions): Catalog;
/**
* Returns true if the given object is an instance of Catalog. 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 Catalog;
readonly browseOnly: pulumi.Output<boolean | undefined>;
/**
* the type of the catalog.
*/
readonly catalogType: pulumi.Output<string>;
/**
* User-supplied free-form text.
*/
readonly comment: pulumi.Output<string | undefined>;
/**
* For Foreign Catalogs: the name of the connection to an external data source. Changes forces creation of a new resource.
*/
readonly connectionName: pulumi.Output<string | undefined>;
/**
* time at which this catalog was created, in epoch milliseconds.
*/
readonly createdAt: pulumi.Output<number>;
/**
* username of catalog creator.
*/
readonly createdBy: pulumi.Output<string>;
readonly effectivePredictiveOptimizationFlag: pulumi.Output<outputs.CatalogEffectivePredictiveOptimizationFlag>;
/**
* 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 catalog regardless of its contents.
*/
readonly forceDestroy: pulumi.Output<boolean | undefined>;
readonly fullName: pulumi.Output<string>;
/**
* Whether the catalog is accessible from all workspaces or a specific set of workspaces. Can be `ISOLATED` or `OPEN`. Setting the catalog to `ISOLATED` will automatically allow access from the current workspace.
*/
readonly isolationMode: pulumi.Output<string>;
/**
* ID of the parent metastore.
*/
readonly metastoreId: pulumi.Output<string>;
/**
* Name of Catalog relative to parent metastore.
*/
readonly name: pulumi.Output<string>;
/**
* For Foreign Catalogs: the name of the entity from an external data source that maps to a catalog. For example, the database name in a PostgreSQL server.
*/
readonly options: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Username/groupname/sp applicationId of the catalog owner.
*/
readonly owner: pulumi.Output<string>;
/**
* Extensible Catalog properties.
*/
readonly properties: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* For Delta Sharing Catalogs: the name of the delta sharing provider. Change forces creation of a new resource.
*/
readonly providerName: pulumi.Output<string | undefined>;
readonly provisioningInfo: pulumi.Output<outputs.CatalogProvisioningInfo>;
/**
* the type of Unity Catalog securable.
*/
readonly securableType: pulumi.Output<string>;
/**
* For Delta Sharing Catalogs: the name of the share under the share provider. Change forces creation of a new resource.
*/
readonly shareName: pulumi.Output<string | undefined>;
/**
* effective storage Location URL (full path) for managed tables within catalog.
*/
readonly storageLocation: pulumi.Output<string>;
/**
* Managed location of the catalog. 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 metastore root location. Change forces creation of a new resource.
*/
readonly storageRoot: pulumi.Output<string | undefined>;
/**
* time at which this catalog was last modified, in epoch milliseconds..
*/
readonly updatedAt: pulumi.Output<number>;
/**
* username of user who last modified catalog.
*/
readonly updatedBy: pulumi.Output<string>;
/**
* Create a Catalog 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?: CatalogArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Catalog resources.
*/
export interface CatalogState {
browseOnly?: pulumi.Input<boolean>;
/**
* the type of the catalog.
*/
catalogType?: pulumi.Input<string>;
/**
* User-supplied free-form text.
*/
comment?: pulumi.Input<string>;
/**
* For Foreign Catalogs: the name of the connection to an external data source. Changes forces creation of a new resource.
*/
connectionName?: pulumi.Input<string>;
/**
* time at which this catalog was created, in epoch milliseconds.
*/
createdAt?: pulumi.Input<number>;
/**
* username of catalog creator.
*/
createdBy?: pulumi.Input<string>;
effectivePredictiveOptimizationFlag?: pulumi.Input<inputs.CatalogEffectivePredictiveOptimizationFlag>;
/**
* Whether predictive optimization should be enabled for this object and objects under it. Can be `ENABLE`, `DISABLE` or `INHERIT`
*/
enablePredictiveOptimization?: pulumi.Input<string>;
/**
* Delete catalog regardless of its contents.
*/
forceDestroy?: pulumi.Input<boolean>;
fullName?: pulumi.Input<string>;
/**
* Whether the catalog is accessible from all workspaces or a specific set of workspaces. Can be `ISOLATED` or `OPEN`. Setting the catalog to `ISOLATED` will automatically allow access from the current workspace.
*/
isolationMode?: pulumi.Input<string>;
/**
* ID of the parent metastore.
*/
metastoreId?: pulumi.Input<string>;
/**
* Name of Catalog relative to parent metastore.
*/
name?: pulumi.Input<string>;
/**
* For Foreign Catalogs: the name of the entity from an external data source that maps to a catalog. For example, the database name in a PostgreSQL server.
*/
options?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Username/groupname/sp applicationId of the catalog owner.
*/
owner?: pulumi.Input<string>;
/**
* Extensible Catalog properties.
*/
properties?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* For Delta Sharing Catalogs: the name of the delta sharing provider. Change forces creation of a new resource.
*/
providerName?: pulumi.Input<string>;
provisioningInfo?: pulumi.Input<inputs.CatalogProvisioningInfo>;
/**
* the type of Unity Catalog securable.
*/
securableType?: pulumi.Input<string>;
/**
* For Delta Sharing Catalogs: the name of the share under the share provider. Change forces creation of a new resource.
*/
shareName?: pulumi.Input<string>;
/**
* effective storage Location URL (full path) for managed tables within catalog.
*/
storageLocation?: pulumi.Input<string>;
/**
* Managed location of the catalog. 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 metastore root location. Change forces creation of a new resource.
*/
storageRoot?: pulumi.Input<string>;
/**
* time at which this catalog was last modified, in epoch milliseconds..
*/
updatedAt?: pulumi.Input<number>;
/**
* username of user who last modified catalog.
*/
updatedBy?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Catalog resource.
*/
export interface CatalogArgs {
browseOnly?: pulumi.Input<boolean>;
/**
* User-supplied free-form text.
*/
comment?: pulumi.Input<string>;
/**
* For Foreign Catalogs: the name of the connection to an external data source. Changes forces creation of a new resource.
*/
connectionName?: pulumi.Input<string>;
effectivePredictiveOptimizationFlag?: pulumi.Input<inputs.CatalogEffectivePredictiveOptimizationFlag>;
/**
* Whether predictive optimization should be enabled for this object and objects under it. Can be `ENABLE`, `DISABLE` or `INHERIT`
*/
enablePredictiveOptimization?: pulumi.Input<string>;
/**
* Delete catalog regardless of its contents.
*/
forceDestroy?: pulumi.Input<boolean>;
/**
* Whether the catalog is accessible from all workspaces or a specific set of workspaces. Can be `ISOLATED` or `OPEN`. Setting the catalog to `ISOLATED` will automatically allow access from the current workspace.
*/
isolationMode?: pulumi.Input<string>;
/**
* ID of the parent metastore.
*/
metastoreId?: pulumi.Input<string>;
/**
* Name of Catalog relative to parent metastore.
*/
name?: pulumi.Input<string>;
/**
* For Foreign Catalogs: the name of the entity from an external data source that maps to a catalog. For example, the database name in a PostgreSQL server.
*/
options?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Username/groupname/sp applicationId of the catalog owner.
*/
owner?: pulumi.Input<string>;
/**
* Extensible Catalog properties.
*/
properties?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* For Delta Sharing Catalogs: the name of the delta sharing provider. Change forces creation of a new resource.
*/
providerName?: pulumi.Input<string>;
provisioningInfo?: pulumi.Input<inputs.CatalogProvisioningInfo>;
/**
* For Delta Sharing Catalogs: the name of the share under the share provider. Change forces creation of a new resource.
*/
shareName?: pulumi.Input<string>;
/**
* Managed location of the catalog. 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 metastore root location. Change forces creation of a new resource.
*/
storageRoot?: pulumi.Input<string>;
}