Method update
Updates the specified virtual host of the specified HTTP router.
HTTP request
PATCH https://alb.api.cloud.yandex.net/apploadbalancer/v1/httpRouters/{httpRouterId}/virtualHosts/{virtualHostName}
Path parameters
Parameter | Description |
---|---|
httpRouterId | Required. ID of the HTTP router to update a virtual host in. To get the HTTP router ID, make a list request. |
virtualHostName | Required. Name of the virtual host. Used only to refer to the virtual host. The name of a host cannot be changed. To get the virtual host name, make a list request. |
Body parameters
{
"updateMask": "string",
"authority": [
"string"
],
"routes": [
{
"name": "string",
"routeOptions": {
"modifyRequestHeaders": [
{
"name": "string",
// `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`routes[].routeOptions.modifyRequestHeaders[]`
}
],
"modifyResponseHeaders": [
{
"name": "string",
// `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`routes[].routeOptions.modifyResponseHeaders[]`
}
]
},
// `routes[]` includes only one of the fields `http`, `grpc`
"http": {
"match": {
"httpMethod": [
"string"
],
"path": {
// `routes[].http.match.path` includes only one of the fields `exactMatch`, `prefixMatch`
"exactMatch": "string",
"prefixMatch": "string",
// end of the list of possible fields`routes[].http.match.path`
}
},
// `routes[].http` includes only one of the fields `route`, `redirect`, `directResponse`
"route": {
"backendGroupId": "string",
"timeout": "string",
"idleTimeout": "string",
"prefixRewrite": "string",
"upgradeTypes": [
"string"
],
// `routes[].http.route` includes only one of the fields `hostRewrite`, `autoHostRewrite`
"hostRewrite": "string",
"autoHostRewrite": true,
// end of the list of possible fields`routes[].http.route`
},
"redirect": {
"replaceScheme": "string",
"replaceHost": "string",
"replacePort": "string",
"removeQuery": true,
"responseCode": "string",
// `routes[].http.redirect` includes only one of the fields `replacePath`, `replacePrefix`
"replacePath": "string",
"replacePrefix": "string",
// end of the list of possible fields`routes[].http.redirect`
},
"directResponse": {
"status": "string",
"body": {
"text": "string"
}
},
// end of the list of possible fields`routes[].http`
},
"grpc": {
"match": {
"fqmn": {
// `routes[].grpc.match.fqmn` includes only one of the fields `exactMatch`, `prefixMatch`
"exactMatch": "string",
"prefixMatch": "string",
// end of the list of possible fields`routes[].grpc.match.fqmn`
}
},
// `routes[].grpc` includes only one of the fields `route`, `statusResponse`
"route": {
"backendGroupId": "string",
"maxTimeout": "string",
"idleTimeout": "string",
// `routes[].grpc.route` includes only one of the fields `hostRewrite`, `autoHostRewrite`
"hostRewrite": "string",
"autoHostRewrite": true,
// end of the list of possible fields`routes[].grpc.route`
},
"statusResponse": {
"status": "string"
},
// end of the list of possible fields`routes[].grpc`
},
// end of the list of possible fields`routes[]`
}
],
"modifyRequestHeaders": [
{
"name": "string",
// `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`modifyRequestHeaders[]`
}
],
"modifyResponseHeaders": [
{
"name": "string",
// `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`modifyResponseHeaders[]`
}
]
}
Field | Description |
---|---|
updateMask | string Field mask that specifies which attributes of the virtual host should be updated. A comma-separated names off ALL fields to be updated. Оnly the specified fields will be changed. The others will be left untouched. If the field is specified in If |
authority[] | string New list of domains to attribute 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 ( Existing list of domains is completely replaced by the specified list. If not specified, all domains are attributed to the host, which is the same as specifying a |
routes[] | object A route resource. For details about the concept, see documentation. |
routes[]. name |
string Required. Name of the route. |
routes[]. routeOptions |
object |
routes[]. routeOptions. modifyRequestHeaders[] |
object A header modification resource. |
routes[]. routeOptions. modifyRequestHeaders[]. name |
string Name of the header. |
routes[]. routeOptions. modifyRequestHeaders[]. append |
string 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. |
routes[]. routeOptions. modifyRequestHeaders[]. replace |
string 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. |
routes[]. routeOptions. modifyRequestHeaders[]. remove |
boolean (boolean) routes[].routeOptions.modifyRequestHeaders[] includes only one of the fields append , replace , remove , rename Removes the header. |
routes[]. routeOptions. modifyRequestHeaders[]. rename |
string 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. |
routes[]. routeOptions. modifyResponseHeaders[] |
object A header modification resource. |
routes[]. routeOptions. modifyResponseHeaders[]. name |
string Name of the header. |
routes[]. routeOptions. modifyResponseHeaders[]. append |
string 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. |
routes[]. routeOptions. modifyResponseHeaders[]. replace |
string 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. |
routes[]. routeOptions. modifyResponseHeaders[]. remove |
boolean (boolean) routes[].routeOptions.modifyResponseHeaders[] includes only one of the fields append , replace , remove , rename Removes the header. |
routes[]. routeOptions. modifyResponseHeaders[]. rename |
string 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. |
routes[]. http |
object HTTP route configuration. routes[] includes only one of the fields http , grpc An HTTP route configuration resource. |
routes[]. http. match |
object Condition (predicate) used to select the route. An HTTP route condition (predicate) resource. |
routes[]. http. match. httpMethod[] |
string HTTP method specified in the request. |
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. |
routes[]. http. match. path. exactMatch |
string routes[].http.match.path includes only one of the fields exactMatch , prefixMatch Exact match string. |
routes[]. http. match. path. prefixMatch |
string routes[].http.match.path includes only one of the fields exactMatch , prefixMatch Prefix match string. |
routes[]. http. route |
object Forwards the request to a backend group for processing as configured. routes[].http includes only one of the fields route , redirect , directResponse An HTTP route action resource. |
routes[]. http. route. backendGroupId |
string Required. Backend group to forward requests to. Stream (TCP) backend groups are not supported. |
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: |
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 |
routes[]. http. route. prefixRewrite |
string Replacement for the path prefix matched by For instance, if If not specified, the path is not changed. |
routes[]. http. route. upgradeTypes[] |
string Supported values for HTTP |
routes[]. http. route. hostRewrite |
string routes[].http.route includes only one of the fields hostRewrite , autoHostRewrite Host replacement. |
routes[]. http. route. autoHostRewrite |
boolean (boolean) routes[].http.route includes only one of the fields hostRewrite , autoHostRewrite Automatically replaces the host with that of the target. |
routes[]. http. redirect |
object Redirects the request as configured. routes[].http includes only one of the fields route , redirect , directResponse A redirect action resource. |
routes[]. http. redirect. replaceScheme |
string URI scheme replacement. If If not specified, the original scheme and port are used. |
routes[]. http. redirect. replaceHost |
string URI host replacement. If not specified, the original host is used. |
routes[]. http. redirect. replacePort |
string (int64) URI host replacement. If not specified, the original host is used. |
routes[]. http. redirect. removeQuery |
boolean (boolean) Removes URI query. |
routes[]. http. redirect. responseCode |
string HTTP status code to use in redirect responses. HTTP status codes supported for use in redirect responses.
|
routes[]. http. redirect. replacePath |
string routes[].http.redirect includes only one of the fields replacePath , replacePrefix Replacement for the whole path. |
routes[]. http. redirect. replacePrefix |
string routes[].http.redirect includes only one of the fields replacePath , replacePrefix Replacement for the path prefix matched by For instance, if |
routes[]. http. directResponse |
object Instructs the load balancer to respond directly as configured. routes[].http includes only one of the fields route , redirect , directResponse A direct response action resource. |
routes[]. http. directResponse. status |
string (int64) HTTP status code to use in responses. Acceptable values are 100 to 599, inclusive. |
routes[]. http. directResponse. body |
object Response body. A health check payload resource. |
routes[]. http. directResponse. body. text |
string Payload text. The string length in characters must be greater than 0. |
routes[]. grpc |
object gRPC route configuration. routes[] includes only one of the fields http , grpc A gRPC route configuration resource. |
routes[]. grpc. match |
object Condition (predicate) used to select the route. A gRPC route condition (predicate) resource. |
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. |
routes[]. grpc. match. fqmn. exactMatch |
string routes[].grpc.match.fqmn includes only one of the fields exactMatch , prefixMatch Exact match string. |
routes[]. grpc. match. fqmn. prefixMatch |
string routes[].grpc.match.fqmn includes only one of the fields exactMatch , prefixMatch Prefix match string. |
routes[]. grpc. route |
object Forwards the request to a backend group for processing as configured. routes[].grpc includes only one of the fields route , statusResponse A gRPC route action resource. |
routes[]. grpc. route. backendGroupId |
string Required. Backend group to forward requests to. |
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: |
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 |
routes[]. grpc. route. hostRewrite |
string routes[].grpc.route includes only one of the fields hostRewrite , autoHostRewrite Host replacement. |
routes[]. grpc. route. autoHostRewrite |
boolean (boolean) routes[].grpc.route includes only one of the fields hostRewrite , autoHostRewrite Automatically replaces the host with that of the target. |
routes[]. grpc. statusResponse |
object Instructs the load balancer to respond directly with a specified status. routes[].grpc includes only one of the fields route , statusResponse A gRPC status response action resource. |
routes[]. grpc. statusResponse. status |
string gRPC status code to use in responses. gRPC status code supported for use in responses.
|
modifyRequestHeaders[] | object A header modification resource. |
modifyRequestHeaders[]. name |
string Name of the header. |
modifyRequestHeaders[]. append |
string 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. |
modifyRequestHeaders[]. replace |
string 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. |
modifyRequestHeaders[]. remove |
boolean (boolean) modifyRequestHeaders[] includes only one of the fields append , replace , remove , rename Removes the header. |
modifyRequestHeaders[]. rename |
string 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. |
modifyResponseHeaders[] | object A header modification resource. |
modifyResponseHeaders[]. name |
string Name of the header. |
modifyResponseHeaders[]. append |
string 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. |
modifyResponseHeaders[]. replace |
string 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. |
modifyResponseHeaders[]. remove |
boolean (boolean) modifyResponseHeaders[] includes only one of the fields append , replace , remove , rename Removes the header. |
modifyResponseHeaders[]. rename |
string 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. |
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. |
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. |
done | boolean (boolean) If the value is |
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 The error result of the operation in case of failure or cancellation. |
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. |