PUT /sandboxes/{sandboxID}/network
Update sandbox network
Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.
Параметры
sandboxID·string· путь · обязательно
Тело запроса
Обязательно: да
application/json
Схема: SandboxNetworkUpdateConfig
Network configuration update for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting a field clears it.
allowOut·array<string>· необязательноList of allowed destinations for egress traffic. Each entry can be a CIDR block (e.g. "8.8.8.8/32"), a bare IP address (e.g. "8.8.8.8"), or a domain name (e.g. "example.com", "*.example.com"). Allowed entries always take precedence over denied entries.
denyOut·array<string>· необязательноList of denied CIDR blocks or IP addresses for egress traffic. Domain names are not supported for deny rules.
rules·object· необязательноPer-domain transform rules. Replaces all existing rules when provided.
rules.*·array<SandboxNetworkRule>· additional propertyrules.*.transform·SandboxNetworkTransform· необязательноTransformations applied to matching egress requests before forwarding.
rules.*.transform.headers·object· необязательноHTTP headers to inject or override in matching requests. An existing header with the same name is replaced. Values are plain strings; secret resolution happens client-side before sending to the API.
rules.*.transform.headers.*·string· additional propertyallow_internet_access·boolean· необязательноAllow sandbox to access the internet. When set to false, it behaves the same as specifying denyOut to 0.0.0.0/0 in the network config.
Ответы
204
Successfully updated the sandbox network configuration
401
Authentication error
Content-Type: application/json
Схема: Error
code·integer· обязательноError code
Формат:
int32message·string· обязательноError
404
Not found
Content-Type: application/json
Схема: Error
code·integer· обязательноError code
Формат:
int32message·string· обязательноError
409
Conflict
Content-Type: application/json
Схема: Error
code·integer· обязательноError code
Формат:
int32message·string· обязательноError
500
Server error
Content-Type: application/json
Схема: Error
code·integer· обязательноError code
Формат:
int32message·string· обязательноError