AsyncEgressManager
Reads and updates a runtime egress policy asynchronously.
Async · Sync counterpart:
EgressManager
AsyncEgressManager declaration
Section titled “AsyncEgressManager declaration”class AsyncEgressManager(_SdkOwnedHandle):AsyncEgressManager access
Section titled “AsyncEgressManager access”This type is created by the SDK; do not construct it directly.
manager = runtime.egressAsyncEgressManager methods
Section titled “AsyncEgressManager methods”set_policy()
Section titled “set_policy()”Replace the complete egress policy and return refreshed metadata.
async 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”>>> await runtime.egress.set_policy(... EgressPolicy(... mode=EgressMode.ALLOWLIST,... allowed_hosts=["api.github.com"],... )... )RuntimeInfo(...)Return the cached egress policy.
async def get() -> EgressPolicyReturns
Section titled “Returns”EgressPolicy