EgressPolicy
Network egress policy attached to a runtime.
Shared
EgressPolicy declaration
Section titled “EgressPolicy declaration”class EgressPolicy:EgressPolicy construction
Section titled “EgressPolicy construction”EgressPolicy(mode: EgressMode | str = EgressMode.DENYLIST, allowed_hosts: list[str] = list(), denied_hosts: list[str] = list())EgressPolicy attributes
Section titled “EgressPolicy attributes”| Name | Type or value | Description |
|---|---|---|
mode | EgressMode | str | Whether the policy uses an allowlist or denylist. |
allowed_hosts | list[str] | Hosts explicitly allowed by the policy. |
denied_hosts | list[str] | Hosts explicitly denied by the policy. |
EgressPolicy methods
Section titled “EgressPolicy methods”to_json()
Section titled “to_json()”Serialize this egress policy for an API request.
def to_json() -> dict[str, Any]Returns
Section titled “Returns”dict[str, Any]
from_json()
Section titled “from_json()”Create an egress policy from an API response payload.
def from_json(data: dict[str, Any] | None) -> 'EgressPolicy'Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
data | dict[str, Any] | None | — | API response payload. |
Returns
Section titled “Returns”'EgressPolicy'