updateRunGroup method
Updates the settings of a run group and returns a response with no body if the operation is successful.
You can update the following settings with UpdateRunGroup:
- Maximum number of CPUs
- Run time (measured in minutes)
- Number of GPUs
- Number of concurrent runs
- Group name
ListRunGroups or GetRunGroup API operations to
verify that the desired changes have been made.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw RequestTimeoutException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter id :
The group's ID.
Parameter maxCpus :
The maximum number of CPUs to use.
Parameter maxDuration :
A maximum run time for the group in minutes.
Parameter maxGpus :
The maximum GPUs that can be used by a run group.
Parameter maxRuns :
The maximum number of concurrent runs for the group.
Parameter name :
A name for the group.
Implementation
Future<void> updateRunGroup({
required String id,
int? maxCpus,
int? maxDuration,
int? maxGpus,
int? maxRuns,
String? name,
}) async {
final $payload = <String, dynamic>{
if (maxCpus != null) 'maxCpus': maxCpus,
if (maxDuration != null) 'maxDuration': maxDuration,
if (maxGpus != null) 'maxGpus': maxGpus,
if (maxRuns != null) 'maxRuns': maxRuns,
if (name != null) 'name': name,
};
await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/runGroup/${Uri.encodeComponent(id)}',
exceptionFnMap: _exceptionFns,
);
}