1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. GenerativeAi
  5. getAgentDataSources
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.GenerativeAi.getAgentDataSources

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides the list of Data Sources in Oracle Cloud Infrastructure Generative Ai Agent service.

    ListDataSources

    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/v2/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[_generativeai.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[_generativeai.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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:GenerativeAi/getAgentDataSources:getAgentDataSources
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment in which to list resources.
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    Filters List<GetAgentDataSourcesFilter>
    KnowledgeBaseId string
    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.
    CompartmentId string
    The OCID of the compartment in which to list resources.
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    Filters []GetAgentDataSourcesFilter
    KnowledgeBaseId string
    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.
    compartmentId String
    The OCID of the compartment in which to list resources.
    displayName String
    A filter to return only resources that match the given display name exactly.
    filters List<GetAgentDataSourcesFilter>
    knowledgeBaseId String
    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.
    compartmentId string
    The OCID of the compartment in which to list resources.
    displayName string
    A filter to return only resources that match the given display name exactly.
    filters GetAgentDataSourcesFilter[]
    knowledgeBaseId string
    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[generativeai.GetAgentDataSourcesFilter]
    knowledge_base_id str
    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.
    compartmentId String
    The OCID of the compartment in which to list resources.
    displayName String
    A filter to return only resources that match the given display name exactly.
    filters List<Property Map>
    knowledgeBaseId String
    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:

    DataSourceCollections List<GetAgentDataSourcesDataSourceCollection>
    The list of data_source_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    CompartmentId string
    The OCID of the compartment.
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable.
    Filters List<GetAgentDataSourcesFilter>
    KnowledgeBaseId string
    The OCID of the parent KnowledgeBase.
    State string
    The current state of the data source.
    DataSourceCollections []GetAgentDataSourcesDataSourceCollection
    The list of data_source_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    CompartmentId string
    The OCID of the compartment.
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable.
    Filters []GetAgentDataSourcesFilter
    KnowledgeBaseId string
    The OCID of the parent KnowledgeBase.
    State string
    The current state of the data source.
    dataSourceCollections List<GetAgentDataSourcesDataSourceCollection>
    The list of data_source_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    compartmentId String
    The OCID of the compartment.
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable.
    filters List<GetAgentDataSourcesFilter>
    knowledgeBaseId String
    The OCID of the parent KnowledgeBase.
    state String
    The current state of the data source.
    dataSourceCollections GetAgentDataSourcesDataSourceCollection[]
    The list of data_source_collection.
    id string
    The provider-assigned unique ID for this managed resource.
    compartmentId string
    The OCID of the compartment.
    displayName string
    A user-friendly name. Does not have to be unique, and it's changeable.
    filters GetAgentDataSourcesFilter[]
    knowledgeBaseId string
    The OCID of the parent KnowledgeBase.
    state string
    The current state of the data source.
    data_source_collections Sequence[generativeai.GetAgentDataSourcesDataSourceCollection]
    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[generativeai.GetAgentDataSourcesFilter]
    knowledge_base_id str
    The OCID of the parent KnowledgeBase.
    state str
    The current state of the data source.
    dataSourceCollections List<Property Map>
    The list of data_source_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    compartmentId String
    The OCID of the compartment.
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable.
    filters List<Property Map>
    knowledgeBaseId String
    The OCID of the parent KnowledgeBase.
    state String
    The current state of the data source.

    Supporting Types

    GetAgentDataSourcesDataSourceCollection

    GetAgentDataSourcesDataSourceCollectionItem

    CompartmentId string
    The OCID of the compartment in which to list resources.
    DataSourceConfigs List<GetAgentDataSourcesDataSourceCollectionItemDataSourceConfig>
    DataSourceConfig
    DefinedTags 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.
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    FreeformTags 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.
    KnowledgeBaseId string
    The OCID of the knowledge base.
    LifecycleDetails 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.
    State string
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    SystemTags Dictionary<string, string>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The date and time the data source was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    TimeUpdated string
    The date and time the data source was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    CompartmentId string
    The OCID of the compartment in which to list resources.
    DataSourceConfigs []GetAgentDataSourcesDataSourceCollectionItemDataSourceConfig
    DataSourceConfig
    DefinedTags 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.
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    FreeformTags 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.
    KnowledgeBaseId string
    The OCID of the knowledge base.
    LifecycleDetails 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.
    State string
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    SystemTags map[string]string
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The date and time the data source was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    TimeUpdated string
    The date and time the data source was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    compartmentId String
    The OCID of the compartment in which to list resources.
    dataSourceConfigs List<GetAgentDataSourcesDataSourceCollectionItemDataSourceConfig>
    DataSourceConfig
    definedTags 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.
    displayName String
    A filter to return only resources that match the given display name exactly.
    freeformTags 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.
    knowledgeBaseId String
    The OCID of the knowledge base.
    lifecycleDetails 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.
    state String
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    systemTags Map<String,String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The date and time the data source was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated String
    The date and time the data source was updated, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    compartmentId string
    The OCID of the compartment in which to list resources.
    dataSourceConfigs GetAgentDataSourcesDataSourceCollectionItemDataSourceConfig[]
    DataSourceConfig
    definedTags {[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.
    displayName string
    A filter to return only resources that match the given display name exactly.
    freeformTags {[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.
    knowledgeBaseId string
    The OCID of the knowledge base.
    lifecycleDetails 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.
    state string
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    systemTags {[key: string]: string}
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    The date and time the data source was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated 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_configs Sequence[generativeai.GetAgentDataSourcesDataSourceCollectionItemDataSourceConfig]
    DataSourceConfig
    defined_tags 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.
    freeform_tags 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_id str
    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.
    state str
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    system_tags 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
    compartmentId String
    The OCID of the compartment in which to list resources.
    dataSourceConfigs List<Property Map>
    DataSourceConfig
    definedTags 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.
    displayName String
    A filter to return only resources that match the given display name exactly.
    freeformTags 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.
    knowledgeBaseId String
    The OCID of the knowledge base.
    lifecycleDetails 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.
    state String
    A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
    systemTags Map<String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The date and time the data source was created, in the format defined by RFC 3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated 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

    DataSourceConfigType string
    The type of the tool. The allowed values are:

    • OCI_OBJECT_STORAGE: The data source is Oracle Cloud Infrastructure Object Storage.
    ObjectStoragePrefixes List<GetAgentDataSourcesDataSourceCollectionItemDataSourceConfigObjectStoragePrefix>
    The locations of data items in Object Storage, can either be an object (File) or a prefix (folder).
    DataSourceConfigType string
    The type of the tool. The allowed values are:

    • OCI_OBJECT_STORAGE: The data source is Oracle Cloud Infrastructure Object Storage.
    ObjectStoragePrefixes []GetAgentDataSourcesDataSourceCollectionItemDataSourceConfigObjectStoragePrefix
    The locations of data items in Object Storage, can either be an object (File) or a prefix (folder).
    dataSourceConfigType String
    The type of the tool. The allowed values are:

    • OCI_OBJECT_STORAGE: The data source is Oracle Cloud Infrastructure Object Storage.
    objectStoragePrefixes List<GetAgentDataSourcesDataSourceCollectionItemDataSourceConfigObjectStoragePrefix>
    The locations of data items in Object Storage, can either be an object (File) or a prefix (folder).
    dataSourceConfigType string
    The type of the tool. The allowed values are:

    • OCI_OBJECT_STORAGE: The data source is Oracle Cloud Infrastructure Object Storage.
    objectStoragePrefixes GetAgentDataSourcesDataSourceCollectionItemDataSourceConfigObjectStoragePrefix[]
    The locations of data items in Object Storage, can either be an object (File) or a prefix (folder).
    data_source_config_type str
    The type of the tool. The allowed values are:

    • OCI_OBJECT_STORAGE: The data source is Oracle Cloud Infrastructure Object Storage.
    object_storage_prefixes Sequence[generativeai.GetAgentDataSourcesDataSourceCollectionItemDataSourceConfigObjectStoragePrefix]
    The locations of data items in Object Storage, can either be an object (File) or a prefix (folder).
    dataSourceConfigType String
    The type of the tool. The allowed values are:

    • OCI_OBJECT_STORAGE: The data source is Oracle Cloud Infrastructure Object Storage.
    objectStoragePrefixes List<Property Map>
    The locations of data items in Object Storage, can either be an object (File) or a prefix (folder).

    GetAgentDataSourcesDataSourceCollectionItemDataSourceConfigObjectStoragePrefix

    Bucket string
    The bucket name of an object.
    Namespace string
    The namespace name of an object.
    Prefix string
    The name of the object (file) or prefix (folder).
    Bucket string
    The bucket name of an object.
    Namespace string
    The namespace name of an object.
    Prefix string
    The name of the object (file) or prefix (folder).
    bucket String
    The bucket name of an object.
    namespace String
    The namespace name of an object.
    prefix String
    The name of the object (file) or prefix (folder).
    bucket string
    The bucket name of an object.
    namespace string
    The namespace name of an object.
    prefix string
    The name of the object (file) or prefix (folder).
    bucket str
    The bucket name of an object.
    namespace str
    The namespace name of an object.
    prefix str
    The name of the object (file) or prefix (folder).
    bucket String
    The bucket name of an object.
    namespace String
    The namespace name of an object.
    prefix String
    The name of the object (file) or prefix (folder).

    GetAgentDataSourcesFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi