---
title: "Create a listener"
description: "409 protocol_mismatch when a target group's protocol doesn't suit the listener (http groups for http and https listeners, tcp groups for tcp and tls), 409 rule_limit past 100 rules, and 409 target_group_not_found when an action names a target group that isn't this load balancer's or doesn't exist."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Load Balancers API

`POST /v1/organizations/{orgId}/projects/{projectId}/load-balancers/{loadBalancer}/listeners`

409 protocol_mismatch when a target group's protocol doesn't suit the listener (http groups for http and https listeners, tcp groups for tcp and tls), 409 rule_limit past 100 rules, and 409 target_group_not_found when an action names a target group that isn't this load balancer's or doesn't exist.

## Authentication

Requires one of the following:

- `apiKey`, http, header `Authorization`
- `oauth`, http, header `Authorization`
- `sessionCookie`, apiKey, in cookie

## Path parameters

- `CreateListener.path.orgId` (string, required) — UUID or prefixed ID (org_…)
- `CreateListener.path.projectId` (string, required) — UUID or prefixed ID (prj_…)
- `CreateListener.path.loadBalancer` (string, required)

## Header parameters

- `CreateListener.header.Idempotency-Key` (string, optional) — Makes a retry safe: the same key and request get the stored response.
  - pattern `^[\x21-\x7e]{1,200}$`

## Request body

_Required._

- `CreateListener.port` (integer, required)
- `CreateListener.protocol` (unknown, required)
  - one of `"tcp"`, `"tls"`, `"http"`, `"https"`
- `CreateListener.additionalCertificates` (array<string>, optional) — SNI certificates beyond the default, at most 24: a client whose SNI one of them covers gets it, and any other client the default certificate. Each renews on its own. tls and https only; none twice, nor the default, nor a certificate with no DNS names (it can only be the default).
- `CreateListener.allowedSourceCidrs` (array<string>, optional) — CIDRs allowed to connect: IPv4, and IPv6 where IPv6 is available. Each family admits only the clients its own ranges cover: a list with no IPv6 range admits no IPv6 client. Defaults to everyone: ["0.0.0.0/0"], with "::/0" where IPv6 is available.
- `CreateListener.certificate` (string, optional) — Required on tls and https.
- `CreateListener.defaultAction` (object, optional) — Required on http and https, unless targetGroup is given. Only http and https listeners take one.
  - `CreateListener.defaultAction.type` (unknown, required)
    - one of `"forward"`, `"redirect"`, `"fixedResponse"`
  - `CreateListener.defaultAction.fixedResponse` (one of, optional)
    - one of: [FixedResponseInput](/lb-api/schemas/FixedResponseInput/), `null`
  - `CreateListener.defaultAction.forward` (one of, optional)
    - one of: [ForwardInput](/lb-api/schemas/ForwardInput/), `null`
  - `CreateListener.defaultAction.redirect` (one of, optional)
    - one of: [RedirectInput](/lb-api/schemas/RedirectInput/), `null`
- `CreateListener.idleTimeoutSeconds` (integer, optional) — tcp and tls: 60-6000 seconds, default 350. http and https: 1-4000, default 60: the client keep-alive, the server timeout and the WebSocket tunnel timeout.
- `CreateListener.rules` (array<object>, optional) — Ordered: the first rule that matches a request acts on it, and the default action takes the rest. At most 100. Sent, it replaces the whole list. Only http and https listeners take them.
  - `CreateListener.rules.action` (object, required) — type names the one of forward, redirect and fixedResponse that is set; the others are null.
    - `CreateListener.rules.action.type` (unknown, required)
      - one of `"forward"`, `"redirect"`, `"fixedResponse"`
    - `CreateListener.rules.action.fixedResponse` (one of, optional)
      - one of: [FixedResponseInput](/lb-api/schemas/FixedResponseInput/), `null`
    - `CreateListener.rules.action.forward` (one of, optional)
      - one of: [ForwardInput](/lb-api/schemas/ForwardInput/), `null`
    - `CreateListener.rules.action.redirect` (one of, optional)
      - one of: [RedirectInput](/lb-api/schemas/RedirectInput/), `null`
  - `CreateListener.rules.match` (object, optional) — Fields AND together. Entries OR within hosts, paths and methods, and AND within headers and queryParams. An empty field matches anything.
    - `CreateListener.rules.match.headers` (array<object>, optional)
      - `CreateListener.rules.match.headers.name` (string, required) — An HTTP token; header names match case-insensitively.
        - maxLength 128
      - `CreateListener.rules.match.headers.value` (string, required) — Printable ASCII, matched exactly.
        - minLength 1; maxLength 256
    - `CreateListener.rules.match.hosts` (array<string>, optional) — Exact names, or *.example.com for any name ending in .example.com. Lowercase; the port is ignored.
      - maxLength 253
    - `CreateListener.rules.match.methods` (array<string>, optional) — Uppercase.
      - maxLength 32
    - `CreateListener.rules.match.paths` (array<object>, optional)
      - `CreateListener.rules.match.paths.type` (unknown, required) — prefix matches on segment boundaries: /api matches /api and /api/x, not /apix.
        - one of `"exact"`, `"prefix"`
      - `CreateListener.rules.match.paths.value` (string, required) — Starts with /; printable ASCII without space, # or ?.
        - minLength 1; maxLength 1024
    - `CreateListener.rules.match.queryParams` (array<object>, optional)
      - `CreateListener.rules.match.queryParams.name` (string, required) — An HTTP token; header names match case-insensitively.
        - maxLength 128
      - `CreateListener.rules.match.queryParams.value` (string, required) — Printable ASCII, matched exactly.
        - minLength 1; maxLength 256
  - `CreateListener.rules.name` (string | null, optional)
    - maxLength 64
- `CreateListener.targetGroup` (string, optional) — Required on tcp and tls. On http and https, alone, a default action forwarding to it.

## Example request

```json
{
  "additionalCertificates": [
    "string"
  ],
  "allowedSourceCidrs": [
    "string"
  ],
  "certificate": "string",
  "defaultAction": {
    "fixedResponse": {
      "body": "string",
      "contentType": "text/plain",
      "statusCode": 200
    },
    "forward": {
      "requestHeaderModifier": {
        "add": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "remove": [
          "string"
        ],
        "set": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      },
      "responseHeaderModifier": {
        "add": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "remove": [
          "string"
        ],
        "set": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      },
      "targetGroups": [
        {
          "targetGroup": "string",
          "weight": 999
        }
      ]
    },
    "redirect": {
      "host": "string",
      "path": "string",
      "port": 1,
      "scheme": "http",
      "statusCode": 301
    },
    "type": "forward"
  },
  "idleTimeoutSeconds": 0,
  "port": 0,
  "protocol": "tcp",
  "rules": [
    {
      "action": {
        "fixedResponse": {
          "body": "string",
          "contentType": "text/plain",
          "statusCode": 200
        },
        "forward": {
          "requestHeaderModifier": {
            "add": [
              {}
            ],
            "remove": [
              "string"
            ],
            "set": [
              {}
            ]
          },
          "responseHeaderModifier": {
            "add": [
              {}
            ],
            "remove": [
              "string"
            ],
            "set": [
              {}
            ]
          },
          "targetGroups": [
            {
              "targetGroup": "string",
              "weight": 999
            }
          ]
        },
        "redirect": {
          "host": "string",
          "path": "string",
          "port": 1,
          "scheme": "http",
          "statusCode": 301
        },
        "type": "forward"
      },
      "match": {
        "headers": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "hosts": [
          "string"
        ],
        "methods": [
          "string"
        ],
        "paths": [
          {
            "type": "exact",
            "value": "string"
          }
        ],
        "queryParams": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      },
      "name": "string"
    }
  ],
  "targetGroup": "string"
}
```

## Code samples

### cURL

```curl
curl --request POST \
  --url https://lb-api.ezghcloud.com/v1/organizations/string/projects/string/load-balancers/string/listeners \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "additionalCertificates": [
    "string"
  ],
  "allowedSourceCidrs": [
    "string"
  ],
  "certificate": "string",
  "defaultAction": {
    "fixedResponse": {
      "body": "string",
      "contentType": "text/plain",
      "statusCode": 200
    },
    "forward": {
      "requestHeaderModifier": {
        "add": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "remove": [
          "string"
        ],
        "set": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      },
      "responseHeaderModifier": {
        "add": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "remove": [
          "string"
        ],
        "set": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      },
      "targetGroups": [
        {
          "targetGroup": "string",
          "weight": 999
        }
      ]
    },
    "redirect": {
      "host": "string",
      "path": "string",
      "port": 1,
      "scheme": "http",
      "statusCode": 301
    },
    "type": "forward"
  },
  "idleTimeoutSeconds": 0,
  "port": 0,
  "protocol": "tcp",
  "rules": [
    {
      "action": {
        "fixedResponse": {
          "body": "string",
          "contentType": "text/plain",
          "statusCode": 200
        },
        "forward": {
          "requestHeaderModifier": {
            "add": [
              {}
            ],
            "remove": [
              "string"
            ],
            "set": [
              {}
            ]
          },
          "responseHeaderModifier": {
            "add": [
              {}
            ],
            "remove": [
              "string"
            ],
            "set": [
              {}
            ]
          },
          "targetGroups": [
            {
              "targetGroup": "string",
              "weight": 999
            }
          ]
        },
        "redirect": {
          "host": "string",
          "path": "string",
          "port": 1,
          "scheme": "http",
          "statusCode": 301
        },
        "type": "forward"
      },
      "match": {
        "headers": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "hosts": [
          "string"
        ],
        "methods": [
          "string"
        ],
        "paths": [
          {
            "type": "exact",
            "value": "string"
          }
        ],
        "queryParams": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      },
      "name": "string"
    }
  ],
  "targetGroup": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://lb-api.ezghcloud.com/v1/organizations/string/projects/string/load-balancers/string/listeners';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    additionalCertificates: ['string'],
    allowedSourceCidrs: ['string'],
    certificate: 'string',
    defaultAction: {
      fixedResponse: {body: JSON.stringify('string'), contentType: 'text/plain', statusCode: 200},
      forward: {
        requestHeaderModifier: {
          add: [{name: 'string', value: 'string'}],
          remove: ['string'],
          set: [{name: 'string', value: 'string'}]
        },
        responseHeaderModifier: {
          add: [{name: 'string', value: 'string'}],
          remove: ['string'],
          set: [{name: 'string', value: 'string'}]
        },
        targetGroups: [{targetGroup: 'string', weight: 999}]
      },
      redirect: {host: 'string', path: 'string', port: 1, scheme: 'http', statusCode: 301},
      type: 'forward'
    },
    idleTimeoutSeconds: 0,
    port: 0,
    protocol: 'tcp',
    rules: [
      {
        action: {
          fixedResponse: {body: JSON.stringify('string'), contentType: 'text/plain', statusCode: 200},
          forward: {
            requestHeaderModifier: {add: [{}], remove: ['string'], set: [{}]},
            responseHeaderModifier: {add: [{}], remove: ['string'], set: [{}]},
            targetGroups: [{targetGroup: 'string', weight: 999}]
          },
          redirect: {host: 'string', path: 'string', port: 1, scheme: 'http', statusCode: 301},
          type: 'forward'
        },
        match: {
          headers: [{name: 'string', value: 'string'}],
          hosts: ['string'],
          methods: ['string'],
          paths: [{type: 'exact', value: 'string'}],
          queryParams: [{name: 'string', value: 'string'}]
        },
        name: 'string'
      }
    ],
    targetGroup: 'string'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://lb-api.ezghcloud.com/v1/organizations/string/projects/string/load-balancers/string/listeners"

payload = {
    "additionalCertificates": ["string"],
    "allowedSourceCidrs": ["string"],
    "certificate": "string",
    "defaultAction": {
        "fixedResponse": {
            "body": "string",
            "contentType": "text/plain",
            "statusCode": 200
        },
        "forward": {
            "requestHeaderModifier": {
                "add": [
                    {
                        "name": "string",
                        "value": "string"
                    }
                ],
                "remove": ["string"],
                "set": [
                    {
                        "name": "string",
                        "value": "string"
                    }
                ]
            },
            "responseHeaderModifier": {
                "add": [
                    {
                        "name": "string",
                        "value": "string"
                    }
                ],
                "remove": ["string"],
                "set": [
                    {
                        "name": "string",
                        "value": "string"
                    }
                ]
            },
            "targetGroups": [
                {
                    "targetGroup": "string",
                    "weight": 999
                }
            ]
        },
        "redirect": {
            "host": "string",
            "path": "string",
            "port": 1,
            "scheme": "http",
            "statusCode": 301
        },
        "type": "forward"
    },
    "idleTimeoutSeconds": 0,
    "port": 0,
    "protocol": "tcp",
    "rules": [
        {
            "action": {
                "fixedResponse": {
                    "body": "string",
                    "contentType": "text/plain",
                    "statusCode": 200
                },
                "forward": {
                    "requestHeaderModifier": {
                        "add": [{}],
                        "remove": ["string"],
                        "set": [{}]
                    },
                    "responseHeaderModifier": {
                        "add": [{}],
                        "remove": ["string"],
                        "set": [{}]
                    },
                    "targetGroups": [
                        {
                            "targetGroup": "string",
                            "weight": 999
                        }
                    ]
                },
                "redirect": {
                    "host": "string",
                    "path": "string",
                    "port": 1,
                    "scheme": "http",
                    "statusCode": 301
                },
                "type": "forward"
            },
            "match": {
                "headers": [
                    {
                        "name": "string",
                        "value": "string"
                    }
                ],
                "hosts": ["string"],
                "methods": ["string"],
                "paths": [
                    {
                        "type": "exact",
                        "value": "string"
                    }
                ],
                "queryParams": [
                    {
                        "name": "string",
                        "value": "string"
                    }
                ]
            },
            "name": "string"
        }
    ],
    "targetGroup": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 201

The listener. lastChange on the load balancer tracks it reaching service.

#### Example

```json
{
  "additionalCertificates": [
    "string"
  ],
  "allowedSourceCidrs": [
    "string"
  ],
  "certificate": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "defaultAction": {
    "fixedResponse": {
      "body": "string",
      "contentType": "text/plain",
      "statusCode": 200
    },
    "forward": {
      "requestHeaderModifier": {
        "add": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "remove": [
          "string"
        ],
        "set": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      },
      "responseHeaderModifier": {
        "add": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "remove": [
          "string"
        ],
        "set": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      },
      "targetGroups": [
        {
          "targetGroup": "string",
          "weight": 999
        }
      ]
    },
    "redirect": {
      "host": "string",
      "path": "string",
      "port": 1,
      "scheme": "http",
      "statusCode": 301
    },
    "type": "forward"
  },
  "id": "string",
  "idleTimeoutSeconds": 0,
  "loadBalancer": "string",
  "port": 0,
  "protocol": "tcp",
  "rules": [
    {
      "action": {
        "fixedResponse": {
          "body": "string",
          "contentType": "text/plain",
          "statusCode": 200
        },
        "forward": {
          "requestHeaderModifier": {
            "add": [
              {}
            ],
            "remove": [
              "string"
            ],
            "set": [
              {}
            ]
          },
          "responseHeaderModifier": {
            "add": [
              {}
            ],
            "remove": [
              "string"
            ],
            "set": [
              {}
            ]
          },
          "targetGroups": [
            {
              "targetGroup": "string",
              "weight": 999
            }
          ]
        },
        "redirect": {
          "host": "string",
          "path": "string",
          "port": 1,
          "scheme": "http",
          "statusCode": 301
        },
        "type": "forward"
      },
      "match": {
        "headers": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "hosts": [
          "string"
        ],
        "methods": [
          "string"
        ],
        "paths": [
          {
            "type": "exact",
            "value": "string"
          }
        ],
        "queryParams": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      },
      "name": "string"
    }
  ],
  "targetGroup": "string",
  "updatedAt": "2019-08-24T14:15:22Z"
}
```

- `CreateListener.response.201.additionalCertificates` (array<string>, required) — SNI certificates beyond the default, at most 24: a client whose SNI one of them covers gets it, and any other client the default certificate. Each renews on its own. Empty on tcp and http.
- `CreateListener.response.201.allowedSourceCidrs` (array<string>, required) — CIDRs allowed to connect: IPv4, and IPv6 where IPv6 is available. Each family admits only the clients its own ranges cover: a list with no IPv6 range admits no IPv6 client. Defaults to everyone: ["0.0.0.0/0"], with "::/0" where IPv6 is available.
- `CreateListener.response.201.certificate` (string | null, required)
- `CreateListener.response.201.createdAt` (string, required)
  - format `date-time`
- `CreateListener.response.201.defaultAction` (one of, required) — An http or https listener's action for a request no rule matches. Null on tcp and tls.
  - one of: [Action](/lb-api/schemas/Action/), `null`
- `CreateListener.response.201.id` (string, required)
- `CreateListener.response.201.idleTimeoutSeconds` (integer, required)
- `CreateListener.response.201.loadBalancer` (string, required)
- `CreateListener.response.201.port` (integer, required)
- `CreateListener.response.201.protocol` (unknown, required)
  - one of `"tcp"`, `"tls"`, `"http"`, `"https"`
- `CreateListener.response.201.rules` (array<object>, required) — Ordered: the first rule that matches a request acts on it, and the default action takes the rest. At most 100. Sent, it replaces the whole list. Empty on tcp and tls.
  - `CreateListener.response.201.rules.action` (object, required) — type names the one of forward, redirect and fixedResponse that is set; the others are null.
    - `CreateListener.response.201.rules.action.fixedResponse` (one of, required)
      - one of: [FixedResponse](/lb-api/schemas/FixedResponse/), `null`
    - `CreateListener.response.201.rules.action.forward` (one of, required)
      - one of: [Forward](/lb-api/schemas/Forward/), `null`
    - `CreateListener.response.201.rules.action.redirect` (one of, required)
      - one of: [Redirect](/lb-api/schemas/Redirect/), `null`
    - `CreateListener.response.201.rules.action.type` (unknown, required)
      - one of `"forward"`, `"redirect"`, `"fixedResponse"`
  - `CreateListener.response.201.rules.match` (object, required) — Fields AND together. Entries OR within hosts, paths and methods, and AND within headers and queryParams. An empty field matches anything.
    - `CreateListener.response.201.rules.match.headers` (array<object>, required)
      - `CreateListener.response.201.rules.match.headers.name` (string, required) — An HTTP token; header names match case-insensitively.
        - maxLength 128
      - `CreateListener.response.201.rules.match.headers.value` (string, required) — Printable ASCII, matched exactly.
        - minLength 1; maxLength 256
    - `CreateListener.response.201.rules.match.hosts` (array<string>, required) — Exact names, or *.example.com for any name ending in .example.com. Lowercase; the port is ignored.
      - maxLength 253
    - `CreateListener.response.201.rules.match.methods` (array<string>, required) — Uppercase.
      - maxLength 32
    - `CreateListener.response.201.rules.match.paths` (array<object>, required)
      - `CreateListener.response.201.rules.match.paths.type` (unknown, required) — prefix matches on segment boundaries: /api matches /api and /api/x, not /apix.
        - one of `"exact"`, `"prefix"`
      - `CreateListener.response.201.rules.match.paths.value` (string, required) — Starts with /; printable ASCII without space, # or ?.
        - minLength 1; maxLength 1024
    - `CreateListener.response.201.rules.match.queryParams` (array<object>, required)
      - `CreateListener.response.201.rules.match.queryParams.name` (string, required) — An HTTP token; header names match case-insensitively.
        - maxLength 128
      - `CreateListener.response.201.rules.match.queryParams.value` (string, required) — Printable ASCII, matched exactly.
        - minLength 1; maxLength 256
  - `CreateListener.response.201.rules.name` (string | null, required)
    - maxLength 64
- `CreateListener.response.201.targetGroup` (string | null, required) — A tcp or tls listener's target group, and an http or https listener's when its default action forwards to exactly one; else null.
- `CreateListener.response.201.updatedAt` (string, required)
  - format `date-time`

### 400

invalid_request (with issues), invalid_cursor, or the endpoint's own 400 codes.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `CreateListener.response.400.error` (object, required)
  - `CreateListener.response.400.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `CreateListener.response.400.error.message` (string, required)
    - maxLength 1024
  - `CreateListener.response.400.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `CreateListener.response.400.error.issues.message` (string, required)
    - `CreateListener.response.400.error.issues.path` (string, required)
  - `CreateListener.response.400.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `CreateListener.response.400.error.quota.id` (string, required)
    - `CreateListener.response.400.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `CreateListener.response.400.error.quota.limit` (integer, required)
      - min 0
    - `CreateListener.response.400.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `CreateListener.response.400.error.quota.inFlight` (integer, optional)
      - min 0
    - `CreateListener.response.400.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `CreateListener.response.400.error.quota.region` (string, optional)
    - `CreateListener.response.400.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `CreateListener.response.400.error.quota.scopeResourceName` (string, optional)
    - `CreateListener.response.400.error.quota.used` (integer, optional)
      - min 0
    - `CreateListener.response.400.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 401

unauthenticated: no credential, or one that doesn't check out.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `CreateListener.response.401.error` (object, required)
  - `CreateListener.response.401.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `CreateListener.response.401.error.message` (string, required)
    - maxLength 1024
  - `CreateListener.response.401.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `CreateListener.response.401.error.issues.message` (string, required)
    - `CreateListener.response.401.error.issues.path` (string, required)
  - `CreateListener.response.401.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `CreateListener.response.401.error.quota.id` (string, required)
    - `CreateListener.response.401.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `CreateListener.response.401.error.quota.limit` (integer, required)
      - min 0
    - `CreateListener.response.401.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `CreateListener.response.401.error.quota.inFlight` (integer, optional)
      - min 0
    - `CreateListener.response.401.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `CreateListener.response.401.error.quota.region` (string, optional)
    - `CreateListener.response.401.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `CreateListener.response.401.error.quota.scopeResourceName` (string, optional)
    - `CreateListener.response.401.error.quota.used` (integer, optional)
      - min 0
    - `CreateListener.response.401.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 403

access_denied: the caller's policies don't allow the action; forbidden_origin: a cookie-authenticated write from an origin that isn't allowed; spend_limit_reached.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `CreateListener.response.403.error` (object, required)
  - `CreateListener.response.403.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `CreateListener.response.403.error.message` (string, required)
    - maxLength 1024
  - `CreateListener.response.403.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `CreateListener.response.403.error.issues.message` (string, required)
    - `CreateListener.response.403.error.issues.path` (string, required)
  - `CreateListener.response.403.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `CreateListener.response.403.error.quota.id` (string, required)
    - `CreateListener.response.403.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `CreateListener.response.403.error.quota.limit` (integer, required)
      - min 0
    - `CreateListener.response.403.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `CreateListener.response.403.error.quota.inFlight` (integer, optional)
      - min 0
    - `CreateListener.response.403.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `CreateListener.response.403.error.quota.region` (string, optional)
    - `CreateListener.response.403.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `CreateListener.response.403.error.quota.scopeResourceName` (string, optional)
    - `CreateListener.response.403.error.quota.used` (integer, optional)
      - min 0
    - `CreateListener.response.403.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 404

not_found: unknown, malformed, or in an organization the caller isn't in.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `CreateListener.response.404.error` (object, required)
  - `CreateListener.response.404.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `CreateListener.response.404.error.message` (string, required)
    - maxLength 1024
  - `CreateListener.response.404.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `CreateListener.response.404.error.issues.message` (string, required)
    - `CreateListener.response.404.error.issues.path` (string, required)
  - `CreateListener.response.404.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `CreateListener.response.404.error.quota.id` (string, required)
    - `CreateListener.response.404.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `CreateListener.response.404.error.quota.limit` (integer, required)
      - min 0
    - `CreateListener.response.404.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `CreateListener.response.404.error.quota.inFlight` (integer, optional)
      - min 0
    - `CreateListener.response.404.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `CreateListener.response.404.error.quota.region` (string, optional)
    - `CreateListener.response.404.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `CreateListener.response.404.error.quota.scopeResourceName` (string, optional)
    - `CreateListener.response.404.error.quota.used` (integer, optional)
      - min 0
    - `CreateListener.response.404.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 409

quota_exceeded (an allocation quota, with quota), idempotency_conflict, idempotency_in_progress (with Retry-After), organization_deletion_pending, operation_in_progress, or the endpoint's own 409 codes.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `CreateListener.response.409.error` (object, required)
  - `CreateListener.response.409.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `CreateListener.response.409.error.message` (string, required)
    - maxLength 1024
  - `CreateListener.response.409.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `CreateListener.response.409.error.issues.message` (string, required)
    - `CreateListener.response.409.error.issues.path` (string, required)
  - `CreateListener.response.409.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `CreateListener.response.409.error.quota.id` (string, required)
    - `CreateListener.response.409.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `CreateListener.response.409.error.quota.limit` (integer, required)
      - min 0
    - `CreateListener.response.409.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `CreateListener.response.409.error.quota.inFlight` (integer, optional)
      - min 0
    - `CreateListener.response.409.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `CreateListener.response.409.error.quota.region` (string, optional)
    - `CreateListener.response.409.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `CreateListener.response.409.error.quota.scopeResourceName` (string, optional)
    - `CreateListener.response.409.error.quota.used` (integer, optional)
      - min 0
    - `CreateListener.response.409.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 413

payload_too_large: the body is over the endpoint's limit (1 MiB unless it says otherwise).

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `CreateListener.response.413.error` (object, required)
  - `CreateListener.response.413.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `CreateListener.response.413.error.message` (string, required)
    - maxLength 1024
  - `CreateListener.response.413.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `CreateListener.response.413.error.issues.message` (string, required)
    - `CreateListener.response.413.error.issues.path` (string, required)
  - `CreateListener.response.413.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `CreateListener.response.413.error.quota.id` (string, required)
    - `CreateListener.response.413.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `CreateListener.response.413.error.quota.limit` (integer, required)
      - min 0
    - `CreateListener.response.413.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `CreateListener.response.413.error.quota.inFlight` (integer, optional)
      - min 0
    - `CreateListener.response.413.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `CreateListener.response.413.error.quota.region` (string, optional)
    - `CreateListener.response.413.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `CreateListener.response.413.error.quota.scopeResourceName` (string, optional)
    - `CreateListener.response.413.error.quota.used` (integer, optional)
      - min 0
    - `CreateListener.response.413.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 429

too_many_requests, with Retry-After; or quota_exceeded (a rate, usage or concurrency quota, with quota), never with Retry-After.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `CreateListener.response.429.error` (object, required)
  - `CreateListener.response.429.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `CreateListener.response.429.error.message` (string, required)
    - maxLength 1024
  - `CreateListener.response.429.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `CreateListener.response.429.error.issues.message` (string, required)
    - `CreateListener.response.429.error.issues.path` (string, required)
  - `CreateListener.response.429.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `CreateListener.response.429.error.quota.id` (string, required)
    - `CreateListener.response.429.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `CreateListener.response.429.error.quota.limit` (integer, required)
      - min 0
    - `CreateListener.response.429.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `CreateListener.response.429.error.quota.inFlight` (integer, optional)
      - min 0
    - `CreateListener.response.429.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `CreateListener.response.429.error.quota.region` (string, optional)
    - `CreateListener.response.429.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `CreateListener.response.429.error.quota.scopeResourceName` (string, optional)
    - `CreateListener.response.429.error.quota.used` (integer, optional)
      - min 0
    - `CreateListener.response.429.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 500

internal_error: a bug; the details are in the logs, under the request ID.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `CreateListener.response.500.error` (object, required)
  - `CreateListener.response.500.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `CreateListener.response.500.error.message` (string, required)
    - maxLength 1024
  - `CreateListener.response.500.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `CreateListener.response.500.error.issues.message` (string, required)
    - `CreateListener.response.500.error.issues.path` (string, required)
  - `CreateListener.response.500.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `CreateListener.response.500.error.quota.id` (string, required)
    - `CreateListener.response.500.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `CreateListener.response.500.error.quota.limit` (integer, required)
      - min 0
    - `CreateListener.response.500.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `CreateListener.response.500.error.quota.inFlight` (integer, optional)
      - min 0
    - `CreateListener.response.500.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `CreateListener.response.500.error.quota.region` (string, optional)
    - `CreateListener.response.500.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `CreateListener.response.500.error.quota.scopeResourceName` (string, optional)
    - `CreateListener.response.500.error.quota.used` (integer, optional)
      - min 0
    - `CreateListener.response.500.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 503

unavailable: a dependency the request needs is down. Retry after Retry-After.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `CreateListener.response.503.error` (object, required)
  - `CreateListener.response.503.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `CreateListener.response.503.error.message` (string, required)
    - maxLength 1024
  - `CreateListener.response.503.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `CreateListener.response.503.error.issues.message` (string, required)
    - `CreateListener.response.503.error.issues.path` (string, required)
  - `CreateListener.response.503.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `CreateListener.response.503.error.quota.id` (string, required)
    - `CreateListener.response.503.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `CreateListener.response.503.error.quota.limit` (integer, required)
      - min 0
    - `CreateListener.response.503.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `CreateListener.response.503.error.quota.inFlight` (integer, optional)
      - min 0
    - `CreateListener.response.503.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `CreateListener.response.503.error.quota.region` (string, optional)
    - `CreateListener.response.503.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `CreateListener.response.503.error.quota.scopeResourceName` (string, optional)
    - `CreateListener.response.503.error.quota.used` (integer, optional)
      - min 0
    - `CreateListener.response.503.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.


Source: https://docs.ezghcloud.com/lb-api/CreateListener/index.md
