# EgressRoute

> API reference for Egress Routes (compute.apoxy.dev/v1alpha1)

**API Group:** `compute.apoxy.dev/v1alpha1`

## Operations

### List EgressRoute

<APIEndpoint method="GET" path="/apis/compute.apoxy.dev/v1alpha1/egressroutes" />

List EgressRoute

**Response**

- `200`: OK

---

### Create EgressRoute

<APIEndpoint method="POST" path="/apis/compute.apoxy.dev/v1alpha1/egressroutes" />

create an EgressRoute

**Request Body**

Spec fields (`EgressRouteSpec`):

| Field | Type | Description |
| --- | --- | --- |
| `parentRefs` | [ParentReference](https://gateway-api.sigs.k8s.io/reference/api-spec/main/spec/#parentreference)[] | ParentRefs attaches this route to EgressGateway listeners. Group and kind default to compute.apoxy.dev/EgressGateway and, when set, must be exactly that; namespace must be unset (all compute kinds are cluster-scoped). sectionName selects a single listener by name; absent attaches to every listener. **(required)** |
| `rules` | [EgressRouteRule](#egressrouterule)[] |  **(required)** |

**Response**

- `200`: OK
- `201`: Created
- `202`: Accepted

---

### Delete All EgressRoute

<APIEndpoint method="DELETE" path="/apis/compute.apoxy.dev/v1alpha1/egressroutes" />

Delete collection of EgressRoute

**Response**

- `200`: OK

---

### Get EgressRoute

<APIEndpoint method="GET" path="/apis/compute.apoxy.dev/v1alpha1/egressroutes/{name}" />

Get the specified EgressRoute

**Response**

- `200`: OK

---

### Replace EgressRoute

<APIEndpoint method="PUT" path="/apis/compute.apoxy.dev/v1alpha1/egressroutes/{name}" />

Replace the specified EgressRoute

**Request Body**

Spec fields (`EgressRouteSpec`):

| Field | Type | Description |
| --- | --- | --- |
| `parentRefs` | [ParentReference](https://gateway-api.sigs.k8s.io/reference/api-spec/main/spec/#parentreference)[] | ParentRefs attaches this route to EgressGateway listeners. Group and kind default to compute.apoxy.dev/EgressGateway and, when set, must be exactly that; namespace must be unset (all compute kinds are cluster-scoped). sectionName selects a single listener by name; absent attaches to every listener. **(required)** |
| `rules` | [EgressRouteRule](#egressrouterule)[] |  **(required)** |

**Response**

- `200`: OK
- `201`: Created

---

### Update EgressRoute

<APIEndpoint method="PATCH" path="/apis/compute.apoxy.dev/v1alpha1/egressroutes/{name}" />

Partially update the specified EgressRoute

**Response**

- `200`: OK
- `201`: Created

---

### Delete EgressRoute

<APIEndpoint method="DELETE" path="/apis/compute.apoxy.dev/v1alpha1/egressroutes/{name}" />

delete an EgressRoute

**Response**

- `200`: OK
- `202`: Accepted

---

## Schema Reference

### EgressRouteRule

| Field | Type | Description |
| --- | --- | --- |
| `matches` | [EgressRouteMatch](#egressroutematch)[] | Matches lists the destinations this rule admits. **(required)** |

### EgressRouteMatch

| Field | Type | Description |
| --- | --- | --- |
| `destinationCIDRs` | string[] | DestinationCIDRs matches by IP range. Single IPs as /32 or /128. IPv4 and IPv6 CIDRs are both honored. |
| `destinationHostnames` | string[] | DestinationHostnames matches by hostname. Exact (`api.openai.com`) and wildcard (`*.openai.com`) forms are accepted (gwapiv1.Hostname semantics — a wildcard matches exactly one prefix label). On TLS-terminated listeners the match runs against SNI. |
| `ports` | [EgressPortMatch](#egressportmatch)[] | Ports restricts to specific destination ports or port ranges. |
| `protocol` | string | Protocol selects TCP or UDP. If unset, inherits from the parent listener. UDP is not yet supported. |

### EgressPortMatch

| Field | Type | Description |
| --- | --- | --- |
| `endPort` | integer (int32) |  |
| `port` | integer (int32) | Port matches a single destination port. |
| `startPort` | integer (int32) | StartPort + EndPort define an inclusive range. Both must be set together. Mutually exclusive with Port. |

---

**Navigation** (Reference)

- Previous: [EgressGateway](/docs/reference/compute/egressgateways.md)
- Next: [ServiceRevision](/docs/reference/compute/servicerevisions.md)
- All pages: [index](/docs/llms.txt)
