@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
202 lines (201 loc) • 9.22 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* > This resource can be used with an account or workspace-level provider.
*
* A metastore is the top-level container of objects in Unity Catalog. It stores data assets (tables and views) and the permissions that govern access to them. Databricks account admins can create metastores and assign them to Databricks workspaces in order to control which workloads use each metastore.
*
* Unity Catalog offers a new metastore with built in security and auditing. This is distinct to the metastore used in previous versions of Databricks (based on the Hive Metastore).
*
* A Unity Catalog metastore can be created without a root location & credential to maintain strict separation of storage across catalogs or environments.
*
* ## Example Usage
*
* For AWS
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const _this = new databricks.Metastore("this", {
* name: "primary",
* storageRoot: `s3://${metastore.id}/metastore`,
* owner: "uc admins",
* region: "us-east-1",
* forceDestroy: true,
* });
* const thisMetastoreAssignment = new databricks.MetastoreAssignment("this", {
* metastoreId: _this.id,
* workspaceId: workspaceId,
* });
* ```
*
* For Azure
*
* ## Import
*
* This resource can be imported by ID:
*
* bash
*
* ```sh
* $ pulumi import databricks:index/metastore:Metastore this <id>
* ```
*/
export declare class Metastore extends pulumi.CustomResource {
/**
* Get an existing Metastore 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?: MetastoreState, opts?: pulumi.CustomResourceOptions): Metastore;
/**
* Returns true if the given object is an instance of Metastore. 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 Metastore;
readonly cloud: pulumi.Output<string>;
readonly createdAt: pulumi.Output<number>;
readonly createdBy: pulumi.Output<string>;
readonly defaultDataAccessConfigId: pulumi.Output<string | undefined>;
/**
* The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.
*/
readonly deltaSharingOrganizationName: pulumi.Output<string | undefined>;
/**
* Required along with `deltaSharingScope`. Used to set expiration duration in seconds on recipient data access tokens. Set to 0 for unlimited duration.
*/
readonly deltaSharingRecipientTokenLifetimeInSeconds: pulumi.Output<number | undefined>;
/**
* Required along with `deltaSharingRecipientTokenLifetimeInSeconds`. Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL. INTERNAL only allows sharing within the same account, and INTERNAL_AND_EXTERNAL allows cross account sharing and token based sharing.
*/
readonly deltaSharingScope: pulumi.Output<string | undefined>;
/**
* Destroy metastore regardless of its contents.
*/
readonly forceDestroy: pulumi.Output<boolean | undefined>;
readonly globalMetastoreId: pulumi.Output<string>;
readonly metastoreId: pulumi.Output<string>;
/**
* Name of metastore.
*/
readonly name: pulumi.Output<string>;
/**
* Username/groupname/sp applicationId of the metastore owner.
*/
readonly owner: pulumi.Output<string>;
/**
* The region of the metastore
*/
readonly region: pulumi.Output<string>;
/**
* Path on cloud storage account, where managed `databricks.Table` are stored. Change forces creation of a new resource. If no `storageRoot` is defined for the metastore, each catalog must have a `storageRoot` defined.
*/
readonly storageRoot: pulumi.Output<string | undefined>;
readonly storageRootCredentialId: pulumi.Output<string | undefined>;
readonly updatedAt: pulumi.Output<number>;
readonly updatedBy: pulumi.Output<string>;
/**
* Create a Metastore 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?: MetastoreArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Metastore resources.
*/
export interface MetastoreState {
cloud?: pulumi.Input<string>;
createdAt?: pulumi.Input<number>;
createdBy?: pulumi.Input<string>;
defaultDataAccessConfigId?: pulumi.Input<string>;
/**
* The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.
*/
deltaSharingOrganizationName?: pulumi.Input<string>;
/**
* Required along with `deltaSharingScope`. Used to set expiration duration in seconds on recipient data access tokens. Set to 0 for unlimited duration.
*/
deltaSharingRecipientTokenLifetimeInSeconds?: pulumi.Input<number>;
/**
* Required along with `deltaSharingRecipientTokenLifetimeInSeconds`. Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL. INTERNAL only allows sharing within the same account, and INTERNAL_AND_EXTERNAL allows cross account sharing and token based sharing.
*/
deltaSharingScope?: pulumi.Input<string>;
/**
* Destroy metastore regardless of its contents.
*/
forceDestroy?: pulumi.Input<boolean>;
globalMetastoreId?: pulumi.Input<string>;
metastoreId?: pulumi.Input<string>;
/**
* Name of metastore.
*/
name?: pulumi.Input<string>;
/**
* Username/groupname/sp applicationId of the metastore owner.
*/
owner?: pulumi.Input<string>;
/**
* The region of the metastore
*/
region?: pulumi.Input<string>;
/**
* Path on cloud storage account, where managed `databricks.Table` are stored. Change forces creation of a new resource. If no `storageRoot` is defined for the metastore, each catalog must have a `storageRoot` defined.
*/
storageRoot?: pulumi.Input<string>;
storageRootCredentialId?: pulumi.Input<string>;
updatedAt?: pulumi.Input<number>;
updatedBy?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Metastore resource.
*/
export interface MetastoreArgs {
cloud?: pulumi.Input<string>;
createdAt?: pulumi.Input<number>;
createdBy?: pulumi.Input<string>;
defaultDataAccessConfigId?: pulumi.Input<string>;
/**
* The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing. Once this is set it cannot be removed and can only be modified to another valid value. To delete this value please taint and recreate the resource.
*/
deltaSharingOrganizationName?: pulumi.Input<string>;
/**
* Required along with `deltaSharingScope`. Used to set expiration duration in seconds on recipient data access tokens. Set to 0 for unlimited duration.
*/
deltaSharingRecipientTokenLifetimeInSeconds?: pulumi.Input<number>;
/**
* Required along with `deltaSharingRecipientTokenLifetimeInSeconds`. Used to enable delta sharing on the metastore. Valid values: INTERNAL, INTERNAL_AND_EXTERNAL. INTERNAL only allows sharing within the same account, and INTERNAL_AND_EXTERNAL allows cross account sharing and token based sharing.
*/
deltaSharingScope?: pulumi.Input<string>;
/**
* Destroy metastore regardless of its contents.
*/
forceDestroy?: pulumi.Input<boolean>;
globalMetastoreId?: pulumi.Input<string>;
metastoreId?: pulumi.Input<string>;
/**
* Name of metastore.
*/
name?: pulumi.Input<string>;
/**
* Username/groupname/sp applicationId of the metastore owner.
*/
owner?: pulumi.Input<string>;
/**
* The region of the metastore
*/
region?: pulumi.Input<string>;
/**
* Path on cloud storage account, where managed `databricks.Table` are stored. Change forces creation of a new resource. If no `storageRoot` is defined for the metastore, each catalog must have a `storageRoot` defined.
*/
storageRoot?: pulumi.Input<string>;
storageRootCredentialId?: pulumi.Input<string>;
updatedAt?: pulumi.Input<number>;
updatedBy?: pulumi.Input<string>;
}