Definir modo de red del stack
curl --request POST \
--url https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"network_mode": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({network_mode: '<string>'})
};
fetch('https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode"
payload = { "network_mode": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode"
payload := strings.NewReader("{\n \"network_mode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}Stacks
Definir modo de red del stack
Define cómo se alcanzan entre sí los miembros de un stack. El único modo aceptado es public.
POST
/
v1
/
stacks
/
{stack_id}
/
network-mode
Definir modo de red del stack
curl --request POST \
--url https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"network_mode": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({network_mode: '<string>'})
};
fetch('https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode"
payload = { "network_mode": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode"
payload := strings.NewReader("{\n \"network_mode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}Solo se acepta
public: los miembros usan las direcciones públicas de los servicios, y las bases de datos se alcanzan con certificados de cliente. Cualquier otro valor falla con STACK_NETWORK_MODE_UNAVAILABLE. Requiere el scope stacks:write cuando se llama con una clave de API.
string
requerido
El ID del stack.
string
El workspace al que pertenece el stack, cuando actúas sobre él como propietario del workspace.
string
requerido
public.Response
El stack, como en Obtener stack.Errores
| Estado | Código | Cuándo |
|---|---|---|
| 400 | STACK_NETWORK_MODE_UNAVAILABLE | El modo no es public. |
| 403 | WORKSPACE_OWNER_ONLY | Eres miembro del workspace, no su propietario. |
| 404 | STACK_NOT_FOUND | El stack no existe o pertenece a otra cuenta. |
Última modificación el 28 de octubre de 2026