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

oci.Adm.KnowledgeBase

Explore with Pulumi AI

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

    This resource provides the Knowledge Base resource in Oracle Cloud Infrastructure Adm service.

    Creates a new Knowledge Base.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testKnowledgeBase = new oci.adm.KnowledgeBase("test_knowledge_base", {
        compartmentId: compartmentId,
        definedTags: {
            "foo-namespace.bar-key": "value",
        },
        displayName: knowledgeBaseDisplayName,
        freeformTags: {
            "bar-key": "value",
        },
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_knowledge_base = oci.adm.KnowledgeBase("test_knowledge_base",
        compartment_id=compartment_id,
        defined_tags={
            "foo-namespace.bar-key": "value",
        },
        display_name=knowledge_base_display_name,
        freeform_tags={
            "bar-key": "value",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Adm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Adm.NewKnowledgeBase(ctx, "test_knowledge_base", &Adm.KnowledgeBaseArgs{
    			CompartmentId: pulumi.Any(compartmentId),
    			DefinedTags: pulumi.StringMap{
    				"foo-namespace.bar-key": pulumi.String("value"),
    			},
    			DisplayName: pulumi.Any(knowledgeBaseDisplayName),
    			FreeformTags: pulumi.StringMap{
    				"bar-key": pulumi.String("value"),
    			},
    		})
    		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 = new Oci.Adm.KnowledgeBase("test_knowledge_base", new()
        {
            CompartmentId = compartmentId,
            DefinedTags = 
            {
                { "foo-namespace.bar-key", "value" },
            },
            DisplayName = knowledgeBaseDisplayName,
            FreeformTags = 
            {
                { "bar-key", "value" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Adm.KnowledgeBase;
    import com.pulumi.oci.Adm.KnowledgeBaseArgs;
    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) {
            var testKnowledgeBase = new KnowledgeBase("testKnowledgeBase", KnowledgeBaseArgs.builder()
                .compartmentId(compartmentId)
                .definedTags(Map.of("foo-namespace.bar-key", "value"))
                .displayName(knowledgeBaseDisplayName)
                .freeformTags(Map.of("bar-key", "value"))
                .build());
    
        }
    }
    
    resources:
      testKnowledgeBase:
        type: oci:Adm:KnowledgeBase
        name: test_knowledge_base
        properties:
          compartmentId: ${compartmentId}
          definedTags:
            foo-namespace.bar-key: value
          displayName: ${knowledgeBaseDisplayName}
          freeformTags:
            bar-key: value
    

    Create KnowledgeBase Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new KnowledgeBase(name: string, args: KnowledgeBaseArgs, opts?: CustomResourceOptions);
    @overload
    def KnowledgeBase(resource_name: str,
                      args: KnowledgeBaseArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def KnowledgeBase(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      compartment_id: Optional[str] = None,
                      defined_tags: Optional[Mapping[str, str]] = None,
                      display_name: Optional[str] = None,
                      freeform_tags: Optional[Mapping[str, str]] = None)
    func NewKnowledgeBase(ctx *Context, name string, args KnowledgeBaseArgs, opts ...ResourceOption) (*KnowledgeBase, error)
    public KnowledgeBase(string name, KnowledgeBaseArgs args, CustomResourceOptions? opts = null)
    public KnowledgeBase(String name, KnowledgeBaseArgs args)
    public KnowledgeBase(String name, KnowledgeBaseArgs args, CustomResourceOptions options)
    
    type: oci:Adm:KnowledgeBase
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args KnowledgeBaseArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args KnowledgeBaseArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args KnowledgeBaseArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KnowledgeBaseArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args KnowledgeBaseArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var knowledgeBaseResource = new Oci.Adm.KnowledgeBase("knowledgeBaseResource", new()
    {
        CompartmentId = "string",
        DefinedTags = 
        {
            { "string", "string" },
        },
        DisplayName = "string",
        FreeformTags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := Adm.NewKnowledgeBase(ctx, "knowledgeBaseResource", &Adm.KnowledgeBaseArgs{
    	CompartmentId: pulumi.String("string"),
    	DefinedTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	DisplayName: pulumi.String("string"),
    	FreeformTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var knowledgeBaseResource = new KnowledgeBase("knowledgeBaseResource", KnowledgeBaseArgs.builder()
        .compartmentId("string")
        .definedTags(Map.of("string", "string"))
        .displayName("string")
        .freeformTags(Map.of("string", "string"))
        .build());
    
    knowledge_base_resource = oci.adm.KnowledgeBase("knowledgeBaseResource",
        compartment_id="string",
        defined_tags={
            "string": "string",
        },
        display_name="string",
        freeform_tags={
            "string": "string",
        })
    
    const knowledgeBaseResource = new oci.adm.KnowledgeBase("knowledgeBaseResource", {
        compartmentId: "string",
        definedTags: {
            string: "string",
        },
        displayName: "string",
        freeformTags: {
            string: "string",
        },
    });
    
    type: oci:Adm:KnowledgeBase
    properties:
        compartmentId: string
        definedTags:
            string: string
        displayName: string
        freeformTags:
            string: string
    

    KnowledgeBase Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The KnowledgeBase resource accepts the following input properties:

    CompartmentId string
    (Updatable) The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
    DefinedTags Dictionary<string, string>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    DisplayName string
    (Updatable) The name of the knowledge base.
    FreeformTags Dictionary<string, string>

    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    CompartmentId string
    (Updatable) The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
    DefinedTags map[string]string
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    DisplayName string
    (Updatable) The name of the knowledge base.
    FreeformTags map[string]string

    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    compartmentId String
    (Updatable) The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
    definedTags Map<String,String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    displayName String
    (Updatable) The name of the knowledge base.
    freeformTags Map<String,String>

    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    compartmentId string
    (Updatable) The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
    definedTags {[key: string]: string}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    displayName string
    (Updatable) The name of the knowledge base.
    freeformTags {[key: string]: string}

    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    compartment_id str
    (Updatable) The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
    defined_tags Mapping[str, str]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    display_name str
    (Updatable) The name of the knowledge base.
    freeform_tags Mapping[str, str]

    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    compartmentId String
    (Updatable) The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
    definedTags Map<String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    displayName String
    (Updatable) The name of the knowledge base.
    freeformTags Map<String>

    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Outputs

    All input properties are implicitly available as output properties. Additionally, the KnowledgeBase resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The current lifecycle state of the knowledge base.
    SystemTags Dictionary<string, string>
    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).
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The current lifecycle state of the knowledge base.
    SystemTags map[string]string
    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).
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The current lifecycle state of the knowledge base.
    systemTags Map<String,String>
    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).
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    The current lifecycle state of the knowledge base.
    systemTags {[key: string]: string}
    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).
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    The current lifecycle state of the knowledge base.
    system_tags 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).
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The current lifecycle state of the knowledge base.
    systemTags Map<String>
    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).

    Look up Existing KnowledgeBase Resource

    Get an existing KnowledgeBase resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: KnowledgeBaseState, opts?: CustomResourceOptions): KnowledgeBase
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compartment_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, str]] = None,
            display_name: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, str]] = None,
            state: Optional[str] = None,
            system_tags: Optional[Mapping[str, str]] = None,
            time_created: Optional[str] = None,
            time_updated: Optional[str] = None) -> KnowledgeBase
    func GetKnowledgeBase(ctx *Context, name string, id IDInput, state *KnowledgeBaseState, opts ...ResourceOption) (*KnowledgeBase, error)
    public static KnowledgeBase Get(string name, Input<string> id, KnowledgeBaseState? state, CustomResourceOptions? opts = null)
    public static KnowledgeBase get(String name, Output<String> id, KnowledgeBaseState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CompartmentId string
    (Updatable) The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
    DefinedTags Dictionary<string, string>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    DisplayName string
    (Updatable) The name of the knowledge base.
    FreeformTags Dictionary<string, string>

    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    State string
    The current lifecycle state of the knowledge base.
    SystemTags Dictionary<string, string>
    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
    (Updatable) The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
    DefinedTags map[string]string
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    DisplayName string
    (Updatable) The name of the knowledge base.
    FreeformTags map[string]string

    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    State string
    The current lifecycle state of the knowledge base.
    SystemTags map[string]string
    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
    (Updatable) The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
    definedTags Map<String,String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    displayName String
    (Updatable) The name of the knowledge base.
    freeformTags Map<String,String>

    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state String
    The current lifecycle state of the knowledge base.
    systemTags Map<String,String>
    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
    (Updatable) The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
    definedTags {[key: string]: string}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    displayName string
    (Updatable) The name of the knowledge base.
    freeformTags {[key: string]: string}

    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state string
    The current lifecycle state of the knowledge base.
    systemTags {[key: string]: string}
    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
    (Updatable) The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
    defined_tags Mapping[str, str]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    display_name str
    (Updatable) The name of the knowledge base.
    freeform_tags Mapping[str, str]

    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state str
    The current lifecycle state of the knowledge base.
    system_tags 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).
    compartmentId String
    (Updatable) The compartment Oracle Cloud Identifier (OCID) of the knowledge base.
    definedTags Map<String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
    displayName String
    (Updatable) The name of the knowledge base.
    freeformTags Map<String>

    (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    state String
    The current lifecycle state of the knowledge base.
    systemTags Map<String>
    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).

    Import

    KnowledgeBases can be imported using the id, e.g.

    $ pulumi import oci:Adm/knowledgeBase:KnowledgeBase test_knowledge_base "id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    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