using Salad.Cloud.SDK;
using Salad.Cloud.SDK.Config;
using Salad.Cloud.SDK.Models;
var config = new SaladCloudSdkConfig{};
var client = new SaladCloudSdkClient(config);
var input = new QueuePatch("description", "hB13");
var response = await client.Queues.UpdateQueueAsync(input, "acme-corp", "dev-env", "fifo-queue");
Console.WriteLine(response);import com.salad.cloud.sdk.SaladCloudSdk;
import com.salad.cloud.sdk.config.ApiKeyAuthConfig;
import com.salad.cloud.sdk.config.SaladCloudSdkConfig;
import com.salad.cloud.sdk.models.Queue;
import com.salad.cloud.sdk.models.QueuePatch;
public class Main {
public static void main(String[] args) {
SaladCloudSdkConfig config = SaladCloudSdkConfig.builder()
.apiKeyAuthConfig(ApiKeyAuthConfig.builder().apiKey("YOUR_API_KEY").build())
.build();
SaladCloudSdk saladCloudSdk = new SaladCloudSdk(config);
QueuePatch queuePatch = QueuePatch.builder().description("description").displayName("hB13").build();
Queue response = saladCloudSdk.queues.updateQueue("acme-corp", "dev-env", "fifo-queue", queuePatch);
System.out.println(response);
}
}import (
"fmt"
"encoding/json"
"context"
"github.com/saladtechnologies/salad-cloud-sdk-go/pkg/saladcloudsdkconfig"
"github.com/saladtechnologies/salad-cloud-sdk-go/pkg/saladcloudsdk"
"github.com/saladtechnologies/salad-cloud-sdk-go/pkg/util"
"github.com/saladtechnologies/salad-cloud-sdk-go/pkg/queues"
)
config := saladcloudsdkconfig.NewConfig()
config.SetApiKey("API_KEY")
client := saladcloudsdk.NewSaladCloudSdk(config)
request := queues.QueuePatch{
Description: util.ToPointer(util.Nullable[string]{ Value: "description" }),
DisplayName: util.ToPointer(util.Nullable[string]{ Value: "hB13" }),
}
response, err := client.Queues.UpdateQueue(context.Background(), "acme-corp", "dev-env", "fifo-queue", request)
if err != nil {
panic(err)
}
fmt.Println(response)import { QueuePatch, SaladCloudSdk } from '@saladtechnologies-oss/salad-cloud-sdk';
(async () => {
const saladCloudSdk = new SaladCloudSdk({
apiKey: 'YOUR_API_KEY',
});
const queuePatch: QueuePatch = {
description: 'description',
displayName: 'hB13',
};
const { data } = await saladCloudSdk.queues.updateQueue('acme-corp', 'dev-env', 'fifo-queue', queuePatch);
console.log(data);
})();from salad_cloud_sdk import SaladCloudSdk
from salad_cloud_sdk.models import QueuePatch
sdk = SaladCloudSdk(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
timeout=10000
)
request_body = QueuePatch(
description="description",
display_name="hB13"
)
result = sdk.queues.update_queue(
request_body=request_body,
organization_name="acme-corp",
project_name="dev-env",
queue_name="fifo-queue"
)
print(result)curl --request PATCH \
--url https://api.salad.com/api/public/organizations/{organization_name}/projects/{project_name}/queues/{queue_name} \
--header 'Content-Type: application/merge-patch+json' \
--header 'Salad-Api-Key: <api-key>' \
--data '
{
"description": "<string>",
"display_name": "<string>"
}
'const options = {
method: 'PATCH',
headers: {'Salad-Api-Key': '<api-key>', 'Content-Type': 'application/merge-patch+json'},
body: JSON.stringify({description: '<string>', display_name: '<string>'})
};
fetch('https://api.salad.com/api/public/organizations/{organization_name}/projects/{project_name}/queues/{queue_name}', 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.salad.com/api/public/organizations/{organization_name}/projects/{project_name}/queues/{queue_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'display_name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/merge-patch+json",
"Salad-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.salad.com/api/public/organizations/{organization_name}/projects/{project_name}/queues/{queue_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Salad-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/merge-patch+json'
request.body = "{\n \"description\": \"<string>\",\n \"display_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"container_groups": [
{
"autostart_policy": true,
"container": {
"command": [
"<string>"
],
"image": "<string>",
"resources": {
"cpu": 512,
"gpu_classes": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"memory": 536871424,
"shm_size": 64,
"storage_amount": 562950490292224
},
"environment_variables": {},
"hash": "<string>",
"image_caching": true,
"logging": {
"axiom": {
"api_token": "<string>",
"dataset": "<string>",
"host": "<string>"
},
"datadog": {
"api_key": "<string>",
"host": "<string>",
"tags": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"http": {
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"host": "<string>",
"port": 32768,
"password": "<string>",
"path": "<string>",
"user": "<string>"
},
"new_relic": {
"host": "<string>",
"ingestion_key": "<string>"
},
"splunk": {
"host": "<string>",
"token": "<string>"
},
"tcp": {
"host": "<string>",
"port": 32768
}
},
"size": 4611686018427388000
},
"country_codes": [
"us"
],
"create_time": "2023-11-07T05:31:56Z",
"current_state": {
"finish_time": "2023-11-07T05:31:56Z",
"instance_status_counts": {
"allocating_count": 1073741823,
"creating_count": 1073741823,
"running_count": 1073741823,
"stopping_count": 1073741823
},
"start_time": "2023-11-07T05:31:56Z",
"description": "<string>"
},
"display_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"organization_name": "<string>",
"pending_change": true,
"project_name": "<string>",
"replicas": 250,
"scaling-actions": [
{
"replicas": 250,
"schedule": "<string>"
}
],
"scheduled-scaling-enabled": true,
"update_time": "2023-11-07T05:31:56Z",
"version": 1073741824,
"liveness_probe": {
"failure_threshold": 3,
"initial_delay_seconds": 0,
"period_seconds": 10,
"success_threshold": 1,
"timeout_seconds": 30,
"exec": {
"command": [
"<string>"
]
},
"grpc": {
"port": 32768,
"service": "<string>"
},
"http": {
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"path": "<string>",
"port": 32768
},
"tcp": {
"port": 32767
}
},
"networking": {
"auth": true,
"dns": "<string>",
"load_balancer": "round_robin",
"port": 32768,
"protocol": "http",
"client_request_timeout": 100000,
"server_response_timeout": 100000,
"single_connection_limit": false
},
"queue_autoscaler": {
"desired_queue_length": 50,
"max_replicas": 250,
"min_replicas": 50,
"max_downscale_per_minute": 50,
"max_upscale_per_minute": 50,
"polling_period": 907
},
"queue_connection": {
"path": "<string>",
"port": 32768,
"queue_name": "<string>"
},
"readiness_probe": {
"failure_threshold": 3,
"initial_delay_seconds": 0,
"period_seconds": 1,
"success_threshold": 1,
"timeout_seconds": 1,
"exec": {
"command": [
"<string>"
]
},
"grpc": {
"port": 32768,
"service": "<string>"
},
"http": {
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"path": "<string>",
"port": 32768
},
"tcp": {
"port": 32767
}
},
"readme": "<string>",
"startup_probe": {
"failure_threshold": 15,
"initial_delay_seconds": 0,
"period_seconds": 3,
"success_threshold": 2,
"timeout_seconds": 10,
"exec": {
"command": [
"<string>"
]
},
"grpc": {
"port": 32768,
"service": "<string>"
},
"http": {
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"path": "<string>",
"port": 32768
},
"tcp": {
"port": 32767
}
}
}
],
"create_time": "2023-11-07T05:31:56Z",
"display_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"update_time": "2023-11-07T05:31:56Z",
"current_queue_length": 1073741823,
"description": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 349,
"title": "<string>",
"type": "about:blank"
}{
"detail": "<string>",
"instance": "<string>",
"status": 349,
"title": "<string>",
"type": "about:blank"
}{
"detail": "<string>",
"instance": "<string>",
"status": 349,
"title": "<string>",
"type": "about:blank"
}{
"detail": "<string>",
"instance": "<string>",
"status": 349,
"title": "<string>",
"type": "about:blank"
}Update Queue
Updates an existing queue in the given project.
using Salad.Cloud.SDK;
using Salad.Cloud.SDK.Config;
using Salad.Cloud.SDK.Models;
var config = new SaladCloudSdkConfig{};
var client = new SaladCloudSdkClient(config);
var input = new QueuePatch("description", "hB13");
var response = await client.Queues.UpdateQueueAsync(input, "acme-corp", "dev-env", "fifo-queue");
Console.WriteLine(response);import com.salad.cloud.sdk.SaladCloudSdk;
import com.salad.cloud.sdk.config.ApiKeyAuthConfig;
import com.salad.cloud.sdk.config.SaladCloudSdkConfig;
import com.salad.cloud.sdk.models.Queue;
import com.salad.cloud.sdk.models.QueuePatch;
public class Main {
public static void main(String[] args) {
SaladCloudSdkConfig config = SaladCloudSdkConfig.builder()
.apiKeyAuthConfig(ApiKeyAuthConfig.builder().apiKey("YOUR_API_KEY").build())
.build();
SaladCloudSdk saladCloudSdk = new SaladCloudSdk(config);
QueuePatch queuePatch = QueuePatch.builder().description("description").displayName("hB13").build();
Queue response = saladCloudSdk.queues.updateQueue("acme-corp", "dev-env", "fifo-queue", queuePatch);
System.out.println(response);
}
}import (
"fmt"
"encoding/json"
"context"
"github.com/saladtechnologies/salad-cloud-sdk-go/pkg/saladcloudsdkconfig"
"github.com/saladtechnologies/salad-cloud-sdk-go/pkg/saladcloudsdk"
"github.com/saladtechnologies/salad-cloud-sdk-go/pkg/util"
"github.com/saladtechnologies/salad-cloud-sdk-go/pkg/queues"
)
config := saladcloudsdkconfig.NewConfig()
config.SetApiKey("API_KEY")
client := saladcloudsdk.NewSaladCloudSdk(config)
request := queues.QueuePatch{
Description: util.ToPointer(util.Nullable[string]{ Value: "description" }),
DisplayName: util.ToPointer(util.Nullable[string]{ Value: "hB13" }),
}
response, err := client.Queues.UpdateQueue(context.Background(), "acme-corp", "dev-env", "fifo-queue", request)
if err != nil {
panic(err)
}
fmt.Println(response)import { QueuePatch, SaladCloudSdk } from '@saladtechnologies-oss/salad-cloud-sdk';
(async () => {
const saladCloudSdk = new SaladCloudSdk({
apiKey: 'YOUR_API_KEY',
});
const queuePatch: QueuePatch = {
description: 'description',
displayName: 'hB13',
};
const { data } = await saladCloudSdk.queues.updateQueue('acme-corp', 'dev-env', 'fifo-queue', queuePatch);
console.log(data);
})();from salad_cloud_sdk import SaladCloudSdk
from salad_cloud_sdk.models import QueuePatch
sdk = SaladCloudSdk(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
timeout=10000
)
request_body = QueuePatch(
description="description",
display_name="hB13"
)
result = sdk.queues.update_queue(
request_body=request_body,
organization_name="acme-corp",
project_name="dev-env",
queue_name="fifo-queue"
)
print(result)curl --request PATCH \
--url https://api.salad.com/api/public/organizations/{organization_name}/projects/{project_name}/queues/{queue_name} \
--header 'Content-Type: application/merge-patch+json' \
--header 'Salad-Api-Key: <api-key>' \
--data '
{
"description": "<string>",
"display_name": "<string>"
}
'const options = {
method: 'PATCH',
headers: {'Salad-Api-Key': '<api-key>', 'Content-Type': 'application/merge-patch+json'},
body: JSON.stringify({description: '<string>', display_name: '<string>'})
};
fetch('https://api.salad.com/api/public/organizations/{organization_name}/projects/{project_name}/queues/{queue_name}', 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.salad.com/api/public/organizations/{organization_name}/projects/{project_name}/queues/{queue_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'display_name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/merge-patch+json",
"Salad-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.salad.com/api/public/organizations/{organization_name}/projects/{project_name}/queues/{queue_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Salad-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/merge-patch+json'
request.body = "{\n \"description\": \"<string>\",\n \"display_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"container_groups": [
{
"autostart_policy": true,
"container": {
"command": [
"<string>"
],
"image": "<string>",
"resources": {
"cpu": 512,
"gpu_classes": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"memory": 536871424,
"shm_size": 64,
"storage_amount": 562950490292224
},
"environment_variables": {},
"hash": "<string>",
"image_caching": true,
"logging": {
"axiom": {
"api_token": "<string>",
"dataset": "<string>",
"host": "<string>"
},
"datadog": {
"api_key": "<string>",
"host": "<string>",
"tags": [
{
"name": "<string>",
"value": "<string>"
}
]
},
"http": {
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"host": "<string>",
"port": 32768,
"password": "<string>",
"path": "<string>",
"user": "<string>"
},
"new_relic": {
"host": "<string>",
"ingestion_key": "<string>"
},
"splunk": {
"host": "<string>",
"token": "<string>"
},
"tcp": {
"host": "<string>",
"port": 32768
}
},
"size": 4611686018427388000
},
"country_codes": [
"us"
],
"create_time": "2023-11-07T05:31:56Z",
"current_state": {
"finish_time": "2023-11-07T05:31:56Z",
"instance_status_counts": {
"allocating_count": 1073741823,
"creating_count": 1073741823,
"running_count": 1073741823,
"stopping_count": 1073741823
},
"start_time": "2023-11-07T05:31:56Z",
"description": "<string>"
},
"display_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"organization_name": "<string>",
"pending_change": true,
"project_name": "<string>",
"replicas": 250,
"scaling-actions": [
{
"replicas": 250,
"schedule": "<string>"
}
],
"scheduled-scaling-enabled": true,
"update_time": "2023-11-07T05:31:56Z",
"version": 1073741824,
"liveness_probe": {
"failure_threshold": 3,
"initial_delay_seconds": 0,
"period_seconds": 10,
"success_threshold": 1,
"timeout_seconds": 30,
"exec": {
"command": [
"<string>"
]
},
"grpc": {
"port": 32768,
"service": "<string>"
},
"http": {
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"path": "<string>",
"port": 32768
},
"tcp": {
"port": 32767
}
},
"networking": {
"auth": true,
"dns": "<string>",
"load_balancer": "round_robin",
"port": 32768,
"protocol": "http",
"client_request_timeout": 100000,
"server_response_timeout": 100000,
"single_connection_limit": false
},
"queue_autoscaler": {
"desired_queue_length": 50,
"max_replicas": 250,
"min_replicas": 50,
"max_downscale_per_minute": 50,
"max_upscale_per_minute": 50,
"polling_period": 907
},
"queue_connection": {
"path": "<string>",
"port": 32768,
"queue_name": "<string>"
},
"readiness_probe": {
"failure_threshold": 3,
"initial_delay_seconds": 0,
"period_seconds": 1,
"success_threshold": 1,
"timeout_seconds": 1,
"exec": {
"command": [
"<string>"
]
},
"grpc": {
"port": 32768,
"service": "<string>"
},
"http": {
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"path": "<string>",
"port": 32768
},
"tcp": {
"port": 32767
}
},
"readme": "<string>",
"startup_probe": {
"failure_threshold": 15,
"initial_delay_seconds": 0,
"period_seconds": 3,
"success_threshold": 2,
"timeout_seconds": 10,
"exec": {
"command": [
"<string>"
]
},
"grpc": {
"port": 32768,
"service": "<string>"
},
"http": {
"headers": [
{
"name": "<string>",
"value": "<string>"
}
],
"path": "<string>",
"port": 32768
},
"tcp": {
"port": 32767
}
}
}
],
"create_time": "2023-11-07T05:31:56Z",
"display_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"update_time": "2023-11-07T05:31:56Z",
"current_queue_length": 1073741823,
"description": "<string>"
}{
"detail": "<string>",
"instance": "<string>",
"status": 349,
"title": "<string>",
"type": "about:blank"
}{
"detail": "<string>",
"instance": "<string>",
"status": 349,
"title": "<string>",
"type": "about:blank"
}{
"detail": "<string>",
"instance": "<string>",
"status": 349,
"title": "<string>",
"type": "about:blank"
}{
"detail": "<string>",
"instance": "<string>",
"status": 349,
"title": "<string>",
"type": "about:blank"
}Authorizations
Path Parameters
Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. The organization name.
2 - 63^[a-z][a-z0-9-]{0,61}[a-z0-9]$"acme-corp"
Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. The project name.
2 - 63^[a-z][a-z0-9-]{0,61}[a-z0-9]$"dev-env"
The queue name.
2 - 63^[a-z][a-z0-9-]{0,61}[a-z0-9]$"fifo-queue"
Body
Represents a request to update an existing queue.
The description. This may be used as a space for notes or other information about the queue.
500^.*$The display name. This may be used as a more human-readable name.
2 - 63^[ ,-.0-9A-Za-z]+$Response
OK
Represents a queue.
The container groups that are part of this queue. Each container group represents a scalable set of identical containers running as a distributed service.
100Show child attributes
Show child attributes
The date and time the queue was created.
The display name. This may be used as a more human-readable name.
2 - 63^[ ,-.0-9A-Za-z]+$The queue identifier. This is automatically generated and assigned when the queue is created.
The queue name. This must be unique within the project.
2 - 63^[a-z][a-z0-9-]{0,61}[a-z0-9]$The date and time the queue was last updated.
The current length of the queue
0 <= x <= 2147483647The description. This may be used as a space for notes or other information about the queue.
500^.*$Was this page helpful?