EgressManager
Reads and updates the network egress policy for a runtime.
Sync · Async counterpart:
AsyncEgressManager
EgressManager declaration
Section titled “EgressManager declaration”class EgressManager(_SdkOwnedHandle):EgressManager access
Section titled “EgressManager access”This type is created by the SDK; do not construct it directly.
manager = runtime.egressEgressManager methods
Section titled “EgressManager methods”set_policy()
Section titled “set_policy()”Replace the complete egress policy and return refreshed metadata.
def set_policy(policy: EgressPolicy) -> RuntimeInfoParameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
policy | EgressPolicy | — | Egress policy to apply. |
Returns
Section titled “Returns”RuntimeInfo
Examples
Section titled “Examples”>>> runtime.egress.set_policy(... EgressPolicy(... mode=EgressMode.ALLOWLIST,... allowed_hosts=["api.github.com"],... )... )RuntimeInfo(...)Return the cached egress policy.
def get() -> EgressPolicyReturns
Section titled “Returns”EgressPolicy