Skip to content

delete_system_instance

delete_system_instance(
    *,
    config_overrides: Optional[IoTThingsGraphClientConfig] = None,
    id: Optional[Urn] = None,
) -> DeleteSystemInstanceResponse

Deletes a system instance. Only system instances that have never been deployed, or that have been undeployed can be deleted.

Users can create a new system instance that has the same ID as a deleted system instance.

Parameters:

  • id (Optional[Urn], default: None ) –

    The ID of the system instance to be deleted.

Raises:

Source code in docs_src/capo_iotthingsgraph/_services/io_t_things_graph.py
def delete_system_instance(
    self,
    *,
    config_overrides: Optional[IoTThingsGraphClientConfig] = None,
    id: Optional["capo_iotthingsgraph.types.urn.Urn"] = None,
) -> "capo_iotthingsgraph.types.delete_system_instance_response.DeleteSystemInstanceResponse":
    """<p>Deletes a system instance. Only system instances that have never been deployed, or that have been undeployed can be deleted.</p> <p>Users can create a new system instance that has the same ID as a deleted system instance.</p>

    Args:
        id: <p>The ID of the system instance to be deleted.</p>

    Raises:
        capo_iotthingsgraph.errors.internal_failure_exception.InternalFailureException: <p></p>
        capo_iotthingsgraph.errors.invalid_request_exception.InvalidRequestException: <p></p>
        capo_iotthingsgraph.errors.resource_in_use_exception.ResourceInUseException: <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.delete_system_instance_request.DeleteSystemInstanceRequest]",
    ) -> OperationResponse[
        "capo_iotthingsgraph.types.delete_system_instance_response.DeleteSystemInstanceResponse"
    ]:
        import capo_iotthingsgraph._operations.iot_things_graph_front_end_service.delete_system_instance

        output, http_response = (
            capo_iotthingsgraph._operations.iot_things_graph_front_end_service.delete_system_instance.delete_system_instance(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteSystemInstance")
    )
    input_: capo_iotthingsgraph.types.delete_system_instance_request.DeleteSystemInstanceRequest = {}
    if id is not None:
        input_["id"] = id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output