rebootInputDevice method

Future<void> rebootInputDevice({
  1. required String inputDeviceId,
  2. RebootInputDeviceForce? force,
})

Send a reboot command to the specified input device. The device will begin rebooting within a few seconds of sending the command. When the reboot is complete, the device’s connection status will change to connected.

May throw BadGatewayException. May throw BadRequestException. May throw ForbiddenException. May throw GatewayTimeoutException. May throw InternalServerErrorException. May throw NotFoundException. May throw TooManyRequestsException. May throw UnprocessableEntityException.

Parameter inputDeviceId : The unique ID of the input device to reboot. For example, hd-123456789abcdef.

Parameter force : Force a reboot of an input device. If the device is streaming, it will stop streaming and begin rebooting within a few seconds of sending the command. If the device was streaming prior to the reboot, the device will resume streaming when the reboot completes.

Implementation

Future<void> rebootInputDevice({
  required String inputDeviceId,
  RebootInputDeviceForce? force,
}) async {
  final $payload = <String, dynamic>{
    if (force != null) 'force': force.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/prod/inputDevices/${Uri.encodeComponent(inputDeviceId)}/reboot',
    exceptionFnMap: _exceptionFns,
  );
}