Method get
Returns the specified HTTP router.
To get the list of all available HTTP routers, make a list request.
HTTP request
GET https://alb.api.cloud.yandex.net/apploadbalancer/v1/httpRouters/{httpRouterId}
Path parameters
Parameter | Description |
---|---|
httpRouterId | Required. ID of the HTTP router to return. To get the HTTP router ID, make a list request. |
Response
HTTP Code: 200 - OK
{
"id": "string",
"name": "string",
"description": "string",
"folderId": "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[]`
}
]
},
// `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`
"exactMatch": "string",
"prefixMatch": "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`
"exactMatch": "string",
"prefixMatch": "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[]`
}
]
}
}
],
"createdAt": "string",
"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[]`
}
]
}
}
An HTTP router resource.
For details about the concept, see documentation.
Field | Description |
---|---|
id | string ID of the router. Generated at creation time. |
name | string Name of the router. The name is unique within the folder. |
description | string Description of the router. |
folderId | string ID of the folder that the router belongs to. |
labels | object Router labels as |
virtualHosts[] | object A virtual host resource. For details about the concept, see documentation. |
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 A wildcard asterisk character ( If not specified, all domains are attributed to the host, which is the same as specifying a |
virtualHosts[]. routes[] |
object A route resource. For details about the concept, see documentation. |
virtualHosts[]. routes[]. name |
string Required. Name of the route. |
virtualHosts[]. routes[]. routeOptions |
object |
virtualHosts[]. routes[]. routeOptions. modifyRequestHeaders[] |
object A header modification resource. |
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 A header modification resource. |
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[]. http |
object HTTP route configuration. virtualHosts[].routes[] includes only one of the fields http , grpc An HTTP route configuration resource. |
virtualHosts[]. routes[]. http. match |
object Condition (predicate) used to select the route. An HTTP route condition (predicate) resource. |
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 Exact match string. |
virtualHosts[]. routes[]. http. match. path. prefixMatch |
string virtualHosts[].routes[].http.match.path includes only one of the fields exactMatch , prefixMatch Prefix 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 An HTTP route action resource. |
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 Default value: |
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 If a connection times out, the load balancer responds to the client with a If not specified, no idle timeout is used, and an alive connection may be idle for any duration (see |
virtualHosts[]. routes[]. http. route. prefixRewrite |
string Replacement for the path prefix matched by For instance, if If not specified, the path is not changed. |
virtualHosts[]. routes[]. http. route. upgradeTypes[] |
string Supported values for HTTP |
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 A redirect action resource. |
virtualHosts[]. routes[]. http. redirect. replaceScheme |
string URI scheme replacement. If 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. HTTP status codes supported for use in redirect responses.
|
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 For instance, if |
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 A direct response action resource. |
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 A gRPC route configuration resource. |
virtualHosts[]. routes[]. grpc. match |
object Condition (predicate) used to select the route. A gRPC route condition (predicate) resource. |
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. 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 Exact match string. |
virtualHosts[]. routes[]. grpc. match. fqmn. prefixMatch |
string virtualHosts[].routes[].grpc.match.fqmn includes only one of the fields exactMatch , prefixMatch Prefix 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 A gRPC route action resource. |
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 If a connection times out, the load balancer responds to the client with an Default value: |
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 If a connection times out, the load balancer responds to the client with an If not specified, no idle timeout is used, and an alive connection may be idle for any duration (see |
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 A gRPC status response action resource. |
virtualHosts[]. routes[]. grpc. statusResponse. status |
string gRPC status code to use in responses. gRPC status code supported for use in responses.
|
virtualHosts[]. modifyRequestHeaders[] |
object A header modification resource. |
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 A header modification resource. |
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 A header modification resource. |
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 A header modification resource. |
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. |
createdAt | string (date-time) Creation timestamp. String in RFC3339 text format. |
routeOptions | object |
routeOptions. modifyRequestHeaders[] |
object A header modification resource. |
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 A header modification resource. |
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. |