updateAgentRuntimeEndpoint method

Future<UpdateAgentRuntimeEndpointResponse> updateAgentRuntimeEndpoint({
  1. required String agentRuntimeId,
  2. required String endpointName,
  3. String? agentRuntimeVersion,
  4. String? clientToken,
  5. String? description,
})

Updates an existing Amazon Bedrock AgentCore Runtime endpoint.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter agentRuntimeId : The unique identifier of the AgentCore Runtime associated with the endpoint.

Parameter endpointName : The name of the AgentCore Runtime endpoint to update.

Parameter agentRuntimeVersion : The updated version of the AgentCore Runtime for the endpoint.

Parameter clientToken : A unique, case-sensitive identifier to ensure idempotency of the request.

Parameter description : The updated description of the AgentCore Runtime endpoint.

Implementation

Future<UpdateAgentRuntimeEndpointResponse> updateAgentRuntimeEndpoint({
  required String agentRuntimeId,
  required String endpointName,
  String? agentRuntimeVersion,
  String? clientToken,
  String? description,
}) async {
  final $payload = <String, dynamic>{
    if (agentRuntimeVersion != null)
      'agentRuntimeVersion': agentRuntimeVersion,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (description != null) 'description': description,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/runtimes/${Uri.encodeComponent(agentRuntimeId)}/runtime-endpoints/${Uri.encodeComponent(endpointName)}/',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateAgentRuntimeEndpointResponse.fromJson(response);
}