Package com.pulumi.aws.bedrock
Class AgentKnowledgeBase
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.bedrock.AgentKnowledgeBase
-
public class AgentKnowledgeBase extends com.pulumi.resources.CustomResource
Resource for managing an AWS Agents for Amazon Bedrock Knowledge Base. ## Example Usage <!--Start PulumiCodeChooser -->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()); } }
-
-
Constructor Summary
Constructors Constructor Description AgentKnowledgeBase(java.lang.String name)
AgentKnowledgeBase(java.lang.String name, AgentKnowledgeBaseArgs args)
AgentKnowledgeBase(java.lang.String name, AgentKnowledgeBaseArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
arn()
com.pulumi.core.Output<java.lang.String>
createdAt()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
description()
com.pulumi.core.Output<java.util.List<java.lang.String>>
failureReasons()
static AgentKnowledgeBase
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, AgentKnowledgeBaseState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<AgentKnowledgeBaseKnowledgeBaseConfiguration>>
knowledgeBaseConfiguration()
com.pulumi.core.Output<java.lang.String>
name()
com.pulumi.core.Output<java.lang.String>
roleArn()
com.pulumi.core.Output<java.util.Optional<AgentKnowledgeBaseStorageConfiguration>>
storageConfiguration()
com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>
tags()
com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>
tagsAll()
com.pulumi.core.Output<java.util.Optional<AgentKnowledgeBaseTimeouts>>
timeouts()
com.pulumi.core.Output<java.lang.String>
updatedAt()
-
-
-
Constructor Detail
-
AgentKnowledgeBase
public AgentKnowledgeBase(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
AgentKnowledgeBase
public AgentKnowledgeBase(java.lang.String name, AgentKnowledgeBaseArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
AgentKnowledgeBase
public AgentKnowledgeBase(java.lang.String name, AgentKnowledgeBaseArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the knowledge base.
-
createdAt
public com.pulumi.core.Output<java.lang.String> createdAt()
- Returns:
- Time at which the knowledge base was created.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- Description of the knowledge base.
-
failureReasons
public com.pulumi.core.Output<java.util.List<java.lang.String>> failureReasons()
-
knowledgeBaseConfiguration
public com.pulumi.core.Output<java.util.Optional<AgentKnowledgeBaseKnowledgeBaseConfiguration>> knowledgeBaseConfiguration()
- Returns:
- Details about the embeddings configuration of the knowledge base. See `knowledge_base_configuration` block for details.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Name of the knowledge base.
-
roleArn
public com.pulumi.core.Output<java.lang.String> roleArn()
- Returns:
- ARN of the IAM role with permissions to invoke API operations on the knowledge base.
-
storageConfiguration
public com.pulumi.core.Output<java.util.Optional<AgentKnowledgeBaseStorageConfiguration>> storageConfiguration()
- Returns:
- Details about the storage configuration of the knowledge base. See `storage_configuration` block for details. The following arguments are optional:
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- 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.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
-
timeouts
public com.pulumi.core.Output<java.util.Optional<AgentKnowledgeBaseTimeouts>> timeouts()
-
updatedAt
public com.pulumi.core.Output<java.lang.String> updatedAt()
- Returns:
- Time at which the knowledge base was last updated.
-
get
public static AgentKnowledgeBase get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable AgentKnowledgeBaseState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-