CloudToDeviceMessagesOperations Class

CloudToDeviceMessagesOperations operations.

Inheritance
builtins.object
CloudToDeviceMessagesOperations

Constructor

CloudToDeviceMessagesOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

api_version

Version of the Api. Constant value: "2021-04-12".

Methods

abandon_feedback_notification

Abandons the lock on a cloud-to-device feedback message. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging for more information.

complete_feedback_notification

Completes the cloud-to-device feedback message. A completed message is deleted from the feedback queue of the service. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging for more information.

purge_cloud_to_device_message_queue

Deletes all the pending commands for a device in the IoT Hub.

receive_feedback_notification

Gets the feedback for cloud-to-device messages. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging for more information. This capability is only available in the standard tier IoT Hub. For more information, see Choose the right IoT Hub tier.

abandon_feedback_notification

Abandons the lock on a cloud-to-device feedback message. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging for more information.

abandon_feedback_notification(lock_token, custom_headers=None, raw=False, **operation_config)

Parameters

lock_token
str
Required

The lock token obtained when the cloud-to-device message is received.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None,

Exceptions

complete_feedback_notification

Completes the cloud-to-device feedback message. A completed message is deleted from the feedback queue of the service. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging for more information.

complete_feedback_notification(lock_token, custom_headers=None, raw=False, **operation_config)

Parameters

lock_token
str
Required

The lock token obtained when the cloud-to-device message is received. This is used to resolve race conditions when completing a feedback message.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None,

Exceptions

purge_cloud_to_device_message_queue

Deletes all the pending commands for a device in the IoT Hub.

purge_cloud_to_device_message_queue(id, custom_headers=None, raw=False, **operation_config)

Parameters

id
str
Required

The unique identifier of the device.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

PurgeMessageQueueResult or ClientRawResponse if raw=true

Return type

Exceptions

receive_feedback_notification

Gets the feedback for cloud-to-device messages. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging for more information. This capability is only available in the standard tier IoT Hub. For more information, see Choose the right IoT Hub tier.

receive_feedback_notification(custom_headers=None, raw=False, **operation_config)

Parameters

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None,

Exceptions

Attributes

models

models = <module 'azure.iot.hub.protocol.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\iot\\hub\\protocol\\models\\__init__.py'>