Python
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
kv_store = client.fastedge.kv_stores.replace(
store_id=0,
name="name",
)
print(kv_store.name)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/fastedge"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
kvStore, err := client.Fastedge.KvStores.Replace(
context.TODO(),
0,
fastedge.KvStoreReplaceParams{
KvStore: fastedge.KvStoreParam{
Name: "name",
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", kvStore.Name)
}
curl --request PUT \
--url https://api.gcore.com/fastedge/v1/kv/{store_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"comment": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', comment: '<string>'})
};
fetch('https://api.gcore.com/fastedge/v1/kv/{store_id}', 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.gcore.com/fastedge/v1/kv/{store_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://api.gcore.com/fastedge/v1/kv/{store_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/fastedge/v1/kv/{store_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"comment": "<string>",
"app_count": 123,
"byod": {
"url": "redis://redis.example.com:6379/0",
"prefix": "app:prod:"
},
"size": 123,
"revision": 123,
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}Edge Storage
Update an edge store
Modify edge store configuration including name, description, and application associations. Store type cannot be changed after creation.
PUT
/
fastedge
/
v1
/
kv
/
{store_id}
Python
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
kv_store = client.fastedge.kv_stores.replace(
store_id=0,
name="name",
)
print(kv_store.name)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/fastedge"
"github.com/G-Core/gcore-go/option"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
kvStore, err := client.Fastedge.KvStores.Replace(
context.TODO(),
0,
fastedge.KvStoreReplaceParams{
KvStore: fastedge.KvStoreParam{
Name: "name",
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", kvStore.Name)
}
curl --request PUT \
--url https://api.gcore.com/fastedge/v1/kv/{store_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"comment": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', comment: '<string>'})
};
fetch('https://api.gcore.com/fastedge/v1/kv/{store_id}', 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.gcore.com/fastedge/v1/kv/{store_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://api.gcore.com/fastedge/v1/kv/{store_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/fastedge/v1/kv/{store_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"comment": "<string>",
"app_count": 123,
"byod": {
"url": "redis://redis.example.com:6379/0",
"prefix": "app:prod:"
},
"size": 123,
"revision": 123,
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
application/json
Store details
Response
Edge store updated successfully, returns updated configuration
Was this page helpful?