1. Packages
  2. Databricks
  3. API Docs
  4. getCurrentMetastore
Databricks v1.50.2 published on Tuesday, Sep 24, 2024 by Pulumi

databricks.getCurrentMetastore

Explore with Pulumi AI

databricks logo
Databricks v1.50.2 published on Tuesday, Sep 24, 2024 by Pulumi

    Retrieves information about metastore attached to a given workspace.

    Note This is the workspace-level data source.

    Note If you have a fully automated setup with workspaces created by databricks.MwsWorkspaces or azurerm_databricks_workspace, please make sure to add depends_on attribute to prevent authentication is not configured for provider errors.

    Example Usage

    MetastoreSummary response for a metastore attached to the current workspace.

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const this = databricks.getCurrentMetastore({});
    export const someMetastore = _this.then(_this => _this.metastoreInfo);
    
    import pulumi
    import pulumi_databricks as databricks
    
    this = databricks.get_current_metastore()
    pulumi.export("someMetastore", this.metastore_info)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		this, err := databricks.GetCurrentMetastore(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("someMetastore", this.MetastoreInfo)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = Databricks.GetCurrentMetastore.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["someMetastore"] = @this.Apply(@this => @this.Apply(getCurrentMetastoreResult => getCurrentMetastoreResult.MetastoreInfo)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.DatabricksFunctions;
    import com.pulumi.databricks.inputs.GetCurrentMetastoreArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var this = DatabricksFunctions.getCurrentMetastore();
    
            ctx.export("someMetastore", this_.metastoreInfo());
        }
    }
    
    variables:
      this:
        fn::invoke:
          Function: databricks:getCurrentMetastore
          Arguments: {}
    outputs:
      someMetastore: ${this.metastoreInfo}
    

    The following resources are used in the same context:

    • databricks.Metastore to get information for a metastore with a given ID.
    • databricks.getMetastores to get a mapping of name to id of all metastores.
    • databricks.Metastore to manage Metastores within Unity Catalog.
    • databricks.Catalog to manage catalogs within Unity Catalog.

    Using getCurrentMetastore

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCurrentMetastore(args: GetCurrentMetastoreArgs, opts?: InvokeOptions): Promise<GetCurrentMetastoreResult>
    function getCurrentMetastoreOutput(args: GetCurrentMetastoreOutputArgs, opts?: InvokeOptions): Output<GetCurrentMetastoreResult>
    def get_current_metastore(id: Optional[str] = None,
                              metastore_info: Optional[GetCurrentMetastoreMetastoreInfo] = None,
                              opts: Optional[InvokeOptions] = None) -> GetCurrentMetastoreResult
    def get_current_metastore_output(id: Optional[pulumi.Input[str]] = None,
                              metastore_info: Optional[pulumi.Input[GetCurrentMetastoreMetastoreInfoArgs]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetCurrentMetastoreResult]
    func GetCurrentMetastore(ctx *Context, args *GetCurrentMetastoreArgs, opts ...InvokeOption) (*GetCurrentMetastoreResult, error)
    func GetCurrentMetastoreOutput(ctx *Context, args *GetCurrentMetastoreOutputArgs, opts ...InvokeOption) GetCurrentMetastoreResultOutput

    > Note: This function is named GetCurrentMetastore in the Go SDK.

    public static class GetCurrentMetastore 
    {
        public static Task<GetCurrentMetastoreResult> InvokeAsync(GetCurrentMetastoreArgs args, InvokeOptions? opts = null)
        public static Output<GetCurrentMetastoreResult> Invoke(GetCurrentMetastoreInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCurrentMetastoreResult> getCurrentMetastore(GetCurrentMetastoreArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: databricks:index/getCurrentMetastore:getCurrentMetastore
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    metastore ID. Will be no_metastore if there is no metastore assigned for the current workspace
    MetastoreInfo GetCurrentMetastoreMetastoreInfo
    summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
    Id string
    metastore ID. Will be no_metastore if there is no metastore assigned for the current workspace
    MetastoreInfo GetCurrentMetastoreMetastoreInfo
    summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
    id String
    metastore ID. Will be no_metastore if there is no metastore assigned for the current workspace
    metastoreInfo GetCurrentMetastoreMetastoreInfo
    summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
    id string
    metastore ID. Will be no_metastore if there is no metastore assigned for the current workspace
    metastoreInfo GetCurrentMetastoreMetastoreInfo
    summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
    id str
    metastore ID. Will be no_metastore if there is no metastore assigned for the current workspace
    metastore_info GetCurrentMetastoreMetastoreInfo
    summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
    id String
    metastore ID. Will be no_metastore if there is no metastore assigned for the current workspace
    metastoreInfo Property Map
    summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):

    getCurrentMetastore Result

    The following output properties are available:

    Id string
    metastore ID. Will be no_metastore if there is no metastore assigned for the current workspace
    MetastoreInfo GetCurrentMetastoreMetastoreInfo
    summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
    Id string
    metastore ID. Will be no_metastore if there is no metastore assigned for the current workspace
    MetastoreInfo GetCurrentMetastoreMetastoreInfo
    summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
    id String
    metastore ID. Will be no_metastore if there is no metastore assigned for the current workspace
    metastoreInfo GetCurrentMetastoreMetastoreInfo
    summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
    id string
    metastore ID. Will be no_metastore if there is no metastore assigned for the current workspace
    metastoreInfo GetCurrentMetastoreMetastoreInfo
    summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
    id str
    metastore ID. Will be no_metastore if there is no metastore assigned for the current workspace
    metastore_info GetCurrentMetastoreMetastoreInfo
    summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):
    id String
    metastore ID. Will be no_metastore if there is no metastore assigned for the current workspace
    metastoreInfo Property Map
    summary about a metastore attached to the current workspace returned by Get a metastore summary API. This contains the following attributes (check the API page for up-to-date details):

    Supporting Types

    GetCurrentMetastoreMetastoreInfo

    Cloud string
    CreatedAt int
    Timestamp (in milliseconds) when the current metastore was created.
    CreatedBy string
    the ID of the identity that created the current metastore.
    DefaultDataAccessConfigId string
    the ID of the default data access configuration.
    DeltaSharingOrganizationName string
    The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing.
    DeltaSharingRecipientTokenLifetimeInSeconds int
    the expiration duration in seconds on recipient data access tokens.
    DeltaSharingScope string
    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.
    GlobalMetastoreId string
    Identifier in form of <cloud>:<region>:<metastore_id> for use in Databricks to Databricks Delta Sharing.
    MetastoreId string
    Metastore ID.
    Name string
    Name of metastore.
    Owner string
    Username/group name/sp application_id of the metastore owner.
    PrivilegeModelVersion string
    the version of the privilege model used by the metastore.
    Region string
    (Mandatory for account-level) The region of the metastore.
    StorageRoot string
    Path on cloud storage account, where managed databricks.Table are stored.
    StorageRootCredentialId string
    ID of a storage credential used for the storage_root.
    StorageRootCredentialName string
    Name of a storage credential used for the storage_root.
    UpdatedAt int
    Timestamp (in milliseconds) when the current metastore was updated.
    UpdatedBy string
    the ID of the identity that updated the current metastore.
    Cloud string
    CreatedAt int
    Timestamp (in milliseconds) when the current metastore was created.
    CreatedBy string
    the ID of the identity that created the current metastore.
    DefaultDataAccessConfigId string
    the ID of the default data access configuration.
    DeltaSharingOrganizationName string
    The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing.
    DeltaSharingRecipientTokenLifetimeInSeconds int
    the expiration duration in seconds on recipient data access tokens.
    DeltaSharingScope string
    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.
    GlobalMetastoreId string
    Identifier in form of <cloud>:<region>:<metastore_id> for use in Databricks to Databricks Delta Sharing.
    MetastoreId string
    Metastore ID.
    Name string
    Name of metastore.
    Owner string
    Username/group name/sp application_id of the metastore owner.
    PrivilegeModelVersion string
    the version of the privilege model used by the metastore.
    Region string
    (Mandatory for account-level) The region of the metastore.
    StorageRoot string
    Path on cloud storage account, where managed databricks.Table are stored.
    StorageRootCredentialId string
    ID of a storage credential used for the storage_root.
    StorageRootCredentialName string
    Name of a storage credential used for the storage_root.
    UpdatedAt int
    Timestamp (in milliseconds) when the current metastore was updated.
    UpdatedBy string
    the ID of the identity that updated the current metastore.
    cloud String
    createdAt Integer
    Timestamp (in milliseconds) when the current metastore was created.
    createdBy String
    the ID of the identity that created the current metastore.
    defaultDataAccessConfigId String
    the ID of the default data access configuration.
    deltaSharingOrganizationName String
    The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing.
    deltaSharingRecipientTokenLifetimeInSeconds Integer
    the expiration duration in seconds on recipient data access tokens.
    deltaSharingScope String
    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.
    globalMetastoreId String
    Identifier in form of <cloud>:<region>:<metastore_id> for use in Databricks to Databricks Delta Sharing.
    metastoreId String
    Metastore ID.
    name String
    Name of metastore.
    owner String
    Username/group name/sp application_id of the metastore owner.
    privilegeModelVersion String
    the version of the privilege model used by the metastore.
    region String
    (Mandatory for account-level) The region of the metastore.
    storageRoot String
    Path on cloud storage account, where managed databricks.Table are stored.
    storageRootCredentialId String
    ID of a storage credential used for the storage_root.
    storageRootCredentialName String
    Name of a storage credential used for the storage_root.
    updatedAt Integer
    Timestamp (in milliseconds) when the current metastore was updated.
    updatedBy String
    the ID of the identity that updated the current metastore.
    cloud string
    createdAt number
    Timestamp (in milliseconds) when the current metastore was created.
    createdBy string
    the ID of the identity that created the current metastore.
    defaultDataAccessConfigId string
    the ID of the default data access configuration.
    deltaSharingOrganizationName string
    The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing.
    deltaSharingRecipientTokenLifetimeInSeconds number
    the expiration duration in seconds on recipient data access tokens.
    deltaSharingScope string
    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.
    globalMetastoreId string
    Identifier in form of <cloud>:<region>:<metastore_id> for use in Databricks to Databricks Delta Sharing.
    metastoreId string
    Metastore ID.
    name string
    Name of metastore.
    owner string
    Username/group name/sp application_id of the metastore owner.
    privilegeModelVersion string
    the version of the privilege model used by the metastore.
    region string
    (Mandatory for account-level) The region of the metastore.
    storageRoot string
    Path on cloud storage account, where managed databricks.Table are stored.
    storageRootCredentialId string
    ID of a storage credential used for the storage_root.
    storageRootCredentialName string
    Name of a storage credential used for the storage_root.
    updatedAt number
    Timestamp (in milliseconds) when the current metastore was updated.
    updatedBy string
    the ID of the identity that updated the current metastore.
    cloud str
    created_at int
    Timestamp (in milliseconds) when the current metastore was created.
    created_by str
    the ID of the identity that created the current metastore.
    default_data_access_config_id str
    the ID of the default data access configuration.
    delta_sharing_organization_name str
    The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing.
    delta_sharing_recipient_token_lifetime_in_seconds int
    the expiration duration in seconds on recipient data access tokens.
    delta_sharing_scope str
    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.
    global_metastore_id str
    Identifier in form of <cloud>:<region>:<metastore_id> for use in Databricks to Databricks Delta Sharing.
    metastore_id str
    Metastore ID.
    name str
    Name of metastore.
    owner str
    Username/group name/sp application_id of the metastore owner.
    privilege_model_version str
    the version of the privilege model used by the metastore.
    region str
    (Mandatory for account-level) The region of the metastore.
    storage_root str
    Path on cloud storage account, where managed databricks.Table are stored.
    storage_root_credential_id str
    ID of a storage credential used for the storage_root.
    storage_root_credential_name str
    Name of a storage credential used for the storage_root.
    updated_at int
    Timestamp (in milliseconds) when the current metastore was updated.
    updated_by str
    the ID of the identity that updated the current metastore.
    cloud String
    createdAt Number
    Timestamp (in milliseconds) when the current metastore was created.
    createdBy String
    the ID of the identity that created the current metastore.
    defaultDataAccessConfigId String
    the ID of the default data access configuration.
    deltaSharingOrganizationName String
    The organization name of a Delta Sharing entity. This field is used for Databricks to Databricks sharing.
    deltaSharingRecipientTokenLifetimeInSeconds Number
    the expiration duration in seconds on recipient data access tokens.
    deltaSharingScope String
    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.
    globalMetastoreId String
    Identifier in form of <cloud>:<region>:<metastore_id> for use in Databricks to Databricks Delta Sharing.
    metastoreId String
    Metastore ID.
    name String
    Name of metastore.
    owner String
    Username/group name/sp application_id of the metastore owner.
    privilegeModelVersion String
    the version of the privilege model used by the metastore.
    region String
    (Mandatory for account-level) The region of the metastore.
    storageRoot String
    Path on cloud storage account, where managed databricks.Table are stored.
    storageRootCredentialId String
    ID of a storage credential used for the storage_root.
    storageRootCredentialName String
    Name of a storage credential used for the storage_root.
    updatedAt Number
    Timestamp (in milliseconds) when the current metastore was updated.
    updatedBy String
    the ID of the identity that updated the current metastore.

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Databricks v1.50.2 published on Tuesday, Sep 24, 2024 by Pulumi