Skip to content

EgressPolicy

Network egress policy attached to a runtime.

Shared

class EgressPolicy:
EgressPolicy(mode: EgressMode | str = EgressMode.DENYLIST, allowed_hosts: list[str] = list(), denied_hosts: list[str] = list())
NameType or valueDescription
modeEgressMode | strWhether the policy uses an allowlist or denylist.
allowed_hostslist[str]Hosts explicitly allowed by the policy.
denied_hostslist[str]Hosts explicitly denied by the policy.

Serialize this egress policy for an API request.

def to_json() -> dict[str, Any]
  • dict[str, Any]

Create an egress policy from an API response payload.

def from_json(data: dict[str, Any] | None) -> 'EgressPolicy'
NameTypeDefaultDescription
datadict[str, Any] | NoneAPI response payload.
  • 'EgressPolicy'