Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi
oci.Adm.getKnowledgebases
Start a Neo task
Explain and create an oci.Adm.getKnowledgebases resource
This data source provides the list of Knowledge Bases in Oracle Cloud Infrastructure ADM service.
Returns a list of KnowledgeBases based on the specified query parameters. At least id or compartmentId query parameter must be provided.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testKnowledgeBases = oci.Adm.getKnowledgebases({
compartmentId: compartmentId,
displayName: knowledgeBaseDisplayName,
id: knowledgeBaseId,
state: knowledgeBaseState,
});
import pulumi
import pulumi_oci as oci
test_knowledge_bases = oci.Adm.get_knowledgebases(compartment_id=compartment_id,
display_name=knowledge_base_display_name,
id=knowledge_base_id,
state=knowledge_base_state)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/adm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := adm.GetKnowledgebases(ctx, &adm.GetKnowledgebasesArgs{
CompartmentId: pulumi.StringRef(compartmentId),
DisplayName: pulumi.StringRef(knowledgeBaseDisplayName),
Id: pulumi.StringRef(knowledgeBaseId),
State: pulumi.StringRef(knowledgeBaseState),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testKnowledgeBases = Oci.Adm.GetKnowledgebases.Invoke(new()
{
CompartmentId = compartmentId,
DisplayName = knowledgeBaseDisplayName,
Id = knowledgeBaseId,
State = knowledgeBaseState,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Adm.AdmFunctions;
import com.pulumi.oci.Adm.inputs.GetKnowledgebasesArgs;
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 testKnowledgeBases = AdmFunctions.getKnowledgebases(GetKnowledgebasesArgs.builder()
.compartmentId(compartmentId)
.displayName(knowledgeBaseDisplayName)
.id(knowledgeBaseId)
.state(knowledgeBaseState)
.build());
}
}
variables:
testKnowledgeBases:
fn::invoke:
function: oci:Adm:getKnowledgebases
arguments:
compartmentId: ${compartmentId}
displayName: ${knowledgeBaseDisplayName}
id: ${knowledgeBaseId}
state: ${knowledgeBaseState}
Using getKnowledgebases
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 getKnowledgebases(args: GetKnowledgebasesArgs, opts?: InvokeOptions): Promise<GetKnowledgebasesResult>
function getKnowledgebasesOutput(args: GetKnowledgebasesOutputArgs, opts?: InvokeOptions): Output<GetKnowledgebasesResult>def get_knowledgebases(compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[GetKnowledgebasesFilter]] = None,
id: Optional[str] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetKnowledgebasesResult
def get_knowledgebases_output(compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetKnowledgebasesFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetKnowledgebasesResult]func GetKnowledgebases(ctx *Context, args *GetKnowledgebasesArgs, opts ...InvokeOption) (*GetKnowledgebasesResult, error)
func GetKnowledgebasesOutput(ctx *Context, args *GetKnowledgebasesOutputArgs, opts ...InvokeOption) GetKnowledgebasesResultOutput> Note: This function is named GetKnowledgebases in the Go SDK.
public static class GetKnowledgebases
{
public static Task<GetKnowledgebasesResult> InvokeAsync(GetKnowledgebasesArgs args, InvokeOptions? opts = null)
public static Output<GetKnowledgebasesResult> Invoke(GetKnowledgebasesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetKnowledgebasesResult> getKnowledgebases(GetKnowledgebasesArgs args, InvokeOptions options)
public static Output<GetKnowledgebasesResult> getKnowledgebases(GetKnowledgebasesArgs args, InvokeOptions options)
fn::invoke:
function: oci:Adm/getKnowledgebases:getKnowledgebases
arguments:
# arguments dictionaryThe following arguments are supported:
- Compartment
Id string - A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.
- Display
Name string - A filter to return only resources that match the entire display name given.
- Filters
List<Get
Knowledgebases Filter> - Id string
- A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.
- State string
- A filter to return only Knowledge Bases that match the specified lifecycleState.
- Compartment
Id string - A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.
- Display
Name string - A filter to return only resources that match the entire display name given.
- Filters
[]Get
Knowledgebases Filter - Id string
- A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.
- State string
- A filter to return only Knowledge Bases that match the specified lifecycleState.
- compartment
Id String - A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.
- display
Name String - A filter to return only resources that match the entire display name given.
- filters
List<Get
Knowledgebases Filter> - id String
- A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.
- state String
- A filter to return only Knowledge Bases that match the specified lifecycleState.
- compartment
Id string - A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.
- display
Name string - A filter to return only resources that match the entire display name given.
- filters
Get
Knowledgebases Filter[] - id string
- A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.
- state string
- A filter to return only Knowledge Bases that match the specified lifecycleState.
- compartment_
id str - A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.
- display_
name str - A filter to return only resources that match the entire display name given.
- filters
Sequence[Get
Knowledgebases Filter] - id str
- A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.
- state str
- A filter to return only Knowledge Bases that match the specified lifecycleState.
- compartment
Id String - A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.
- display
Name String - A filter to return only resources that match the entire display name given.
- filters List<Property Map>
- id String
- A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.
- state String
- A filter to return only Knowledge Bases that match the specified lifecycleState.
getKnowledgebases Result
The following output properties are available:
- Knowledge
Base List<GetCollections Knowledgebases Knowledge Base Collection> - The list of knowledge_base_collection.
- Compartment
Id string - The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
- Display
Name string - The name of the knowledge base.
- Filters
List<Get
Knowledgebases Filter> - Id string
- The Oracle Cloud Identifier (OCID) of the knowledge base.
- State string
- The current lifecycle state of the knowledge base.
- Knowledge
Base []GetCollections Knowledgebases Knowledge Base Collection - The list of knowledge_base_collection.
- Compartment
Id string - The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
- Display
Name string - The name of the knowledge base.
- Filters
[]Get
Knowledgebases Filter - Id string
- The Oracle Cloud Identifier (OCID) of the knowledge base.
- State string
- The current lifecycle state of the knowledge base.
- knowledge
Base List<GetCollections Knowledgebases Knowledge Base Collection> - The list of knowledge_base_collection.
- compartment
Id String - The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
- display
Name String - The name of the knowledge base.
- filters
List<Get
Knowledgebases Filter> - id String
- The Oracle Cloud Identifier (OCID) of the knowledge base.
- state String
- The current lifecycle state of the knowledge base.
- knowledge
Base GetCollections Knowledgebases Knowledge Base Collection[] - The list of knowledge_base_collection.
- compartment
Id string - The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
- display
Name string - The name of the knowledge base.
- filters
Get
Knowledgebases Filter[] - id string
- The Oracle Cloud Identifier (OCID) of the knowledge base.
- state string
- The current lifecycle state of the knowledge base.
- knowledge_
base_ Sequence[Getcollections Knowledgebases Knowledge Base Collection] - The list of knowledge_base_collection.
- compartment_
id str - The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
- display_
name str - The name of the knowledge base.
- filters
Sequence[Get
Knowledgebases Filter] - id str
- The Oracle Cloud Identifier (OCID) of the knowledge base.
- state str
- The current lifecycle state of the knowledge base.
- knowledge
Base List<Property Map>Collections - The list of knowledge_base_collection.
- compartment
Id String - The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
- display
Name String - The name of the knowledge base.
- filters List<Property Map>
- id String
- The Oracle Cloud Identifier (OCID) of the knowledge base.
- state String
- The current lifecycle state of the knowledge base.
Supporting Types
GetKnowledgebasesFilter
GetKnowledgebasesKnowledgeBaseCollection
- Items
List<Get
Knowledgebases Knowledge Base Collection Item> - List of knowledge base summaries.
- Items
[]Get
Knowledgebases Knowledge Base Collection Item - List of knowledge base summaries.
- items
List<Get
Knowledgebases Knowledge Base Collection Item> - List of knowledge base summaries.
- items
Get
Knowledgebases Knowledge Base Collection Item[] - List of knowledge base summaries.
- items
Sequence[Get
Knowledgebases Knowledge Base Collection Item] - List of knowledge base summaries.
- items List<Property Map>
- List of knowledge base summaries.
GetKnowledgebasesKnowledgeBaseCollectionItem
- Compartment
Id string - A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"} - Display
Name string - A filter to return only resources that match the entire display name given.
- 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 string
- A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.
- State string
- A filter to return only Knowledge Bases that match the specified lifecycleState.
- Dictionary<string, string>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"} - Time
Created string - The creation date and time of the knowledge base (formatted according to RFC3339).
- Time
Updated string - The date and time the knowledge base was last updated (formatted according to RFC3339).
- Compartment
Id string - A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"} - Display
Name string - A filter to return only resources that match the entire display name given.
- 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 string
- A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.
- State string
- A filter to return only Knowledge Bases that match the specified lifecycleState.
- map[string]string
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"} - Time
Created string - The creation date and time of the knowledge base (formatted according to RFC3339).
- Time
Updated string - The date and time the knowledge base was last updated (formatted according to RFC3339).
- compartment
Id String - A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"} - display
Name String - A filter to return only resources that match the entire display name given.
- 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 String
- A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.
- state String
- A filter to return only Knowledge Bases that match the specified lifecycleState.
- Map<String,String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"} - time
Created String - The creation date and time of the knowledge base (formatted according to RFC3339).
- time
Updated String - The date and time the knowledge base was last updated (formatted according to RFC3339).
- compartment
Id string - A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"} - display
Name string - A filter to return only resources that match the entire display name given.
- {[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 string
- A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.
- state string
- A filter to return only Knowledge Bases that match the specified lifecycleState.
- {[key: string]: string}
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"} - time
Created string - The creation date and time of the knowledge base (formatted according to RFC3339).
- time
Updated string - The date and time the knowledge base was last updated (formatted according to RFC3339).
- compartment_
id str - A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"} - display_
name str - A filter to return only resources that match the entire display name given.
- 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 str
- A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.
- state str
- A filter to return only Knowledge Bases that match the specified lifecycleState.
- Mapping[str, str]
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"} - time_
created str - The creation date and time of the knowledge base (formatted according to RFC3339).
- time_
updated str - The date and time the knowledge base was last updated (formatted according to RFC3339).
- compartment
Id String - A filter to return only resources that belong to the specified compartment identifier. Required only if the id query param is not specified.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"} - display
Name String - A filter to return only resources that match the entire display name given.
- 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 String
- A filter to return only resources that match the specified identifier. Required only if the compartmentId query parameter is not specified.
- state String
- A filter to return only Knowledge Bases that match the specified lifecycleState.
- Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"} - time
Created String - The creation date and time of the knowledge base (formatted according to RFC3339).
- time
Updated String - The date and time the knowledge base was last updated (formatted according to RFC3339).
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ociTerraform Provider.
