Sandbox-bound view of Miosa.Network.
Every call pre-populates resource_id with the sandbox's ID and sets
resource_type to "sandbox".
Usage
{:ok, sandbox} = Miosa.Sandboxes.create(client, %{name: "my-box"})
{:ok, rule} = Miosa.Sandboxes.Network.allow(sandbox, client, "api.github.com")
{:ok, rule} = Miosa.Sandboxes.Network.deny(sandbox, client, "bad.host.io")
{:ok, policy} = Miosa.Sandboxes.Network.lockdown(sandbox, client)
{:ok, policy} = Miosa.Sandboxes.Network.observe(sandbox, client)
{:ok, items} = Miosa.Sandboxes.Network.suggestions(sandbox, client)
{:ok, rules} = Miosa.Sandboxes.Network.rules(sandbox, client)The sandbox argument may be either a Miosa.Types.Computer.t() struct or
a plain binary sandbox ID string.
Summary
Functions
Add an allow rule for host, scoped to this sandbox.
Add a deny rule for host, scoped to this sandbox.
Set the policy to mode=enforce for this sandbox — denied requests are blocked.
Set the policy to mode=audit_only for this sandbox — log but do not block.
List egress policies scoped to this sandbox.
Delete an allowlist rule by ID.
List allowlist rules for this sandbox.
Return AI-generated allowlist suggestions for this sandbox.
Functions
@spec allow(map() | String.t(), Miosa.Client.t(), String.t(), keyword()) :: Miosa.Client.result(map())
Add an allow rule for host, scoped to this sandbox.
@spec deny(map() | String.t(), Miosa.Client.t(), String.t(), keyword()) :: Miosa.Client.result(map())
Add a deny rule for host, scoped to this sandbox.
@spec lockdown(map() | String.t(), Miosa.Client.t(), keyword()) :: Miosa.Client.result(map())
Set the policy to mode=enforce for this sandbox — denied requests are blocked.
@spec observe(map() | String.t(), Miosa.Client.t(), keyword()) :: Miosa.Client.result(map())
Set the policy to mode=audit_only for this sandbox — log but do not block.
@spec policies(map() | String.t(), Miosa.Client.t(), keyword()) :: Miosa.Client.result([map()])
List egress policies scoped to this sandbox.
@spec remove_rule(map() | String.t(), Miosa.Client.t(), String.t()) :: :ok | {:error, Miosa.Error.t()}
Delete an allowlist rule by ID.
@spec rules(map() | String.t(), Miosa.Client.t(), keyword()) :: Miosa.Client.result([map()])
List allowlist rules for this sandbox.
@spec suggestions(map() | String.t(), Miosa.Client.t(), keyword()) :: Miosa.Client.result([map()])
Return AI-generated allowlist suggestions for this sandbox.