> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NetworkOptions

> Network deny flags and create-time ingress/egress grants.

ソース: [src/cwsandbox/\_types.py:676](https://github.com/coreweave/cwsandbox-client/blob/v1.14.2/src/cwsandbox/_types.py#L676)

```python theme={"system"}
class NetworkOptions(*, deny_egress: bool | None = None, deny_ingress: bool | None = None, egress: Sequence[EgressRule | Mapping[str, Any]] | None = None, ingress: Sequence[IngressRule | Mapping[str, Any]] | None = None)
```

ネットワーク拒否フラグと作成時のイングレス/外向き通信の許可設定。

ポートの公開には、型付きの `services=` を使用します。`egress` と `ingress` は
デフォルト拒否を前提とする許可専用のルールセットです。空または None の場合は、ランナーの
ポリシーのデフォルトが適用されます。

**属性**

* `deny_egress` (`bool | None`) : True の場合、宣言されたすべての外向き通信を拒否します (ポリシーのデフォルトは使用されません) 。
  空でない `egress` リストとは排他的です。
* `deny_ingress` (`bool | None`) : True の場合、CUSTOM イングレスを拒否します (ポリシーのデフォルトは使用されません) 。
* `egress` (`Sequence[EgressRule | Mapping[str, Any]] | None`) : 外向き通信の許可設定 (`EgressRule` または dict) 。
* `ingress` (`Sequence[IngressRule | Mapping[str, Any]] | None`) : CUSTOM ポートのイングレスのソース (`IngressRule` または dict) 。
