---
title: "POST /projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts"
method: POST
path: "/projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts"
tags: ["instanceGroups"]
---

# POST /projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts

`POST /projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts`

Sets the named ports for the specified instance group.

## Path parameters

- `project` string, required
- `zone` string, required
- `instanceGroup` string, required

## Query parameters

- `requestId` string

## Request body

- InstanceGroupsSetNamedPortsRequest
  - `namedPorts` NamedPort[] — The list of named ports to set for this instance group.
    - `name` string — The name for this named port. The name must be 1-63 characters long, and comply withRFC1035.
    - `port` integer — The port number, which can be a value between 1 and 65535.
  - `fingerprint` string, byte — The fingerprint of the named ports information for this instance group. Use this optional property to prevent conflicts when multiple users change the named ports settings concurrently. Obtain the fingerprint with theinstanceGroups.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request. A request with an incorrect fingerprint will fail with error412 conditionNotMet.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/compute.md) · [All operations](https://skmtc.dev/google/apis/compute/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/compute/revisions/6120ed8969d4/schema)
