updateAgent method
Implementation
Future<void> updateAgent({required String projectId, required String agentId, required Map<String, dynamic> configuration}) async {
final encodedProjectId = Uri.encodeComponent(projectId);
final encodedAgentId = Uri.encodeComponent(agentId);
final uri = Uri.parse('$baseUrl/accounts/projects/$encodedProjectId/agents/$encodedAgentId');
final response = await httpClient.put(uri, body: jsonEncode({'configuration': _jsonMapWithoutNulls(configuration)}));
if (response.statusCode >= 400) {
throw MeshagentException(
'Failed to update agent. '
'Status code: ${response.statusCode}, body: ${response.body}',
);
}
}