Skip to content

delete_queued_messages async

delete_queued_messages(
    id: WirelessDeviceId,
    message_id: MessageId,
    *,
    config_overrides: Optional[AsyncIoTWirelessClientConfig] = None,
    wireless_device_type: Optional[WirelessDeviceType] = None,
) -> DeleteQueuedMessagesResponse

Remove queued messages from the downlink queue.

Parameters:

  • id (WirelessDeviceId) –

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

  • message_id (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.

  • wireless_device_type (Optional[WirelessDeviceType], default: None ) –

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

Raises:

Source code in docs_src/capo_iot_wireless/_services/async_io_t_wireless.py
async def delete_queued_messages(
    self,
    id: "capo_iot_wireless.types.wireless_device_id.WirelessDeviceId",
    message_id: "capo_iot_wireless.types.message_id.MessageId",
    *,
    config_overrides: Optional[AsyncIoTWirelessClientConfig] = None,
    wireless_device_type: Optional[
        "capo_iot_wireless.types.wireless_device_type.WirelessDeviceType"
    ] = None,
) -> "capo_iot_wireless.types.delete_queued_messages_response.DeleteQueuedMessagesResponse":
    """<p>Remove queued messages from the downlink queue.</p>

    Args:
        id: <p>The ID of a given wireless device for which downlink messages will be deleted.</p>
        message_id: <p>If message ID is <code>"*"</code>, 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.</p>
        wireless_device_type: <p>The wireless device type, which can be either Sidewalk or LoRaWAN.</p>

    Raises:
        capo_iot_wireless.errors.access_denied_exception.AccessDeniedException: <p>User does not have permission to perform this action.</p>
        capo_iot_wireless.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing a request.</p>
        capo_iot_wireless.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource does not exist.</p>
        capo_iot_wireless.errors.throttling_exception.ThrottlingException: <p>The request was denied because it exceeded the allowed API request rate.</p>
        capo_iot_wireless.errors.validation_exception.ValidationException: <p>The input did not meet the specified constraints.</p>
        capo_iot_wireless.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iot_wireless.types.delete_queued_messages_request.DeleteQueuedMessagesRequest]",
    ) -> AsyncOperationResponse[
        "capo_iot_wireless.types.delete_queued_messages_response.DeleteQueuedMessagesResponse"
    ]:
        import capo_iot_wireless._operations.iotwireless.delete_queued_messages

        (
            output,
            http_response,
        ) = await capo_iot_wireless._operations.iotwireless.delete_queued_messages.async_delete_queued_messages(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteQueuedMessages")
    )
    input_: capo_iot_wireless.types.delete_queued_messages_request.DeleteQueuedMessagesRequest = {
        "id": id,
        "message_id": message_id,
    }
    if wireless_device_type is not None:
        input_["wireless_device_type"] = wireless_device_type

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output