Skip to main content

Useful CloudShell Automation API Code Examples

This section provides different code examples that can be used for reference.

📄️ Inspecting and Clearing Driver Commands on a Resource

Starting with CloudShell 2026.1, four Automation API methods let you see which resource driver commands are queued or running and cancel them. They exist to solve a specific problem: a resource that is exclusive and does not allow concurrent commands stays blocked while a command runs on it, and that command often belongs to a previous — possibly already ended — sandbox. A new sandbox waiting behind it has no way to see the command, let alone cancel it, because everything it can reach is scoped to its own reservation.