Skip to main content

harness

Creates, updates, deletes, gets or lists a harness resource.

Overview

Nameharness
TypeResource
Idaws.bedrock_agentcore_control.harness

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
allowed_toolsarrayThe allowed tools of the harness. All tools are allowed by default.
arnstringThe ARN of the harness. (pattern: <code>arn:([^:]+)?:bedrock-agentcore:[a-z0-9-]+:[0-9]{12}:harness/[a-zA-Z][a-zA-Z0-9_]{0,39}-[a-zA-Z0-9]{10}</code>)
authorizer_configurationobjectRepresents inbound authorization configuration options used to authenticate incoming requests.
created_atstring (date-time)The createdAt time of the harness.
environmentobjectThe compute environment on which the Harness runs.
environment_artifactobjectThe environment artifact for a harness, such as a container image containing custom dependencies.
environment_variablesobjectEnvironment variables exposed in the environment in which the harness operates.
execution_role_arnstringIAM role the harness assumes when running. (pattern: <code>arn:aws(-[^:]+)?:iam::([0-9]{12})?:role/.+</code>)
failure_reasonstringReason why create or update operations fail.
harness_idstringThe ID of the harness. (pattern: <code>[a-zA-Z][a-zA-Z0-9_]{0,39}-[a-zA-Z0-9]{10}</code>)
harness_namestringThe name of the harness. (pattern: <code>[a-zA-Z][a-zA-Z0-9_]{0,39}</code>)
harness_versionstringThe version of the harness. Incremented on every successful UpdateHarness. (pattern: <code>([1-9][0-9]{0,4})</code>)
max_iterationsintegerThe maximum number of iterations in the agent loop allowed before exiting per invocation.
max_tokensintegerThe maximum total number of output tokens the agent can generate across all model calls within a single invocation.
memoryobjectThe memory configuration for a harness.
modelobjectSpecification of which model to use.
skillsarrayThe skills of the harness.
statusstringThe status of the harness. (CREATING, CREATE_FAILED, UPDATING, UPDATE_FAILED, READY, DELETING, DELETE_FAILED)
system_promptarrayThe system prompt of the harness.
timeout_secondsintegerThe maximum duration per invocation.
toolsarrayThe tools of the harness.
truncationobjectConfiguration for truncating conversation context when it exceeds model limits.
updated_atstring (date-time)The updatedAt time of the harness.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_harnessselectharness_id, regionharnessVersionOperation to get a single harness.
create_harnessinsertregion, harnessName, executionRoleArnOperation to create a harness.
update_harnessupdateharness_id, regionOperation to update a harness.
delete_harnessdeleteharness_id, regionclientToken, deleteManagedMemoryOperation to delete a Harness.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
harness_idstringThe ID of the harness to delete.
regionstringAWS region (default: us-east-1)
clientTokenstringA unique, case-sensitive identifier to ensure idempotency of the request.
deleteManagedMemorybooleanWhether to delete the managed memory on harness deletion. Default: true. If false, the memory is disassociated and becomes a regular customer-owned resource.
harnessVersionstringSpecific version of the harness to retrieve. If omitted, returns the current Harness configuration, including its status.

SELECT examples

Operation to get a single harness.

SELECT
allowed_tools,
arn,
authorizer_configuration,
created_at,
environment,
environment_artifact,
environment_variables,
execution_role_arn,
failure_reason,
harness_id,
harness_name,
harness_version,
max_iterations,
max_tokens,
memory,
model,
skills,
status,
system_prompt,
timeout_seconds,
tools,
truncation,
updated_at
FROM aws.bedrock_agentcore_control.harness
WHERE harness_id = '{{ harness_id }}' -- required
AND region = '{{ region }}' -- required
AND harnessVersion = '{{ harnessVersion }}'
;

INSERT examples

Operation to create a harness.

INSERT INTO aws.bedrock_agentcore_control.harness (
harnessName,
clientToken,
executionRoleArn,
environment,
environmentArtifact,
environmentVariables,
authorizerConfiguration,
model,
systemPrompt,
tools,
skills,
allowedTools,
memory,
truncation,
maxIterations,
maxTokens,
timeoutSeconds,
tags,
region
)
SELECT
'{{ harnessName }}' /* required */,
'{{ clientToken }}',
'{{ executionRoleArn }}' /* required */,
'{{ environment }}',
'{{ environmentArtifact }}',
'{{ environmentVariables }}',
'{{ authorizerConfiguration }}',
'{{ model }}',
'{{ systemPrompt }}',
'{{ tools }}',
'{{ skills }}',
'{{ allowedTools }}',
'{{ memory }}',
'{{ truncation }}',
{{ maxIterations }},
{{ maxTokens }},
{{ timeoutSeconds }},
'{{ tags }}',
'{{ region }}'
RETURNING
harness
;

UPDATE examples

Operation to update a harness.

UPDATE aws.bedrock_agentcore_control.harness
SET
clientToken = '{{ clientToken }}',
executionRoleArn = '{{ executionRoleArn }}',
environment = '{{ environment }}',
environmentArtifact = '{{ environmentArtifact }}',
environmentVariables = '{{ environmentVariables }}',
authorizerConfiguration = '{{ authorizerConfiguration }}',
model = '{{ model }}',
systemPrompt = '{{ systemPrompt }}',
tools = '{{ tools }}',
skills = '{{ skills }}',
allowedTools = '{{ allowedTools }}',
memory = '{{ memory }}',
truncation = '{{ truncation }}',
maxIterations = {{ maxIterations }},
maxTokens = {{ maxTokens }},
timeoutSeconds = {{ timeoutSeconds }}
WHERE
harness_id = '{{ harness_id }}' --required
AND region = '{{ region }}' --required
RETURNING
harness;

DELETE examples

Operation to delete a Harness.

DELETE FROM aws.bedrock_agentcore_control.harness
WHERE harness_id = '{{ harness_id }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}'
AND deleteManagedMemory = '{{ deleteManagedMemory }}'
;