All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.bedrock.AgentKnowledgeBase Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.bedrock;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.bedrock.AgentKnowledgeBaseArgs;
import com.pulumi.aws.bedrock.inputs.AgentKnowledgeBaseState;
import com.pulumi.aws.bedrock.outputs.AgentKnowledgeBaseKnowledgeBaseConfiguration;
import com.pulumi.aws.bedrock.outputs.AgentKnowledgeBaseStorageConfiguration;
import com.pulumi.aws.bedrock.outputs.AgentKnowledgeBaseTimeouts;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Resource for managing an AWS Agents for Amazon Bedrock Knowledge Base.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.bedrock.AgentKnowledgeBase;
 * import com.pulumi.aws.bedrock.AgentKnowledgeBaseArgs;
 * import com.pulumi.aws.bedrock.inputs.AgentKnowledgeBaseKnowledgeBaseConfigurationArgs;
 * import com.pulumi.aws.bedrock.inputs.AgentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationArgs;
 * import com.pulumi.aws.bedrock.inputs.AgentKnowledgeBaseStorageConfigurationArgs;
 * import com.pulumi.aws.bedrock.inputs.AgentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationArgs;
 * import com.pulumi.aws.bedrock.inputs.AgentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingArgs;
 * 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 example = new AgentKnowledgeBase("example", AgentKnowledgeBaseArgs.builder()
 *             .name("example")
 *             .roleArn(exampleAwsIamRole.arn())
 *             .knowledgeBaseConfiguration(AgentKnowledgeBaseKnowledgeBaseConfigurationArgs.builder()
 *                 .vectorKnowledgeBaseConfiguration(AgentKnowledgeBaseKnowledgeBaseConfigurationVectorKnowledgeBaseConfigurationArgs.builder()
 *                     .embeddingModelArn("arn:aws:bedrock:us-west-2::foundation-model/amazon.titan-embed-text-v1")
 *                     .build())
 *                 .type("VECTOR")
 *                 .build())
 *             .storageConfiguration(AgentKnowledgeBaseStorageConfigurationArgs.builder()
 *                 .type("OPENSEARCH_SERVERLESS")
 *                 .opensearchServerlessConfiguration(AgentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationArgs.builder()
 *                     .collectionArn("arn:aws:aoss:us-west-2:123456789012:collection/142bezjddq707i5stcrf")
 *                     .vectorIndexName("bedrock-knowledge-base-default-index")
 *                     .fieldMapping(AgentKnowledgeBaseStorageConfigurationOpensearchServerlessConfigurationFieldMappingArgs.builder()
 *                         .vectorField("bedrock-knowledge-base-default-vector")
 *                         .textField("AMAZON_BEDROCK_TEXT_CHUNK")
 *                         .metadataField("AMAZON_BEDROCK_METADATA")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Using `pulumi import`, import Agents for Amazon Bedrock Knowledge Base using the knowledge base ID. For example: * * ```sh * $ pulumi import aws:bedrock/agentKnowledgeBase:AgentKnowledgeBase example EMDPPAYPZI * ``` * */ @ResourceType(type="aws:bedrock/agentKnowledgeBase:AgentKnowledgeBase") public class AgentKnowledgeBase extends com.pulumi.resources.CustomResource { /** * ARN of the knowledge base. * */ @Export(name="arn", refs={String.class}, tree="[0]") private Output arn; /** * @return ARN of the knowledge base. * */ public Output arn() { return this.arn; } /** * Time at which the knowledge base was created. * */ @Export(name="createdAt", refs={String.class}, tree="[0]") private Output createdAt; /** * @return Time at which the knowledge base was created. * */ public Output createdAt() { return this.createdAt; } /** * Description of the knowledge base. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return Description of the knowledge base. * */ public Output> description() { return Codegen.optional(this.description); } @Export(name="failureReasons", refs={List.class,String.class}, tree="[0,1]") private Output> failureReasons; public Output> failureReasons() { return this.failureReasons; } /** * Details about the embeddings configuration of the knowledge base. See `knowledge_base_configuration` block for details. * */ @Export(name="knowledgeBaseConfiguration", refs={AgentKnowledgeBaseKnowledgeBaseConfiguration.class}, tree="[0]") private Output knowledgeBaseConfiguration; /** * @return Details about the embeddings configuration of the knowledge base. See `knowledge_base_configuration` block for details. * */ public Output> knowledgeBaseConfiguration() { return Codegen.optional(this.knowledgeBaseConfiguration); } /** * Name of the knowledge base. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Name of the knowledge base. * */ public Output name() { return this.name; } /** * ARN of the IAM role with permissions to invoke API operations on the knowledge base. * */ @Export(name="roleArn", refs={String.class}, tree="[0]") private Output roleArn; /** * @return ARN of the IAM role with permissions to invoke API operations on the knowledge base. * */ public Output roleArn() { return this.roleArn; } /** * Details about the storage configuration of the knowledge base. See `storage_configuration` block for details. * * The following arguments are optional: * */ @Export(name="storageConfiguration", refs={AgentKnowledgeBaseStorageConfiguration.class}, tree="[0]") private Output storageConfiguration; /** * @return Details about the storage configuration of the knowledge base. See `storage_configuration` block for details. * * The following arguments are optional: * */ public Output> storageConfiguration() { return Codegen.optional(this.storageConfiguration); } /** * Map of tags assigned to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Map of tags assigned to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. * * @deprecated * Please use `tags` instead. * */ @Deprecated /* Please use `tags` instead. */ @Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tagsAll; /** * @return Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. * */ public Output> tagsAll() { return this.tagsAll; } @Export(name="timeouts", refs={AgentKnowledgeBaseTimeouts.class}, tree="[0]") private Output timeouts; public Output> timeouts() { return Codegen.optional(this.timeouts); } /** * Time at which the knowledge base was last updated. * */ @Export(name="updatedAt", refs={String.class}, tree="[0]") private Output updatedAt; /** * @return Time at which the knowledge base was last updated. * */ public Output updatedAt() { return this.updatedAt; } /** * * @param name The _unique_ name of the resulting resource. */ public AgentKnowledgeBase(java.lang.String name) { this(name, AgentKnowledgeBaseArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public AgentKnowledgeBase(java.lang.String name, AgentKnowledgeBaseArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public AgentKnowledgeBase(java.lang.String name, AgentKnowledgeBaseArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:bedrock/agentKnowledgeBase:AgentKnowledgeBase", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private AgentKnowledgeBase(java.lang.String name, Output id, @Nullable AgentKnowledgeBaseState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:bedrock/agentKnowledgeBase:AgentKnowledgeBase", name, state, makeResourceOptions(options, id), false); } private static AgentKnowledgeBaseArgs makeArgs(AgentKnowledgeBaseArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? AgentKnowledgeBaseArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static AgentKnowledgeBase get(java.lang.String name, Output id, @Nullable AgentKnowledgeBaseState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new AgentKnowledgeBase(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy