Application Load Balancer API, REST: VirtualHost.List
Lists virtual hosts of the specified HTTP router.
HTTP request
GET https://alb.api.cloud.yandex.net/apploadbalancer/v1/httpRouters/{httpRouterId}/virtualHosts
Path parameters
Field |
Description |
httpRouterId |
string Required field. ID of the HTTP router to list virtual hosts in. To get the HTTP router ID, make a HttpRouterService.List request. |
Query parameters
Field |
Description |
pageSize |
string (int64) The maximum number of results per page to return. If the number of available |
pageToken |
string Page token. To get the next page of results, set |
Response
HTTP Code: 200 - OK
{
"virtualHosts": [
{
"name": "string",
"authority": [
"string"
],
"routes": [
{
"name": "string",
// Includes only one of the fields `http`, `grpc`
"http": {
"match": {
"httpMethod": [
"string"
],
"path": {
// Includes only one of the fields `exactMatch`, `prefixMatch`, `regexMatch`
"exactMatch": "string",
"prefixMatch": "string",
"regexMatch": "string"
// end of the list of possible fields
}
},
// Includes only one of the fields `route`, `redirect`, `directResponse`
"route": {
"backendGroupId": "string",
"timeout": "string",
"idleTimeout": "string",
// Includes only one of the fields `hostRewrite`, `autoHostRewrite`
"hostRewrite": "string",
"autoHostRewrite": "boolean",
// end of the list of possible fields
"prefixRewrite": "string",
"upgradeTypes": [
"string"
],
"rateLimit": {
"allRequests": {
// Includes only one of the fields `perSecond`, `perMinute`
"perSecond": "string",
"perMinute": "string"
// end of the list of possible fields
},
"requestsPerIp": {
// Includes only one of the fields `perSecond`, `perMinute`
"perSecond": "string",
"perMinute": "string"
// end of the list of possible fields
}
}
},
"redirect": {
"replaceScheme": "string",
"replaceHost": "string",
"replacePort": "string",
// Includes only one of the fields `replacePath`, `replacePrefix`
"replacePath": "string",
"replacePrefix": "string",
// end of the list of possible fields
"removeQuery": "boolean",
"responseCode": "string"
},
"directResponse": {
"status": "string",
"body": {
// Includes only one of the fields `text`
"text": "string"
// end of the list of possible fields
}
}
// end of the list of possible fields
},
"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
}
},
// Includes only one of the fields `route`, `statusResponse`
"route": {
"backendGroupId": "string",
"maxTimeout": "string",
"idleTimeout": "string",
// Includes only one of the fields `hostRewrite`, `autoHostRewrite`
"hostRewrite": "string",
"autoHostRewrite": "boolean",
// end of the list of possible fields
"rateLimit": {
"allRequests": {
// Includes only one of the fields `perSecond`, `perMinute`
"perSecond": "string",
"perMinute": "string"
// end of the list of possible fields
},
"requestsPerIp": {
// Includes only one of the fields `perSecond`, `perMinute`
"perSecond": "string",
"perMinute": "string"
// end of the list of possible fields
}
}
},
"statusResponse": {
"status": "string"
}
// end of the list of possible fields
},
// end of the list of possible fields
"routeOptions": {
"modifyRequestHeaders": [
{
"name": "string",
// Includes only one of the fields `append`, `replace`, `remove`, `rename`
"append": "string",
"replace": "string",
"remove": "boolean",
"rename": "string"
// end of the list of possible fields
}
],
"modifyResponseHeaders": [
{
"name": "string",
// Includes only one of the fields `append`, `replace`, `remove`, `rename`
"append": "string",
"replace": "string",
"remove": "boolean",
"rename": "string"
// end of the list of possible fields
}
],
"rbac": {
"action": "string",
"principals": [
{
"andPrincipals": [
{
// Includes only one of the fields `header`, `remoteIp`, `any`
"header": {
"name": "string",
"value": {
// Includes only one of the fields `exactMatch`, `prefixMatch`, `regexMatch`
"exactMatch": "string",
"prefixMatch": "string",
"regexMatch": "string"
// end of the list of possible fields
}
},
"remoteIp": "string",
"any": "boolean"
// end of the list of possible fields
}
]
}
]
},
"securityProfileId": "string"
}
}
],
"modifyRequestHeaders": [
{
"name": "string",
// Includes only one of the fields `append`, `replace`, `remove`, `rename`
"append": "string",
"replace": "string",
"remove": "boolean",
"rename": "string"
// end of the list of possible fields
}
],
"modifyResponseHeaders": [
{
"name": "string",
// Includes only one of the fields `append`, `replace`, `remove`, `rename`
"append": "string",
"replace": "string",
"remove": "boolean",
"rename": "string"
// end of the list of possible fields
}
],
"routeOptions": {
"modifyRequestHeaders": [
{
"name": "string",
// Includes only one of the fields `append`, `replace`, `remove`, `rename`
"append": "string",
"replace": "string",
"remove": "boolean",
"rename": "string"
// end of the list of possible fields
}
],
"modifyResponseHeaders": [
{
"name": "string",
// Includes only one of the fields `append`, `replace`, `remove`, `rename`
"append": "string",
"replace": "string",
"remove": "boolean",
"rename": "string"
// end of the list of possible fields
}
],
"rbac": {
"action": "string",
"principals": [
{
"andPrincipals": [
{
// Includes only one of the fields `header`, `remoteIp`, `any`
"header": {
"name": "string",
"value": {
// Includes only one of the fields `exactMatch`, `prefixMatch`, `regexMatch`
"exactMatch": "string",
"prefixMatch": "string",
"regexMatch": "string"
// end of the list of possible fields
}
},
"remoteIp": "string",
"any": "boolean"
// end of the list of possible fields
}
]
}
]
},
"securityProfileId": "string"
},
"rateLimit": {
"allRequests": {
// Includes only one of the fields `perSecond`, `perMinute`
"perSecond": "string",
"perMinute": "string"
// end of the list of possible fields
},
"requestsPerIp": {
// Includes only one of the fields `perSecond`, `perMinute`
"perSecond": "string",
"perMinute": "string"
// end of the list of possible fields
}
}
}
],
"nextPageToken": "string"
}
Field |
Description |
virtualHosts[] |
List of virtual hosts of the specified HTTP router. |
nextPageToken |
string Token for getting the next page of the list. If the number of results is greater than Each subsequent page will have its own |
VirtualHost
A virtual host resource.
For details about the concept, see documentation.
Field |
Description |
name |
string Required field. Name of the virtual host. The name is unique within the HTTP router. |
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 A wildcard asterisk character ( If not specified, all domains are attributed to the host, which is the same as specifying a |
routes[] |
Routes of the virtual host. A route contains a set of conditions (predicates) that are used by the load balancer to select the route The order of routes matters: the first route whose predicate matches the request is selected. |
modifyRequestHeaders[] |
Deprecated, use route_options.modify_request_headers. |
modifyResponseHeaders[] |
Deprecated, use route_options.modify_response_headers. |
routeOptions |
|
rateLimit |
RateLimit is a rate limit configuration applied for a whole virtual host. |
Route
A route resource.
For details about the concept, see documentation.
Field |
Description |
name |
string Required field. Name of the route. |
http |
HTTP route configuration. Includes only one of the fields Route configuration. |
grpc |
gRPC route configuration. Includes only one of the fields Route configuration. |
routeOptions |
HttpRoute
An HTTP route configuration resource.
Field |
Description |
match |
Condition (predicate) used to select the route. |
route |
Forwards the request to a backend group for processing as configured. Includes only one of the fields Action performed on the request if the route is selected. |
redirect |
Redirects the request as configured. Includes only one of the fields Action performed on the request if the route is selected. |
directResponse |
Instructs the load balancer to respond directly as configured. Includes only one of the fields Action performed on the request if the route is selected. |
HttpRouteMatch
An HTTP route condition (predicate) resource.
Field |
Description |
httpMethod[] |
string HTTP method specified in the request. |
path |
Match settings for the path specified in the request. If not specified, the route matches all paths. |
StringMatch
A string matcher resource.
Field |
Description |
exactMatch |
string Exact match string. Includes only one of the fields Match string for either exact or prefix match. |
prefixMatch |
string Prefix match string. Includes only one of the fields Match string for either exact or prefix match. |
regexMatch |
string Regular expression match string. Includes only one of the fields Match string for either exact or prefix match. |
HttpRouteAction
An HTTP route action resource.
Field |
Description |
backendGroupId |
string Required field. Backend group to forward requests to. Stream (TCP) backend groups are not supported. |
timeout |
string (duration) Overall timeout for an HTTP connection between a load balancer node an a backend from the backend group: If a connection times out, the load balancer responds to the client with a Default value: |
idleTimeout |
string (duration) Idle timeout for an HTTP connection between a load balancer node an a backend from the backend group: 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 |
hostRewrite |
string Host replacement. Includes only one of the fields Value rewrite settings for HTTP/1.1 If not specified, the host is not changed. |
autoHostRewrite |
boolean Automatically replaces the host with that of the target. Includes only one of the fields Value rewrite settings for HTTP/1.1 If not specified, the host is not changed. |
prefixRewrite |
string Replacement for the path prefix matched by StringMatch. For instance, if StringMatch.prefixMatch value is If not specified, the path is not changed. |
upgradeTypes[] |
string Supported values for HTTP |
rateLimit |
RateLimit is a rate limit configuration applied for route. |
RateLimit
RateLimit is a set of settings for global rate limiting.
Field |
Description |
allRequests |
AllRequests is a rate limit configuration applied to all incoming requests. |
requestsPerIp |
RequestsPerIp is a rate limit configuration applied separately for each set of requests |
Limit
Limit is a rate limit value settings.
Field |
Description |
perSecond |
string (int64) PerSecond is a limit value specified with per second time unit. Includes only one of the fields |
perMinute |
string (int64) PerMinute is a limit value specified with per minute time unit. Includes only one of the fields |
RedirectAction
A redirect action resource.
Field |
Description |
replaceScheme |
string URI scheme replacement. If If not specified, the original scheme and port are used. |
replaceHost |
string URI host replacement. If not specified, the original host is used. |
replacePort |
string (int64) URI host replacement. If not specified, the original host is used. |
replacePath |
string Replacement for the whole path. Includes only one of the fields URI path replacement. If not specified, the original path is used. |
replacePrefix |
string Replacement for the path prefix matched by StringMatch. For instance, if StringMatch.prefixMatch value is Includes only one of the fields URI path replacement. If not specified, the original path is used. |
removeQuery |
boolean Removes URI query. |
responseCode |
enum (RedirectResponseCode) HTTP status code to use in redirect responses.
|
DirectResponseAction
A direct response action resource.
Field |
Description |
status |
string (int64) HTTP status code to use in responses. |
body |
Response body. |
Payload
A health check payload resource.
Field |
Description |
text |
string Payload text. Includes only one of the fields Payload. |
GrpcRoute
A gRPC route configuration resource.
Field |
Description |
match |
Condition (predicate) used to select the route. |
route |
Forwards the request to a backend group for processing as configured. Includes only one of the fields Action performed on the request if the route is selected. |
statusResponse |
Instructs the load balancer to respond directly with a specified status. Includes only one of the fields Action performed on the request if the route is selected. |
GrpcRouteMatch
A gRPC route condition (predicate) resource.
Field |
Description |
fqmn |
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. |
GrpcRouteAction
A gRPC route action resource.
Field |
Description |
backendGroupId |
string Required field. Backend group to forward requests to. |
maxTimeout |
string (duration) Overall timeout for an underlying HTTP connection between a load balancer node an a backend from the backend group: 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: |
idleTimeout |
string (duration) Idle timeout for an underlying HTTP connection between a load balancer node an a backend from the backend group: 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 |
hostRewrite |
string Host replacement. Includes only one of the fields Value rewrite settings for HTTP/1.1 If not specified, the host is not changed. |
autoHostRewrite |
boolean Automatically replaces the host with that of the target. Includes only one of the fields Value rewrite settings for HTTP/1.1 If not specified, the host is not changed. |
rateLimit |
RateLimit is a rate limit configuration applied for route. |
GrpcStatusResponseAction
A gRPC status response action resource.
Field |
Description |
status |
enum (Status) gRPC status code
|
RouteOptions
Field |
Description |
modifyRequestHeaders[] |
Apply the following modifications to the request headers. |
modifyResponseHeaders[] |
Apply the following modifications to the response headers. |
rbac |
|
securityProfileId |
string Security profile that will take effect to all requests routed via particular virtual host. |
HeaderModification
A header modification resource.
Field |
Description |
name |
string Name of the header. |
append |
string Appends the specified string to the header value. Variables defined for Envoy proxy Includes only one of the fields Operation to perform on the header. |
replace |
string Replaces the value of the header with the specified string. Variables defined for Envoy proxy Includes only one of the fields Operation to perform on the header. |
remove |
boolean Removes the header. Includes only one of the fields Operation to perform on the header. |
rename |
string Replaces the name of the header with the specified string. Includes only one of the fields Operation to perform on the header. |
RBAC
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.
Field |
Description |
action |
enum (Action) Required field. The action to take if a principal matches. Every action either allows or denies a request.
|
principals[] |
Required. A match occurs when at least one matches the request. |
Principals
Principals define a group of identities for a request.
Field |
Description |
andPrincipals[] |
Required. A match occurs when all principals match the request. |
Principal
Principal defines an identity for a request.
Field |
Description |
header |
A header (or pseudo-header such as :path or :method) of the incoming HTTP request. Includes only one of the fields |
remoteIp |
string A CIDR block or IP that describes the request remote/origin address, e.g. Includes only one of the fields |
any |
boolean When any is set, it matches any request. Includes only one of the fields |
HeaderMatcher
Field |
Description |
name |
string Required field. Specifies the name of the header in the request. |
value |
Specifies how the header match will be performed to route the request. |