---
title: "Updates a Port."
method: PATCH
path: "/v1/{port.name}"
tags: ["PortService"]
---

# Updates a Port.

`PATCH /v1/{port.name}`

## Request

- Base URL: `https://docs.h2o.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.h2o.ai/v1/{port.name}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/docs/v1/:port.name/patch.ts> (a function with typed inputs; its response is checked against the schema)

Authorization: Only the creator of the parent SandboxEngine is allowed to call this method.

## Path parameters

- `port.name` string, required

## Query parameters

- `updateMask` string, required

## Request body

- object
  - `displayName` string: Optional. Human-readable display name for this port.
  - `public` boolean: Optional. Whether this port should be publicly accessible. If false, the port is only accessible within the cluster.
  - `internalUrl` string: Output only. URL for accessing this port from within the Kubernetes cluster.
  - `publicUrl` string: Output only. URL for accessing this port from outside the cluster. Only set when public is true.
  - `createTime` string, date-time: Output only. Time when this port was created.
  - `creator` string: Output only. Name of an entity that created this port.
  - `creatorDisplayName` string: Output only. Display name of the entity that created this port.
  - `updateTime` string, date-time, nullable: Output only. Time when this port was last updated.
  - `updater` string: Output only. Name of an entity that last updated this port.
  - `updaterDisplayName` string: Output only. Display name of the entity that last updated this port.
  - `state` 'STATE_UNSPECIFIED' | 'STATE_PENDING' | 'STATE_READY' | 'STATE_FAILED' | 'STATE_DELETING': The state of the port. - STATE_UNSPECIFIED: The state is not specified. - STATE_PENDING: The port infrastructure is being created. - STATE_READY: The port is ready and accessible. - STATE_FAILED: The port creation has failed. - STATE_DELETING: The port is being deleted.
  - `failureReason` string: Output only. Failure reason during the port creation. Only set when state is STATE_FAILED.

## Response `200`

A successful response.

- V1UpdatePortResponse: Response message for PortService.UpdatePort.
  - `port` V1Port: Port represents a network port exposed from a SandboxEngine.
    - `name` string: Identifier. Resource name of the Port.
    - `displayName` string: Optional. Human-readable display name for this port.
    - `public` boolean: Optional. Whether this port should be publicly accessible. If false, the port is only accessible within the cluster.
    - `internalUrl` string: Output only. URL for accessing this port from within the Kubernetes cluster.
    - `publicUrl` string: Output only. URL for accessing this port from outside the cluster. Only set when public is true.
    - `createTime` string, date-time: Output only. Time when this port was created.
    - `creator` string: Output only. Name of an entity that created this port.
    - `creatorDisplayName` string: Output only. Display name of the entity that created this port.
    - `updateTime` string, date-time, nullable: Output only. Time when this port was last updated.
    - `updater` string: Output only. Name of an entity that last updated this port.
    - `updaterDisplayName` string: Output only. Display name of the entity that last updated this port.
    - `state` 'STATE_UNSPECIFIED' | 'STATE_PENDING' | 'STATE_READY' | 'STATE_FAILED' | 'STATE_DELETING': The state of the port. - STATE_UNSPECIFIED: The state is not specified. - STATE_PENDING: The port infrastructure is being created. - STATE_READY: The port is ready and accessible. - STATE_FAILED: The port creation has failed. - STATE_DELETING: The port is being deleted.
    - `failureReason` string: Output only. Failure reason during the port creation. Only set when state is STATE_FAILED.

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto.md) - [All operations](https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/ai-h2o-engine-sandbox-v1-filesystem-proto/revisions/297cfadc1d39?raw)
