Creates a system. The system is validated against the entities in the latest version of the user's namespace unless another namespace version is specified in the request.
Parameters:
-
definition
(DefinitionDocument)
–
The DefinitionDocument used to create the system.
-
compatible_namespace_version
(Optional[Version], default:
None
)
–
The namespace version in which the system is to be created.
If no value is specified, the latest version is used by default.
Raises:
Source code in docs_src/capo_iotthingsgraph/_services/async_io_t_things_graph.py
| async def create_system_template(
self,
definition: "capo_iotthingsgraph.types.definition_document.DefinitionDocument",
*,
config_overrides: Optional[AsyncIoTThingsGraphClientConfig] = None,
compatible_namespace_version: Optional[
"capo_iotthingsgraph.types.version.Version"
] = None,
) -> "capo_iotthingsgraph.types.create_system_template_response.CreateSystemTemplateResponse":
"""<p>Creates a system. The system is validated against the entities in the latest version of the user's namespace unless another namespace version is specified in the request.</p>
Args:
definition: <p>The <code>DefinitionDocument</code> used to create the system.</p>
compatible_namespace_version: <p>The namespace version in which the system is to be created.</p> <p>If no value is specified, the latest version is used by default.</p>
Raises:
capo_iotthingsgraph.errors.internal_failure_exception.InternalFailureException: <p></p>
capo_iotthingsgraph.errors.invalid_request_exception.InvalidRequestException: <p></p>
capo_iotthingsgraph.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_iotthingsgraph.types.create_system_template_request.CreateSystemTemplateRequest]",
) -> AsyncOperationResponse[
"capo_iotthingsgraph.types.create_system_template_response.CreateSystemTemplateResponse"
]:
import capo_iotthingsgraph._operations.iot_things_graph_front_end_service.create_system_template
(
output,
http_response,
) = await capo_iotthingsgraph._operations.iot_things_graph_front_end_service.create_system_template.async_create_system_template(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateSystemTemplate")
)
input_: capo_iotthingsgraph.types.create_system_template_request.CreateSystemTemplateRequest = {
"definition": definition
}
if compatible_namespace_version is not None:
input_["compatible_namespace_version"] = compatible_namespace_version
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|