@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
132 lines (131 loc) • 5.74 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* > This resource has been deprecated and will be removed soon. Please use the databricks.WorkspaceBinding resource instead.
*
* If you use workspaces to isolate user data access, you may want to limit catalog access to specific workspaces in your account, also known as workspace-catalog binding
*
* By default, Databricks assigns the catalog to all workspaces attached to the current metastore. By using `databricks.CatalogWorkspaceBinding`, the catalog will be unassigned from all workspaces and only assigned explicitly using this resource.
*
* > To use this resource the catalog must have its isolation mode set to `ISOLATED` in the `databricks.Catalog` resource. Alternatively, the isolation mode can be set using the UI or API by following [this guide](https://docs.databricks.com/data-governance/unity-catalog/create-catalogs.html#configuration).
*
* > If the catalog's isolation mode was set to `ISOLATED` using Pulumi then the catalog will have been automatically bound to the workspace it was created from.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const sandbox = new databricks.Catalog("sandbox", {
* name: "sandbox",
* isolationMode: "ISOLATED",
* });
* const sandboxCatalogWorkspaceBinding = new databricks.CatalogWorkspaceBinding("sandbox", {
* securableName: sandbox.name,
* workspaceId: other.workspaceId,
* });
* ```
*
* ## Import
*
* This resource can be imported by using combination of workspace ID, securable type and name:
*
* ```sh
* $ pulumi import databricks:index/catalogWorkspaceBinding:CatalogWorkspaceBinding this "<workspace_id>|<securable_type>|<securable_name>"
* ```
*/
export declare class CatalogWorkspaceBinding extends pulumi.CustomResource {
/**
* Get an existing CatalogWorkspaceBinding 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?: CatalogWorkspaceBindingState, opts?: pulumi.CustomResourceOptions): CatalogWorkspaceBinding;
/**
* Returns true if the given object is an instance of CatalogWorkspaceBinding. 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 CatalogWorkspaceBinding;
/**
* Binding mode. Default to `BINDING_TYPE_READ_WRITE`. Possible values are `BINDING_TYPE_READ_ONLY`, `BINDING_TYPE_READ_WRITE`
*/
readonly bindingType: pulumi.Output<string | undefined>;
/**
* @deprecated Please use 'securable_name' and 'securable_type instead.
*/
readonly catalogName: pulumi.Output<string | undefined>;
/**
* Name of securable. Change forces creation of a new resource.
*/
readonly securableName: pulumi.Output<string>;
/**
* Type of securable. Default to `catalog`. Change forces creation of a new resource.
*/
readonly securableType: pulumi.Output<string | undefined>;
/**
* ID of the workspace. Change forces creation of a new resource.
*/
readonly workspaceId: pulumi.Output<string | undefined>;
/**
* Create a CatalogWorkspaceBinding 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?: CatalogWorkspaceBindingArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering CatalogWorkspaceBinding resources.
*/
export interface CatalogWorkspaceBindingState {
/**
* Binding mode. Default to `BINDING_TYPE_READ_WRITE`. Possible values are `BINDING_TYPE_READ_ONLY`, `BINDING_TYPE_READ_WRITE`
*/
bindingType?: pulumi.Input<string>;
/**
* @deprecated Please use 'securable_name' and 'securable_type instead.
*/
catalogName?: pulumi.Input<string>;
/**
* Name of securable. Change forces creation of a new resource.
*/
securableName?: pulumi.Input<string>;
/**
* Type of securable. Default to `catalog`. Change forces creation of a new resource.
*/
securableType?: pulumi.Input<string>;
/**
* ID of the workspace. Change forces creation of a new resource.
*/
workspaceId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a CatalogWorkspaceBinding resource.
*/
export interface CatalogWorkspaceBindingArgs {
/**
* Binding mode. Default to `BINDING_TYPE_READ_WRITE`. Possible values are `BINDING_TYPE_READ_ONLY`, `BINDING_TYPE_READ_WRITE`
*/
bindingType?: pulumi.Input<string>;
/**
* @deprecated Please use 'securable_name' and 'securable_type instead.
*/
catalogName?: pulumi.Input<string>;
/**
* Name of securable. Change forces creation of a new resource.
*/
securableName?: pulumi.Input<string>;
/**
* Type of securable. Default to `catalog`. Change forces creation of a new resource.
*/
securableType?: pulumi.Input<string>;
/**
* ID of the workspace. Change forces creation of a new resource.
*/
workspaceId?: pulumi.Input<string>;
}