Application Load Balancer API, gRPC: HttpRouterService
- Calls HttpRouterService
- Get
- List
- Create
- CreateHttpRouterRequest
- VirtualHost
- Route
- HttpRoute
- HttpRouteMatch
- StringMatch
- HttpRouteAction
- RedirectAction
- DirectResponseAction
- Payload
- GrpcRoute
- GrpcRouteMatch
- GrpcRouteAction
- GrpcStatusResponseAction
- HeaderModification
- RouteOptions
- RBAC
- Principals
- Principal
- HeaderMatcher
- Operation
- CreateHttpRouterMetadata
- HttpRouter
- Update
- UpdateHttpRouterRequest
- VirtualHost
- Route
- HttpRoute
- HttpRouteMatch
- StringMatch
- HttpRouteAction
- RedirectAction
- DirectResponseAction
- Payload
- GrpcRoute
- GrpcRouteMatch
- GrpcRouteAction
- GrpcStatusResponseAction
- HeaderModification
- RouteOptions
- RBAC
- Principals
- Principal
- HeaderMatcher
- Operation
- UpdateHttpRouterMetadata
- HttpRouter
- Delete
- ListOperations
A set of methods for managing HTTP routers.
Call | Description |
---|---|
Get | Returns the specified HTTP router. |
List | Lists HTTP routers in the specified folder. |
Create | Creates an HTTP router in the specified folder. |
Update | Updates the specified HTTP router. |
Delete | Deletes the specified HTTP router. |
ListOperations | Lists operations for the specified HTTP router. |
Calls HttpRouterService
Get
Returns the specified HTTP router.
To get the list of all available HTTP routers, make a List request.
rpc Get (GetHttpRouterRequest) returns (HttpRouter)
GetHttpRouterRequest
Field | Description |
---|---|
http_router_id | string Required. ID of the HTTP router to return. To get the HTTP router ID, make a HttpRouterService.List request. |
HttpRouter
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. |
folder_id | string ID of the folder that the router belongs to. |
labels | map<string,string> Router labels as key:value pairs. For details about the concept, see documentation. |
virtual_hosts[] | VirtualHost 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. |
created_at | google.protobuf.Timestamp Creation timestamp. |
route_options | RouteOptions |
VirtualHost
Field | Description |
---|---|
name | string Required. 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 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. |
routes[] | Route 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 HttpRoute.match, to match paths prefixed with just / , other routes are never matched. |
modify_request_headers[] | HeaderModification Deprecated, use route_options.modify_request_headers. |
modify_response_headers[] | HeaderModification Deprecated, use route_options.modify_response_headers. |
route_options | RouteOptions |
Route
Field | Description |
---|---|
name | string Required. Name of the route. |
route | oneof: http or grpc Route configuration. |
http | HttpRoute HTTP route configuration. |
grpc | GrpcRoute gRPC route configuration. |
route_options | RouteOptions |
HttpRoute
Field | Description |
---|---|
match | HttpRouteMatch Condition (predicate) used to select the route. |
action | oneof: route , redirect or direct_response Action performed on the request if the route is selected. |
route | HttpRouteAction Forwards the request to a backend group for processing as configured. |
redirect | RedirectAction Redirects the request as configured. |
direct_response | DirectResponseAction Instructs the load balancer to respond directly as configured. |
HttpRouteMatch
Field | Description |
---|---|
http_method[] | string HTTP method specified in the request. |
path | StringMatch Match settings for the path specified in the request. If not specified, the route matches all paths. |
StringMatch
Field | Description |
---|---|
match | oneof: exact_match , prefix_match or regex_match Match string for either exact or prefix match. |
exact_match | string Exact match string. |
prefix_match | string Prefix match string. |
regex_match | string Regular expression match string. |
HttpRouteAction
Field | Description |
---|---|
backend_group_id | string Required. Backend group to forward requests to. Stream (TCP) backend groups are not supported. |
timeout | google.protobuf.Duration 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 . |
idle_timeout | google.protobuf.Duration 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 ). |
host_rewrite_specifier | oneof: host_rewrite or auto_host_rewrite Value rewrite settings for HTTP/1.1 Host headers and HTTP/2 :authority pseudo-headers. If not specified, the host is not changed. |
host_rewrite | string Host replacement. |
auto_host_rewrite | bool Automatically replaces the host with that of the target. |
prefix_rewrite | string Replacement for the path prefix matched by StringMatch. For instance, if StringMatch.prefix_match value is /foo and prefix_rewrite value is /bar , a request with /foobaz path is forwarded with /barbaz path. For StringMatch.exact_match, the whole path is replaced. If not specified, the path is not changed. |
upgrade_types[] | string Supported values for HTTP Upgrade header. E.g. websocket . |
RedirectAction
Field | Description |
---|---|
replace_scheme | 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. |
replace_host | string URI host replacement. If not specified, the original host is used. |
replace_port | int64 URI host replacement. If not specified, the original host is used. |
path | oneof: replace_path or replace_prefix URI path replacement. If not specified, the original path is used. |
replace_path | string Replacement for the whole path. |
replace_prefix | string Replacement for the path prefix matched by StringMatch. For instance, if StringMatch.prefix_match 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 StringMatch.exact_match, the whole path is replaced. |
remove_query | bool Removes URI query. |
response_code | enum RedirectResponseCode HTTP status code to use in redirect responses.
|
DirectResponseAction
Field | Description |
---|---|
status | int64 HTTP status code to use in responses. Acceptable values are 100 to 599, inclusive. |
body | Payload Response body. |
Payload
Field | Description |
---|---|
payload | oneof: text Payload. |
text | string Payload text. The string length in characters must be greater than 0. |
GrpcRoute
Field | Description |
---|---|
match | GrpcRouteMatch Condition (predicate) used to select the route. |
action | oneof: route or status_response Action performed on the request if the route is selected. |
route | GrpcRouteAction Forwards the request to a backend group for processing as configured. |
status_response | GrpcStatusResponseAction Instructs the load balancer to respond directly with a specified status. |
GrpcRouteMatch
Field | Description |
---|---|
fqmn | StringMatch 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. |
GrpcRouteAction
Field | Description |
---|---|
backend_group_id | string Required. Backend group to forward requests to. |
max_timeout | google.protobuf.Duration 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 . |
idle_timeout | google.protobuf.Duration 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 max_timeout 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 max_timeout ). |
host_rewrite_specifier | oneof: host_rewrite or auto_host_rewrite Value rewrite settings for HTTP/1.1 Host headers and HTTP/2 :authority pseudo-headers. If not specified, the host is not changed. |
host_rewrite | string Host replacement. |
auto_host_rewrite | bool Automatically replaces the host with that of the target. |
GrpcStatusResponseAction
Field | Description |
---|---|
status | enum Status gRPC status code
|
HeaderModification
Field | Description |
---|---|
name | string Name of the header. |
operation | oneof: append , replace , remove or rename Operation to perform on the header. |
append | string Appends the specified string to the header value. Variables defined for Envoy proxy |
replace | string Replaces the value of the header with the specified string. Variables defined for Envoy proxy |
remove | bool Removes the header. |
rename | string Replaces the name of the header with the specified string. This operation is only supported for ALB Virtual Hosts. |
RouteOptions
Field | Description |
---|---|
modify_request_headers[] | HeaderModification Apply the following modifications to the request headers. |
modify_response_headers[] | HeaderModification Apply the following modifications to the response headers. |
rbac | RBAC |
security_profile_id | string Security profile that will take effect to all requests routed via particular virtual host. |
RBAC
Field | Description |
---|---|
action | enum Action Required. The action to take if a principal matches. Every action either allows or denies a request.
|
principals[] | Principals Required. A match occurs when at least one matches the request. The minimum number of elements is 1. |
Principals
Field | Description |
---|---|
and_principals[] | Principal Required. A match occurs when all principals match the request. The minimum number of elements is 1. |
Principal
Field | Description |
---|---|
identifier | oneof: header , remote_ip or any |
header | HeaderMatcher A header (or pseudo-header such as: path or: method) of the incoming HTTP request. |
remote_ip | string A CIDR block or IP that describes the request remote/origin address, e.g. 192.0.0.0/24 or192.0.0.4 . |
any | bool When any is set, it matches any request. |
HeaderMatcher
Field | Description |
---|---|
name | string Required. Specifies the name of the header in the request. |
value | StringMatch 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. |
List
Lists HTTP routers in the specified folder.
rpc List (ListHttpRoutersRequest) returns (ListHttpRoutersResponse)
ListHttpRoutersRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder to list HTTP routers in. To get the folder ID, make a resourcemanager.v1.FolderService.List request. |
page_size | int64 The maximum number of results per page to return. If the number of available results is larger than page_size , the service returns a ListHttpRoutersResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. Acceptable values are 0 to 1000, inclusive. |
page_token | string Page token. To get the next page of results, set page_token to the ListHttpRoutersResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
filter | string A filter expression that filters HTTP routers listed in the response. The expression must specify:
name=my-http-router . The maximum string length in characters is 1000. |
ListHttpRoutersResponse
Field | Description |
---|---|
http_routers[] | HttpRouter List of HTTP routers in the specified folder. |
next_page_token | string Token for getting the next page of the list. If the number of results is greater than the specified ListHttpRoutersRequest.page_size, use next_page_token as the value for the ListHttpRoutersRequest.page_token parameter in the next list request. Each subsequent page will have its own next_page_token to continue paging through the results. |
HttpRouter
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. |
folder_id | string ID of the folder that the router belongs to. |
labels | map<string,string> Router labels as key:value pairs. For details about the concept, see documentation. |
virtual_hosts[] | VirtualHost 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. |
created_at | google.protobuf.Timestamp Creation timestamp. |
route_options | RouteOptions |
VirtualHost
Field | Description |
---|---|
name | string Required. 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 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. |
routes[] | Route 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 HttpRoute.match, to match paths prefixed with just / , other routes are never matched. |
modify_request_headers[] | HeaderModification Deprecated, use route_options.modify_request_headers. |
modify_response_headers[] | HeaderModification Deprecated, use route_options.modify_response_headers. |
route_options | RouteOptions |
Route
Field | Description |
---|---|
name | string Required. Name of the route. |
route | oneof: http or grpc Route configuration. |
http | HttpRoute HTTP route configuration. |
grpc | GrpcRoute gRPC route configuration. |
route_options | RouteOptions |
HttpRoute
Field | Description |
---|---|
match | HttpRouteMatch Condition (predicate) used to select the route. |
action | oneof: route , redirect or direct_response Action performed on the request if the route is selected. |
route | HttpRouteAction Forwards the request to a backend group for processing as configured. |
redirect | RedirectAction Redirects the request as configured. |
direct_response | DirectResponseAction Instructs the load balancer to respond directly as configured. |
HttpRouteMatch
Field | Description |
---|---|
http_method[] | string HTTP method specified in the request. |
path | StringMatch Match settings for the path specified in the request. If not specified, the route matches all paths. |
StringMatch
Field | Description |
---|---|
match | oneof: exact_match , prefix_match or regex_match Match string for either exact or prefix match. |
exact_match | string Exact match string. |
prefix_match | string Prefix match string. |
regex_match | string Regular expression match string. |
HttpRouteAction
Field | Description |
---|---|
backend_group_id | string Required. Backend group to forward requests to. Stream (TCP) backend groups are not supported. |
timeout | google.protobuf.Duration 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 . |
idle_timeout | google.protobuf.Duration 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 ). |
host_rewrite_specifier | oneof: host_rewrite or auto_host_rewrite Value rewrite settings for HTTP/1.1 Host headers and HTTP/2 :authority pseudo-headers. If not specified, the host is not changed. |
host_rewrite | string Host replacement. |
auto_host_rewrite | bool Automatically replaces the host with that of the target. |
prefix_rewrite | string Replacement for the path prefix matched by StringMatch. For instance, if StringMatch.prefix_match value is /foo and prefix_rewrite value is /bar , a request with /foobaz path is forwarded with /barbaz path. For StringMatch.exact_match, the whole path is replaced. If not specified, the path is not changed. |
upgrade_types[] | string Supported values for HTTP Upgrade header. E.g. websocket . |
RedirectAction
Field | Description |
---|---|
replace_scheme | 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. |
replace_host | string URI host replacement. If not specified, the original host is used. |
replace_port | int64 URI host replacement. If not specified, the original host is used. |
path | oneof: replace_path or replace_prefix URI path replacement. If not specified, the original path is used. |
replace_path | string Replacement for the whole path. |
replace_prefix | string Replacement for the path prefix matched by StringMatch. For instance, if StringMatch.prefix_match 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 StringMatch.exact_match, the whole path is replaced. |
remove_query | bool Removes URI query. |
response_code | enum RedirectResponseCode HTTP status code to use in redirect responses.
|
DirectResponseAction
Field | Description |
---|---|
status | int64 HTTP status code to use in responses. Acceptable values are 100 to 599, inclusive. |
body | Payload Response body. |
Payload
Field | Description |
---|---|
payload | oneof: text Payload. |
text | string Payload text. The string length in characters must be greater than 0. |
GrpcRoute
Field | Description |
---|---|
match | GrpcRouteMatch Condition (predicate) used to select the route. |
action | oneof: route or status_response Action performed on the request if the route is selected. |
route | GrpcRouteAction Forwards the request to a backend group for processing as configured. |
status_response | GrpcStatusResponseAction Instructs the load balancer to respond directly with a specified status. |
GrpcRouteMatch
Field | Description |
---|---|
fqmn | StringMatch 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. |
GrpcRouteAction
Field | Description |
---|---|
backend_group_id | string Required. Backend group to forward requests to. |
max_timeout | google.protobuf.Duration 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 . |
idle_timeout | google.protobuf.Duration 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 max_timeout 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 max_timeout ). |
host_rewrite_specifier | oneof: host_rewrite or auto_host_rewrite Value rewrite settings for HTTP/1.1 Host headers and HTTP/2 :authority pseudo-headers. If not specified, the host is not changed. |
host_rewrite | string Host replacement. |
auto_host_rewrite | bool Automatically replaces the host with that of the target. |
GrpcStatusResponseAction
Field | Description |
---|---|
status | enum Status gRPC status code
|
HeaderModification
Field | Description |
---|---|
name | string Name of the header. |
operation | oneof: append , replace , remove or rename Operation to perform on the header. |
append | string Appends the specified string to the header value. Variables defined for Envoy proxy |
replace | string Replaces the value of the header with the specified string. Variables defined for Envoy proxy |
remove | bool Removes the header. |
rename | string Replaces the name of the header with the specified string. This operation is only supported for ALB Virtual Hosts. |
RouteOptions
Field | Description |
---|---|
modify_request_headers[] | HeaderModification Apply the following modifications to the request headers. |
modify_response_headers[] | HeaderModification Apply the following modifications to the response headers. |
rbac | RBAC |
security_profile_id | string Security profile that will take effect to all requests routed via particular virtual host. |
RBAC
Field | Description |
---|---|
action | enum Action Required. The action to take if a principal matches. Every action either allows or denies a request.
|
principals[] | Principals Required. A match occurs when at least one matches the request. The minimum number of elements is 1. |
Principals
Field | Description |
---|---|
and_principals[] | Principal Required. A match occurs when all principals match the request. The minimum number of elements is 1. |
Principal
Field | Description |
---|---|
identifier | oneof: header , remote_ip or any |
header | HeaderMatcher A header (or pseudo-header such as: path or: method) of the incoming HTTP request. |
remote_ip | string A CIDR block or IP that describes the request remote/origin address, e.g. 192.0.0.0/24 or192.0.0.4 . |
any | bool When any is set, it matches any request. |
HeaderMatcher
Field | Description |
---|---|
name | string Required. Specifies the name of the header in the request. |
value | StringMatch 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. |
Create
Creates an HTTP router in the specified folder.
rpc Create (CreateHttpRouterRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CreateHttpRouterMetadata
Operation.response:HttpRouter
CreateHttpRouterRequest
Field | Description |
---|---|
folder_id | string Required. ID of the folder to create an HTTP router in. To get the folder ID, make a resourcemanager.v1.FolderService.List request. |
name | string Name of 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 Description of the HTTP router. The maximum string length in characters is 256. |
labels | map<string,string> HTTP router labels as key:value pairs. For details about the concept, see documentation. No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
virtual_hosts[] | VirtualHost 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. |
route_options | RouteOptions Route options for the HTTP router. |
VirtualHost
Field | Description |
---|---|
name | string Required. 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 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. |
routes[] | Route 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 HttpRoute.match, to match paths prefixed with just / , other routes are never matched. |
modify_request_headers[] | HeaderModification Deprecated, use route_options.modify_request_headers. |
modify_response_headers[] | HeaderModification Deprecated, use route_options.modify_response_headers. |
route_options | RouteOptions |
Route
Field | Description |
---|---|
name | string Required. Name of the route. |
route | oneof: http or grpc Route configuration. |
http | HttpRoute HTTP route configuration. |
grpc | GrpcRoute gRPC route configuration. |
route_options | RouteOptions |
HttpRoute
Field | Description |
---|---|
match | HttpRouteMatch Condition (predicate) used to select the route. |
action | oneof: route , redirect or direct_response Action performed on the request if the route is selected. |
route | HttpRouteAction Forwards the request to a backend group for processing as configured. |
redirect | RedirectAction Redirects the request as configured. |
direct_response | DirectResponseAction Instructs the load balancer to respond directly as configured. |
HttpRouteMatch
Field | Description |
---|---|
http_method[] | string HTTP method specified in the request. |
path | StringMatch Match settings for the path specified in the request. If not specified, the route matches all paths. |
StringMatch
Field | Description |
---|---|
match | oneof: exact_match , prefix_match or regex_match Match string for either exact or prefix match. |
exact_match | string Exact match string. |
prefix_match | string Prefix match string. |
regex_match | string Regular expression match string. |
HttpRouteAction
Field | Description |
---|---|
backend_group_id | string Required. Backend group to forward requests to. Stream (TCP) backend groups are not supported. |
timeout | google.protobuf.Duration 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 . |
idle_timeout | google.protobuf.Duration 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 ). |
host_rewrite_specifier | oneof: host_rewrite or auto_host_rewrite Value rewrite settings for HTTP/1.1 Host headers and HTTP/2 :authority pseudo-headers. If not specified, the host is not changed. |
host_rewrite | string Host replacement. |
auto_host_rewrite | bool Automatically replaces the host with that of the target. |
prefix_rewrite | string Replacement for the path prefix matched by StringMatch. For instance, if StringMatch.prefix_match value is /foo and prefix_rewrite value is /bar , a request with /foobaz path is forwarded with /barbaz path. For StringMatch.exact_match, the whole path is replaced. If not specified, the path is not changed. |
upgrade_types[] | string Supported values for HTTP Upgrade header. E.g. websocket . |
RedirectAction
Field | Description |
---|---|
replace_scheme | 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. |
replace_host | string URI host replacement. If not specified, the original host is used. |
replace_port | int64 URI host replacement. If not specified, the original host is used. |
path | oneof: replace_path or replace_prefix URI path replacement. If not specified, the original path is used. |
replace_path | string Replacement for the whole path. |
replace_prefix | string Replacement for the path prefix matched by StringMatch. For instance, if StringMatch.prefix_match 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 StringMatch.exact_match, the whole path is replaced. |
remove_query | bool Removes URI query. |
response_code | enum RedirectResponseCode HTTP status code to use in redirect responses.
|
DirectResponseAction
Field | Description |
---|---|
status | int64 HTTP status code to use in responses. Acceptable values are 100 to 599, inclusive. |
body | Payload Response body. |
Payload
Field | Description |
---|---|
payload | oneof: text Payload. |
text | string Payload text. The string length in characters must be greater than 0. |
GrpcRoute
Field | Description |
---|---|
match | GrpcRouteMatch Condition (predicate) used to select the route. |
action | oneof: route or status_response Action performed on the request if the route is selected. |
route | GrpcRouteAction Forwards the request to a backend group for processing as configured. |
status_response | GrpcStatusResponseAction Instructs the load balancer to respond directly with a specified status. |
GrpcRouteMatch
Field | Description |
---|---|
fqmn | StringMatch 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. |
GrpcRouteAction
Field | Description |
---|---|
backend_group_id | string Required. Backend group to forward requests to. |
max_timeout | google.protobuf.Duration 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 . |
idle_timeout | google.protobuf.Duration 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 max_timeout 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 max_timeout ). |
host_rewrite_specifier | oneof: host_rewrite or auto_host_rewrite Value rewrite settings for HTTP/1.1 Host headers and HTTP/2 :authority pseudo-headers. If not specified, the host is not changed. |
host_rewrite | string Host replacement. |
auto_host_rewrite | bool Automatically replaces the host with that of the target. |
GrpcStatusResponseAction
Field | Description |
---|---|
status | enum Status gRPC status code
|
HeaderModification
Field | Description |
---|---|
name | string Name of the header. |
operation | oneof: append , replace , remove or rename Operation to perform on the header. |
append | string Appends the specified string to the header value. Variables defined for Envoy proxy |
replace | string Replaces the value of the header with the specified string. Variables defined for Envoy proxy |
remove | bool Removes the header. |
rename | string Replaces the name of the header with the specified string. This operation is only supported for ALB Virtual Hosts. |
RouteOptions
Field | Description |
---|---|
modify_request_headers[] | HeaderModification Apply the following modifications to the request headers. |
modify_response_headers[] | HeaderModification Apply the following modifications to the response headers. |
rbac | RBAC |
security_profile_id | string Security profile that will take effect to all requests routed via particular virtual host. |
RBAC
Field | Description |
---|---|
action | enum Action Required. The action to take if a principal matches. Every action either allows or denies a request.
|
principals[] | Principals Required. A match occurs when at least one matches the request. The minimum number of elements is 1. |
Principals
Field | Description |
---|---|
and_principals[] | Principal Required. A match occurs when all principals match the request. The minimum number of elements is 1. |
Principal
Field | Description |
---|---|
identifier | oneof: header , remote_ip or any |
header | HeaderMatcher A header (or pseudo-header such as: path or: method) of the incoming HTTP request. |
remote_ip | string A CIDR block or IP that describes the request remote/origin address, e.g. 192.0.0.0/24 or192.0.0.4 . |
any | bool When any is set, it matches any request. |
HeaderMatcher
Field | Description |
---|---|
name | string Required. Specifies the name of the header in the request. |
value | StringMatch 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. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool 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 | google.protobuf.Any 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. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
CreateHttpRouterMetadata
Field | Description |
---|---|
http_router_id | string ID of the HTTP router that is being created. |
HttpRouter
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. |
folder_id | string ID of the folder that the router belongs to. |
labels | map<string,string> Router labels as key:value pairs. For details about the concept, see documentation. |
virtual_hosts[] | VirtualHost 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. |
created_at | google.protobuf.Timestamp Creation timestamp. |
route_options | RouteOptions |
Update
Updates the specified HTTP router.
rpc Update (UpdateHttpRouterRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:UpdateHttpRouterMetadata
Operation.response:HttpRouter
UpdateHttpRouterRequest
Field | Description |
---|---|
http_router_id | string Required. ID of the HTTP router to update. To get the HTTP router ID, make a HttpRouterService.List request. |
update_mask | google.protobuf.FieldMask Field mask that specifies which attributes of the HTTP router should be updated. |
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 | map<string,string> 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:
[-_./\\@0-9a-z]* . The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\\@0-9a-z]* . |
virtual_hosts[] | VirtualHost 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 VirtualHostService.Create request or a VirtualHostService.Delete request. |
route_options | RouteOptions New route options for the HTTP router. |
VirtualHost
Field | Description |
---|---|
name | string Required. 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 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. |
routes[] | Route 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 HttpRoute.match, to match paths prefixed with just / , other routes are never matched. |
modify_request_headers[] | HeaderModification Deprecated, use route_options.modify_request_headers. |
modify_response_headers[] | HeaderModification Deprecated, use route_options.modify_response_headers. |
route_options | RouteOptions |
Route
Field | Description |
---|---|
name | string Required. Name of the route. |
route | oneof: http or grpc Route configuration. |
http | HttpRoute HTTP route configuration. |
grpc | GrpcRoute gRPC route configuration. |
route_options | RouteOptions |
HttpRoute
Field | Description |
---|---|
match | HttpRouteMatch Condition (predicate) used to select the route. |
action | oneof: route , redirect or direct_response Action performed on the request if the route is selected. |
route | HttpRouteAction Forwards the request to a backend group for processing as configured. |
redirect | RedirectAction Redirects the request as configured. |
direct_response | DirectResponseAction Instructs the load balancer to respond directly as configured. |
HttpRouteMatch
Field | Description |
---|---|
http_method[] | string HTTP method specified in the request. |
path | StringMatch Match settings for the path specified in the request. If not specified, the route matches all paths. |
StringMatch
Field | Description |
---|---|
match | oneof: exact_match , prefix_match or regex_match Match string for either exact or prefix match. |
exact_match | string Exact match string. |
prefix_match | string Prefix match string. |
regex_match | string Regular expression match string. |
HttpRouteAction
Field | Description |
---|---|
backend_group_id | string Required. Backend group to forward requests to. Stream (TCP) backend groups are not supported. |
timeout | google.protobuf.Duration 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 . |
idle_timeout | google.protobuf.Duration 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 ). |
host_rewrite_specifier | oneof: host_rewrite or auto_host_rewrite Value rewrite settings for HTTP/1.1 Host headers and HTTP/2 :authority pseudo-headers. If not specified, the host is not changed. |
host_rewrite | string Host replacement. |
auto_host_rewrite | bool Automatically replaces the host with that of the target. |
prefix_rewrite | string Replacement for the path prefix matched by StringMatch. For instance, if StringMatch.prefix_match value is /foo and prefix_rewrite value is /bar , a request with /foobaz path is forwarded with /barbaz path. For StringMatch.exact_match, the whole path is replaced. If not specified, the path is not changed. |
upgrade_types[] | string Supported values for HTTP Upgrade header. E.g. websocket . |
RedirectAction
Field | Description |
---|---|
replace_scheme | 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. |
replace_host | string URI host replacement. If not specified, the original host is used. |
replace_port | int64 URI host replacement. If not specified, the original host is used. |
path | oneof: replace_path or replace_prefix URI path replacement. If not specified, the original path is used. |
replace_path | string Replacement for the whole path. |
replace_prefix | string Replacement for the path prefix matched by StringMatch. For instance, if StringMatch.prefix_match 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 StringMatch.exact_match, the whole path is replaced. |
remove_query | bool Removes URI query. |
response_code | enum RedirectResponseCode HTTP status code to use in redirect responses.
|
DirectResponseAction
Field | Description |
---|---|
status | int64 HTTP status code to use in responses. Acceptable values are 100 to 599, inclusive. |
body | Payload Response body. |
Payload
Field | Description |
---|---|
payload | oneof: text Payload. |
text | string Payload text. The string length in characters must be greater than 0. |
GrpcRoute
Field | Description |
---|---|
match | GrpcRouteMatch Condition (predicate) used to select the route. |
action | oneof: route or status_response Action performed on the request if the route is selected. |
route | GrpcRouteAction Forwards the request to a backend group for processing as configured. |
status_response | GrpcStatusResponseAction Instructs the load balancer to respond directly with a specified status. |
GrpcRouteMatch
Field | Description |
---|---|
fqmn | StringMatch 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. |
GrpcRouteAction
Field | Description |
---|---|
backend_group_id | string Required. Backend group to forward requests to. |
max_timeout | google.protobuf.Duration 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 . |
idle_timeout | google.protobuf.Duration 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 max_timeout 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 max_timeout ). |
host_rewrite_specifier | oneof: host_rewrite or auto_host_rewrite Value rewrite settings for HTTP/1.1 Host headers and HTTP/2 :authority pseudo-headers. If not specified, the host is not changed. |
host_rewrite | string Host replacement. |
auto_host_rewrite | bool Automatically replaces the host with that of the target. |
GrpcStatusResponseAction
Field | Description |
---|---|
status | enum Status gRPC status code
|
HeaderModification
Field | Description |
---|---|
name | string Name of the header. |
operation | oneof: append , replace , remove or rename Operation to perform on the header. |
append | string Appends the specified string to the header value. Variables defined for Envoy proxy |
replace | string Replaces the value of the header with the specified string. Variables defined for Envoy proxy |
remove | bool Removes the header. |
rename | string Replaces the name of the header with the specified string. This operation is only supported for ALB Virtual Hosts. |
RouteOptions
Field | Description |
---|---|
modify_request_headers[] | HeaderModification Apply the following modifications to the request headers. |
modify_response_headers[] | HeaderModification Apply the following modifications to the response headers. |
rbac | RBAC |
security_profile_id | string Security profile that will take effect to all requests routed via particular virtual host. |
RBAC
Field | Description |
---|---|
action | enum Action Required. The action to take if a principal matches. Every action either allows or denies a request.
|
principals[] | Principals Required. A match occurs when at least one matches the request. The minimum number of elements is 1. |
Principals
Field | Description |
---|---|
and_principals[] | Principal Required. A match occurs when all principals match the request. The minimum number of elements is 1. |
Principal
Field | Description |
---|---|
identifier | oneof: header , remote_ip or any |
header | HeaderMatcher A header (or pseudo-header such as: path or: method) of the incoming HTTP request. |
remote_ip | string A CIDR block or IP that describes the request remote/origin address, e.g. 192.0.0.0/24 or192.0.0.4 . |
any | bool When any is set, it matches any request. |
HeaderMatcher
Field | Description |
---|---|
name | string Required. Specifies the name of the header in the request. |
value | StringMatch 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. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool 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 | google.protobuf.Any 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. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
UpdateHttpRouterMetadata
Field | Description |
---|---|
http_router_id | string ID of the HTTP router that is being updated. |
HttpRouter
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. |
folder_id | string ID of the folder that the router belongs to. |
labels | map<string,string> Router labels as key:value pairs. For details about the concept, see documentation. |
virtual_hosts[] | VirtualHost 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. |
created_at | google.protobuf.Timestamp Creation timestamp. |
route_options | RouteOptions |
Delete
Deletes the specified HTTP router.
rpc Delete (DeleteHttpRouterRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DeleteHttpRouterMetadata
Operation.response:google.protobuf.Empty
DeleteHttpRouterRequest
Field | Description |
---|---|
http_router_id | string Required. ID of the HTTP router to delete. To get the HTTP router ID, make a HttpRouterService.List request. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool 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 | google.protobuf.Any 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. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
DeleteHttpRouterMetadata
Field | Description |
---|---|
http_router_id | string ID of the HTTP router that is being deleted. |
ListOperations
Lists operations for the specified HTTP router.
rpc ListOperations (ListHttpRouterOperationsRequest) returns (ListHttpRouterOperationsResponse)
ListHttpRouterOperationsRequest
Field | Description |
---|---|
http_router_id | string Required. ID of the HTTP router to get operations for. To get the HTTP router ID, use a HttpRouterService.List request. The maximum string length in characters is 50. |
page_size | int64 The maximum number of results per page that should be returned. If the number of available results is larger than page_size , the service returns a ListHttpRouterOperationsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. The maximum value is 1000. |
page_token | string Page token. To get the next page of results, set page_token to the ListHttpRouterOperationsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
ListHttpRouterOperationsResponse
Field | Description |
---|---|
operations[] | operation.Operation List of operations for the specified HTTP router. |
next_page_token | string Token for getting the next page of the list. If the number of results is greater than the specified ListHttpRouterOperationsRequest.page_size, use next_page_token as the value for the ListHttpRouterOperationsRequest.page_token parameter in the next list request. Each subsequent page will have its own next_page_token to continue paging through the results. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool 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 | google.protobuf.Any 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. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any 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 |