Skip to content

Added ShadowClearState and adjusted Shadow sample #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

TwistedTwigleg
Copy link
Contributor

Issue #, if available:

Closes #114

Description of changes:

Added a new state called ShadowClearState for clearing the data in an AWS IoT Shadow. This state can be configured to clear all the data in desired, reported, or both. The Shadow sample was also adjusted to show how to use this new state.

This PR makes the following changes:

  • Added ShadowClearState - allows for clearing all the data in a shadow document
    • For example, can be used to clear all the data in the 'desired' shadow property
    • Is configurable and allows for clearing just the desired, just the reported, or both
  • Adjusted Shadow sample
    • When you type "none" it will send a None object and clear the property with the same name
    • When you type "clear_shadow" it will send a ShadowClearState and will clear all the data in the 'desired' and 'reported' properties
    • Added condition to check for if the response state is not None, which is what is returned after clearing all the data in a shadow document

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

* Added ShadowClearState - allows for clearing all the data in a shadow document
  * For example, can be used to clear all the data in the 'desired' shadow property
  * Is configurable and allows for clearing just the desired, just the reported, or both
* Adjusted Shadow sample
  * When you type "none" it will send a None object and clear the property with the same name
  * When you type "clear_shadow" it will send a ShadowClearState and will clear all the data in the 'desired' and 'reported' properties
  * Added condition to check for if the response state is not None, which is what is returned after clearing all the data in a shadow document
@TwistedTwigleg TwistedTwigleg marked this pull request as draft February 2, 2022 18:38
@TwistedTwigleg
Copy link
Contributor Author

Superseded by #269

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to Clear the "Reported" and "Desired" fields
1 participant