curl --request POST \
--url https://api.select.dev/v2/snowflake-warehouses/actions/batch-update-automated-savings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"items": [
{
"warehouse_uuid": "<string>",
"warehouse_srn": "<string>"
}
],
"smart_suspend": true
}
'import requests
url = "https://api.select.dev/v2/snowflake-warehouses/actions/batch-update-automated-savings"
payload = {
"items": [
{
"warehouse_uuid": "<string>",
"warehouse_srn": "<string>"
}
],
"smart_suspend": True
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
items: [{warehouse_uuid: '<string>', warehouse_srn: '<string>'}],
smart_suspend: true
})
};
fetch('https://api.select.dev/v2/snowflake-warehouses/actions/batch-update-automated-savings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.select.dev/v2/snowflake-warehouses/actions/batch-update-automated-savings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'warehouse_uuid' => '<string>',
'warehouse_srn' => '<string>'
]
],
'smart_suspend' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.select.dev/v2/snowflake-warehouses/actions/batch-update-automated-savings"
payload := strings.NewReader("{\n \"items\": [\n {\n \"warehouse_uuid\": \"<string>\",\n \"warehouse_srn\": \"<string>\"\n }\n ],\n \"smart_suspend\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.select.dev/v2/snowflake-warehouses/actions/batch-update-automated-savings")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"warehouse_uuid\": \"<string>\",\n \"warehouse_srn\": \"<string>\"\n }\n ],\n \"smart_suspend\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/snowflake-warehouses/actions/batch-update-automated-savings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"warehouse_uuid\": \"<string>\",\n \"warehouse_srn\": \"<string>\"\n }\n ],\n \"smart_suspend\": true\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"uuid": "<string>",
"snowflake_account_uuid": "<string>",
"name": "<string>",
"smart_suspend": true,
"type": "<string>",
"snowflake_organization_name": "<string>",
"snowflake_account_name": "<string>",
"resumed_on": "2023-11-07T05:31:56Z",
"is_interactive": false,
"tgs_cluster_reduction_in_progress": true,
"tgs_initial_max_cluster_count": 123,
"tgs_feature_overrides": {
"workload_aware_scale_in": true,
"scale_ins_disabled": true,
"suspends_disabled": true,
"needs_queue_free_scale_in_guard": true
},
"size": "<string>",
"min_cluster_count": 123,
"max_cluster_count": 123,
"scaling_policy": "<string>",
"auto_suspend": 123,
"generation": "<string>"
}
],
"row_count": 123,
"failures": [
{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"index": 123,
"type": "about:blank",
"details": [
{}
]
}
],
"page_token": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Turn automated savings on or off for Snowflake warehouses
Turn SELECT automated savings on or off for a batch of warehouses.
Each item is checked on its own. items contains the changed warehouses
with their new settings, and failures contains the rejected items. Both
are in request order. A rejected item does not stop the other items.
Before SELECT turns automated savings on, it checks that each Snowflake
account has the MANAGE WAREHOUSES privilege. Each item in an account that
does not have it is rejected with the code missing_grant. The grant_sql
member of the failure contains the statement to run in Snowflake.
curl --request POST \
--url https://api.select.dev/v2/snowflake-warehouses/actions/batch-update-automated-savings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"items": [
{
"warehouse_uuid": "<string>",
"warehouse_srn": "<string>"
}
],
"smart_suspend": true
}
'import requests
url = "https://api.select.dev/v2/snowflake-warehouses/actions/batch-update-automated-savings"
payload = {
"items": [
{
"warehouse_uuid": "<string>",
"warehouse_srn": "<string>"
}
],
"smart_suspend": True
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
items: [{warehouse_uuid: '<string>', warehouse_srn: '<string>'}],
smart_suspend: true
})
};
fetch('https://api.select.dev/v2/snowflake-warehouses/actions/batch-update-automated-savings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.select.dev/v2/snowflake-warehouses/actions/batch-update-automated-savings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'warehouse_uuid' => '<string>',
'warehouse_srn' => '<string>'
]
],
'smart_suspend' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.select.dev/v2/snowflake-warehouses/actions/batch-update-automated-savings"
payload := strings.NewReader("{\n \"items\": [\n {\n \"warehouse_uuid\": \"<string>\",\n \"warehouse_srn\": \"<string>\"\n }\n ],\n \"smart_suspend\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.select.dev/v2/snowflake-warehouses/actions/batch-update-automated-savings")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"warehouse_uuid\": \"<string>\",\n \"warehouse_srn\": \"<string>\"\n }\n ],\n \"smart_suspend\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/snowflake-warehouses/actions/batch-update-automated-savings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"warehouse_uuid\": \"<string>\",\n \"warehouse_srn\": \"<string>\"\n }\n ],\n \"smart_suspend\": true\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"uuid": "<string>",
"snowflake_account_uuid": "<string>",
"name": "<string>",
"smart_suspend": true,
"type": "<string>",
"snowflake_organization_name": "<string>",
"snowflake_account_name": "<string>",
"resumed_on": "2023-11-07T05:31:56Z",
"is_interactive": false,
"tgs_cluster_reduction_in_progress": true,
"tgs_initial_max_cluster_count": 123,
"tgs_feature_overrides": {
"workload_aware_scale_in": true,
"scale_ins_disabled": true,
"suspends_disabled": true,
"needs_queue_free_scale_in_guard": true
},
"size": "<string>",
"min_cluster_count": 123,
"max_cluster_count": 123,
"scaling_policy": "<string>",
"auto_suspend": 123,
"generation": "<string>"
}
],
"row_count": 123,
"failures": [
{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"index": 123,
"type": "about:blank",
"details": [
{}
]
}
],
"page_token": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Authorizations
Organization API key (sl_…).
Headers
The organization ID the request is scoped to.
Body
Turn automated savings on or off for a batch of Snowflake warehouses.
The warehouses to change.
1 - 100 elementsShow child attributes
Show child attributes
true turns automated savings on, false turns it off. Automated savings is only turned on for STANDARD and SNOWPARK-OPTIMIZED warehouses. Other warehouses keep their current setting.
Response
Successful Response
Show child attributes
Show child attributes
The number of applied entries.
The entries that were not applied, in request order. Empty when every entry was applied.
Show child attributes
Show child attributes
Opaque cursor for the next page; empty/absent on the last page.

