deleteQueuedMessages method

Future<void> deleteQueuedMessages({
  1. required String id,
  2. required String messageId,
  3. WirelessDeviceType? wirelessDeviceType,
})

Remove queued messages from the downlink queue.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter id : The ID of a given wireless device for which downlink messages will be deleted.

Parameter messageId : If message ID is "*", it cleares the entire downlink queue for a given device, specified by the wireless device ID. Otherwise, the downlink message with the specified message ID will be deleted.

Parameter wirelessDeviceType : The wireless device type, which can be either Sidewalk or LoRaWAN.

Implementation

Future<void> deleteQueuedMessages({
  required String id,
  required String messageId,
  WirelessDeviceType? wirelessDeviceType,
}) async {
  final $query = <String, List<String>>{
    'messageId': [messageId],
    if (wirelessDeviceType != null)
      'WirelessDeviceType': [wirelessDeviceType.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/wireless-devices/${Uri.encodeComponent(id)}/data',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}