Yandex Cloud
  • Сервисы
  • Решения
  • Почему Yandex Cloud
  • Сообщество
  • Тарифы
  • Документация
  • Связаться с нами
Подключиться
Language / Region
Проект Яндекса
© 2023 ООО «Яндекс.Облако»
Yandex Application Load Balancer
  • Начало работы
  • Пошаговые инструкции
    • Все инструкции
    • Целевые группы
      • Создать целевую группу
      • Изменить целевую группу
      • Удалить целевую группу
    • Группы бэкендов
      • Создать группу бэкендов
      • Изменить группу бэкендов
      • Удалить группу бэкендов
    • HTTP-роутеры
      • Создать HTTP-роутер для HTTP-трафика
      • Создать HTTP-роутер для gRPC-трафика
      • Изменить HTTP-роутер
      • Удалить HTTP-роутер
    • L7-балансировщики
      • Создать L7-балансировщик
      • Изменить L7-балансировщик
      • Посмотреть статистику L7-балансировщика
      • Посмотреть логи L7-балансировщика
      • Получить идентификатор лог-группы L7-балансировщика
      • Остановить и запустить L7-балансировщик
      • Удалить L7-балансировщик
    • Инструменты для Managed Service for Kubernetes
      • Установить Ingress-контроллер
      • Установить Gateway API
      • Создать или изменить ресурсы по конфигурации
  • Практические руководства
    • Все практические руководства
    • Организация виртуального хостинга
    • Создание балансировщика с защитой от DDoS
    • Интеграция L7-балансировщика с CDN и Object Storage
    • Сине-зеленое и канареечное развертывание версий сервиса
    • Терминирование TLS-соединений
    • Запись логов балансировщика в PostgreSQL
    • Развертывание и нагрузочное тестирование gRPC-сервиса с масштабированием
  • Концепции
    • Обзор
    • Балансировщики нагрузки
    • HTTP-роутеры
    • Группы бэкендов
    • Целевые группы
    • Квоты и лимиты
  • Инструменты для Managed Service for Kubernetes
    • Ingress-контроллер
      • Обзор
      • Принципы работы
    • Gateway API
    • Необходимые настройки
      • Группы безопасности
      • Сервисный аккаунт
  • Управление доступом
  • Правила тарификации
  • Справочник API
    • Аутентификация в API
    • gRPC (англ.)
      • Overview
      • BackendGroupService
      • HttpRouterService
      • LoadBalancerService
      • TargetGroupService
      • VirtualHostService
      • OperationService
    • REST (англ.)
      • Overview
      • BackendGroup
        • Overview
        • addBackend
        • create
        • delete
        • get
        • list
        • listOperations
        • removeBackend
        • update
        • updateBackend
      • HttpRouter
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • update
      • LoadBalancer
        • Overview
        • addListener
        • addSniMatch
        • create
        • delete
        • get
        • getTargetStates
        • list
        • listOperations
        • removeListener
        • removeSniMatch
        • start
        • stop
        • update
        • updateListener
        • updateSniMatch
      • TargetGroup
        • Overview
        • addTargets
        • create
        • delete
        • get
        • list
        • listOperations
        • removeTargets
        • update
      • VirtualHost
        • Overview
        • create
        • delete
        • get
        • list
        • removeRoute
        • update
        • updateRoute
  • Справочники инструментов для Managed Service for Kubernetes
    • Обзор
    • Ingress-контроллер
      • Ingress
      • HttpBackendGroup
    • Gateway API
      • Gateway
      • HTTPRoute
    • Service
  • Справочник логов
  1. Справочник API
  2. REST (англ.)
  3. HttpRouter
  4. update

Application Load Balancer API, REST: HttpRouter.update

Статья создана
Yandex Cloud
  • HTTP request
  • Path parameters
  • Body parameters
  • Response

Updates the specified HTTP router.

HTTP request

PATCH https://alb.api.cloud.yandex.net/apploadbalancer/v1/httpRouters/{httpRouterId}

Path parameters

Parameter Description
httpRouterId

Required. ID of the HTTP router to update.

To get the HTTP router ID, make a list request.

Body parameters

{
  "updateMask": "string",
  "name": "string",
  "description": "string",
  "labels": "object",
  "virtualHosts": [
    {
      "name": "string",
      "authority": [
        "string"
      ],
      "routes": [
        {
          "name": "string",
          "routeOptions": {
            "modifyRequestHeaders": [
              {
                "name": "string",

                // `virtualHosts[].routes[].routeOptions.modifyRequestHeaders[]` includes only one of the fields `append`, `replace`, `remove`, `rename`
                "append": "string",
                "replace": "string",
                "remove": true,
                "rename": "string",
                // end of the list of possible fields`virtualHosts[].routes[].routeOptions.modifyRequestHeaders[]`

              }
            ],
            "modifyResponseHeaders": [
              {
                "name": "string",

                // `virtualHosts[].routes[].routeOptions.modifyResponseHeaders[]` includes only one of the fields `append`, `replace`, `remove`, `rename`
                "append": "string",
                "replace": "string",
                "remove": true,
                "rename": "string",
                // end of the list of possible fields`virtualHosts[].routes[].routeOptions.modifyResponseHeaders[]`

              }
            ],
            "rbac": {
              "action": "string",
              "principals": [
                {
                  "andPrincipals": [
                    {

                      // `virtualHosts[].routes[].routeOptions.rbac.principals[].andPrincipals[]` includes only one of the fields `header`, `remoteIp`, `any`
                      "header": {
                        "name": "string",
                        "value": {

                          // `virtualHosts[].routes[].routeOptions.rbac.principals[].andPrincipals[].header.value` includes only one of the fields `exactMatch`, `prefixMatch`, `regexMatch`
                          "exactMatch": "string",
                          "prefixMatch": "string",
                          "regexMatch": "string",
                          // end of the list of possible fields`virtualHosts[].routes[].routeOptions.rbac.principals[].andPrincipals[].header.value`

                        }
                      },
                      "remoteIp": "string",
                      "any": true,
                      // end of the list of possible fields`virtualHosts[].routes[].routeOptions.rbac.principals[].andPrincipals[]`

                    }
                  ]
                }
              ]
            }
          },

          // `virtualHosts[].routes[]` includes only one of the fields `http`, `grpc`
          "http": {
            "match": {
              "httpMethod": [
                "string"
              ],
              "path": {

                // `virtualHosts[].routes[].http.match.path` includes only one of the fields `exactMatch`, `prefixMatch`, `regexMatch`
                "exactMatch": "string",
                "prefixMatch": "string",
                "regexMatch": "string",
                // end of the list of possible fields`virtualHosts[].routes[].http.match.path`

              }
            },

            // `virtualHosts[].routes[].http` includes only one of the fields `route`, `redirect`, `directResponse`
            "route": {
              "backendGroupId": "string",
              "timeout": "string",
              "idleTimeout": "string",
              "prefixRewrite": "string",
              "upgradeTypes": [
                "string"
              ],

              // `virtualHosts[].routes[].http.route` includes only one of the fields `hostRewrite`, `autoHostRewrite`
              "hostRewrite": "string",
              "autoHostRewrite": true,
              // end of the list of possible fields`virtualHosts[].routes[].http.route`

            },
            "redirect": {
              "replaceScheme": "string",
              "replaceHost": "string",
              "replacePort": "string",
              "removeQuery": true,
              "responseCode": "string",

              // `virtualHosts[].routes[].http.redirect` includes only one of the fields `replacePath`, `replacePrefix`
              "replacePath": "string",
              "replacePrefix": "string",
              // end of the list of possible fields`virtualHosts[].routes[].http.redirect`

            },
            "directResponse": {
              "status": "string",
              "body": {
                "text": "string"
              }
            },
            // end of the list of possible fields`virtualHosts[].routes[].http`

          },
          "grpc": {
            "match": {
              "fqmn": {

                // `virtualHosts[].routes[].grpc.match.fqmn` includes only one of the fields `exactMatch`, `prefixMatch`, `regexMatch`
                "exactMatch": "string",
                "prefixMatch": "string",
                "regexMatch": "string",
                // end of the list of possible fields`virtualHosts[].routes[].grpc.match.fqmn`

              }
            },

            // `virtualHosts[].routes[].grpc` includes only one of the fields `route`, `statusResponse`
            "route": {
              "backendGroupId": "string",
              "maxTimeout": "string",
              "idleTimeout": "string",

              // `virtualHosts[].routes[].grpc.route` includes only one of the fields `hostRewrite`, `autoHostRewrite`
              "hostRewrite": "string",
              "autoHostRewrite": true,
              // end of the list of possible fields`virtualHosts[].routes[].grpc.route`

            },
            "statusResponse": {
              "status": "string"
            },
            // end of the list of possible fields`virtualHosts[].routes[].grpc`

          },
          // end of the list of possible fields`virtualHosts[].routes[]`

        }
      ],
      "modifyRequestHeaders": [
        {
          "name": "string",

          // `virtualHosts[].modifyRequestHeaders[]` includes only one of the fields `append`, `replace`, `remove`, `rename`
          "append": "string",
          "replace": "string",
          "remove": true,
          "rename": "string",
          // end of the list of possible fields`virtualHosts[].modifyRequestHeaders[]`

        }
      ],
      "modifyResponseHeaders": [
        {
          "name": "string",

          // `virtualHosts[].modifyResponseHeaders[]` includes only one of the fields `append`, `replace`, `remove`, `rename`
          "append": "string",
          "replace": "string",
          "remove": true,
          "rename": "string",
          // end of the list of possible fields`virtualHosts[].modifyResponseHeaders[]`

        }
      ],
      "routeOptions": {
        "modifyRequestHeaders": [
          {
            "name": "string",

            // `virtualHosts[].routeOptions.modifyRequestHeaders[]` includes only one of the fields `append`, `replace`, `remove`, `rename`
            "append": "string",
            "replace": "string",
            "remove": true,
            "rename": "string",
            // end of the list of possible fields`virtualHosts[].routeOptions.modifyRequestHeaders[]`

          }
        ],
        "modifyResponseHeaders": [
          {
            "name": "string",

            // `virtualHosts[].routeOptions.modifyResponseHeaders[]` includes only one of the fields `append`, `replace`, `remove`, `rename`
            "append": "string",
            "replace": "string",
            "remove": true,
            "rename": "string",
            // end of the list of possible fields`virtualHosts[].routeOptions.modifyResponseHeaders[]`

          }
        ],
        "rbac": {
          "action": "string",
          "principals": [
            {
              "andPrincipals": [
                {

                  // `virtualHosts[].routeOptions.rbac.principals[].andPrincipals[]` includes only one of the fields `header`, `remoteIp`, `any`
                  "header": {
                    "name": "string",
                    "value": {

                      // `virtualHosts[].routeOptions.rbac.principals[].andPrincipals[].header.value` includes only one of the fields `exactMatch`, `prefixMatch`, `regexMatch`
                      "exactMatch": "string",
                      "prefixMatch": "string",
                      "regexMatch": "string",
                      // end of the list of possible fields`virtualHosts[].routeOptions.rbac.principals[].andPrincipals[].header.value`

                    }
                  },
                  "remoteIp": "string",
                  "any": true,
                  // end of the list of possible fields`virtualHosts[].routeOptions.rbac.principals[].andPrincipals[]`

                }
              ]
            }
          ]
        }
      }
    }
  ],
  "routeOptions": {
    "modifyRequestHeaders": [
      {
        "name": "string",

        // `routeOptions.modifyRequestHeaders[]` includes only one of the fields `append`, `replace`, `remove`, `rename`
        "append": "string",
        "replace": "string",
        "remove": true,
        "rename": "string",
        // end of the list of possible fields`routeOptions.modifyRequestHeaders[]`

      }
    ],
    "modifyResponseHeaders": [
      {
        "name": "string",

        // `routeOptions.modifyResponseHeaders[]` includes only one of the fields `append`, `replace`, `remove`, `rename`
        "append": "string",
        "replace": "string",
        "remove": true,
        "rename": "string",
        // end of the list of possible fields`routeOptions.modifyResponseHeaders[]`

      }
    ],
    "rbac": {
      "action": "string",
      "principals": [
        {
          "andPrincipals": [
            {

              // `routeOptions.rbac.principals[].andPrincipals[]` includes only one of the fields `header`, `remoteIp`, `any`
              "header": {
                "name": "string",
                "value": {

                  // `routeOptions.rbac.principals[].andPrincipals[].header.value` includes only one of the fields `exactMatch`, `prefixMatch`, `regexMatch`
                  "exactMatch": "string",
                  "prefixMatch": "string",
                  "regexMatch": "string",
                  // end of the list of possible fields`routeOptions.rbac.principals[].andPrincipals[].header.value`

                }
              },
              "remoteIp": "string",
              "any": true,
              // end of the list of possible fields`routeOptions.rbac.principals[].andPrincipals[]`

            }
          ]
        }
      ]
    }
  }
}
Field Description
updateMask string

Field mask that specifies which attributes of the HTTP router should be updated.

A comma-separated names off ALL fields to be updated. Only the specified fields will be changed. The others will be left untouched. If the field is specified in updateMask and no value for that field was sent in the request, the field's value will be reset to the default. The default value for most fields is null or 0.

If updateMask is not sent in the request, all fields' values will be updated. Fields specified in the request will be updated to provided values. The rest of the fields will be reset to the default.

name string

New name for the HTTP router. The name must be unique within the folder.

Value must match the regular expression ([a-z]([-a-z0-9]{0,61}[a-z0-9])?)?.

description string

New description of the HTTP router.

The maximum string length in characters is 256.

labels object

HTTP router labels as key:value pairs. For details about the concept, see documentation.

Existing set of labels is completely replaced by the provided set, so if you just want to add or remove a label:

  1. Get the current set of labels with a get request.
  2. Add or remove a label in this set.
  3. Send the new set in this field.

No more than 64 per resource. The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\@0-9a-z]*. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\@0-9a-z]*.

virtualHosts[] object

New virtual hosts that combine routes inside the router. For details about the concept, see documentation.

Only one virtual host with no authority (default match) can be specified.

Existing list of virtual hosts is completely replaced by the specified list, so if you just want to add or remove a virtual host, make a create request or a delete request.

virtualHosts[].
name
string

Required. Name of the virtual host. The name is unique within the HTTP router.

virtualHosts[].
authority[]
string

List of domains that are attributed to the virtual host.

The host is selected to process the request received by the load balancer if the domain specified in the HTTP/1.1 Host header or the HTTP/2 :authority pseudo-header matches a domain specified in the host.

A wildcard asterisk character (*) matches 0 or more characters.

If not specified, all domains are attributed to the host, which is the same as specifying a * value. An HTTP router must not contain more than one virtual host to which all domains are attributed.

virtualHosts[].
routes[]
object

Routes of the virtual host.

A route contains a set of conditions (predicates) that are used by the load balancer to select the route for the request and an action on the request. For details about the concept, see documentation.

The order of routes matters: the first route whose predicate matches the request is selected. The most specific routes should be at the top of the list, so that they are not overridden. For example, if the first HTTP route is configured, via match, to match paths prefixed with just /, other routes are never matched.

virtualHosts[].
routes[].
name
string

Required. Name of the route.

virtualHosts[].
routes[].
routeOptions
object
virtualHosts[].
routes[].
routeOptions.
modifyRequestHeaders[]
object

Apply the following modifications to the request headers.

virtualHosts[].
routes[].
routeOptions.
modifyRequestHeaders[].
name
string

Name of the header.

virtualHosts[].
routes[].
routeOptions.
modifyRequestHeaders[].
append
string
virtualHosts[].routes[].routeOptions.modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Appends the specified string to the header value.

Variables defined for Envoy proxy are supported.

virtualHosts[].
routes[].
routeOptions.
modifyRequestHeaders[].
replace
string
virtualHosts[].routes[].routeOptions.modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the value of the header with the specified string.

Variables defined for Envoy proxy are supported.

virtualHosts[].
routes[].
routeOptions.
modifyRequestHeaders[].
remove
boolean (boolean)
virtualHosts[].routes[].routeOptions.modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Removes the header.

virtualHosts[].
routes[].
routeOptions.
modifyRequestHeaders[].
rename
string
virtualHosts[].routes[].routeOptions.modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the name of the header with the specified string. This operation is only supported for ALB Virtual Hosts.

virtualHosts[].
routes[].
routeOptions.
modifyResponseHeaders[]
object

Apply the following modifications to the response headers.

virtualHosts[].
routes[].
routeOptions.
modifyResponseHeaders[].
name
string

Name of the header.

virtualHosts[].
routes[].
routeOptions.
modifyResponseHeaders[].
append
string
virtualHosts[].routes[].routeOptions.modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Appends the specified string to the header value.

Variables defined for Envoy proxy are supported.

virtualHosts[].
routes[].
routeOptions.
modifyResponseHeaders[].
replace
string
virtualHosts[].routes[].routeOptions.modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the value of the header with the specified string.

Variables defined for Envoy proxy are supported.

virtualHosts[].
routes[].
routeOptions.
modifyResponseHeaders[].
remove
boolean (boolean)
virtualHosts[].routes[].routeOptions.modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Removes the header.

virtualHosts[].
routes[].
routeOptions.
modifyResponseHeaders[].
rename
string
virtualHosts[].routes[].routeOptions.modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the name of the header with the specified string. This operation is only supported for ALB Virtual Hosts.

virtualHosts[].
routes[].
routeOptions.
rbac
object

Role Based Access Control (RBAC) provides router, virtual host, and route access control for the ALB service. Requests are allowed or denied based on the action and whether a matching principal is found. For instance, if the action is ALLOW and a matching principal is found the request should be allowed.

virtualHosts[].
routes[].
routeOptions.
rbac.
action
string

Required. The action to take if a principal matches. Every action either allows or denies a request.

  • ALLOW: Allows the request if and only if there is a principal that matches the request.
  • DENY: Allows the request if and only if there are no principal that match the request.
virtualHosts[].
routes[].
routeOptions.
rbac.
principals[]
object

Required. Required. A match occurs when at least one matches the request.

The minimum number of elements is 1.

virtualHosts[].
routes[].
routeOptions.
rbac.
principals[].
andPrincipals[]
object

Required. Required. A match occurs when all principals match the request.

The minimum number of elements is 1.

virtualHosts[].
routes[].
routeOptions.
rbac.
principals[].
andPrincipals[].
header
object
A header (or pseudo-header such as :path or :method) of the incoming HTTP request.
virtualHosts[].routes[].routeOptions.rbac.principals[].andPrincipals[] includes only one of the fields header, remoteIp, any
virtualHosts[].
routes[].
routeOptions.
rbac.
principals[].
andPrincipals[].
header.
name
string

Required. Specifies the name of the header in the request.

virtualHosts[].
routes[].
routeOptions.
rbac.
principals[].
andPrincipals[].
header.
value
object

Specifies how the header match will be performed to route the request. In the absence of value a request that has specified header name will match, regardless of the header's value.

A string matcher resource.

virtualHosts[].
routes[].
routeOptions.
rbac.
principals[].
andPrincipals[].
header.
value.
exactMatch
string
virtualHosts[].routes[].routeOptions.rbac.principals[].andPrincipals[].header.value includes only one of the fields exactMatch, prefixMatch, regexMatch

Exact match string.

virtualHosts[].
routes[].
routeOptions.
rbac.
principals[].
andPrincipals[].
header.
value.
prefixMatch
string
virtualHosts[].routes[].routeOptions.rbac.principals[].andPrincipals[].header.value includes only one of the fields exactMatch, prefixMatch, regexMatch

Prefix match string.

virtualHosts[].
routes[].
routeOptions.
rbac.
principals[].
andPrincipals[].
header.
value.
regexMatch
string
virtualHosts[].routes[].routeOptions.rbac.principals[].andPrincipals[].header.value includes only one of the fields exactMatch, prefixMatch, regexMatch

Regular expression match string.

virtualHosts[].
routes[].
routeOptions.
rbac.
principals[].
andPrincipals[].
remoteIp
string
virtualHosts[].routes[].routeOptions.rbac.principals[].andPrincipals[] includes only one of the fields header, remoteIp, any

A CIDR block or IP that describes the request remote/origin address, e.g. 192.0.0.0/24 or192.0.0.4 .

virtualHosts[].
routes[].
routeOptions.
rbac.
principals[].
andPrincipals[].
any
boolean (boolean)
virtualHosts[].routes[].routeOptions.rbac.principals[].andPrincipals[] includes only one of the fields header, remoteIp, any

When any is set, it matches any request.

virtualHosts[].
routes[].
http
object
HTTP route configuration.
virtualHosts[].routes[] includes only one of the fields http, grpc
virtualHosts[].
routes[].
http.
match
object
Condition (predicate) used to select the route.
virtualHosts[].
routes[].
http.
match.
httpMethod[]
string

HTTP method specified in the request.

virtualHosts[].
routes[].
http.
match.
path
object

Match settings for the path specified in the request.

If not specified, the route matches all paths.

A string matcher resource.

virtualHosts[].
routes[].
http.
match.
path.
exactMatch
string
virtualHosts[].routes[].http.match.path includes only one of the fields exactMatch, prefixMatch, regexMatch

Exact match string.

virtualHosts[].
routes[].
http.
match.
path.
prefixMatch
string
virtualHosts[].routes[].http.match.path includes only one of the fields exactMatch, prefixMatch, regexMatch

Prefix match string.

virtualHosts[].
routes[].
http.
match.
path.
regexMatch
string
virtualHosts[].routes[].http.match.path includes only one of the fields exactMatch, prefixMatch, regexMatch

Regular expression match string.

virtualHosts[].
routes[].
http.
route
object
Forwards the request to a backend group for processing as configured.
virtualHosts[].routes[].http includes only one of the fields route, redirect, directResponse
virtualHosts[].
routes[].
http.
route.
backendGroupId
string

Required. Backend group to forward requests to.

Stream (TCP) backend groups are not supported.

virtualHosts[].
routes[].
http.
route.
timeout
string

Overall timeout for an HTTP connection between a load balancer node an a backend from the backend group: the maximum time the connection is kept alive for, regardless of whether data is transferred over it.

If a connection times out, the load balancer responds to the client with a 504 Gateway Timeout status code.

Default value: 60.

virtualHosts[].
routes[].
http.
route.
idleTimeout
string

Idle timeout for an HTTP connection between a load balancer node an a backend from the backend group: the maximum time the connection is allowed to be idle, i.e. without any data transferred over it.

Specifying meaningful values for both timeout and idle_timeout is useful for implementing server-push mechanisms such as long polling, server-sent events (EventSource interface) etc.

If a connection times out, the load balancer responds to the client with a 504 Gateway Timeout status code.

If not specified, no idle timeout is used, and an alive connection may be idle for any duration (see timeout).

virtualHosts[].
routes[].
http.
route.
prefixRewrite
string

Replacement for the path prefix matched by StringMatch.

For instance, if prefixMatch value is /foo and replace_prefix value is /bar, a request with /foobaz path is forwarded with /barbaz path. For exactMatch, the whole path is replaced.

If not specified, the path is not changed.

virtualHosts[].
routes[].
http.
route.
upgradeTypes[]
string

Supported values for HTTP Upgrade header. E.g. websocket.

virtualHosts[].
routes[].
http.
route.
hostRewrite
string
virtualHosts[].routes[].http.route includes only one of the fields hostRewrite, autoHostRewrite

Host replacement.

virtualHosts[].
routes[].
http.
route.
autoHostRewrite
boolean (boolean)
virtualHosts[].routes[].http.route includes only one of the fields hostRewrite, autoHostRewrite

Automatically replaces the host with that of the target.

virtualHosts[].
routes[].
http.
redirect
object
Redirects the request as configured.
virtualHosts[].routes[].http includes only one of the fields route, redirect, directResponse
virtualHosts[].
routes[].
http.
redirect.
replaceScheme
string

URI scheme replacement.

If http or https scheme is to be replaced and 80 or 443 port is specified in the original URI, the port is also removed.

If not specified, the original scheme and port are used.

virtualHosts[].
routes[].
http.
redirect.
replaceHost
string

URI host replacement.

If not specified, the original host is used.

virtualHosts[].
routes[].
http.
redirect.
replacePort
string (int64)

URI host replacement.

If not specified, the original host is used.

virtualHosts[].
routes[].
http.
redirect.
removeQuery
boolean (boolean)

Removes URI query.

virtualHosts[].
routes[].
http.
redirect.
responseCode
string
HTTP status code to use in redirect responses.
  • MOVED_PERMANENTLY: 301 Moved Permanently status code.
  • FOUND: 302 Found status code.
  • SEE_OTHER: 303 See Other status code.
  • TEMPORARY_REDIRECT: 307 Temporary Redirect status code.
  • PERMANENT_REDIRECT: 308 Permanent Redirect status code.
virtualHosts[].
routes[].
http.
redirect.
replacePath
string
virtualHosts[].routes[].http.redirect includes only one of the fields replacePath, replacePrefix

Replacement for the whole path.

virtualHosts[].
routes[].
http.
redirect.
replacePrefix
string
virtualHosts[].routes[].http.redirect includes only one of the fields replacePath, replacePrefix

Replacement for the path prefix matched by StringMatch.

For instance, if prefixMatch value is /foo and replace_prefix value is /bar, a request with https://example.com/foobaz URI is redirected to https://example.com/barbaz. For exactMatch, the whole path is replaced.

virtualHosts[].
routes[].
http.
directResponse
object
Instructs the load balancer to respond directly as configured.
virtualHosts[].routes[].http includes only one of the fields route, redirect, directResponse
virtualHosts[].
routes[].
http.
directResponse.
status
string (int64)

HTTP status code to use in responses.

Acceptable values are 100 to 599, inclusive.

virtualHosts[].
routes[].
http.
directResponse.
body
object

Response body.

A health check payload resource.

virtualHosts[].
routes[].
http.
directResponse.
body.
text
string

Payload text.

The string length in characters must be greater than 0.

virtualHosts[].
routes[].
grpc
object
gRPC route configuration.
virtualHosts[].routes[] includes only one of the fields http, grpc
virtualHosts[].
routes[].
grpc.
match
object
Condition (predicate) used to select the route.
virtualHosts[].
routes[].
grpc.
match.
fqmn
object

Match settings for gRPC service method called in the request.

A match string must be a fully qualified method name, e.g. foo.bar.v1.BazService/Get, or a prefix of such.

If not specified, the route matches all methods.

A string matcher resource.

virtualHosts[].
routes[].
grpc.
match.
fqmn.
exactMatch
string
virtualHosts[].routes[].grpc.match.fqmn includes only one of the fields exactMatch, prefixMatch, regexMatch

Exact match string.

virtualHosts[].
routes[].
grpc.
match.
fqmn.
prefixMatch
string
virtualHosts[].routes[].grpc.match.fqmn includes only one of the fields exactMatch, prefixMatch, regexMatch

Prefix match string.

virtualHosts[].
routes[].
grpc.
match.
fqmn.
regexMatch
string
virtualHosts[].routes[].grpc.match.fqmn includes only one of the fields exactMatch, prefixMatch, regexMatch

Regular expression match string.

virtualHosts[].
routes[].
grpc.
route
object
Forwards the request to a backend group for processing as configured.
virtualHosts[].routes[].grpc includes only one of the fields route, statusResponse
virtualHosts[].
routes[].
grpc.
route.
backendGroupId
string

Required. Backend group to forward requests to.

virtualHosts[].
routes[].
grpc.
route.
maxTimeout
string

Overall timeout for an underlying HTTP connection between a load balancer node an a backend from the backend group: the maximum time the connection is kept alive for, regardless of whether data is transferred over it.

If a client specifies a lower timeout in HTTP grpc-timeout header, the max_timeout value is ignored.

If a connection times out, the load balancer responds to the client with an UNAVAILABLE status code.

Default value: 60.

virtualHosts[].
routes[].
grpc.
route.
idleTimeout
string

Idle timeout for an underlying HTTP connection between a load balancer node an a backend from the backend group: the maximum time the connection is allowed to be idle, i.e. without any data transferred over it.

Specifying meaningful values for both maxTimeout and idle_timeout is useful for implementing server-push mechanisms such as long polling, server-sent events etc.

If a connection times out, the load balancer responds to the client with an UNAVAILABLE status code.

If not specified, no idle timeout is used, and an alive connection may be idle for any duration (see maxTimeout).

virtualHosts[].
routes[].
grpc.
route.
hostRewrite
string
virtualHosts[].routes[].grpc.route includes only one of the fields hostRewrite, autoHostRewrite

Host replacement.

virtualHosts[].
routes[].
grpc.
route.
autoHostRewrite
boolean (boolean)
virtualHosts[].routes[].grpc.route includes only one of the fields hostRewrite, autoHostRewrite

Automatically replaces the host with that of the target.

virtualHosts[].
routes[].
grpc.
statusResponse
object
Instructs the load balancer to respond directly with a specified status.
virtualHosts[].routes[].grpc includes only one of the fields route, statusResponse
virtualHosts[].
routes[].
grpc.
statusResponse.
status
string

gRPC status code to use in responses.

gRPC status code supported for use in responses.

  • OK: OK (0) status code.
  • INVALID_ARGUMENT: INVALID_ARGUMENT (3) status code.
  • NOT_FOUND: NOT_FOUND (5) status code.
  • PERMISSION_DENIED: PERMISSION_DENIED (7) status code.
  • UNAUTHENTICATED: UNAUTHENTICATED (16) status code.
  • UNIMPLEMENTED: UNIMPLEMENTED (12) status code.
  • INTERNAL: INTERNAL (13) status code.
  • UNAVAILABLE: UNAVAILABLE (14) status code.
virtualHosts[].
modifyRequestHeaders[]
object

Deprecated, use route_options.modify_request_headers.

virtualHosts[].
modifyRequestHeaders[].
name
string

Name of the header.

virtualHosts[].
modifyRequestHeaders[].
append
string
virtualHosts[].modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Appends the specified string to the header value.

Variables defined for Envoy proxy are supported.

virtualHosts[].
modifyRequestHeaders[].
replace
string
virtualHosts[].modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the value of the header with the specified string.

Variables defined for Envoy proxy are supported.

virtualHosts[].
modifyRequestHeaders[].
remove
boolean (boolean)
virtualHosts[].modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Removes the header.

virtualHosts[].
modifyRequestHeaders[].
rename
string
virtualHosts[].modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the name of the header with the specified string. This operation is only supported for ALB Virtual Hosts.

virtualHosts[].
modifyResponseHeaders[]
object

Deprecated, use route_options.modify_response_headers.

virtualHosts[].
modifyResponseHeaders[].
name
string

Name of the header.

virtualHosts[].
modifyResponseHeaders[].
append
string
virtualHosts[].modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Appends the specified string to the header value.

Variables defined for Envoy proxy are supported.

virtualHosts[].
modifyResponseHeaders[].
replace
string
virtualHosts[].modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the value of the header with the specified string.

Variables defined for Envoy proxy are supported.

virtualHosts[].
modifyResponseHeaders[].
remove
boolean (boolean)
virtualHosts[].modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Removes the header.

virtualHosts[].
modifyResponseHeaders[].
rename
string
virtualHosts[].modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the name of the header with the specified string. This operation is only supported for ALB Virtual Hosts.

virtualHosts[].
routeOptions
object
virtualHosts[].
routeOptions.
modifyRequestHeaders[]
object

Apply the following modifications to the request headers.

virtualHosts[].
routeOptions.
modifyRequestHeaders[].
name
string

Name of the header.

virtualHosts[].
routeOptions.
modifyRequestHeaders[].
append
string
virtualHosts[].routeOptions.modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Appends the specified string to the header value.

Variables defined for Envoy proxy are supported.

virtualHosts[].
routeOptions.
modifyRequestHeaders[].
replace
string
virtualHosts[].routeOptions.modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the value of the header with the specified string.

Variables defined for Envoy proxy are supported.

virtualHosts[].
routeOptions.
modifyRequestHeaders[].
remove
boolean (boolean)
virtualHosts[].routeOptions.modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Removes the header.

virtualHosts[].
routeOptions.
modifyRequestHeaders[].
rename
string
virtualHosts[].routeOptions.modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the name of the header with the specified string. This operation is only supported for ALB Virtual Hosts.

virtualHosts[].
routeOptions.
modifyResponseHeaders[]
object

Apply the following modifications to the response headers.

virtualHosts[].
routeOptions.
modifyResponseHeaders[].
name
string

Name of the header.

virtualHosts[].
routeOptions.
modifyResponseHeaders[].
append
string
virtualHosts[].routeOptions.modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Appends the specified string to the header value.

Variables defined for Envoy proxy are supported.

virtualHosts[].
routeOptions.
modifyResponseHeaders[].
replace
string
virtualHosts[].routeOptions.modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the value of the header with the specified string.

Variables defined for Envoy proxy are supported.

virtualHosts[].
routeOptions.
modifyResponseHeaders[].
remove
boolean (boolean)
virtualHosts[].routeOptions.modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Removes the header.

virtualHosts[].
routeOptions.
modifyResponseHeaders[].
rename
string
virtualHosts[].routeOptions.modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the name of the header with the specified string. This operation is only supported for ALB Virtual Hosts.

virtualHosts[].
routeOptions.
rbac
object

Role Based Access Control (RBAC) provides router, virtual host, and route access control for the ALB service. Requests are allowed or denied based on the action and whether a matching principal is found. For instance, if the action is ALLOW and a matching principal is found the request should be allowed.

virtualHosts[].
routeOptions.
rbac.
action
string

Required. The action to take if a principal matches. Every action either allows or denies a request.

  • ALLOW: Allows the request if and only if there is a principal that matches the request.
  • DENY: Allows the request if and only if there are no principal that match the request.
virtualHosts[].
routeOptions.
rbac.
principals[]
object

Required. Required. A match occurs when at least one matches the request.

The minimum number of elements is 1.

virtualHosts[].
routeOptions.
rbac.
principals[].
andPrincipals[]
object

Required. Required. A match occurs when all principals match the request.

The minimum number of elements is 1.

virtualHosts[].
routeOptions.
rbac.
principals[].
andPrincipals[].
header
object
A header (or pseudo-header such as :path or :method) of the incoming HTTP request.
virtualHosts[].routeOptions.rbac.principals[].andPrincipals[] includes only one of the fields header, remoteIp, any
virtualHosts[].
routeOptions.
rbac.
principals[].
andPrincipals[].
header.
name
string

Required. Specifies the name of the header in the request.

virtualHosts[].
routeOptions.
rbac.
principals[].
andPrincipals[].
header.
value
object

Specifies how the header match will be performed to route the request. In the absence of value a request that has specified header name will match, regardless of the header's value.

A string matcher resource.

virtualHosts[].
routeOptions.
rbac.
principals[].
andPrincipals[].
header.
value.
exactMatch
string
virtualHosts[].routeOptions.rbac.principals[].andPrincipals[].header.value includes only one of the fields exactMatch, prefixMatch, regexMatch

Exact match string.

virtualHosts[].
routeOptions.
rbac.
principals[].
andPrincipals[].
header.
value.
prefixMatch
string
virtualHosts[].routeOptions.rbac.principals[].andPrincipals[].header.value includes only one of the fields exactMatch, prefixMatch, regexMatch

Prefix match string.

virtualHosts[].
routeOptions.
rbac.
principals[].
andPrincipals[].
header.
value.
regexMatch
string
virtualHosts[].routeOptions.rbac.principals[].andPrincipals[].header.value includes only one of the fields exactMatch, prefixMatch, regexMatch

Regular expression match string.

virtualHosts[].
routeOptions.
rbac.
principals[].
andPrincipals[].
remoteIp
string
virtualHosts[].routeOptions.rbac.principals[].andPrincipals[] includes only one of the fields header, remoteIp, any

A CIDR block or IP that describes the request remote/origin address, e.g. 192.0.0.0/24 or192.0.0.4 .

virtualHosts[].
routeOptions.
rbac.
principals[].
andPrincipals[].
any
boolean (boolean)
virtualHosts[].routeOptions.rbac.principals[].andPrincipals[] includes only one of the fields header, remoteIp, any

When any is set, it matches any request.

routeOptions object

New route options for the HTTP router.

routeOptions.
modifyRequestHeaders[]
object

Apply the following modifications to the request headers.

routeOptions.
modifyRequestHeaders[].
name
string

Name of the header.

routeOptions.
modifyRequestHeaders[].
append
string
routeOptions.modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Appends the specified string to the header value.

Variables defined for Envoy proxy are supported.

routeOptions.
modifyRequestHeaders[].
replace
string
routeOptions.modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the value of the header with the specified string.

Variables defined for Envoy proxy are supported.

routeOptions.
modifyRequestHeaders[].
remove
boolean (boolean)
routeOptions.modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Removes the header.

routeOptions.
modifyRequestHeaders[].
rename
string
routeOptions.modifyRequestHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the name of the header with the specified string. This operation is only supported for ALB Virtual Hosts.

routeOptions.
modifyResponseHeaders[]
object

Apply the following modifications to the response headers.

routeOptions.
modifyResponseHeaders[].
name
string

Name of the header.

routeOptions.
modifyResponseHeaders[].
append
string
routeOptions.modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Appends the specified string to the header value.

Variables defined for Envoy proxy are supported.

routeOptions.
modifyResponseHeaders[].
replace
string
routeOptions.modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the value of the header with the specified string.

Variables defined for Envoy proxy are supported.

routeOptions.
modifyResponseHeaders[].
remove
boolean (boolean)
routeOptions.modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Removes the header.

routeOptions.
modifyResponseHeaders[].
rename
string
routeOptions.modifyResponseHeaders[] includes only one of the fields append, replace, remove, rename

Replaces the name of the header with the specified string. This operation is only supported for ALB Virtual Hosts.

routeOptions.
rbac
object

Role Based Access Control (RBAC) provides router, virtual host, and route access control for the ALB service. Requests are allowed or denied based on the action and whether a matching principal is found. For instance, if the action is ALLOW and a matching principal is found the request should be allowed.

routeOptions.
rbac.
action
string

Required. The action to take if a principal matches. Every action either allows or denies a request.

  • ALLOW: Allows the request if and only if there is a principal that matches the request.
  • DENY: Allows the request if and only if there are no principal that match the request.
routeOptions.
rbac.
principals[]
object

Required. Required. A match occurs when at least one matches the request.

The minimum number of elements is 1.

routeOptions.
rbac.
principals[].
andPrincipals[]
object

Required. Required. A match occurs when all principals match the request.

The minimum number of elements is 1.

routeOptions.
rbac.
principals[].
andPrincipals[].
header
object
A header (or pseudo-header such as :path or :method) of the incoming HTTP request.
routeOptions.rbac.principals[].andPrincipals[] includes only one of the fields header, remoteIp, any
routeOptions.
rbac.
principals[].
andPrincipals[].
header.
name
string

Required. Specifies the name of the header in the request.

routeOptions.
rbac.
principals[].
andPrincipals[].
header.
value
object

Specifies how the header match will be performed to route the request. In the absence of value a request that has specified header name will match, regardless of the header's value.

A string matcher resource.

routeOptions.
rbac.
principals[].
andPrincipals[].
header.
value.
exactMatch
string
routeOptions.rbac.principals[].andPrincipals[].header.value includes only one of the fields exactMatch, prefixMatch, regexMatch

Exact match string.

routeOptions.
rbac.
principals[].
andPrincipals[].
header.
value.
prefixMatch
string
routeOptions.rbac.principals[].andPrincipals[].header.value includes only one of the fields exactMatch, prefixMatch, regexMatch

Prefix match string.

routeOptions.
rbac.
principals[].
andPrincipals[].
header.
value.
regexMatch
string
routeOptions.rbac.principals[].andPrincipals[].header.value includes only one of the fields exactMatch, prefixMatch, regexMatch

Regular expression match string.

routeOptions.
rbac.
principals[].
andPrincipals[].
remoteIp
string
routeOptions.rbac.principals[].andPrincipals[] includes only one of the fields header, remoteIp, any

A CIDR block or IP that describes the request remote/origin address, e.g. 192.0.0.0/24 or192.0.0.4 .

routeOptions.
rbac.
principals[].
andPrincipals[].
any
boolean (boolean)
routeOptions.rbac.principals[].andPrincipals[] includes only one of the fields header, remoteIp, any

When any is set, it matches any request.

Response

HTTP Code: 200 - OK

{
  "id": "string",
  "description": "string",
  "createdAt": "string",
  "createdBy": "string",
  "modifiedAt": "string",
  "done": true,
  "metadata": "object",

  //  includes only one of the fields `error`, `response`
  "error": {
    "code": "integer",
    "message": "string",
    "details": [
      "object"
    ]
  },
  "response": "object",
  // end of the list of possible fields

}

An Operation resource. For more information, see Operation.

Field Description
id string

ID of the operation.

description string

Description of the operation. 0-256 characters long.

createdAt string (date-time)

Creation timestamp.

String in RFC3339 text format. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

createdBy string

ID of the user or service account who initiated the operation.

modifiedAt string (date-time)

The time when the Operation resource was last modified.

String in RFC3339 text format. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

done boolean (boolean)

If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

metadata object

Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.

error object
The error result of the operation in case of failure or cancellation.
includes only one of the fields error, response
error.
code
integer (int32)

Error code. An enum value of google.rpc.Code.

error.
message
string

An error message.

error.
details[]
object

A list of messages that carry the error details.

response object
includes only one of the fields error, response

The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is the standard Create/Update, the response should be the target resource of the operation. Any method that returns a long-running operation should document the response type, if any.

Была ли статья полезна?

Language / Region
Проект Яндекса
© 2023 ООО «Яндекс.Облако»
В этой статье:
  • HTTP request
  • Path parameters
  • Body parameters
  • Response