A Durable Object controls its container through ctx.container. Use the Durable Object Container API to start, stop, monitor, and connect to the container. Use Durable Object storage and alarms in the same class to keep state and schedule work.
Durable Object Container API
Start, stop, monitor, and connect to a container through ctx.container.
If your application uses the Container class, refer to Migrate from the Container class to the Durable Object Container API.