update_thing
async
¶
update_thing(
thing_name: ThingName,
*,
config_overrides: Optional[AsyncIoTClientConfig] = None,
thing_type_name: Optional[ThingTypeName] = None,
attribute_payload: Optional[AttributePayload] = None,
expected_version: Optional[OptionalVersion] = None,
remove_thing_type: Optional[RemoveThingType] = None,
) -> UpdateThingResponse
Updates the data for a thing.
Requires permission to access the UpdateThing action.
Parameters:
-
thing_name(ThingName) –The name of the thing to update.
You can't change a thing's name. To change a thing's name, you must create a new thing, give it the new name, and then delete the old thing.
-
thing_type_name(Optional[ThingTypeName], default:None) –The name of the thing type.
-
attribute_payload(Optional[AttributePayload], default:None) –A list of thing attributes, a JSON string containing name-value pairs. For example:
{\"attributes\":{\"name1\":\"value2\"}}This data is used to add new attributes or update existing attributes.
-
expected_version(Optional[OptionalVersion], default:None) –The expected version of the thing record in the registry. If the version of the record in the registry does not match the expected version specified in the request, the
UpdateThingrequest is rejected with aVersionConflictException. -
remove_thing_type(Optional[RemoveThingType], default:None) –Remove a thing type association. If true, the association is removed.
Raises:
-
InternalFailureException–An unexpected error has occurred.
-
InvalidRequestException–The request is not valid.
-
ResourceNotFoundException–The specified resource does not exist.
-
ServiceUnavailableException–The service is temporarily unavailable.
-
ThrottlingException–The rate exceeds the limit.
-
UnauthorizedException–You are not authorized to perform this operation.
-
VersionConflictException–An exception thrown when the version of an entity specified with the
expectedVersionparameter does not match the latest version in the system. -
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_iot/_services/async_io_t.py
18825 18826 18827 18828 18829 18830 18831 18832 18833 18834 18835 18836 18837 18838 18839 18840 18841 18842 18843 18844 18845 18846 18847 18848 18849 18850 18851 18852 18853 18854 18855 18856 18857 18858 18859 18860 18861 18862 18863 18864 18865 18866 18867 18868 18869 18870 18871 18872 18873 18874 18875 18876 18877 18878 18879 18880 18881 18882 18883 18884 18885 18886 18887 18888 18889 18890 18891 18892 18893 18894 18895 18896 18897 18898 18899 | |