Oracle Cloud Infrastructure v3.10.0 published on Wednesday, Nov 5, 2025 by Pulumi
oci.GenerativeAi.getAgentDataSources
Start a Neo task
Explain and create an oci.GenerativeAi.getAgentDataSources resource
This data source provides the list of Data Sources in Oracle Cloud Infrastructure Generative Ai Agent service.
Gets a list of data sources.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testDataSources = oci.GenerativeAi.getAgentDataSources({
compartmentId: compartmentId,
displayName: dataSourceDisplayName,
knowledgeBaseId: testKnowledgeBase.id,
state: dataSourceState,
});
import pulumi
import pulumi_oci as oci
test_data_sources = oci.GenerativeAi.get_agent_data_sources(compartment_id=compartment_id,
display_name=data_source_display_name,
knowledge_base_id=test_knowledge_base["id"],
state=data_source_state)
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.GetAgentDataSources(ctx, &generativeai.GetAgentDataSourcesArgs{
CompartmentId: pulumi.StringRef(compartmentId),
DisplayName: pulumi.StringRef(dataSourceDisplayName),
KnowledgeBaseId: pulumi.StringRef(testKnowledgeBase.Id),
State: pulumi.StringRef(dataSourceState),
}, 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 testDataSources = Oci.GenerativeAi.GetAgentDataSources.Invoke(new()
{
CompartmentId = compartmentId,
DisplayName = dataSourceDisplayName,
KnowledgeBaseId = testKnowledgeBase.Id,
State = dataSourceState,
});
});
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.GetAgentDataSourcesArgs;
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 testDataSources = GenerativeAiFunctions.getAgentDataSources(GetAgentDataSourcesArgs.builder()
.compartmentId(compartmentId)
.displayName(dataSourceDisplayName)
.knowledgeBaseId(testKnowledgeBase.id())
.state(dataSourceState)
.build());
}
}
variables:
testDataSources:
fn::invoke:
function: oci:GenerativeAi:getAgentDataSources
arguments:
compartmentId: ${compartmentId}
displayName: ${dataSourceDisplayName}
knowledgeBaseId: ${testKnowledgeBase.id}
state: ${dataSourceState}
Using getAgentDataSources
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 getAgentDataSources(args: GetAgentDataSourcesArgs, opts?: InvokeOptions): Promise<GetAgentDataSourcesResult>
function getAgentDataSourcesOutput(args: GetAgentDataSourcesOutputArgs, opts?: InvokeOptions): Output<GetAgentDataSourcesResult>def get_agent_data_sources(compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[GetAgentDataSourcesFilter]] = None,
knowledge_base_id: Optional[str] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAgentDataSourcesResult
def get_agent_data_sources_output(compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetAgentDataSourcesFilterArgs]]]] = None,
knowledge_base_id: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAgentDataSourcesResult]func GetAgentDataSources(ctx *Context, args *GetAgentDataSourcesArgs, opts ...InvokeOption) (*GetAgentDataSourcesResult, error)
func GetAgentDataSourcesOutput(ctx *Context, args *GetAgentDataSourcesOutputArgs, opts ...InvokeOption) GetAgentDataSourcesResultOutput> Note: This function is named GetAgentDataSources in the Go SDK.
public static class GetAgentDataSources
{
public static Task<GetAgentDataSourcesResult> InvokeAsync(GetAgentDataSourcesArgs args, InvokeOptions? opts = null)
public static Output<GetAgentDataSourcesResult> Invoke(GetAgentDataSourcesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAgentDataSourcesResult> getAgentDataSources(GetAgentDataSourcesArgs args, InvokeOptions options)
public static Output<GetAgentDataSourcesResult> getAgentDataSources(GetAgentDataSourcesArgs args, InvokeOptions options)
fn::invoke:
function: oci:GenerativeAi/getAgentDataSources:getAgentDataSources
arguments:
# arguments dictionaryThe following arguments are supported:
- Compartment
Id string - The OCID of the compartment in which to list resources.
- Display
Name string - A filter to return only resources that match the given display name exactly.
- Filters
List<Get
Agent Data Sources Filter> - Knowledge
Base stringId - The OCID of the knowledge base.
- State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Compartment
Id string - The OCID of the compartment in which to list resources.
- Display
Name string - A filter to return only resources that match the given display name exactly.
- Filters
[]Get
Agent Data Sources Filter - Knowledge
Base stringId - The OCID of the knowledge base.
- State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- compartment
Id String - The OCID of the compartment in which to list resources.
- display
Name String - A filter to return only resources that match the given display name exactly.
- filters
List<Get
Agent Data Sources Filter> - knowledge
Base StringId - The OCID of the knowledge base.
- state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- compartment
Id string - The OCID of the compartment in which to list resources.
- display
Name string - A filter to return only resources that match the given display name exactly.
- filters
Get
Agent Data Sources Filter[] - knowledge
Base stringId - The OCID of the knowledge base.
- state string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- compartment_
id str - The OCID of the compartment in which to list resources.
- display_
name str - A filter to return only resources that match the given display name exactly.
- filters
Sequence[Get
Agent Data Sources Filter] - knowledge_
base_ strid - The OCID of the knowledge base.
- state str
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- compartment
Id String - The OCID of the compartment in which to list resources.
- display
Name String - A filter to return only resources that match the given display name exactly.
- filters List<Property Map>
- knowledge
Base StringId - The OCID of the knowledge base.
- state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
getAgentDataSources Result
The following output properties are available:
- Data
Source List<GetCollections Agent Data Sources Data Source Collection> - The list of data_source_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Compartment
Id string - The OCID of the compartment.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable.
- Filters
List<Get
Agent Data Sources Filter> - Knowledge
Base stringId - The OCID of the parent KnowledgeBase.
- State string
- The current state of the data source.
- Data
Source []GetCollections Agent Data Sources Data Source Collection - The list of data_source_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Compartment
Id string - The OCID of the compartment.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable.
- Filters
[]Get
Agent Data Sources Filter - Knowledge
Base stringId - The OCID of the parent KnowledgeBase.
- State string
- The current state of the data source.
- data
Source List<GetCollections Agent Data Sources Data Source Collection> - The list of data_source_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- compartment
Id String - The OCID of the compartment.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable.
- filters
List<Get
Agent Data Sources Filter> - knowledge
Base StringId - The OCID of the parent KnowledgeBase.
- state String
- The current state of the data source.
- data
Source GetCollections Agent Data Sources Data Source Collection[] - The list of data_source_collection.
- id string
- The provider-assigned unique ID for this managed resource.
- compartment
Id string - The OCID of the compartment.
- display
Name string - A user-friendly name. Does not have to be unique, and it's changeable.
- filters
Get
Agent Data Sources Filter[] - knowledge
Base stringId - The OCID of the parent KnowledgeBase.
- state string
- The current state of the data source.
- data_
source_ Sequence[Getcollections Agent Data Sources Data Source Collection] - The list of data_source_collection.
- id str
- The provider-assigned unique ID for this managed resource.
- compartment_
id str - The OCID of the compartment.
- display_
name str - A user-friendly name. Does not have to be unique, and it's changeable.
- filters
Sequence[Get
Agent Data Sources Filter] - knowledge_
base_ strid - The OCID of the parent KnowledgeBase.
- state str
- The current state of the data source.
- data
Source List<Property Map>Collections - The list of data_source_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- compartment
Id String - The OCID of the compartment.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable.
- filters List<Property Map>
- knowledge
Base StringId - The OCID of the parent KnowledgeBase.
- state String
- The current state of the data source.
Supporting Types
GetAgentDataSourcesDataSourceCollection
GetAgentDataSourcesDataSourceCollectionItem
- Compartment
Id string - The OCID of the compartment in which to list resources.
- Data
Source List<GetConfigs Agent Data Sources Data Source Collection Item Data Source Config> - The details of data source.
- 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 data source.
- Display
Name string - A filter to return only resources that match the given display name exactly.
- 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 data source.
- Knowledge
Base stringId - The OCID of the knowledge base.
- Lifecycle
Details string - A message that describes the current state of the data source in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- Metadata Dictionary<string, string>
- Key-value pairs to allow additional configurations.
- State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- 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 data source was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - Time
Updated string - The date and time the data source was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- Compartment
Id string - The OCID of the compartment in which to list resources.
- Data
Source []GetConfigs Agent Data Sources Data Source Collection Item Data Source Config - The details of data source.
- 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 data source.
- Display
Name string - A filter to return only resources that match the given display name exactly.
- 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 data source.
- Knowledge
Base stringId - The OCID of the knowledge base.
- Lifecycle
Details string - A message that describes the current state of the data source in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- Metadata map[string]string
- Key-value pairs to allow additional configurations.
- State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- 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 data source was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - Time
Updated string - The date and time the data source was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- compartment
Id String - The OCID of the compartment in which to list resources.
- data
Source List<GetConfigs Agent Data Sources Data Source Collection Item Data Source Config> - The details of data source.
- 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 data source.
- display
Name String - A filter to return only resources that match the given display name exactly.
- 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 data source.
- knowledge
Base StringId - The OCID of the knowledge base.
- lifecycle
Details String - A message that describes the current state of the data source in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- metadata Map<String,String>
- Key-value pairs to allow additional configurations.
- state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- 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 data source was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - time
Updated String - The date and time the data source was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- compartment
Id string - The OCID of the compartment in which to list resources.
- data
Source GetConfigs Agent Data Sources Data Source Collection Item Data Source Config[] - The details of data source.
- {[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 data source.
- display
Name string - A filter to return only resources that match the given display name exactly.
- {[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 data source.
- knowledge
Base stringId - The OCID of the knowledge base.
- lifecycle
Details string - A message that describes the current state of the data source in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- metadata {[key: string]: string}
- Key-value pairs to allow additional configurations.
- state string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- {[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 data source was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - time
Updated string - The date and time the data source was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- compartment_
id str - The OCID of the compartment in which to list resources.
- data_
source_ Sequence[Getconfigs Agent Data Sources Data Source Collection Item Data Source Config] - The details of data source.
- 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 data source.
- display_
name str - A filter to return only resources that match the given display name exactly.
- 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 data source.
- knowledge_
base_ strid - The OCID of the knowledge base.
- lifecycle_
details str - A message that describes the current state of the data source in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- metadata Mapping[str, str]
- Key-value pairs to allow additional configurations.
- state str
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- 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 data source was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - time_
updated str - The date and time the data source was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
- compartment
Id String - The OCID of the compartment in which to list resources.
- data
Source List<Property Map>Configs - The details of data source.
- 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 data source.
- display
Name String - A filter to return only resources that match the given display name exactly.
- 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 data source.
- knowledge
Base StringId - The OCID of the knowledge base.
- lifecycle
Details String - A message that describes the current state of the data source in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
- metadata Map<String>
- Key-value pairs to allow additional configurations.
- state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- 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 data source was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - time
Updated String - The date and time the data source was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z
GetAgentDataSourcesDataSourceCollectionItemDataSourceConfig
- Data
Source stringConfig Type - The type of the tool.
- Object
Storage List<GetPrefixes Agent Data Sources Data Source Collection Item Data Source Config Object Storage Prefix> - The locations of data items in Object Storage, can either be an object (File) or a prefix (folder).
- Data
Source stringConfig Type - The type of the tool.
- Object
Storage []GetPrefixes Agent Data Sources Data Source Collection Item Data Source Config Object Storage Prefix - The locations of data items in Object Storage, can either be an object (File) or a prefix (folder).
- data
Source StringConfig Type - The type of the tool.
- object
Storage List<GetPrefixes Agent Data Sources Data Source Collection Item Data Source Config Object Storage Prefix> - The locations of data items in Object Storage, can either be an object (File) or a prefix (folder).
- data
Source stringConfig Type - The type of the tool.
- object
Storage GetPrefixes Agent Data Sources Data Source Collection Item Data Source Config Object Storage Prefix[] - The locations of data items in Object Storage, can either be an object (File) or a prefix (folder).
- data_
source_ strconfig_ type - The type of the tool.
- object_
storage_ Sequence[Getprefixes Agent Data Sources Data Source Collection Item Data Source Config Object Storage Prefix] - The locations of data items in Object Storage, can either be an object (File) or a prefix (folder).
- data
Source StringConfig Type - The type of the tool.
- object
Storage List<Property Map>Prefixes - The locations of data items in Object Storage, can either be an object (File) or a prefix (folder).
GetAgentDataSourcesDataSourceCollectionItemDataSourceConfigObjectStoragePrefix
GetAgentDataSourcesFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ociTerraform Provider.
