Обновить основные сведения о сервисе
Обновляет основные сведения о сервисе, такие как имя сервиса или IP Access List.
curl --request PATCH \
--url https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"endpoints": [
{
"enabled": true,
"protocol": "mysql"
}
],
"ipAccessList": {
"add": [
{
"description": "<string>",
"source": "<string>"
}
],
"remove": [
{
"description": "<string>",
"source": "<string>"
}
]
},
"name": "<string>",
"privateEndpointIds": {
"add": [
"<string>"
],
"remove": [
"<string>"
]
},
"transparentDataEncryptionKeyId": "<string>"
}
'import requests
url = "https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}"
payload = {
"endpoints": [
{
"enabled": True,
"protocol": "mysql"
}
],
"ipAccessList": {
"add": [
{
"description": "<string>",
"source": "<string>"
}
],
"remove": [
{
"description": "<string>",
"source": "<string>"
}
]
},
"name": "<string>",
"privateEndpointIds": {
"add": ["<string>"],
"remove": ["<string>"]
},
"transparentDataEncryptionKeyId": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
endpoints: [{enabled: true, protocol: 'mysql'}],
ipAccessList: {
add: [{description: '<string>', source: '<string>'}],
remove: [{description: '<string>', source: '<string>'}]
},
name: '<string>',
privateEndpointIds: {add: ['<string>'], remove: ['<string>']},
transparentDataEncryptionKeyId: '<string>'
})
};
fetch('https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}', 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.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}",
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([
'endpoints' => [
[
'enabled' => true,
'protocol' => 'mysql'
]
],
'ipAccessList' => [
'add' => [
[
'description' => '<string>',
'source' => '<string>'
]
],
'remove' => [
[
'description' => '<string>',
'source' => '<string>'
]
]
],
'name' => '<string>',
'privateEndpointIds' => [
'add' => [
'<string>'
],
'remove' => [
'<string>'
]
],
'transparentDataEncryptionKeyId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}"
payload := strings.NewReader("{\n \"endpoints\": [\n {\n \"enabled\": true,\n \"protocol\": \"mysql\"\n }\n ],\n \"ipAccessList\": {\n \"add\": [\n {\n \"description\": \"<string>\",\n \"source\": \"<string>\"\n }\n ],\n \"remove\": [\n {\n \"description\": \"<string>\",\n \"source\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"privateEndpointIds\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"transparentDataEncryptionKeyId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.patch("https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"endpoints\": [\n {\n \"enabled\": true,\n \"protocol\": \"mysql\"\n }\n ],\n \"ipAccessList\": {\n \"add\": [\n {\n \"description\": \"<string>\",\n \"source\": \"<string>\"\n }\n ],\n \"remove\": [\n {\n \"description\": \"<string>\",\n \"source\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"privateEndpointIds\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"transparentDataEncryptionKeyId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"endpoints\": [\n {\n \"enabled\": true,\n \"protocol\": \"mysql\"\n }\n ],\n \"ipAccessList\": {\n \"add\": [\n {\n \"description\": \"<string>\",\n \"source\": \"<string>\"\n }\n ],\n \"remove\": [\n {\n \"description\": \"<string>\",\n \"source\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"privateEndpointIds\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"transparentDataEncryptionKeyId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result": {
"availablePrivateEndpointIds": [
"<string>"
],
"byocId": "<string>",
"clickhouseVersion": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"dataWarehouseId": "<string>",
"encryptionAssumedRoleIdentifier": "<string>",
"encryptionKey": "<string>",
"encryptionRoleId": "<string>",
"endpoints": [
{
"host": "<string>",
"port": 123,
"protocol": "mysql",
"username": "<string>"
}
],
"hasTransparentDataEncryption": true,
"iamRole": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idleScaling": true,
"idleTimeoutMinutes": 123,
"ipAccessList": [
{
"description": "<string>",
"source": "<string>"
}
],
"isPrimary": true,
"isReadonly": true,
"maxReplicaMemoryGb": 120,
"maxTotalMemoryGb": 360,
"minReplicaMemoryGb": 16,
"minTotalMemoryGb": 48,
"name": "<string>",
"numReplicas": 3,
"privateEndpointIds": [
"<string>"
],
"transparentDataEncryptionKeyId": "<string>"
},
"status": 200
}{
"error": "<string>",
"status": 400
}Авторизации
Используйте идентификатор ключа и секрет ключа, полученные в консоли ClickHouse Cloud: https://clickhouse.com/docs/cloud/manage/openapi
Параметры пути
ID организации, которой принадлежит сервис.
ID сервиса, который нужно обновить.
Тело
Список конечных точек сервиса для изменения
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Имя сервиса. Буквенно-цифровая строка с пробелами длиной до 50 символов.
Show child attributes
Show child attributes
Выберите fast, если хотите получать новые релизы ClickHouse сразу после их выхода. Новые возможности будут доступны быстрее, но и риск ошибок будет выше. Выберите slow, если хотите отложить получение релизов, чтобы оставить себе больше времени на тестирование. Эта возможность доступна только для сервисов 'production'. Значение по умолчанию — regular release channel.
slow, default, fast Идентификатор ключа для ротации
Была ли эта страница полезной?
curl --request PATCH \
--url https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"endpoints": [
{
"enabled": true,
"protocol": "mysql"
}
],
"ipAccessList": {
"add": [
{
"description": "<string>",
"source": "<string>"
}
],
"remove": [
{
"description": "<string>",
"source": "<string>"
}
]
},
"name": "<string>",
"privateEndpointIds": {
"add": [
"<string>"
],
"remove": [
"<string>"
]
},
"transparentDataEncryptionKeyId": "<string>"
}
'import requests
url = "https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}"
payload = {
"endpoints": [
{
"enabled": True,
"protocol": "mysql"
}
],
"ipAccessList": {
"add": [
{
"description": "<string>",
"source": "<string>"
}
],
"remove": [
{
"description": "<string>",
"source": "<string>"
}
]
},
"name": "<string>",
"privateEndpointIds": {
"add": ["<string>"],
"remove": ["<string>"]
},
"transparentDataEncryptionKeyId": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
endpoints: [{enabled: true, protocol: 'mysql'}],
ipAccessList: {
add: [{description: '<string>', source: '<string>'}],
remove: [{description: '<string>', source: '<string>'}]
},
name: '<string>',
privateEndpointIds: {add: ['<string>'], remove: ['<string>']},
transparentDataEncryptionKeyId: '<string>'
})
};
fetch('https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}', 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.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}",
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([
'endpoints' => [
[
'enabled' => true,
'protocol' => 'mysql'
]
],
'ipAccessList' => [
'add' => [
[
'description' => '<string>',
'source' => '<string>'
]
],
'remove' => [
[
'description' => '<string>',
'source' => '<string>'
]
]
],
'name' => '<string>',
'privateEndpointIds' => [
'add' => [
'<string>'
],
'remove' => [
'<string>'
]
],
'transparentDataEncryptionKeyId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}"
payload := strings.NewReader("{\n \"endpoints\": [\n {\n \"enabled\": true,\n \"protocol\": \"mysql\"\n }\n ],\n \"ipAccessList\": {\n \"add\": [\n {\n \"description\": \"<string>\",\n \"source\": \"<string>\"\n }\n ],\n \"remove\": [\n {\n \"description\": \"<string>\",\n \"source\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"privateEndpointIds\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"transparentDataEncryptionKeyId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.patch("https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"endpoints\": [\n {\n \"enabled\": true,\n \"protocol\": \"mysql\"\n }\n ],\n \"ipAccessList\": {\n \"add\": [\n {\n \"description\": \"<string>\",\n \"source\": \"<string>\"\n }\n ],\n \"remove\": [\n {\n \"description\": \"<string>\",\n \"source\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"privateEndpointIds\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"transparentDataEncryptionKeyId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clickhouse.cloud/v1/organizations/{organizationId}/services/{serviceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"endpoints\": [\n {\n \"enabled\": true,\n \"protocol\": \"mysql\"\n }\n ],\n \"ipAccessList\": {\n \"add\": [\n {\n \"description\": \"<string>\",\n \"source\": \"<string>\"\n }\n ],\n \"remove\": [\n {\n \"description\": \"<string>\",\n \"source\": \"<string>\"\n }\n ]\n },\n \"name\": \"<string>\",\n \"privateEndpointIds\": {\n \"add\": [\n \"<string>\"\n ],\n \"remove\": [\n \"<string>\"\n ]\n },\n \"transparentDataEncryptionKeyId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"result": {
"availablePrivateEndpointIds": [
"<string>"
],
"byocId": "<string>",
"clickhouseVersion": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"dataWarehouseId": "<string>",
"encryptionAssumedRoleIdentifier": "<string>",
"encryptionKey": "<string>",
"encryptionRoleId": "<string>",
"endpoints": [
{
"host": "<string>",
"port": 123,
"protocol": "mysql",
"username": "<string>"
}
],
"hasTransparentDataEncryption": true,
"iamRole": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idleScaling": true,
"idleTimeoutMinutes": 123,
"ipAccessList": [
{
"description": "<string>",
"source": "<string>"
}
],
"isPrimary": true,
"isReadonly": true,
"maxReplicaMemoryGb": 120,
"maxTotalMemoryGb": 360,
"minReplicaMemoryGb": 16,
"minTotalMemoryGb": 48,
"name": "<string>",
"numReplicas": 3,
"privateEndpointIds": [
"<string>"
],
"transparentDataEncryptionKeyId": "<string>"
},
"status": 200
}{
"error": "<string>",
"status": 400
}