update_thing
¶
update_thing(
thing_name: ThingName,
*,
config_overrides: Optional[IoTClientConfig] = 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/io_t.py
18547 18548 18549 18550 18551 18552 18553 18554 18555 18556 18557 18558 18559 18560 18561 18562 18563 18564 18565 18566 18567 18568 18569 18570 18571 18572 18573 18574 18575 18576 18577 18578 18579 18580 18581 18582 18583 18584 18585 18586 18587 18588 18589 18590 18591 18592 18593 18594 18595 18596 18597 18598 18599 18600 18601 18602 18603 18604 18605 18606 18607 18608 18609 18610 18611 18612 18613 18614 18615 18616 18617 18618 18619 18620 | |