BedrockAgentCoreControl / Client / update_agent_runtime
update_agent_runtime¶
- BedrockAgentCoreControl.Client.update_agent_runtime(**kwargs)¶
Updates an existing Amazon Secure Agent.
See also: AWS API Documentation
Request Syntax
response = client.update_agent_runtime( agentRuntimeId='string', agentRuntimeArtifact={ 'containerConfiguration': { 'containerUri': 'string' }, 'codeConfiguration': { 'code': { 's3': { 'bucket': 'string', 'prefix': 'string', 'versionId': 'string' } }, 'runtime': 'PYTHON_3_10'|'PYTHON_3_11'|'PYTHON_3_12'|'PYTHON_3_13', 'entryPoint': [ 'string', ] } }, roleArn='string', networkConfiguration={ 'networkMode': 'PUBLIC'|'VPC', 'networkModeConfig': { 'securityGroups': [ 'string', ], 'subnets': [ 'string', ] } }, description='string', authorizerConfiguration={ 'customJWTAuthorizer': { 'discoveryUrl': 'string', 'allowedAudience': [ 'string', ], 'allowedClients': [ 'string', ] } }, requestHeaderConfiguration={ 'requestHeaderAllowlist': [ 'string', ] }, protocolConfiguration={ 'serverProtocol': 'MCP'|'HTTP'|'A2A' }, lifecycleConfiguration={ 'idleRuntimeSessionTimeout': 123, 'maxLifetime': 123 }, environmentVariables={ 'string': 'string' }, clientToken='string' )
- Parameters:
agentRuntimeId (string) –
[REQUIRED]
The unique identifier of the AgentCore Runtime to update.
agentRuntimeArtifact (dict) –
[REQUIRED]
The updated artifact of the AgentCore Runtime.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
containerConfiguration,codeConfiguration.containerConfiguration (dict) –
The container configuration for the agent artifact.
containerUri (string) – [REQUIRED]
The ECR URI of the container.
codeConfiguration (dict) –
The code configuration for the agent runtime artifact, including the source code location and execution settings.
code (dict) – [REQUIRED]
The source code location and configuration details.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
s3.s3 (dict) –
The Amazon Amazon S3 object that contains the source code for the agent runtime.
bucket (string) – [REQUIRED]
The name of the Amazon S3 bucket. This bucket contains the stored data.
prefix (string) – [REQUIRED]
The prefix for objects in the Amazon S3 bucket. This prefix is added to the object keys to organize the data.
versionId (string) –
The version ID of the Amazon Amazon S3 object. If not specified, the latest version of the object is used.
runtime (string) – [REQUIRED]
The runtime environment for executing the code (for example, Python 3.9 or Node.js 18).
entryPoint (list) – [REQUIRED]
The entry point for the code execution, specifying the function or method that should be invoked when the code runs.
(string) –
roleArn (string) –
[REQUIRED]
The updated IAM role ARN that provides permissions for the AgentCore Runtime.
networkConfiguration (dict) –
[REQUIRED]
The updated network configuration for the AgentCore Runtime.
networkMode (string) – [REQUIRED]
The network mode for the AgentCore Runtime.
networkModeConfig (dict) –
The network mode configuration for the AgentCore Runtime.
securityGroups (list) – [REQUIRED]
The security groups associated with the VPC configuration.
(string) –
subnets (list) – [REQUIRED]
The subnets associated with the VPC configuration.
(string) –
description (string) – The updated description of the AgentCore Runtime.
authorizerConfiguration (dict) –
The updated authorizer configuration for the AgentCore Runtime.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
customJWTAuthorizer.customJWTAuthorizer (dict) –
The inbound JWT-based authorization, specifying how incoming requests should be authenticated.
discoveryUrl (string) – [REQUIRED]
This URL is used to fetch OpenID Connect configuration or authorization server metadata for validating incoming tokens.
allowedAudience (list) –
Represents individual audience values that are validated in the incoming JWT token validation process.
(string) –
allowedClients (list) –
Represents individual client IDs that are validated in the incoming JWT token validation process.
(string) –
requestHeaderConfiguration (dict) –
The updated configuration for HTTP request headers that will be passed through to the runtime.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
requestHeaderAllowlist.requestHeaderAllowlist (list) –
A list of HTTP request headers that are allowed to be passed through to the runtime.
(string) –
protocolConfiguration (dict) –
The protocol configuration for an agent runtime. This structure defines how the agent runtime communicates with clients.
serverProtocol (string) – [REQUIRED]
The server protocol for the agent runtime. This field specifies which protocol the agent runtime uses to communicate with clients.
lifecycleConfiguration (dict) –
The updated life cycle configuration for the AgentCore Runtime.
idleRuntimeSessionTimeout (integer) –
Timeout in seconds for idle runtime sessions. When a session remains idle for this duration, it will be automatically terminated. Default: 900 seconds (15 minutes).
maxLifetime (integer) –
Maximum lifetime for the instance in seconds. Once reached, instances will be automatically terminated and replaced. Default: 28800 seconds (8 hours).
environmentVariables (dict) –
Updated environment variables to set in the AgentCore Runtime environment.
(string) –
(string) –
clientToken (string) –
A unique, case-sensitive identifier to ensure idempotency of the request.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'agentRuntimeArn': 'string', 'agentRuntimeId': 'string', 'workloadIdentityDetails': { 'workloadIdentityArn': 'string' }, 'agentRuntimeVersion': 'string', 'createdAt': datetime(2015, 1, 1), 'lastUpdatedAt': datetime(2015, 1, 1), 'status': 'CREATING'|'CREATE_FAILED'|'UPDATING'|'UPDATE_FAILED'|'READY'|'DELETING' }
Response Structure
(dict) –
agentRuntimeArn (string) –
The Amazon Resource Name (ARN) of the updated AgentCore Runtime.
agentRuntimeId (string) –
The unique identifier of the updated AgentCore Runtime.
workloadIdentityDetails (dict) –
The workload identity details for the updated AgentCore Runtime.
workloadIdentityArn (string) –
The ARN associated with the workload identity.
agentRuntimeVersion (string) –
The version of the updated AgentCore Runtime.
createdAt (datetime) –
The timestamp when the AgentCore Runtime was created.
lastUpdatedAt (datetime) –
The timestamp when the AgentCore Runtime was last updated.
status (string) –
The current status of the updated AgentCore Runtime.
Exceptions
BedrockAgentCoreControl.Client.exceptions.ServiceQuotaExceededExceptionBedrockAgentCoreControl.Client.exceptions.AccessDeniedExceptionBedrockAgentCoreControl.Client.exceptions.ValidationExceptionBedrockAgentCoreControl.Client.exceptions.ResourceNotFoundExceptionBedrockAgentCoreControl.Client.exceptions.ThrottlingExceptionBedrockAgentCoreControl.Client.exceptions.InternalServerException