Interface CreateHarnessRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,BedrockAgentCoreControlRequest.Builder,Buildable,CopyableBuilder<CreateHarnessRequest.Builder,,CreateHarnessRequest> SdkBuilder<CreateHarnessRequest.Builder,,CreateHarnessRequest> SdkPojo,SdkRequest.Builder
- Enclosing class:
CreateHarnessRequest
-
Method Summary
Modifier and TypeMethodDescriptionallowedTools(String... allowedTools) The tools that the agent is allowed to use.allowedTools(Collection<String> allowedTools) The tools that the agent is allowed to use.default CreateHarnessRequest.BuilderauthorizerConfiguration(Consumer<AuthorizerConfiguration.Builder> authorizerConfiguration) Sets the value of the AuthorizerConfiguration property for this object.authorizerConfiguration(AuthorizerConfiguration authorizerConfiguration) Sets the value of the AuthorizerConfiguration property for this object.clientToken(String clientToken) A unique, case-sensitive identifier to ensure idempotency of the request.default CreateHarnessRequest.Builderenvironment(Consumer<HarnessEnvironmentProviderRequest.Builder> environment) The compute environment configuration for the harness, including network and lifecycle settings.environment(HarnessEnvironmentProviderRequest environment) The compute environment configuration for the harness, including network and lifecycle settings.default CreateHarnessRequest.BuilderenvironmentArtifact(Consumer<HarnessEnvironmentArtifact.Builder> environmentArtifact) The environment artifact for the harness, such as a custom container image containing additional dependencies.environmentArtifact(HarnessEnvironmentArtifact environmentArtifact) The environment artifact for the harness, such as a custom container image containing additional dependencies.environmentVariables(Map<String, String> environmentVariables) Environment variables to set in the harness runtime environment.executionRoleArn(String executionRoleArn) The ARN of the IAM role that the harness assumes when running.harnessName(String harnessName) The name of the harness.maxIterations(Integer maxIterations) The maximum number of iterations the agent loop can execute per invocation.The maximum total number of output tokens the agent can generate across all model calls within a single invocation.default CreateHarnessRequest.BuilderThe AgentCore Memory configuration for persisting conversation context across sessions.memory(HarnessMemoryConfiguration memory) The AgentCore Memory configuration for persisting conversation context across sessions.default CreateHarnessRequest.BuilderThe model configuration for the harness.model(HarnessModelConfiguration model) The model configuration for the harness.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.skills(Collection<HarnessSkill> skills) The skills available to the agent.skills(Consumer<HarnessSkill.Builder>... skills) The skills available to the agent.skills(HarnessSkill... skills) The skills available to the agent.systemPrompt(Collection<HarnessSystemContentBlock> systemPrompt) The system prompt that defines the agent's behavior and instructions.systemPrompt(Consumer<HarnessSystemContentBlock.Builder>... systemPrompt) The system prompt that defines the agent's behavior and instructions.systemPrompt(HarnessSystemContentBlock... systemPrompt) The system prompt that defines the agent's behavior and instructions.Tags to apply to the harness resource.timeoutSeconds(Integer timeoutSeconds) The maximum duration in seconds for the agent loop execution per invocation.tools(Collection<HarnessTool> tools) The tools available to the agent, such as remote MCP servers, AgentCore Gateway, AgentCore Browser, Code Interpreter, or inline functions.tools(Consumer<HarnessTool.Builder>... tools) The tools available to the agent, such as remote MCP servers, AgentCore Gateway, AgentCore Browser, Code Interpreter, or inline functions.tools(HarnessTool... tools) The tools available to the agent, such as remote MCP servers, AgentCore Gateway, AgentCore Browser, Code Interpreter, or inline functions.default CreateHarnessRequest.Buildertruncation(Consumer<HarnessTruncationConfiguration.Builder> truncation) The truncation configuration for managing conversation context when it exceeds model limits.truncation(HarnessTruncationConfiguration truncation) The truncation configuration for managing conversation context when it exceeds model limits.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.services.bedrockagentcorecontrol.model.BedrockAgentCoreControlRequest.Builder
buildMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
harnessName
The name of the harness. Must start with a letter and contain only alphanumeric characters and underscores.
- Parameters:
harnessName- The name of the harness. Must start with a letter and contain only alphanumeric characters and underscores.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
clientToken
A unique, case-sensitive identifier to ensure idempotency of the request.
- Parameters:
clientToken- A unique, case-sensitive identifier to ensure idempotency of the request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
executionRoleArn
The ARN of the IAM role that the harness assumes when running. This role must have permissions for the services the agent needs to access, such as Amazon Bedrock for model invocation.
- Parameters:
executionRoleArn- The ARN of the IAM role that the harness assumes when running. This role must have permissions for the services the agent needs to access, such as Amazon Bedrock for model invocation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
environment
The compute environment configuration for the harness, including network and lifecycle settings.
- Parameters:
environment- The compute environment configuration for the harness, including network and lifecycle settings.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
environment
default CreateHarnessRequest.Builder environment(Consumer<HarnessEnvironmentProviderRequest.Builder> environment) The compute environment configuration for the harness, including network and lifecycle settings.
This is a convenience method that creates an instance of theHarnessEnvironmentProviderRequest.Builderavoiding the need to create one manually viaHarnessEnvironmentProviderRequest.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toenvironment(HarnessEnvironmentProviderRequest).- Parameters:
environment- a consumer that will call methods onHarnessEnvironmentProviderRequest.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
environmentArtifact
The environment artifact for the harness, such as a custom container image containing additional dependencies.
- Parameters:
environmentArtifact- The environment artifact for the harness, such as a custom container image containing additional dependencies.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
environmentArtifact
default CreateHarnessRequest.Builder environmentArtifact(Consumer<HarnessEnvironmentArtifact.Builder> environmentArtifact) The environment artifact for the harness, such as a custom container image containing additional dependencies.
This is a convenience method that creates an instance of theHarnessEnvironmentArtifact.Builderavoiding the need to create one manually viaHarnessEnvironmentArtifact.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toenvironmentArtifact(HarnessEnvironmentArtifact).- Parameters:
environmentArtifact- a consumer that will call methods onHarnessEnvironmentArtifact.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
environmentVariables
Environment variables to set in the harness runtime environment.
- Parameters:
environmentVariables- Environment variables to set in the harness runtime environment.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
authorizerConfiguration
CreateHarnessRequest.Builder authorizerConfiguration(AuthorizerConfiguration authorizerConfiguration) Sets the value of the AuthorizerConfiguration property for this object.- Parameters:
authorizerConfiguration- The new value for the AuthorizerConfiguration property for this object.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
authorizerConfiguration
default CreateHarnessRequest.Builder authorizerConfiguration(Consumer<AuthorizerConfiguration.Builder> authorizerConfiguration) Sets the value of the AuthorizerConfiguration property for this object. This is a convenience method that creates an instance of theAuthorizerConfiguration.Builderavoiding the need to create one manually viaAuthorizerConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toauthorizerConfiguration(AuthorizerConfiguration).- Parameters:
authorizerConfiguration- a consumer that will call methods onAuthorizerConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
model
The model configuration for the harness. Supports Amazon Bedrock, OpenAI, and Google Gemini model providers.
- Parameters:
model- The model configuration for the harness. Supports Amazon Bedrock, OpenAI, and Google Gemini model providers.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
model
The model configuration for the harness. Supports Amazon Bedrock, OpenAI, and Google Gemini model providers.
This is a convenience method that creates an instance of theHarnessModelConfiguration.Builderavoiding the need to create one manually viaHarnessModelConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tomodel(HarnessModelConfiguration).- Parameters:
model- a consumer that will call methods onHarnessModelConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
systemPrompt
The system prompt that defines the agent's behavior and instructions.
- Parameters:
systemPrompt- The system prompt that defines the agent's behavior and instructions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
systemPrompt
The system prompt that defines the agent's behavior and instructions.
- Parameters:
systemPrompt- The system prompt that defines the agent's behavior and instructions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
systemPrompt
CreateHarnessRequest.Builder systemPrompt(Consumer<HarnessSystemContentBlock.Builder>... systemPrompt) The system prompt that defines the agent's behavior and instructions.
This is a convenience method that creates an instance of theHarnessSystemContentBlock.Builderavoiding the need to create one manually viaHarnessSystemContentBlock.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tosystemPrompt(List<HarnessSystemContentBlock>).- Parameters:
systemPrompt- a consumer that will call methods onHarnessSystemContentBlock.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
tools
The tools available to the agent, such as remote MCP servers, AgentCore Gateway, AgentCore Browser, Code Interpreter, or inline functions.
- Parameters:
tools- The tools available to the agent, such as remote MCP servers, AgentCore Gateway, AgentCore Browser, Code Interpreter, or inline functions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tools
The tools available to the agent, such as remote MCP servers, AgentCore Gateway, AgentCore Browser, Code Interpreter, or inline functions.
- Parameters:
tools- The tools available to the agent, such as remote MCP servers, AgentCore Gateway, AgentCore Browser, Code Interpreter, or inline functions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tools
The tools available to the agent, such as remote MCP servers, AgentCore Gateway, AgentCore Browser, Code Interpreter, or inline functions.
This is a convenience method that creates an instance of theHarnessTool.Builderavoiding the need to create one manually viaHarnessTool.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totools(List<HarnessTool>).- Parameters:
tools- a consumer that will call methods onHarnessTool.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
skills
The skills available to the agent. Skills are bundles of files that the agent can pull into its context on demand.
- Parameters:
skills- The skills available to the agent. Skills are bundles of files that the agent can pull into its context on demand.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
skills
The skills available to the agent. Skills are bundles of files that the agent can pull into its context on demand.
- Parameters:
skills- The skills available to the agent. Skills are bundles of files that the agent can pull into its context on demand.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
skills
The skills available to the agent. Skills are bundles of files that the agent can pull into its context on demand.
This is a convenience method that creates an instance of theHarnessSkill.Builderavoiding the need to create one manually viaHarnessSkill.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toskills(List<HarnessSkill>).- Parameters:
skills- a consumer that will call methods onHarnessSkill.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
allowedTools
The tools that the agent is allowed to use. Supports glob patterns such as * for all tools, @builtin for all built-in tools, or @serverName/toolName for specific MCP server tools.
- Parameters:
allowedTools- The tools that the agent is allowed to use. Supports glob patterns such as * for all tools, @builtin for all built-in tools, or @serverName/toolName for specific MCP server tools.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
allowedTools
The tools that the agent is allowed to use. Supports glob patterns such as * for all tools, @builtin for all built-in tools, or @serverName/toolName for specific MCP server tools.
- Parameters:
allowedTools- The tools that the agent is allowed to use. Supports glob patterns such as * for all tools, @builtin for all built-in tools, or @serverName/toolName for specific MCP server tools.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
memory
The AgentCore Memory configuration for persisting conversation context across sessions.
- Parameters:
memory- The AgentCore Memory configuration for persisting conversation context across sessions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
memory
The AgentCore Memory configuration for persisting conversation context across sessions.
This is a convenience method that creates an instance of theHarnessMemoryConfiguration.Builderavoiding the need to create one manually viaHarnessMemoryConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tomemory(HarnessMemoryConfiguration).- Parameters:
memory- a consumer that will call methods onHarnessMemoryConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
truncation
The truncation configuration for managing conversation context when it exceeds model limits.
- Parameters:
truncation- The truncation configuration for managing conversation context when it exceeds model limits.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
truncation
default CreateHarnessRequest.Builder truncation(Consumer<HarnessTruncationConfiguration.Builder> truncation) The truncation configuration for managing conversation context when it exceeds model limits.
This is a convenience method that creates an instance of theHarnessTruncationConfiguration.Builderavoiding the need to create one manually viaHarnessTruncationConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totruncation(HarnessTruncationConfiguration).- Parameters:
truncation- a consumer that will call methods onHarnessTruncationConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
maxIterations
The maximum number of iterations the agent loop can execute per invocation.
- Parameters:
maxIterations- The maximum number of iterations the agent loop can execute per invocation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
maxTokens
The maximum total number of output tokens the agent can generate across all model calls within a single invocation.
- Parameters:
maxTokens- The maximum total number of output tokens the agent can generate across all model calls within a single invocation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
timeoutSeconds
The maximum duration in seconds for the agent loop execution per invocation.
- Parameters:
timeoutSeconds- The maximum duration in seconds for the agent loop execution per invocation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
Tags to apply to the harness resource.
- Parameters:
tags- Tags to apply to the harness resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
overrideConfiguration
CreateHarnessRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
CreateHarnessRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
builderConsumer- AConsumerto which an emptyAwsRequestOverrideConfiguration.Builderwill be given.- Returns:
- This object for method chaining.
-