1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DataCatalog
  5. getMetastores
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.DataCatalog.getMetastores

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

This data source provides the list of Metastores in Oracle Cloud Infrastructure Data Catalog service.

Returns a list of all metastores in the specified compartment.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testMetastores = oci.DataCatalog.getMetastores({
    compartmentId: compartmentId,
    displayName: metastoreDisplayName,
    state: metastoreState,
});
Copy
import pulumi
import pulumi_oci as oci

test_metastores = oci.DataCatalog.get_metastores(compartment_id=compartment_id,
    display_name=metastore_display_name,
    state=metastore_state)
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/datacatalog"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datacatalog.GetMetastores(ctx, &datacatalog.GetMetastoresArgs{
			CompartmentId: compartmentId,
			DisplayName:   pulumi.StringRef(metastoreDisplayName),
			State:         pulumi.StringRef(metastoreState),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testMetastores = Oci.DataCatalog.GetMetastores.Invoke(new()
    {
        CompartmentId = compartmentId,
        DisplayName = metastoreDisplayName,
        State = metastoreState,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DataCatalog.DataCatalogFunctions;
import com.pulumi.oci.DataCatalog.inputs.GetMetastoresArgs;
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 testMetastores = DataCatalogFunctions.getMetastores(GetMetastoresArgs.builder()
            .compartmentId(compartmentId)
            .displayName(metastoreDisplayName)
            .state(metastoreState)
            .build());

    }
}
Copy
variables:
  testMetastores:
    fn::invoke:
      function: oci:DataCatalog:getMetastores
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${metastoreDisplayName}
        state: ${metastoreState}
Copy

Using getMetastores

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 getMetastores(args: GetMetastoresArgs, opts?: InvokeOptions): Promise<GetMetastoresResult>
function getMetastoresOutput(args: GetMetastoresOutputArgs, opts?: InvokeOptions): Output<GetMetastoresResult>
Copy
def get_metastores(compartment_id: Optional[str] = None,
                   display_name: Optional[str] = None,
                   filters: Optional[Sequence[_datacatalog.GetMetastoresFilter]] = None,
                   state: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetMetastoresResult
def get_metastores_output(compartment_id: Optional[pulumi.Input[str]] = None,
                   display_name: Optional[pulumi.Input[str]] = None,
                   filters: Optional[pulumi.Input[Sequence[pulumi.Input[_datacatalog.GetMetastoresFilterArgs]]]] = None,
                   state: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetMetastoresResult]
Copy
func GetMetastores(ctx *Context, args *GetMetastoresArgs, opts ...InvokeOption) (*GetMetastoresResult, error)
func GetMetastoresOutput(ctx *Context, args *GetMetastoresOutputArgs, opts ...InvokeOption) GetMetastoresResultOutput
Copy

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

public static class GetMetastores 
{
    public static Task<GetMetastoresResult> InvokeAsync(GetMetastoresArgs args, InvokeOptions? opts = null)
    public static Output<GetMetastoresResult> Invoke(GetMetastoresInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetMetastoresResult> getMetastores(GetMetastoresArgs args, InvokeOptions options)
public static Output<GetMetastoresResult> getMetastores(GetMetastoresArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:DataCatalog/getMetastores:getMetastores
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
The OCID of the compartment where you want to list resources.
DisplayName string
A filter to return only resources that match the entire display name given. The match is not case sensitive.
Filters Changes to this property will trigger replacement. List<GetMetastoresFilter>
State string
A filter to return only resources that match the specified lifecycle state. The value is case insensitive.
CompartmentId This property is required. string
The OCID of the compartment where you want to list resources.
DisplayName string
A filter to return only resources that match the entire display name given. The match is not case sensitive.
Filters Changes to this property will trigger replacement. []GetMetastoresFilter
State string
A filter to return only resources that match the specified lifecycle state. The value is case insensitive.
compartmentId This property is required. String
The OCID of the compartment where you want to list resources.
displayName String
A filter to return only resources that match the entire display name given. The match is not case sensitive.
filters Changes to this property will trigger replacement. List<GetMetastoresFilter>
state String
A filter to return only resources that match the specified lifecycle state. The value is case insensitive.
compartmentId This property is required. string
The OCID of the compartment where you want to list resources.
displayName string
A filter to return only resources that match the entire display name given. The match is not case sensitive.
filters Changes to this property will trigger replacement. GetMetastoresFilter[]
state string
A filter to return only resources that match the specified lifecycle state. The value is case insensitive.
compartment_id This property is required. str
The OCID of the compartment where you want to list resources.
display_name str
A filter to return only resources that match the entire display name given. The match is not case sensitive.
filters Changes to this property will trigger replacement. Sequence[datacatalog.GetMetastoresFilter]
state str
A filter to return only resources that match the specified lifecycle state. The value is case insensitive.
compartmentId This property is required. String
The OCID of the compartment where you want to list resources.
displayName String
A filter to return only resources that match the entire display name given. The match is not case sensitive.
filters Changes to this property will trigger replacement. List<Property Map>
state String
A filter to return only resources that match the specified lifecycle state. The value is case insensitive.

getMetastores Result

The following output properties are available:

CompartmentId string
OCID of the compartment which holds the metastore.
Id string
The provider-assigned unique ID for this managed resource.
Metastores List<GetMetastoresMetastore>
The list of metastores.
DisplayName string
Mutable name of the metastore.
Filters List<GetMetastoresFilter>
State string
The current state of the metastore.
CompartmentId string
OCID of the compartment which holds the metastore.
Id string
The provider-assigned unique ID for this managed resource.
Metastores []GetMetastoresMetastore
The list of metastores.
DisplayName string
Mutable name of the metastore.
Filters []GetMetastoresFilter
State string
The current state of the metastore.
compartmentId String
OCID of the compartment which holds the metastore.
id String
The provider-assigned unique ID for this managed resource.
metastores List<GetMetastoresMetastore>
The list of metastores.
displayName String
Mutable name of the metastore.
filters List<GetMetastoresFilter>
state String
The current state of the metastore.
compartmentId string
OCID of the compartment which holds the metastore.
id string
The provider-assigned unique ID for this managed resource.
metastores GetMetastoresMetastore[]
The list of metastores.
displayName string
Mutable name of the metastore.
filters GetMetastoresFilter[]
state string
The current state of the metastore.
compartment_id str
OCID of the compartment which holds the metastore.
id str
The provider-assigned unique ID for this managed resource.
metastores Sequence[datacatalog.GetMetastoresMetastore]
The list of metastores.
display_name str
Mutable name of the metastore.
filters Sequence[datacatalog.GetMetastoresFilter]
state str
The current state of the metastore.
compartmentId String
OCID of the compartment which holds the metastore.
id String
The provider-assigned unique ID for this managed resource.
metastores List<Property Map>
The list of metastores.
displayName String
Mutable name of the metastore.
filters List<Property Map>
state String
The current state of the metastore.

Supporting Types

GetMetastoresFilter

Name This property is required. string
Values This property is required. List<string>
Regex bool
Name This property is required. string
Values This property is required. []string
Regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean
name This property is required. string
values This property is required. string[]
regex boolean
name This property is required. str
values This property is required. Sequence[str]
regex bool
name This property is required. String
values This property is required. List<String>
regex Boolean

GetMetastoresMetastore

CompartmentId This property is required. string
The OCID of the compartment where you want to list resources.
DefaultExternalTableLocation This property is required. string
Location under which external tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
DefaultManagedTableLocation This property is required. string
Location under which managed tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
DefinedTags This property is required. Dictionary<string, string>
Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"foo-namespace.bar-key": "value"}
DisplayName This property is required. string
A filter to return only resources that match the entire display name given. The match is not case sensitive.
FreeformTags This property is required. Dictionary<string, string>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
Id This property is required. string
The metastore's OCID.
LifecycleDetails This property is required. string
A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
Locks This property is required. List<GetMetastoresMetastoreLock>
Locks associated with this resource.
State This property is required. string
A filter to return only resources that match the specified lifecycle state. The value is case insensitive.
SystemTags This property is required. Dictionary<string, string>
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated This property is required. string
Time at which the metastore was created. An RFC3339 formatted datetime string.
TimeUpdated This property is required. string
Time at which the metastore was last modified. An RFC3339 formatted datetime string.
CompartmentId This property is required. string
The OCID of the compartment where you want to list resources.
DefaultExternalTableLocation This property is required. string
Location under which external tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
DefaultManagedTableLocation This property is required. string
Location under which managed tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
DefinedTags This property is required. map[string]string
Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"foo-namespace.bar-key": "value"}
DisplayName This property is required. string
A filter to return only resources that match the entire display name given. The match is not case sensitive.
FreeformTags This property is required. map[string]string
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
Id This property is required. string
The metastore's OCID.
LifecycleDetails This property is required. string
A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
Locks This property is required. []GetMetastoresMetastoreLock
Locks associated with this resource.
State This property is required. string
A filter to return only resources that match the specified lifecycle state. The value is case insensitive.
SystemTags This property is required. map[string]string
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated This property is required. string
Time at which the metastore was created. An RFC3339 formatted datetime string.
TimeUpdated This property is required. string
Time at which the metastore was last modified. An RFC3339 formatted datetime string.
compartmentId This property is required. String
The OCID of the compartment where you want to list resources.
defaultExternalTableLocation This property is required. String
Location under which external tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
defaultManagedTableLocation This property is required. String
Location under which managed tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
definedTags This property is required. Map<String,String>
Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"foo-namespace.bar-key": "value"}
displayName This property is required. String
A filter to return only resources that match the entire display name given. The match is not case sensitive.
freeformTags This property is required. Map<String,String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
id This property is required. String
The metastore's OCID.
lifecycleDetails This property is required. String
A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
locks This property is required. List<GetMetastoresMetastoreLock>
Locks associated with this resource.
state This property is required. String
A filter to return only resources that match the specified lifecycle state. The value is case insensitive.
systemTags This property is required. Map<String,String>
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated This property is required. String
Time at which the metastore was created. An RFC3339 formatted datetime string.
timeUpdated This property is required. String
Time at which the metastore was last modified. An RFC3339 formatted datetime string.
compartmentId This property is required. string
The OCID of the compartment where you want to list resources.
defaultExternalTableLocation This property is required. string
Location under which external tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
defaultManagedTableLocation This property is required. string
Location under which managed tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
definedTags This property is required. {[key: string]: string}
Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"foo-namespace.bar-key": "value"}
displayName This property is required. string
A filter to return only resources that match the entire display name given. The match is not case sensitive.
freeformTags This property is required. {[key: string]: string}
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
id This property is required. string
The metastore's OCID.
lifecycleDetails This property is required. string
A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
locks This property is required. GetMetastoresMetastoreLock[]
Locks associated with this resource.
state This property is required. string
A filter to return only resources that match the specified lifecycle state. The value is case insensitive.
systemTags This property is required. {[key: string]: string}
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated This property is required. string
Time at which the metastore was created. An RFC3339 formatted datetime string.
timeUpdated This property is required. string
Time at which the metastore was last modified. An RFC3339 formatted datetime string.
compartment_id This property is required. str
The OCID of the compartment where you want to list resources.
default_external_table_location This property is required. str
Location under which external tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
default_managed_table_location This property is required. str
Location under which managed tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
defined_tags This property is required. Mapping[str, str]
Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"foo-namespace.bar-key": "value"}
display_name This property is required. str
A filter to return only resources that match the entire display name given. The match is not case sensitive.
freeform_tags This property is required. Mapping[str, str]
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
id This property is required. str
The metastore's OCID.
lifecycle_details This property is required. str
A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
locks This property is required. Sequence[datacatalog.GetMetastoresMetastoreLock]
Locks associated with this resource.
state This property is required. str
A filter to return only resources that match the specified lifecycle state. The value is case insensitive.
system_tags This property is required. Mapping[str, str]
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
time_created This property is required. str
Time at which the metastore was created. An RFC3339 formatted datetime string.
time_updated This property is required. str
Time at which the metastore was last modified. An RFC3339 formatted datetime string.
compartmentId This property is required. String
The OCID of the compartment where you want to list resources.
defaultExternalTableLocation This property is required. String
Location under which external tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
defaultManagedTableLocation This property is required. String
Location under which managed tables will be created by default. This references Object Storage using an HDFS URI format. Example: oci://bucket@namespace/sub-dir/
definedTags This property is required. Map<String>
Usage of predefined tag keys. These predefined keys are scoped to namespaces. Example: {"foo-namespace.bar-key": "value"}
displayName This property is required. String
A filter to return only resources that match the entire display name given. The match is not case sensitive.
freeformTags This property is required. Map<String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
id This property is required. String
The metastore's OCID.
lifecycleDetails This property is required. String
A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
locks This property is required. List<Property Map>
Locks associated with this resource.
state This property is required. String
A filter to return only resources that match the specified lifecycle state. The value is case insensitive.
systemTags This property is required. Map<String>
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated This property is required. String
Time at which the metastore was created. An RFC3339 formatted datetime string.
timeUpdated This property is required. String
Time at which the metastore was last modified. An RFC3339 formatted datetime string.

GetMetastoresMetastoreLock

Message This property is required. string
A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.
RelatedResourceId This property is required. string
The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.
TimeCreated This property is required. string
Time at which the metastore was created. An RFC3339 formatted datetime string.
Type This property is required. string
Type of the lock.
Message This property is required. string
A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.
RelatedResourceId This property is required. string
The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.
TimeCreated This property is required. string
Time at which the metastore was created. An RFC3339 formatted datetime string.
Type This property is required. string
Type of the lock.
message This property is required. String
A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.
relatedResourceId This property is required. String
The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.
timeCreated This property is required. String
Time at which the metastore was created. An RFC3339 formatted datetime string.
type This property is required. String
Type of the lock.
message This property is required. string
A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.
relatedResourceId This property is required. string
The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.
timeCreated This property is required. string
Time at which the metastore was created. An RFC3339 formatted datetime string.
type This property is required. string
Type of the lock.
message This property is required. str
A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.
related_resource_id This property is required. str
The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.
time_created This property is required. str
Time at which the metastore was created. An RFC3339 formatted datetime string.
type This property is required. str
Type of the lock.
message This property is required. String
A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.
relatedResourceId This property is required. String
The id of the resource that is locking this resource. Indicates that deleting this resource will remove the lock.
timeCreated This property is required. String
Time at which the metastore was created. An RFC3339 formatted datetime string.
type This property is required. String
Type of the lock.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi