assumeQueueRoleForWorker method
Allows a worker to assume a queue role.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerErrorException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter farmId :
The farm ID of the worker assuming the queue role.
Parameter fleetId :
The fleet ID of the worker assuming the queue role.
Parameter queueId :
The queue ID of the worker assuming the queue role.
Parameter workerId :
The worker ID of the worker assuming the queue role.
Implementation
Future<AssumeQueueRoleForWorkerResponse> assumeQueueRoleForWorker({
required String farmId,
required String fleetId,
required String queueId,
required String workerId,
}) async {
final $query = <String, List<String>>{
'queueId': [queueId],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/2023-10-12/farms/${Uri.encodeComponent(farmId)}/fleets/${Uri.encodeComponent(fleetId)}/workers/${Uri.encodeComponent(workerId)}/queue-roles',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return AssumeQueueRoleForWorkerResponse.fromJson(response);
}