curl --request POST \
--url https://api.select.dev/v2/snowflake-warehouses/{warehouse_uuid}/actions/set-generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"snowflake_account_uuid": "<string>"
}
'import requests
url = "https://api.select.dev/v2/snowflake-warehouses/{warehouse_uuid}/actions/set-generation"
payload = { "snowflake_account_uuid": "<string>" }
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({snowflake_account_uuid: '<string>'})
};
fetch('https://api.select.dev/v2/snowflake-warehouses/{warehouse_uuid}/actions/set-generation', 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/{warehouse_uuid}/actions/set-generation",
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([
'snowflake_account_uuid' => '<string>'
]),
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/{warehouse_uuid}/actions/set-generation"
payload := strings.NewReader("{\n \"snowflake_account_uuid\": \"<string>\"\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/{warehouse_uuid}/actions/set-generation")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"snowflake_account_uuid\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/snowflake-warehouses/{warehouse_uuid}/actions/set-generation")
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 \"snowflake_account_uuid\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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>"
}{
"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": [
{}
]
}Change the generation of a Snowflake warehouse
Change a standard warehouse to Gen1 or Gen2 in Snowflake.
The change has an effect on billing immediately. Gen2 credits cost more per hour than Gen1 credits. Queries that are running when the generation changes finish on the previous generation, and Snowflake bills both generations until they finish. A warehouse that already has the generation is returned unchanged.
SELECT needs the MANAGE WAREHOUSES privilege on the Snowflake account. If
the account does not have it, the response has the code missing_grant,
and its grant_sql member contains the statement to run in Snowflake.
curl --request POST \
--url https://api.select.dev/v2/snowflake-warehouses/{warehouse_uuid}/actions/set-generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"snowflake_account_uuid": "<string>"
}
'import requests
url = "https://api.select.dev/v2/snowflake-warehouses/{warehouse_uuid}/actions/set-generation"
payload = { "snowflake_account_uuid": "<string>" }
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({snowflake_account_uuid: '<string>'})
};
fetch('https://api.select.dev/v2/snowflake-warehouses/{warehouse_uuid}/actions/set-generation', 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/{warehouse_uuid}/actions/set-generation",
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([
'snowflake_account_uuid' => '<string>'
]),
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/{warehouse_uuid}/actions/set-generation"
payload := strings.NewReader("{\n \"snowflake_account_uuid\": \"<string>\"\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/{warehouse_uuid}/actions/set-generation")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"snowflake_account_uuid\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/snowflake-warehouses/{warehouse_uuid}/actions/set-generation")
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 \"snowflake_account_uuid\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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>"
}{
"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.
Path Parameters
Body
Change the generation of a Snowflake warehouse.
The generation to change to. Gen2 is only available for STANDARD warehouses smaller than 5X-Large.
1, 2 The snowflake_account_uuid of the warehouse, from the warehouse list. Required when more than one Snowflake account has a warehouse with this uuid.
Response
Successful Response
A Snowflake warehouse, with its SELECT automated savings settings.
The identifier Snowflake gives the warehouse.
The identifier of the Snowflake account that contains the warehouse.
The name of the warehouse.
Whether SELECT automated savings is on for the warehouse.
The Snowflake warehouse type, for example STANDARD.
The name of the Snowflake organization.
The name of the Snowflake account.
When Snowflake last resumed the warehouse.
Whether the warehouse is an interactive warehouse.
Whether automated savings has lowered the maximum cluster count of the warehouse and has not restored it yet.
The maximum cluster count of the warehouse before automated savings lowered it.
Overrides that SELECT staff set for how automated savings manages the warehouse.
Show child attributes
Show child attributes
The Snowflake warehouse size. null for an adaptive warehouse.
The minimum cluster count of the warehouse.
The maximum cluster count of the warehouse.
The Snowflake scaling policy of the warehouse.
The number of seconds of inactivity after which Snowflake suspends the warehouse.
The Snowflake generation of the warehouse.

