update_harness
¶
update_harness(
harness_id: HarnessId,
*,
config_overrides: Optional[BedrockAgentCoreControlClientConfig] = None,
client_token: Optional[ClientToken] = None,
execution_role_arn: Optional[RoleArn] = None,
environment: Optional[HarnessEnvironmentProviderRequest] = None,
environment_artifact: Optional[UpdatedHarnessEnvironmentArtifact] = None,
environment_variables: Optional[EnvironmentVariablesMap] = None,
authorizer_configuration: Optional[UpdatedAuthorizerConfiguration] = None,
model: Optional[HarnessModelConfiguration] = None,
system_prompt: Optional[HarnessSystemPrompt] = None,
tools: Optional[HarnessTools] = None,
skills: Optional[HarnessSkills] = None,
allowed_tools: Optional[HarnessAllowedTools] = None,
memory: Optional[UpdatedHarnessMemoryConfiguration] = None,
truncation: Optional[HarnessTruncationConfiguration] = None,
hooks: Optional[HarnessHooks] = None,
max_iterations: Optional[int] = None,
max_tokens: Optional[int] = None,
timeout_seconds: Optional[int] = None,
) -> UpdateHarnessResponse
Operation to update a harness.
Parameters:
-
harness_id(HarnessId) –The ID of the harness to update.
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier to ensure idempotency of the request.
-
execution_role_arn(Optional[RoleArn], default:None) –The ARN of the IAM role that the harness assumes when running. If not specified, the existing value is retained.
-
environment(Optional[HarnessEnvironmentProviderRequest], default:None) –The compute environment configuration for the harness. If not specified, the existing value is retained.
-
environment_artifact(Optional[UpdatedHarnessEnvironmentArtifact], default:None) –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(Optional[EnvironmentVariablesMap], default:None) –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.
-
model(Optional[HarnessModelConfiguration], default:None) –The model configuration for the harness. If not specified, the existing value is retained.
-
system_prompt(Optional[HarnessSystemPrompt], default:None) –The system prompt that defines the agent's behavior. If not specified, the existing value is retained.
-
tools(Optional[HarnessTools], default:None) –The tools available to the agent. If specified, this replaces all existing tools. If not specified, the existing value is retained.
-
skills(Optional[HarnessSkills], default:None) –The skills available to the agent. If specified, this replaces all existing skills. If not specified, the existing value is retained.
-
allowed_tools(Optional[HarnessAllowedTools], default:None) –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(Optional[UpdatedHarnessMemoryConfiguration], default:None) –The AgentCore Memory configuration. Use the optionalValue wrapper to set a new value, or set it to null to clear the existing configuration.
-
truncation(Optional[HarnessTruncationConfiguration], default:None) –The truncation configuration for managing conversation context. If not specified, the existing value is retained.
-
hooks(Optional[HarnessHooks], default:None) –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(Optional[int], default:None) –The maximum number of iterations the agent loop can execute per invocation. If not specified, the existing value is retained.
-
max_tokens(Optional[int], default:None) –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(Optional[int], default:None) –The maximum duration in seconds for the agent loop execution per invocation. If not specified, the existing value is retained.
Raises:
-
AccessDeniedException–This exception is thrown when a request is denied per access permissions
-
ConflictException–This exception is thrown when there is a conflict performing an operation
-
InternalServerException–This exception is thrown if there was an unexpected error during processing of request
-
ResourceNotFoundException–This exception is thrown when a resource referenced by the operation does not exist
-
ServiceQuotaExceededException–This exception is thrown when a request is made beyond the service quota
-
ThrottlingException–This exception is thrown when the number of requests exceeds the limit
-
ValidationException–The input fails to satisfy the constraints specified by the service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock_agentcore_control/_services/bedrock_agent_core_control.py
8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 | |