# EndpointPortConfig


[API catalog](/reference/api/) · [Docker Engine overview](/reference/api/engine/version/v1.57/) · [Product manual](https://docs.docker.com/engine/) · [OpenAPI specification](/reference/api/engine/version/v1.57.yaml)

API version: 1.57





Schema constraints and annotations:

```json
{
  "properties": {
    "Name": {
      "type": "string"
    },
    "Protocol": {
      "enum": [
        "tcp",
        "udp",
        "sctp"
      ],
      "type": "string"
    },
    "PublishMode": {
      "default": "ingress",
      "description": "The mode in which port is published.\n\n\u003cp\u003e\u003cbr /\u003e\u003c/p\u003e\n\n- \"ingress\" makes the target port accessible on every node,\n  regardless of whether there is a task for the service running on\n  that node or not.\n- \"host\" bypasses the routing mesh and publish the port directly on\n  the swarm node where that service is running.\n",
      "enum": [
        "ingress",
        "host"
      ],
      "example": "ingress",
      "type": "string"
    },
    "PublishedPort": {
      "description": "The port on the swarm hosts.",
      "type": "integer"
    },
    "TargetPort": {
      "description": "The port inside the container.",
      "type": "integer"
    }
  },
  "type": "object"
}
```



