Oracle Cloud Infrastructure v3.7.0 published on Saturday, Sep 13, 2025 by Pulumi
oci.GenerativeAi.getAgentKnowledgeBase
Explore with Pulumi AI
This data source provides details about a specific Knowledge Base resource in Oracle Cloud Infrastructure Generative Ai Agent service.
Gets information about a knowledge base.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testKnowledgeBase = oci.GenerativeAi.getAgentKnowledgeBase({
knowledgeBaseId: testKnowledgeBaseOciGenerativeAiAgentKnowledgeBase.id,
});
import pulumi
import pulumi_oci as oci
test_knowledge_base = oci.GenerativeAi.get_agent_knowledge_base(knowledge_base_id=test_knowledge_base_oci_generative_ai_agent_knowledge_base["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/generativeai"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := generativeai.GetAgentKnowledgeBase(ctx, &generativeai.GetAgentKnowledgeBaseArgs{
KnowledgeBaseId: testKnowledgeBaseOciGenerativeAiAgentKnowledgeBase.Id,
}, 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 testKnowledgeBase = Oci.GenerativeAi.GetAgentKnowledgeBase.Invoke(new()
{
KnowledgeBaseId = testKnowledgeBaseOciGenerativeAiAgentKnowledgeBase.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.GenerativeAi.GenerativeAiFunctions;
import com.pulumi.oci.GenerativeAi.inputs.GetAgentKnowledgeBaseArgs;
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 testKnowledgeBase = GenerativeAiFunctions.getAgentKnowledgeBase(GetAgentKnowledgeBaseArgs.builder()
.knowledgeBaseId(testKnowledgeBaseOciGenerativeAiAgentKnowledgeBase.id())
.build());
}
}
variables:
testKnowledgeBase:
fn::invoke:
function: oci:GenerativeAi:getAgentKnowledgeBase
arguments:
knowledgeBaseId: ${testKnowledgeBaseOciGenerativeAiAgentKnowledgeBase.id}
Using getAgentKnowledgeBase
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 getAgentKnowledgeBase(args: GetAgentKnowledgeBaseArgs, opts?: InvokeOptions): Promise<GetAgentKnowledgeBaseResult>
function getAgentKnowledgeBaseOutput(args: GetAgentKnowledgeBaseOutputArgs, opts?: InvokeOptions): Output<GetAgentKnowledgeBaseResult>
def get_agent_knowledge_base(knowledge_base_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAgentKnowledgeBaseResult
def get_agent_knowledge_base_output(knowledge_base_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAgentKnowledgeBaseResult]
func LookupAgentKnowledgeBase(ctx *Context, args *LookupAgentKnowledgeBaseArgs, opts ...InvokeOption) (*LookupAgentKnowledgeBaseResult, error)
func LookupAgentKnowledgeBaseOutput(ctx *Context, args *LookupAgentKnowledgeBaseOutputArgs, opts ...InvokeOption) LookupAgentKnowledgeBaseResultOutput
> Note: This function is named LookupAgentKnowledgeBase
in the Go SDK.
public static class GetAgentKnowledgeBase
{
public static Task<GetAgentKnowledgeBaseResult> InvokeAsync(GetAgentKnowledgeBaseArgs args, InvokeOptions? opts = null)
public static Output<GetAgentKnowledgeBaseResult> Invoke(GetAgentKnowledgeBaseInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAgentKnowledgeBaseResult> getAgentKnowledgeBase(GetAgentKnowledgeBaseArgs args, InvokeOptions options)
public static Output<GetAgentKnowledgeBaseResult> getAgentKnowledgeBase(GetAgentKnowledgeBaseArgs args, InvokeOptions options)
fn::invoke:
function: oci:GenerativeAi/getAgentKnowledgeBase:getAgentKnowledgeBase
arguments:
# arguments dictionary
The following arguments are supported:
- Knowledge
Base stringId - The OCID of the knowledge base.
- Knowledge
Base stringId - The OCID of the knowledge base.
- knowledge
Base StringId - The OCID of the knowledge base.
- knowledge
Base stringId - The OCID of the knowledge base.
- knowledge_
base_ strid - The OCID of the knowledge base.
- knowledge
Base StringId - The OCID of the knowledge base.
getAgentKnowledgeBase Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
- A description of the knowledge base.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable.
- Dictionary<string, string>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Id string
- The OCID of the knowledge base.
- Index
Configs List<GetAgent Knowledge Base Index Config> - The index configuration of Knowledge bases.
- Knowledge
Base stringId - Knowledge
Base List<GetStatistics Agent Knowledge Base Knowledge Base Statistic> - Statistics for Default Knowledge Base.
- Lifecycle
Details string - A message that describes the current state of the knowledge base in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- State string
- The current state of the knowledge base.
- Dictionary<string, string>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The date and time the knowledge base was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- Time
Updated string - The date and time the knowledge base was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- Compartment
Id string - The OCID of the compartment.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
- A description of the knowledge base.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable.
- map[string]string
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Id string
- The OCID of the knowledge base.
- Index
Configs []GetAgent Knowledge Base Index Config - The index configuration of Knowledge bases.
- Knowledge
Base stringId - Knowledge
Base []GetStatistics Agent Knowledge Base Knowledge Base Statistic - Statistics for Default Knowledge Base.
- Lifecycle
Details string - A message that describes the current state of the knowledge base in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- State string
- The current state of the knowledge base.
- map[string]string
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The date and time the knowledge base was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- Time
Updated string - The date and time the knowledge base was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- compartment
Id String - The OCID of the compartment.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
- A description of the knowledge base.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable.
- Map<String,String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id String
- The OCID of the knowledge base.
- index
Configs List<GetAgent Knowledge Base Index Config> - The index configuration of Knowledge bases.
- knowledge
Base StringId - knowledge
Base List<GetStatistics Agent Knowledge Base Knowledge Base Statistic> - Statistics for Default Knowledge Base.
- lifecycle
Details String - A message that describes the current state of the knowledge base in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- state String
- The current state of the knowledge base.
- Map<String,String>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The date and time the knowledge base was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- time
Updated String - The date and time the knowledge base was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- compartment
Id string - The OCID of the compartment.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description string
- A description of the knowledge base.
- display
Name string - A user-friendly name. Does not have to be unique, and it's changeable.
- {[key: string]: string}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id string
- The OCID of the knowledge base.
- index
Configs GetAgent Knowledge Base Index Config[] - The index configuration of Knowledge bases.
- knowledge
Base stringId - knowledge
Base GetStatistics Agent Knowledge Base Knowledge Base Statistic[] - Statistics for Default Knowledge Base.
- lifecycle
Details string - A message that describes the current state of the knowledge base in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- state string
- The current state of the knowledge base.
- {[key: string]: string}
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created string - The date and time the knowledge base was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- time
Updated string - The date and time the knowledge base was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- compartment_
id str - The OCID of the compartment.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description str
- A description of the knowledge base.
- display_
name str - A user-friendly name. Does not have to be unique, and it's changeable.
- Mapping[str, str]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id str
- The OCID of the knowledge base.
- index_
configs Sequence[GetAgent Knowledge Base Index Config] - The index configuration of Knowledge bases.
- knowledge_
base_ strid - knowledge_
base_ Sequence[Getstatistics Agent Knowledge Base Knowledge Base Statistic] - Statistics for Default Knowledge Base.
- lifecycle_
details str - A message that describes the current state of the knowledge base in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- state str
- The current state of the knowledge base.
- Mapping[str, str]
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time_
created str - The date and time the knowledge base was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- time_
updated str - The date and time the knowledge base was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- compartment
Id String - The OCID of the compartment.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
- A description of the knowledge base.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable.
- Map<String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id String
- The OCID of the knowledge base.
- index
Configs List<Property Map> - The index configuration of Knowledge bases.
- knowledge
Base StringId - knowledge
Base List<Property Map>Statistics - Statistics for Default Knowledge Base.
- lifecycle
Details String - A message that describes the current state of the knowledge base in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- state String
- The current state of the knowledge base.
- Map<String>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The date and time the knowledge base was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- time
Updated String - The date and time the knowledge base was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
Supporting Types
GetAgentKnowledgeBaseIndexConfig
- Cluster
Id string - The OCID of the OpenSearch Cluster.
- Database
Connections List<GetAgent Knowledge Base Index Config Database Connection> - The connection type for Databases.
- Database
Functions List<GetAgent Knowledge Base Index Config Database Function> - Array of Database functions to be used.
- Index
Config stringType - The type of index.
- Indexes
List<Get
Agent Knowledge Base Index Config Index> - Index configuration for open search.
- Secret
Details List<GetAgent Knowledge Base Index Config Secret Detail> - The details of configured security configuration on OpenSearch.
- Should
Enable boolHybrid Search - Whether to enable Hybrid search in service managed OpenSearch.
- Cluster
Id string - The OCID of the OpenSearch Cluster.
- Database
Connections []GetAgent Knowledge Base Index Config Database Connection - The connection type for Databases.
- Database
Functions []GetAgent Knowledge Base Index Config Database Function - Array of Database functions to be used.
- Index
Config stringType - The type of index.
- Indexes
[]Get
Agent Knowledge Base Index Config Index - Index configuration for open search.
- Secret
Details []GetAgent Knowledge Base Index Config Secret Detail - The details of configured security configuration on OpenSearch.
- Should
Enable boolHybrid Search - Whether to enable Hybrid search in service managed OpenSearch.
- cluster
Id String - The OCID of the OpenSearch Cluster.
- database
Connections List<GetAgent Knowledge Base Index Config Database Connection> - The connection type for Databases.
- database
Functions List<GetAgent Knowledge Base Index Config Database Function> - Array of Database functions to be used.
- index
Config StringType - The type of index.
- indexes
List<Get
Agent Knowledge Base Index Config Index> - Index configuration for open search.
- secret
Details List<GetAgent Knowledge Base Index Config Secret Detail> - The details of configured security configuration on OpenSearch.
- should
Enable BooleanHybrid Search - Whether to enable Hybrid search in service managed OpenSearch.
- cluster
Id string - The OCID of the OpenSearch Cluster.
- database
Connections GetAgent Knowledge Base Index Config Database Connection[] - The connection type for Databases.
- database
Functions GetAgent Knowledge Base Index Config Database Function[] - Array of Database functions to be used.
- index
Config stringType - The type of index.
- indexes
Get
Agent Knowledge Base Index Config Index[] - Index configuration for open search.
- secret
Details GetAgent Knowledge Base Index Config Secret Detail[] - The details of configured security configuration on OpenSearch.
- should
Enable booleanHybrid Search - Whether to enable Hybrid search in service managed OpenSearch.
- cluster_
id str - The OCID of the OpenSearch Cluster.
- database_
connections Sequence[GetAgent Knowledge Base Index Config Database Connection] - The connection type for Databases.
- database_
functions Sequence[GetAgent Knowledge Base Index Config Database Function] - Array of Database functions to be used.
- index_
config_ strtype - The type of index.
- indexes
Sequence[Get
Agent Knowledge Base Index Config Index] - Index configuration for open search.
- secret_
details Sequence[GetAgent Knowledge Base Index Config Secret Detail] - The details of configured security configuration on OpenSearch.
- should_
enable_ boolhybrid_ search - Whether to enable Hybrid search in service managed OpenSearch.
- cluster
Id String - The OCID of the OpenSearch Cluster.
- database
Connections List<Property Map> - The connection type for Databases.
- database
Functions List<Property Map> - Array of Database functions to be used.
- index
Config StringType - The type of index.
- indexes List<Property Map>
- Index configuration for open search.
- secret
Details List<Property Map> - The details of configured security configuration on OpenSearch.
- should
Enable BooleanHybrid Search - Whether to enable Hybrid search in service managed OpenSearch.
GetAgentKnowledgeBaseIndexConfigDatabaseConnection
- Connection
Id string - The OCID of the Database Tools Connection.
- Connection
Type string - The type of Database connection.
- Connection
Id string - The OCID of the Database Tools Connection.
- Connection
Type string - The type of Database connection.
- connection
Id String - The OCID of the Database Tools Connection.
- connection
Type String - The type of Database connection.
- connection
Id string - The OCID of the Database Tools Connection.
- connection
Type string - The type of Database connection.
- connection_
id str - The OCID of the Database Tools Connection.
- connection_
type str - The type of Database connection.
- connection
Id String - The OCID of the Database Tools Connection.
- connection
Type String - The type of Database connection.
GetAgentKnowledgeBaseIndexConfigDatabaseFunction
- Name string
- The index name in opensearch.
- Name string
- The index name in opensearch.
- name String
- The index name in opensearch.
- name string
- The index name in opensearch.
- name str
- The index name in opensearch.
- name String
- The index name in opensearch.
GetAgentKnowledgeBaseIndexConfigIndex
- Name string
- The index name in opensearch.
- Schemas
List<Get
Agent Knowledge Base Index Config Index Schema> - The index schema details.
- Name string
- The index name in opensearch.
- Schemas
[]Get
Agent Knowledge Base Index Config Index Schema - The index schema details.
- name String
- The index name in opensearch.
- schemas
List<Get
Agent Knowledge Base Index Config Index Schema> - The index schema details.
- name string
- The index name in opensearch.
- schemas
Get
Agent Knowledge Base Index Config Index Schema[] - The index schema details.
- name str
- The index name in opensearch.
- schemas
Sequence[Get
Agent Knowledge Base Index Config Index Schema] - The index schema details.
- name String
- The index name in opensearch.
- schemas List<Property Map>
- The index schema details.
GetAgentKnowledgeBaseIndexConfigIndexSchema
- Body
Key string - Body key name.
- Embedding
Body stringKey - Field within customer managed Oracle Cloud Infrastructure OpenSearch document containing the vector embedding for queries.
- Title
Key string - Title key that stores the Title of a document, if available.
- Url
Key string - URL key that stores the URL of a document, if available.
- Body
Key string - Body key name.
- Embedding
Body stringKey - Field within customer managed Oracle Cloud Infrastructure OpenSearch document containing the vector embedding for queries.
- Title
Key string - Title key that stores the Title of a document, if available.
- Url
Key string - URL key that stores the URL of a document, if available.
- body
Key String - Body key name.
- embedding
Body StringKey - Field within customer managed Oracle Cloud Infrastructure OpenSearch document containing the vector embedding for queries.
- title
Key String - Title key that stores the Title of a document, if available.
- url
Key String - URL key that stores the URL of a document, if available.
- body
Key string - Body key name.
- embedding
Body stringKey - Field within customer managed Oracle Cloud Infrastructure OpenSearch document containing the vector embedding for queries.
- title
Key string - Title key that stores the Title of a document, if available.
- url
Key string - URL key that stores the URL of a document, if available.
- body_
key str - Body key name.
- embedding_
body_ strkey - Field within customer managed Oracle Cloud Infrastructure OpenSearch document containing the vector embedding for queries.
- title_
key str - Title key that stores the Title of a document, if available.
- url_
key str - URL key that stores the URL of a document, if available.
- body
Key String - Body key name.
- embedding
Body StringKey - Field within customer managed Oracle Cloud Infrastructure OpenSearch document containing the vector embedding for queries.
- title
Key String - Title key that stores the Title of a document, if available.
- url
Key String - URL key that stores the URL of a document, if available.
GetAgentKnowledgeBaseIndexConfigSecretDetail
GetAgentKnowledgeBaseKnowledgeBaseStatistic
- Size
In stringBytes - Knowledge Base size in bytes.
- Total
Ingested stringFiles - Total number of ingested files in Knowledge Base.
- Size
In stringBytes - Knowledge Base size in bytes.
- Total
Ingested stringFiles - Total number of ingested files in Knowledge Base.
- size
In StringBytes - Knowledge Base size in bytes.
- total
Ingested StringFiles - Total number of ingested files in Knowledge Base.
- size
In stringBytes - Knowledge Base size in bytes.
- total
Ingested stringFiles - Total number of ingested files in Knowledge Base.
- size_
in_ strbytes - Knowledge Base size in bytes.
- total_
ingested_ strfiles - Total number of ingested files in Knowledge Base.
- size
In StringBytes - Knowledge Base size in bytes.
- total
Ingested StringFiles - Total number of ingested files in Knowledge Base.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.