Skip to content

BedrockAgentCoreControlClient.update_harness

rboto-bedrock-agentcore-control==0.4.0 · Service index · Types

Model summary (excerpt): Operation to update a harness.

Install and imports

python -m pip install "rboto[bedrock-agentcore-control]==0.4.0"
from rboto import BedrockAgentCoreControlClient
from collections.abc import Sequence
from rboto_bedrock_agentcore_control.types import (
    HarnessEnvironmentProviderRequest,
    HarnessHook,
    HarnessModelConfiguration,
    HarnessSkill,
    HarnessSystemContentBlock,
    HarnessTool,
    HarnessTruncationConfiguration,
    UpdateHarnessOutput,
    UpdatedAuthorizerConfiguration,
    UpdatedHarnessEnvironmentArtifact,
    UpdatedHarnessMemoryConfiguration,
)

Signature

async def update_harness(
    *,
    harness_id: str,
    client_token: str | None = None,
    execution_role_arn: str | None = None,
    environment: HarnessEnvironmentProviderRequest | None = None,
    environment_artifact: UpdatedHarnessEnvironmentArtifact | None = None,
    environment_variables: dict[str, str] | None = None,
    authorizer_configuration: UpdatedAuthorizerConfiguration | None = None,
    model: HarnessModelConfiguration | None = None,
    system_prompt: Sequence[HarnessSystemContentBlock] | None = None,
    tools: Sequence[HarnessTool] | None = None,
    skills: Sequence[HarnessSkill] | None = None,
    allowed_tools: Sequence[str] | None = None,
    memory: UpdatedHarnessMemoryConfiguration | None = None,
    truncation: HarnessTruncationConfiguration | None = None,
    hooks: Sequence[HarnessHook] | None = None,
    max_iterations: int | None = None,
    max_tokens: int | None = None,
    timeout_seconds: int | None = None,
) -> UpdateHarnessOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
harness_id Yes The ID of the harness to update.
client_token No A unique, case-sensitive identifier to ensure idempotency of the request.
execution_role_arn No The ARN of the IAM role that the harness assumes when running. If not specified, the existing value is retained.
environment No The compute environment configuration for the harness. If not specified, the existing value is retained.
environment_artifact No The environment artifact for the harness. Use the optionalValue wrapper to set a new value, or set it to null to clear the existing configuration.
environment_variables No Environment variables to set in the harness runtime environment. If specified, this replaces all existing environment variables. If not specified, the existing value is retained.
authorizer_configuration No
model No The model configuration for the harness. If not specified, the existing value is retained.
system_prompt No The system prompt that defines the agent's behavior. If not specified, the existing value is retained.
tools No The tools available to the agent. If specified, this replaces all existing tools. If not specified, the existing value is retained.
skills No The skills available to the agent. If specified, this replaces all existing skills. If not specified, the existing value is retained.
allowed_tools No The tools that the agent is allowed to use. If specified, this replaces all existing allowed tools. If not specified, the existing value is retained.
memory No The AgentCore Memory configuration. Use the optionalValue wrapper to set a new value, or set it to null to clear the existing configuration.
truncation No The truncation configuration for managing conversation context. If not specified, the existing value is retained.
hooks No The lifecycle hooks to run at defined points in the agent loop. If specified, this replaces all existing hooks. If not specified, the existing hooks are retained.
max_iterations No The maximum number of iterations the agent loop can execute per invocation. If not specified, the existing value is retained.
max_tokens No The maximum total number of output tokens the agent can generate across all model calls within a single invocation. If not specified, the existing value is retained.
timeout_seconds No The maximum duration in seconds for the agent loop execution per invocation. If not specified, the existing value is retained.

Output

UpdateHarnessOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
harness HarnessOutput | None Always present HarnessOutput

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

HarnessEnvironmentProviderRequest, HarnessHook, HarnessModelConfiguration, HarnessSkill, HarnessSystemContentBlock, HarnessTool, HarnessTruncationConfiguration, UpdateHarnessOutput, UpdatedAuthorizerConfiguration, UpdatedHarnessEnvironmentArtifact, UpdatedHarnessMemoryConfiguration

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_bedrock_agentcore_control.exceptions:

AccessDeniedError, ConflictError, InternalServerError, ResourceNotFoundError, ServiceQuotaExceededError, ThrottlingError, ValidationError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model