awsiot.iotshadow¶
- class awsiot.iotshadow.IotShadowClient(mqtt_connection)¶
Bases:
MqttServiceClient
The AWS IoT Device Shadow service adds shadows to AWS IoT thing objects. Shadows are a simple data store for device properties and state. Shadows can make a device’s state available to apps and other services whether the device is connected to AWS IoT or not.
AWS Docs: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html
- Parameters:
mqtt_connection (Connection) –
- publish_delete_named_shadow(request, qos)¶
Deletes a named shadow for an AWS IoT thing.
API Docs: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
- Parameters:
request (DeleteNamedShadowRequest) – DeleteNamedShadowRequest instance.
qos (int) – The Quality of Service guarantee of this message
- Returns:
A Future whose result will be None if the request is successfully published. The Future’s result will be an exception if the request cannot be published.
- Return type:
Future
- publish_delete_shadow(request, qos)¶
Deletes the (classic) shadow for an AWS IoT thing.
API Docs: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic
- Parameters:
request (DeleteShadowRequest) – DeleteShadowRequest instance.
qos (int) – The Quality of Service guarantee of this message
- Returns:
A Future whose result will be None if the request is successfully published. The Future’s result will be an exception if the request cannot be published.
- Return type:
Future
- publish_get_named_shadow(request, qos)¶
Gets a named shadow for an AWS IoT thing.
API Docs: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
- Parameters:
request (GetNamedShadowRequest) – GetNamedShadowRequest instance.
qos (int) – The Quality of Service guarantee of this message
- Returns:
A Future whose result will be None if the request is successfully published. The Future’s result will be an exception if the request cannot be published.
- Return type:
Future
- publish_get_shadow(request, qos)¶
Gets the (classic) shadow for an AWS IoT thing.
API Docs: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic
- Parameters:
request (GetShadowRequest) – GetShadowRequest instance.
qos (int) – The Quality of Service guarantee of this message
- Returns:
A Future whose result will be None if the request is successfully published. The Future’s result will be an exception if the request cannot be published.
- Return type:
Future
- publish_update_named_shadow(request, qos)¶
Update a named shadow for a device.
API Docs: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
- Parameters:
request (UpdateNamedShadowRequest) – UpdateNamedShadowRequest instance.
qos (int) – The Quality of Service guarantee of this message
- Returns:
A Future whose result will be None if the request is successfully published. The Future’s result will be an exception if the request cannot be published.
- Return type:
Future
- publish_update_shadow(request, qos)¶
Update a device’s (classic) shadow.
API Docs: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic
- Parameters:
request (UpdateShadowRequest) – UpdateShadowRequest instance.
qos (int) – The Quality of Service guarantee of this message
- Returns:
A Future whose result will be None if the request is successfully published. The Future’s result will be an exception if the request cannot be published.
- Return type:
Future
- subscribe_to_delete_named_shadow_accepted(request, qos, callback)¶
Subscribes to the accepted topic for the DeleteNamedShadow operation.
- Parameters:
request (DeleteNamedShadowSubscriptionRequest) – DeleteNamedShadowSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[DeleteShadowResponse], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type DeleteShadowResponse. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- subscribe_to_delete_named_shadow_rejected(request, qos, callback)¶
Subscribes to the rejected topic for the DeleteNamedShadow operation.
- Parameters:
request (DeleteNamedShadowSubscriptionRequest) – DeleteNamedShadowSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[ErrorResponse], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type ErrorResponse. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- subscribe_to_delete_shadow_accepted(request, qos, callback)¶
Subscribes to the accepted topic for the DeleteShadow operation
- Parameters:
request (DeleteShadowSubscriptionRequest) – DeleteShadowSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[DeleteShadowResponse], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type DeleteShadowResponse. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- subscribe_to_delete_shadow_rejected(request, qos, callback)¶
Subscribes to the rejected topic for the DeleteShadow operation
- Parameters:
request (DeleteShadowSubscriptionRequest) – DeleteShadowSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[ErrorResponse], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type ErrorResponse. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- subscribe_to_get_named_shadow_accepted(request, qos, callback)¶
Subscribes to the accepted topic for the GetNamedShadow operation.
- Parameters:
request (GetNamedShadowSubscriptionRequest) – GetNamedShadowSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[GetShadowResponse], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type GetShadowResponse. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- subscribe_to_get_named_shadow_rejected(request, qos, callback)¶
Subscribes to the rejected topic for the GetNamedShadow operation.
- Parameters:
request (GetNamedShadowSubscriptionRequest) – GetNamedShadowSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[ErrorResponse], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type ErrorResponse. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- subscribe_to_get_shadow_accepted(request, qos, callback)¶
Subscribes to the accepted topic for the GetShadow operation.
- Parameters:
request (GetShadowSubscriptionRequest) – GetShadowSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[GetShadowResponse], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type GetShadowResponse. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- subscribe_to_get_shadow_rejected(request, qos, callback)¶
Subscribes to the rejected topic for the GetShadow operation.
- Parameters:
request (GetShadowSubscriptionRequest) – GetShadowSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[ErrorResponse], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type ErrorResponse. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- subscribe_to_named_shadow_delta_updated_events(request, qos, callback)¶
Subscribe to NamedShadowDelta events for a named shadow of an AWS IoT thing.
- Parameters:
request (NamedShadowDeltaUpdatedSubscriptionRequest) – NamedShadowDeltaUpdatedSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[ShadowDeltaUpdatedEvent], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type ShadowDeltaUpdatedEvent. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- subscribe_to_named_shadow_updated_events(request, qos, callback)¶
Subscribe to ShadowUpdated events for a named shadow of an AWS IoT thing.
- Parameters:
request (NamedShadowUpdatedSubscriptionRequest) – NamedShadowUpdatedSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[ShadowUpdatedEvent], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type ShadowUpdatedEvent. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- subscribe_to_shadow_delta_updated_events(request, qos, callback)¶
Subscribe to ShadowDelta events for the (classic) shadow of an AWS IoT thing.
- Parameters:
request (ShadowDeltaUpdatedSubscriptionRequest) – ShadowDeltaUpdatedSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[ShadowDeltaUpdatedEvent], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type ShadowDeltaUpdatedEvent. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- subscribe_to_shadow_updated_events(request, qos, callback)¶
Subscribe to ShadowUpdated events for the (classic) shadow of an AWS IoT thing.
- Parameters:
request (ShadowUpdatedSubscriptionRequest) – ShadowUpdatedSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[ShadowUpdatedEvent], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type ShadowUpdatedEvent. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- subscribe_to_update_named_shadow_accepted(request, qos, callback)¶
Subscribes to the accepted topic for the UpdateNamedShadow operation
- Parameters:
request (UpdateNamedShadowSubscriptionRequest) – UpdateNamedShadowSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[UpdateShadowResponse], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type UpdateShadowResponse. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- subscribe_to_update_named_shadow_rejected(request, qos, callback)¶
Subscribes to the rejected topic for the UpdateNamedShadow operation
- Parameters:
request (UpdateNamedShadowSubscriptionRequest) – UpdateNamedShadowSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[ErrorResponse], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type ErrorResponse. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- subscribe_to_update_shadow_accepted(request, qos, callback)¶
Subscribes to the accepted topic for the UpdateShadow operation
- Parameters:
request (UpdateShadowSubscriptionRequest) – UpdateShadowSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[UpdateShadowResponse], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type UpdateShadowResponse. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- subscribe_to_update_shadow_rejected(request, qos, callback)¶
Subscribes to the rejected topic for the UpdateShadow operation
- Parameters:
request (UpdateShadowSubscriptionRequest) – UpdateShadowSubscriptionRequest instance.
qos (int) – The Quality of Service guarantee of this message
callback (Callable[[ErrorResponse], None]) – Callback to invoke each time the event is received. The callback should take 1 argument of type ErrorResponse. The callback is not expected to return anything.
- Returns:
Tuple with two values. The first is a Future whose result will be the awscrt.mqtt.QoS granted by the server, or an exception if the subscription fails. The second value is a topic which may be passed to unsubscribe() to stop receiving messages. Note that messages may arrive before the subscription is acknowledged.
- Return type:
- class awsiot.iotshadow.DeleteNamedShadowRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to make a DeleteNamedShadow request.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
- client_token¶
Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
- Type:
- class awsiot.iotshadow.DeleteNamedShadowSubscriptionRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to subscribe to DeleteNamedShadow responses for an AWS IoT thing.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
- class awsiot.iotshadow.DeleteShadowRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to make a DeleteShadow request.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
- client_token¶
Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
- Type:
- class awsiot.iotshadow.DeleteShadowResponse(*args, **kwargs)¶
Bases:
ModeledClass
Response payload to a DeleteShadow request.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
client_token (str) – A client token used to correlate requests and responses.
timestamp (datetime.datetime) – The time the response was generated by AWS IoT.
version (int) – The current version of the document for the device’s shadow.
- timestamp¶
The time the response was generated by AWS IoT.
- Type:
- class awsiot.iotshadow.DeleteShadowSubscriptionRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to subscribe to DeleteShadow responses for an AWS IoT thing.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
thing_name (str) – AWS IoT thing to subscribe to DeleteShadow operations for.
- class awsiot.iotshadow.ErrorResponse(*args, **kwargs)¶
Bases:
ModeledClass
Response document containing details about a failed request.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
client_token (str) – Opaque request-response correlation data. Present only if a client token was used in the request.
code (int) – An HTTP response code that indicates the type of error.
message (str) – A text message that provides additional information.
timestamp (datetime.datetime) – The date and time the response was generated by AWS IoT. This property is not present in all error response documents.
- client_token¶
Opaque request-response correlation data. Present only if a client token was used in the request.
- Type:
- timestamp¶
The date and time the response was generated by AWS IoT. This property is not present in all error response documents.
- Type:
- class awsiot.iotshadow.GetNamedShadowRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to make a GetNamedShadow request.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
- client_token¶
Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
- Type:
- class awsiot.iotshadow.GetNamedShadowSubscriptionRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to subscribe to GetNamedShadow responses.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
- class awsiot.iotshadow.GetShadowRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to make a GetShadow request.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
- client_token¶
Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
- Type:
- class awsiot.iotshadow.GetShadowResponse(*args, **kwargs)¶
Bases:
ModeledClass
Response payload to a GetShadow request.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
client_token (str) – An opaque token used to correlate requests and responses.
metadata (ShadowMetadata) – Contains the timestamps for each attribute in the desired and reported sections of the state.
state (ShadowStateWithDelta) – The (classic) shadow state of the AWS IoT thing.
timestamp (datetime.datetime) – The time the response was generated by AWS IoT.
version (int) – The current version of the document for the device’s shadow shared in AWS IoT. It is increased by one over the previous version of the document.
- metadata¶
Contains the timestamps for each attribute in the desired and reported sections of the state.
- Type:
- state¶
The (classic) shadow state of the AWS IoT thing.
- Type:
- timestamp¶
The time the response was generated by AWS IoT.
- Type:
- class awsiot.iotshadow.GetShadowSubscriptionRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to subscribe to GetShadow responses.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
thing_name (str) – AWS IoT thing subscribe to GetShadow responses for.
- class awsiot.iotshadow.NamedShadowDeltaUpdatedSubscriptionRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to subscribe to a device’s NamedShadowDelta events.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
- class awsiot.iotshadow.NamedShadowUpdatedSubscriptionRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to subscribe to a device’s NamedShadowUpdated events.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
- class awsiot.iotshadow.ShadowDeltaUpdatedEvent(*args, **kwargs)¶
Bases:
ModeledClass
An event generated when a shadow document was updated by a request to AWS IoT. The event payload contains only the changes requested.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
client_token (str) – An opaque token used to correlate requests and responses. Present only if a client token was used in the request.
metadata (Dict[str, Any]) – Timestamps for the shadow properties that were updated.
state (Dict[str, Any]) – Shadow properties that were updated.
timestamp (datetime.datetime) – The time the event was generated by AWS IoT.
version (int) – The current version of the document for the device’s shadow.
- client_token¶
An opaque token used to correlate requests and responses. Present only if a client token was used in the request.
- Type:
- timestamp¶
The time the event was generated by AWS IoT.
- Type:
- class awsiot.iotshadow.ShadowDeltaUpdatedSubscriptionRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to subscribe to a device’s ShadowDelta events.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
thing_name (str) – Name of the AWS IoT thing to get ShadowDelta events for.
- class awsiot.iotshadow.ShadowMetadata(*args, **kwargs)¶
Bases:
ModeledClass
Contains the last-updated timestamps for each attribute in the desired and reported sections of the shadow state.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
- desired¶
Contains the timestamps for each attribute in the desired section of a shadow’s state.
- class awsiot.iotshadow.ShadowState(*args, **kwargs)¶
Bases:
ModeledClass
(Potentially partial) state of an AWS IoT thing’s shadow.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
- desired_is_nullable¶
Set to true to allow ‘desired’ to be None, clearing the data if sent.
- Type:
- class awsiot.iotshadow.ShadowStateWithDelta(*args, **kwargs)¶
Bases:
ModeledClass
(Potentially partial) state of an AWS IoT thing’s shadow. Includes the delta between the reported and desired states.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
- class awsiot.iotshadow.ShadowUpdatedEvent(*args, **kwargs)¶
Bases:
ModeledClass
A description of the before and after states of a device shadow.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
current (ShadowUpdatedSnapshot) – Contains the state of the object after the update.
previous (ShadowUpdatedSnapshot) – Contains the state of the object before the update.
timestamp (datetime.datetime) – The time the event was generated by AWS IoT.
- current¶
Contains the state of the object after the update.
- Type:
- previous¶
Contains the state of the object before the update.
- Type:
- timestamp¶
The time the event was generated by AWS IoT.
- Type:
- class awsiot.iotshadow.ShadowUpdatedSnapshot(*args, **kwargs)¶
Bases:
ModeledClass
Complete state of the (classic) shadow of an AWS IoT Thing.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
metadata (ShadowMetadata) – Contains the timestamps for each attribute in the desired and reported sections of the state.
state (ShadowState) – Current shadow state.
version (int) – The current version of the document for the device’s shadow.
- metadata¶
Contains the timestamps for each attribute in the desired and reported sections of the state.
- Type:
- state¶
Current shadow state.
- Type:
- class awsiot.iotshadow.ShadowUpdatedSubscriptionRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to subscribe to a device’s ShadowUpdated events.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
thing_name (str) – Name of the AWS IoT thing to get ShadowUpdated events for.
- class awsiot.iotshadow.UpdateNamedShadowRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to make an UpdateNamedShadow request.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
client_token (str) – Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
shadow_name (str) – Name of the shadow to update.
state (ShadowState) – Requested changes to shadow state. Updates affect only the fields specified.
thing_name (str) – Aws IoT thing to update a named shadow of.
version (int) – (Optional) The Device Shadow service applies the update only if the specified version matches the latest version.
- client_token¶
Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
- Type:
- state¶
Requested changes to shadow state. Updates affect only the fields specified.
- Type:
- class awsiot.iotshadow.UpdateNamedShadowSubscriptionRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to subscribe to UpdateNamedShadow responses.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
- class awsiot.iotshadow.UpdateShadowRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to make an UpdateShadow request.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
client_token (str) – Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
state (ShadowState) – Requested changes to the shadow state. Updates affect only the fields specified.
thing_name (str) – Aws IoT thing to update the (classic) shadow of.
version (int) – (Optional) The Device Shadow service processes the update only if the specified version matches the latest version.
- client_token¶
Optional. A client token used to correlate requests and responses. Enter an arbitrary value here and it is reflected in the response.
- Type:
- state¶
Requested changes to the shadow state. Updates affect only the fields specified.
- Type:
- class awsiot.iotshadow.UpdateShadowResponse(*args, **kwargs)¶
Bases:
ModeledClass
Response payload to an UpdateShadow request.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
client_token (str) – An opaque token used to correlate requests and responses. Present only if a client token was used in the request.
metadata (ShadowMetadata) – Contains the timestamps for each attribute in the desired and reported sections so that you can determine when the state was updated.
state (ShadowState) – Updated device shadow state.
timestamp (datetime.datetime) – The time the response was generated by AWS IoT.
version (int) – The current version of the document for the device’s shadow shared in AWS IoT. It is increased by one over the previous version of the document.
- client_token¶
An opaque token used to correlate requests and responses. Present only if a client token was used in the request.
- Type:
- metadata¶
Contains the timestamps for each attribute in the desired and reported sections so that you can determine when the state was updated.
- Type:
- state¶
Updated device shadow state.
- Type:
- timestamp¶
The time the response was generated by AWS IoT.
- Type:
- class awsiot.iotshadow.UpdateShadowSubscriptionRequest(*args, **kwargs)¶
Bases:
ModeledClass
Data needed to subscribe to UpdateShadow responses.
All attributes are None by default, and may be set by keyword in the constructor.
- Keyword Arguments:
thing_name (str) – Name of the AWS IoT thing to listen to UpdateShadow responses for.