Skip to content

EgressManager

Reads and updates the network egress policy for a runtime.

Sync · Async counterpart: AsyncEgressManager

class EgressManager(_SdkOwnedHandle):

This type is created by the SDK; do not construct it directly.

manager = runtime.egress

Replace the complete egress policy and return refreshed metadata.

def set_policy(policy: EgressPolicy) -> RuntimeInfo
NameTypeDefaultDescription
policyEgressPolicyEgress policy to apply.
  • RuntimeInfo
>>> runtime.egress.set_policy(
... EgressPolicy(
... mode=EgressMode.ALLOWLIST,
... allowed_hosts=["api.github.com"],
... )
... )
RuntimeInfo(...)

Return the cached egress policy.

def get() -> EgressPolicy
  • EgressPolicy