update_agent
async
¶
update_agent(
agent_id: Id,
agent_name: Name,
agent_resource_role_arn: AgentRoleArn,
*,
config_overrides: Optional[AsyncBedrockAgentClientConfig] = 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/async_bedrock_agent.py
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 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 | |