update_agent
¶
update_agent(
agent_id: Id,
agent_name: Name,
agent_resource_role_arn: AgentRoleArn,
*,
config_overrides: Optional[BedrockAgentClientConfig] = None,
instruction: Optional[Instruction] = None,
foundation_model: Optional[ModelIdentifier] = None,
description: Optional[Description] = None,
orchestration_type: Optional[OrchestrationType] = None,
custom_orchestration: Optional[CustomOrchestration] = None,
idle_session_ttl_in_seconds: Optional[SessionTTL] = None,
customer_encryption_key_arn: Optional[KmsKeyArn] = None,
prompt_override_configuration: Optional[PromptOverrideConfiguration] = None,
guardrail_configuration: Optional[GuardrailConfiguration] = None,
memory_configuration: Optional[MemoryConfiguration] = None,
agent_collaboration: Optional[AgentCollaboration] = None,
) -> UpdateAgentResponse
Updates the configuration of an agent.
Parameters:
-
agent_id(Id) –The unique identifier of the agent.
-
agent_name(Name) –Specifies a new name for the agent.
-
instruction(Optional[Instruction], default:None) –Specifies new instructions that tell the agent what it should do and how it should interact with users.
-
foundation_model(Optional[ModelIdentifier], default:None) –The identifier for the model that you want to be used for orchestration by the agent you create.
The
modelIdto provide depends on the type of model or throughput that you use:-
If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see Amazon Bedrock base model IDs (on-demand throughput) in the Amazon Bedrock User Guide.
-
If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see Supported Regions and models for cross-region inference in the Amazon Bedrock User Guide.
-
If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see Run inference using a Provisioned Throughput in the Amazon Bedrock User Guide.
-
If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see Use a custom model in Amazon Bedrock in the Amazon Bedrock User Guide.
-
If you use an imported model, specify the ARN of the imported model. You can get the model ARN from a successful call to CreateModelImportJob or from the Imported models page in the Amazon Bedrock console.
-
-
description(Optional[Description], default:None) –Specifies a new description of the agent.
-
orchestration_type(Optional[OrchestrationType], default:None) –Specifies the type of orchestration strategy for the agent. This is set to
DEFAULTorchestration type, by default. -
custom_orchestration(Optional[CustomOrchestration], default:None) –Contains details of the custom orchestration configured for the agent.
-
idle_session_ttl_in_seconds(Optional[SessionTTL], default:None) –The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.
A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.
-
agent_resource_role_arn(AgentRoleArn) –The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.
-
customer_encryption_key_arn(Optional[KmsKeyArn], default:None) –The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent.
-
prompt_override_configuration(Optional[PromptOverrideConfiguration], default:None) –Contains configurations to override prompts in different parts of an agent sequence. For more information, see Advanced prompts.
-
guardrail_configuration(Optional[GuardrailConfiguration], default:None) –The unique Guardrail configuration assigned to the agent when it is updated.
-
memory_configuration(Optional[MemoryConfiguration], default:None) –Specifies the new memory configuration for the agent.
-
agent_collaboration(Optional[AgentCollaboration], default:None) –The agent's collaboration role.
Raises:
-
AccessDeniedException–The request is denied because of missing access permissions.
-
ConflictException–There was a conflict performing an operation.
-
InternalServerException–An internal server error occurred. Retry your request.
-
ResourceNotFoundException–The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
-
ServiceQuotaExceededException–The number of requests exceeds the service quota. Resubmit your request later.
-
ThrottlingException–The number of requests exceeds the limit. Resubmit your request later.
-
ValidationException–Input validation failed. Check your request parameters and retry the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock_agent/_services/bedrock_agent.py
2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 | |