Adjusting autopause for Cloud Environments using Swagger

Jason Cerrato
  • Updated

Occasionally, you may need to extend the default autopause time (30 minutes) to accommodate long-running (i.e. more than 24 hours) jobs. Note that autopause is already disabled for up to 24 hours as long as the kernel is running. 

To do this without recreating the cluster (simultaneously losing outputs and any newly loaded programs) you must send a PATCH command on a currently Running or Stopped cluster. This article will describe how to send a PATCH command using Swagger. 


Before disabling or adjusting autopause - be mindful of runaway costs


Autopause protects users from runaway charges when a job is done and they are not actively working in their Cloud Environment. Turning off autopause or extending the time limit may lead to additional charges since the Cloud Environment will continue to bill until the user manually pauses or deletes the cluster. 


Cautions about adjusting the autopause threshold

You will want to strike a balance between an autopause value that is too short (not long
enough to complete your analysis) and one that is too long (so your Cloud Environment sits there running up changes without actually doing any work).

The safest practice may be to adjust the threshold to a large number (e.g. 600 minutes) for long jobs and then adjust it back to 30 minutes when done. That way, you won't add rack up extra charges related to your Cloud Environment for longer than you need to.

Autopause will not kick in if your browser is active and your screen is on. Your Cloud Environment will never pause if you don't close your Cloud Environment browser tab and your computer is set to never go to sleep. Note that this can be risky, as it could incur large and unanticipated costs.

Step 1: Find the Cloud Environment cluster name

There are a couple of ways you can find the name of your Cloud Environment. The easiest way is by navigating to and finding the name of your active Cloud Environment under Details. The name will be in the form saturn-alphanumeric-string.



If you are using a Jupyter Notebook, you can also find the name by 1) right-clicking the Jupyter logo in the top left and 2) selecting "Copy Link Address."


The unique cluster id (part of the link address) is created when you make your cluster. The link will have the format below. The cluster id is the part highlighted in purple:

Step 2: Use the Swagger interface to adjust the autopause time

Swagger (an API management system that uses a web browser interface to facilitate cluster creation and management) contains a set of scripts that allow you to configure your Cloud Environment directly from the browser. 

To open the Swagger interface, go to


  1. Click on the open lock on the right-hand side to authenticate. This step is how Swagger ensures that you have permission to adjust the autopause.
    In the authorizations popup, check all three authorization boxes and click the green "Authorize" button. The lock will be closed when this is complete.
  2. Click the "Try it out" button to be able to change the parameters

    Next, you'll fill in the parameters form:
  3. googleProject - the Terra billing project associated with the Cloud Environment in question
  4. runtimeName is the one you found in Step 1 of this article.
  5. Request body specifies what you want the cluster to do. You can remove the pre-filled options in the body. Make sure your request is specific to auto-pause by only leaving the options below. To adjust the threshold enter a new value (in minutes):
    "autopause": true,
    "autopauseThreshold": 1200
    If you wanted to turn autopause off complete, you can use this as the body:
    "autopause": false
    NOTE: This will allow the Cloud Environment to run indefinitely unless it is manually paused or deleted. There is a real danger for runaway costs by disabling autopause, so it is generally not recommended over setting a high autopause threshold.
  6. Click Execute

Under the Responses section, you will find out whether the request went through. After clicking execute it will be the first response listed at the top. If your response doesn't make sense, please contact the Support team for help


Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request



Please sign in to leave a comment.