Gets definitions of the specified entities. Uses the latest version of the user's namespace by default. This API returns the following TDM entities.
-
Properties
-
States
-
Events
-
Actions
-
Capabilities
-
Mappings
-
Devices
-
Device Models
-
Services
This action doesn't return definitions for systems, flows, and deployments.
Parameters:
-
ids
(Urns)
–
An array of entity IDs.
The IDs should be in the following format.
urn:tdm:REGION/ACCOUNT ID/default:device:DEVICENAME
-
namespace_version
(Optional[Version], default:
None
)
–
The version of the user's namespace. Defaults to the latest version of the user's namespace.
Raises:
Source code in docs_src/capo_iotthingsgraph/_services/io_t_things_graph.py
| def get_entities(
self,
ids: "capo_iotthingsgraph.types.urns.Urns",
*,
config_overrides: Optional[IoTThingsGraphClientConfig] = None,
namespace_version: Optional["capo_iotthingsgraph.types.version.Version"] = None,
) -> "capo_iotthingsgraph.types.get_entities_response.GetEntitiesResponse":
"""<p>Gets definitions of the specified entities. Uses the latest version of the user's namespace by default. This API returns the following TDM entities.</p> <ul> <li> <p>Properties</p> </li> <li> <p>States</p> </li> <li> <p>Events</p> </li> <li> <p>Actions</p> </li> <li> <p>Capabilities</p> </li> <li> <p>Mappings</p> </li> <li> <p>Devices</p> </li> <li> <p>Device Models</p> </li> <li> <p>Services</p> </li> </ul> <p>This action doesn't return definitions for systems, flows, and deployments.</p>
Args:
ids: <p>An array of entity IDs.</p> <p>The IDs should be in the following format.</p> <p> <code>urn:tdm:REGION/ACCOUNT ID/default:device:DEVICENAME</code> </p>
namespace_version: <p>The version of the user's namespace. Defaults to the latest version of the user's namespace.</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.get_entities_request.GetEntitiesRequest]",
) -> OperationResponse[
"capo_iotthingsgraph.types.get_entities_response.GetEntitiesResponse"
]:
import capo_iotthingsgraph._operations.iot_things_graph_front_end_service.get_entities
output, http_response = (
capo_iotthingsgraph._operations.iot_things_graph_front_end_service.get_entities.get_entities(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetEntities")
)
input_: capo_iotthingsgraph.types.get_entities_request.GetEntitiesRequest = {
"ids": ids
}
if namespace_version is not None:
input_["namespace_version"] = namespace_version
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|