oci logo
Oracle Cloud Infrastructure v0.12.0, Mar 17 23

oci.Adm.getKnowledgebases

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

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testKnowledgeBases = Oci.Adm.GetKnowledgebases.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        DisplayName = @var.Knowledge_base_display_name,
        Id = @var.Knowledge_base_id,
        State = @var.Knowledge_base_state,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/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(_var.Compartment_id),
			DisplayName:   pulumi.StringRef(_var.Knowledge_base_display_name),
			Id:            pulumi.StringRef(_var.Knowledge_base_id),
			State:         pulumi.StringRef(_var.Knowledge_base_state),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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(var_.compartment_id())
            .displayName(var_.knowledge_base_display_name())
            .id(var_.knowledge_base_id())
            .state(var_.knowledge_base_state())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_knowledge_bases = oci.Adm.get_knowledgebases(compartment_id=var["compartment_id"],
    display_name=var["knowledge_base_display_name"],
    id=var["knowledge_base_id"],
    state=var["knowledge_base_state"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testKnowledgeBases = oci.Adm.getKnowledgebases({
    compartmentId: _var.compartment_id,
    displayName: _var.knowledge_base_display_name,
    id: _var.knowledge_base_id,
    state: _var.knowledge_base_state,
});
variables:
  testKnowledgeBases:
    fn::invoke:
      Function: oci:Adm:getKnowledgebases
      Arguments:
        compartmentId: ${var.compartment_id}
        displayName: ${var.knowledge_base_display_name}
        id: ${var.knowledge_base_id}
        state: ${var.knowledge_base_state}

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

The following arguments are supported:

CompartmentId string

A filter to return only resources that belong to the specified compartment identifier.

DisplayName string

A filter to return only resources that match the entire display name given.

Filters List<GetKnowledgebasesFilter>
Id string

A filter to return only resources that match the specified identifier.

State string

A filter to return only Knowledge Bases that match the specified lifecycleState.

CompartmentId string

A filter to return only resources that belong to the specified compartment identifier.

DisplayName string

A filter to return only resources that match the entire display name given.

Filters []GetKnowledgebasesFilter
Id string

A filter to return only resources that match the specified identifier.

State string

A filter to return only Knowledge Bases that match the specified lifecycleState.

compartmentId String

A filter to return only resources that belong to the specified compartment identifier.

displayName String

A filter to return only resources that match the entire display name given.

filters List<GetKnowledgebasesFilter>
id String

A filter to return only resources that match the specified identifier.

state String

A filter to return only Knowledge Bases that match the specified lifecycleState.

compartmentId string

A filter to return only resources that belong to the specified compartment identifier.

displayName string

A filter to return only resources that match the entire display name given.

filters GetKnowledgebasesFilter[]
id string

A filter to return only resources that match the specified identifier.

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.

display_name str

A filter to return only resources that match the entire display name given.

filters GetKnowledgebasesFilter]
id str

A filter to return only resources that match the specified identifier.

state str

A filter to return only Knowledge Bases that match the specified lifecycleState.

compartmentId String

A filter to return only resources that belong to the specified compartment identifier.

displayName 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.

state String

A filter to return only Knowledge Bases that match the specified lifecycleState.

getKnowledgebases Result

The following output properties are available:

KnowledgeBaseCollections List<GetKnowledgebasesKnowledgeBaseCollection>

The list of knowledge_base_collection.

CompartmentId string

The Oracle Cloud Identifier (OCID) of the Knowledge Base's compartment.

DisplayName string

The name of the Knowledge Base.

Filters List<GetKnowledgebasesFilter>
Id string

The Oracle Cloud Identifier (OCID) of the Knowledge Base.

State string

The current lifecycle state of the Knowledge Base.

KnowledgeBaseCollections []GetKnowledgebasesKnowledgeBaseCollection

The list of knowledge_base_collection.

CompartmentId string

The Oracle Cloud Identifier (OCID) of the Knowledge Base's compartment.

DisplayName string

The name of the Knowledge Base.

Filters []GetKnowledgebasesFilter
Id string

The Oracle Cloud Identifier (OCID) of the Knowledge Base.

State string

The current lifecycle state of the Knowledge Base.

knowledgeBaseCollections List<GetKnowledgebasesKnowledgeBaseCollection>

The list of knowledge_base_collection.

compartmentId String

The Oracle Cloud Identifier (OCID) of the Knowledge Base's compartment.

displayName String

The name of the Knowledge Base.

filters List<GetKnowledgebasesFilter>
id String

The Oracle Cloud Identifier (OCID) of the Knowledge Base.

state String

The current lifecycle state of the Knowledge Base.

knowledgeBaseCollections GetKnowledgebasesKnowledgeBaseCollection[]

The list of knowledge_base_collection.

compartmentId string

The Oracle Cloud Identifier (OCID) of the Knowledge Base's compartment.

displayName string

The name of the Knowledge Base.

filters GetKnowledgebasesFilter[]
id string

The Oracle Cloud Identifier (OCID) of the Knowledge Base.

state string

The current lifecycle state of the Knowledge Base.

knowledge_base_collections GetKnowledgebasesKnowledgeBaseCollection]

The list of knowledge_base_collection.

compartment_id str

The Oracle Cloud Identifier (OCID) of the Knowledge Base's compartment.

display_name str

The name of the Knowledge Base.

filters GetKnowledgebasesFilter]
id str

The Oracle Cloud Identifier (OCID) of the Knowledge Base.

state str

The current lifecycle state of the Knowledge Base.

knowledgeBaseCollections List<Property Map>

The list of knowledge_base_collection.

compartmentId String

The Oracle Cloud Identifier (OCID) of the Knowledge Base's compartment.

displayName 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

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

GetKnowledgebasesKnowledgeBaseCollection

GetKnowledgebasesKnowledgeBaseCollectionItem

CompartmentId string

A filter to return only resources that belong to the specified compartment identifier.

DefinedTags Dictionary<string, object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

DisplayName string

A filter to return only resources that match the entire display name given.

FreeformTags Dictionary<string, object>

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.

State string

A filter to return only Knowledge Bases that match the specified lifecycleState.

SystemTags Dictionary<string, object>

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

TimeCreated string

The creation date and time of the Knowledge Base (formatted according to RFC3339).

TimeUpdated string

The date and time the Knowledge Base was last updated (formatted according to RFC3339).

CompartmentId string

A filter to return only resources that belong to the specified compartment identifier.

DefinedTags map[string]interface{}

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

DisplayName string

A filter to return only resources that match the entire display name given.

FreeformTags map[string]interface{}

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.

State string

A filter to return only Knowledge Bases that match the specified lifecycleState.

SystemTags map[string]interface{}

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

TimeCreated string

The creation date and time of the Knowledge Base (formatted according to RFC3339).

TimeUpdated string

The date and time the Knowledge Base was last updated (formatted according to RFC3339).

compartmentId String

A filter to return only resources that belong to the specified compartment identifier.

definedTags Map<String,Object>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

displayName String

A filter to return only resources that match the entire display name given.

freeformTags Map<String,Object>

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.

state String

A filter to return only Knowledge Bases that match the specified lifecycleState.

systemTags Map<String,Object>

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

timeCreated String

The creation date and time of the Knowledge Base (formatted according to RFC3339).

timeUpdated String

The date and time the Knowledge Base was last updated (formatted according to RFC3339).

compartmentId string

A filter to return only resources that belong to the specified compartment identifier.

definedTags {[key: string]: any}

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

displayName string

A filter to return only resources that match the entire display name given.

freeformTags {[key: string]: any}

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.

state string

A filter to return only Knowledge Bases that match the specified lifecycleState.

systemTags {[key: string]: any}

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

timeCreated string

The creation date and time of the Knowledge Base (formatted according to RFC3339).

timeUpdated 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.

defined_tags Mapping[str, Any]

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.

freeform_tags Mapping[str, Any]

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.

state str

A filter to return only Knowledge Bases that match the specified lifecycleState.

system_tags Mapping[str, Any]

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).

compartmentId String

A filter to return only resources that belong to the specified compartment identifier.

definedTags Map<Any>

Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

displayName String

A filter to return only resources that match the entire display name given.

freeformTags Map<Any>

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.

state String

A filter to return only Knowledge Bases that match the specified lifecycleState.

systemTags Map<Any>

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

timeCreated String

The creation date and time of the Knowledge Base (formatted according to RFC3339).

timeUpdated 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 oci Terraform Provider.