
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* @Nullable */ String> 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* @Nullable */ AgentKnowledgeBaseKnowledgeBaseConfiguration> 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* @Nullable */ AgentKnowledgeBaseStorageConfiguration> 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* @Nullable */ Map> 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
© 2015 - 2025 Weber Informatics LLC | Privacy Policy