@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
165 lines (164 loc) • 5.58 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Database Catalogs are databases inside a Lakebase Database Instance which are synced into a Postgres Catalog inside Unity Catalog.
*
* ## Example Usage
*
* ### Example
*
* This example creates a Database Catalog based on an existing database in the Database Instance
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const _this = new databricks.DatabaseDatabaseCatalog("this", {
* name: "my_registered_catalog",
* databaseInstanceName: "my-database-instance",
* databaseName: "databricks_postgres",
* });
* ```
*
* This example creates a Database Catalog along with a new database inside an existing Database Instance
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const _this = new databricks.DatabaseDatabaseCatalog("this", {
* name: "my_registered_catalog",
* databaseInstanceName: "my-database-instance",
* databaseName: "new_registered_catalog_database",
* createDatabaseIfNotExists: true,
* });
* ```
*
* This example creates a DatabaseInstance and then a Database Catalog inside it
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const instance = new databricks.DatabaseInstance("instance", {
* name: "my-database-instance",
* capacity: "CU_1",
* });
* const catalog = new databricks.DatabaseDatabaseCatalog("catalog", {
* name: "my_registered_catalog",
* databaseInstanceName: instance.name,
* databaseName: "new_registered_catalog_database",
* createDatabaseIfNotExists: true,
* });
* ```
*
* ## Import
*
* As of Pulumi v1.5, resources can be imported through configuration.
*
* hcl
*
* import {
*
* id = "name"
*
* to = databricks_database_database_catalog.this
*
* }
*
* If you are using an older version of Pulumi, import the resource using the `pulumi import` command as follows:
*
* ```sh
* $ pulumi import databricks:index/databaseDatabaseCatalog:DatabaseDatabaseCatalog databricks_database_database_catalog "name"
* ```
*/
export declare class DatabaseDatabaseCatalog extends pulumi.CustomResource {
/**
* Get an existing DatabaseDatabaseCatalog 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?: DatabaseDatabaseCatalogState, opts?: pulumi.CustomResourceOptions): DatabaseDatabaseCatalog;
/**
* Returns true if the given object is an instance of DatabaseDatabaseCatalog. 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 DatabaseDatabaseCatalog;
readonly createDatabaseIfNotExists: pulumi.Output<boolean>;
/**
* The name of the DatabaseInstance housing the database
*/
readonly databaseInstanceName: pulumi.Output<string>;
/**
* The name of the database (in a instance) associated with the catalog
*/
readonly databaseName: pulumi.Output<string>;
/**
* The name of the catalog in UC
*/
readonly name: pulumi.Output<string>;
/**
* (string)
*/
readonly uid: pulumi.Output<string>;
/**
* Workspace ID of the resource
*/
readonly workspaceId: pulumi.Output<string | undefined>;
/**
* Create a DatabaseDatabaseCatalog 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: DatabaseDatabaseCatalogArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering DatabaseDatabaseCatalog resources.
*/
export interface DatabaseDatabaseCatalogState {
createDatabaseIfNotExists?: pulumi.Input<boolean>;
/**
* The name of the DatabaseInstance housing the database
*/
databaseInstanceName?: pulumi.Input<string>;
/**
* The name of the database (in a instance) associated with the catalog
*/
databaseName?: pulumi.Input<string>;
/**
* The name of the catalog in UC
*/
name?: pulumi.Input<string>;
/**
* (string)
*/
uid?: pulumi.Input<string>;
/**
* Workspace ID of the resource
*/
workspaceId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a DatabaseDatabaseCatalog resource.
*/
export interface DatabaseDatabaseCatalogArgs {
createDatabaseIfNotExists?: pulumi.Input<boolean>;
/**
* The name of the DatabaseInstance housing the database
*/
databaseInstanceName: pulumi.Input<string>;
/**
* The name of the database (in a instance) associated with the catalog
*/
databaseName: pulumi.Input<string>;
/**
* The name of the catalog in UC
*/
name?: pulumi.Input<string>;
/**
* Workspace ID of the resource
*/
workspaceId?: pulumi.Input<string>;
}