> ## 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.

# サービス

> サンドボックスが公開する、タイプが明示されたサービスポート。

<h2 id="service">
  サービス
</h2>

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

```python theme={"system"}
class Service(*, port: int, name: str | None = None, protocol: ServiceProtocol | str | None = None, visibility: ServiceVisibility | str | None = None, endpoint: Endpoint | dict[str, Any] | None = None)
```

サンドボックスが公開する、タイプ付きのサービスポートです。

ベータ版の string `NetworkOptions` イングレス/外向き通信モードモデルを置き換えます。

**属性**

* `name` (`str | None`) : オプションのサービス名です。
* `protocol` (`ServiceProtocol | str | None`) : L4 プロトコルです (未設定の場合はデフォルトで TCP) 。`endpoint` が設定されている場合は、未設定または
  TCP である必要があります。
* `visibility` (`ServiceVisibility | str | None`) : このポートにアクセスできる対象です (PUBLIC/PRIVATE/CUSTOM) 。
  CUSTOM は、フリートがアクセス可能な対象を割り当てることを意味します。`service_urls` は
  API が URL を返さない限り空のままです。サービスは引き続き
  `exposed_ports` に表示されます。`endpoint` が設定されている場合は PUBLIC
  である必要があります。
* `endpoint` (`Endpoint | dict[str, Any] | None`) : オプションのプロダクトエンドポイントです。HTTPS/OPEN (オプションの
  `request_timeout_seconds`) または TLS\_PASSTHROUGH (認証と
  タイムアウトは未設定) です。通常の TCP/UDP ポートの場合は省略します。

***

<h2 id="serviceprotocol">
  ServiceProtocol
</h2>

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

```python theme={"system"}
class ServiceProtocol
```

* `UNSPECIFIED` = `'unspecified'`
* `TCP` = `'tcp'`
* `UDP` = `'udp'`
* `SCTP` = `'sctp'`

***

<h2 id="servicevisibility">
  ServiceVisibility
</h2>

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

```python theme={"system"}
class ServiceVisibility
```

* `UNSPECIFIED` = `'unspecified'`
* `PUBLIC` = `'public'`
* `PRIVATE` = `'private'`
* `CUSTOM` = `'custom'`

***
