updateAgentRuntime method
- required AgentRuntimeArtifact agentRuntimeArtifact,
- required String agentRuntimeId,
- required NetworkConfiguration networkConfiguration,
- required String roleArn,
- AuthorizerConfiguration? authorizerConfiguration,
- String? clientToken,
- String? description,
- Map<
String, String> ? environmentVariables, - List<
FilesystemConfiguration> ? filesystemConfigurations, - LifecycleConfiguration? lifecycleConfiguration,
- RuntimeMetadataConfiguration? metadataConfiguration,
- ProtocolConfiguration? protocolConfiguration,
- RequestHeaderConfiguration? requestHeaderConfiguration,
Updates an existing Amazon Secure Agent.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter agentRuntimeArtifact :
The updated artifact of the AgentCore Runtime.
Parameter agentRuntimeId :
The unique identifier of the AgentCore Runtime to update.
Parameter networkConfiguration :
The updated network configuration for the AgentCore Runtime.
Parameter roleArn :
The updated IAM role ARN that provides permissions for the AgentCore
Runtime.
Parameter authorizerConfiguration :
The updated authorizer configuration for the AgentCore Runtime.
Parameter clientToken :
A unique, case-sensitive identifier to ensure idempotency of the request.
Parameter description :
The updated description of the AgentCore Runtime.
Parameter environmentVariables :
Updated environment variables to set in the AgentCore Runtime environment.
Parameter filesystemConfigurations :
The updated filesystem configurations to mount into the AgentCore Runtime.
Parameter lifecycleConfiguration :
The updated life cycle configuration for the AgentCore Runtime.
Parameter metadataConfiguration :
The updated configuration for microVM Metadata Service (MMDS) settings for
the AgentCore Runtime.
Parameter requestHeaderConfiguration :
The updated configuration for HTTP request headers that will be passed
through to the runtime.
Implementation
Future<UpdateAgentRuntimeResponse> updateAgentRuntime({
required AgentRuntimeArtifact agentRuntimeArtifact,
required String agentRuntimeId,
required NetworkConfiguration networkConfiguration,
required String roleArn,
AuthorizerConfiguration? authorizerConfiguration,
String? clientToken,
String? description,
Map<String, String>? environmentVariables,
List<FilesystemConfiguration>? filesystemConfigurations,
LifecycleConfiguration? lifecycleConfiguration,
RuntimeMetadataConfiguration? metadataConfiguration,
ProtocolConfiguration? protocolConfiguration,
RequestHeaderConfiguration? requestHeaderConfiguration,
}) async {
final $payload = <String, dynamic>{
'agentRuntimeArtifact': agentRuntimeArtifact,
'networkConfiguration': networkConfiguration,
'roleArn': roleArn,
if (authorizerConfiguration != null)
'authorizerConfiguration': authorizerConfiguration,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'description': description,
if (environmentVariables != null)
'environmentVariables': environmentVariables,
if (filesystemConfigurations != null)
'filesystemConfigurations': filesystemConfigurations,
if (lifecycleConfiguration != null)
'lifecycleConfiguration': lifecycleConfiguration,
if (metadataConfiguration != null)
'metadataConfiguration': metadataConfiguration,
if (protocolConfiguration != null)
'protocolConfiguration': protocolConfiguration,
if (requestHeaderConfiguration != null)
'requestHeaderConfiguration': requestHeaderConfiguration,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/runtimes/${Uri.encodeComponent(agentRuntimeId)}/',
exceptionFnMap: _exceptionFns,
);
return UpdateAgentRuntimeResponse.fromJson(response);
}