updateWorkerSchedule method
Updates the schedule for a worker.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerErrorException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter farmId :
The farm ID to update.
Parameter fleetId :
The fleet ID to update.
Parameter workerId :
The worker ID to update.
Parameter updatedSessionActions :
The session actions associated with the worker schedule to update.
Implementation
Future<UpdateWorkerScheduleResponse> updateWorkerSchedule({
required String farmId,
required String fleetId,
required String workerId,
Map<String, UpdatedSessionActionInfo>? updatedSessionActions,
}) async {
final $payload = <String, dynamic>{
if (updatedSessionActions != null)
'updatedSessionActions': updatedSessionActions,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/2023-10-12/farms/${Uri.encodeComponent(farmId)}/fleets/${Uri.encodeComponent(fleetId)}/workers/${Uri.encodeComponent(workerId)}/schedule',
exceptionFnMap: _exceptionFns,
);
return UpdateWorkerScheduleResponse.fromJson(response);
}