Dissociates a device entity from a concrete thing. The action takes only the type of the entity that you need to dissociate because only one entity of a particular type can be associated with a thing.
Parameters:
-
thing_name
(ThingName)
–
The name of the thing to disassociate.
-
entity_type
(EntityType)
–
The entity type from which to disassociate the thing.
Raises:
Source code in docs_src/capo_iotthingsgraph/_services/io_t_things_graph.py
| def dissociate_entity_from_thing(
self,
thing_name: "capo_iotthingsgraph.types.thing_name.ThingName",
entity_type: "capo_iotthingsgraph.types.entity_type.EntityType",
*,
config_overrides: Optional[IoTThingsGraphClientConfig] = None,
) -> "capo_iotthingsgraph.types.dissociate_entity_from_thing_response.DissociateEntityFromThingResponse":
"""<p>Dissociates a device entity from a concrete thing. The action takes only the type of the entity that you need to dissociate because only one entity of a particular type can be associated with a thing.</p>
Args:
thing_name: <p>The name of the thing to disassociate.</p>
entity_type: <p>The entity type from which to disassociate the thing.</p>
Raises:
capo_iotthingsgraph.errors.internal_failure_exception.InternalFailureException: <p></p>
capo_iotthingsgraph.errors.invalid_request_exception.InvalidRequestException: <p></p>
capo_iotthingsgraph.errors.resource_not_found_exception.ResourceNotFoundException: <p></p>
capo_iotthingsgraph.errors.throttling_exception.ThrottlingException: <p></p>
capo_iotthingsgraph.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_iotthingsgraph.types.dissociate_entity_from_thing_request.DissociateEntityFromThingRequest]",
) -> OperationResponse[
"capo_iotthingsgraph.types.dissociate_entity_from_thing_response.DissociateEntityFromThingResponse"
]:
import capo_iotthingsgraph._operations.iot_things_graph_front_end_service.dissociate_entity_from_thing
output, http_response = (
capo_iotthingsgraph._operations.iot_things_graph_front_end_service.dissociate_entity_from_thing.dissociate_entity_from_thing(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DissociateEntityFromThing")
)
input_: capo_iotthingsgraph.types.dissociate_entity_from_thing_request.DissociateEntityFromThingRequest = {
"thing_name": thing_name,
"entity_type": entity_type,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|