Let's assume I have a container that keeps temperature data. But for some reason, I don't want to delete container but I want to disable it to not accept any contentinstance until I make it enable again. It can be similar example for AE. If an AE is disabled, then I want it to not accept any request to itself. The example can be given for subscription also. If the subscription is disabled then the notification shouldnt be sent anywhere.
Is there a suitable way to implement this in OneM2M or should we handle it out of the OneM2M scope?
I assume that there is a management AE that decides whether the access to the <container> shall be limited. One possibility that works without changing the <container> and its structure could be that this AE updates or adds the <ACP> for this resource. This <ACP> should then forbid to create new <contentInstances>. The same can be done with other resources, e.g. an <AE>.
You also might have a look at the disableRetrieval attribute of <container>. Perhaps this might also be helpful.
This method, however, would not work with <subscriptions>. Here, you can change the eventNotificationCriteria to an impossible to reach criteria, or you can change the allowed schedule to an empty list. But please be aware that these solutions are hacks.