updateAgentCollaborator method

Future<UpdateAgentCollaboratorResponse> updateAgentCollaborator({
  1. required AgentDescriptor agentDescriptor,
  2. required String agentId,
  3. required String agentVersion,
  4. required String collaborationInstruction,
  5. required String collaboratorId,
  6. required String collaboratorName,
  7. RelayConversationHistory? relayConversationHistory,
})

Updates an agent's collaborator.

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

Parameter agentDescriptor : An agent descriptor for the agent collaborator.

Parameter agentId : The agent's ID.

Parameter agentVersion : The agent's version.

Parameter collaborationInstruction : Instruction for the collaborator.

Parameter collaboratorId : The collaborator's ID.

Parameter collaboratorName : The collaborator's name.

Parameter relayConversationHistory : A relay conversation history for the collaborator.

Implementation

Future<UpdateAgentCollaboratorResponse> updateAgentCollaborator({
  required AgentDescriptor agentDescriptor,
  required String agentId,
  required String agentVersion,
  required String collaborationInstruction,
  required String collaboratorId,
  required String collaboratorName,
  RelayConversationHistory? relayConversationHistory,
}) async {
  final $payload = <String, dynamic>{
    'agentDescriptor': agentDescriptor,
    'collaborationInstruction': collaborationInstruction,
    'collaboratorName': collaboratorName,
    if (relayConversationHistory != null)
      'relayConversationHistory': relayConversationHistory.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/agents/${Uri.encodeComponent(agentId)}/agentversions/${Uri.encodeComponent(agentVersion)}/agentcollaborators/${Uri.encodeComponent(collaboratorId)}/',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateAgentCollaboratorResponse.fromJson(response);
}