Application Load Balancer API, gRPC: LoadBalancerService.Create
- gRPC request
- CreateLoadBalancerRequest
- AllocationPolicy
- Location
- ListenerSpec
- EndpointSpec
- AddressSpec
- ExternalIpv4AddressSpec
- InternalIpv4AddressSpec
- ExternalIpv6AddressSpec
- StreamListener
- StreamHandler
- HttpListener
- HttpHandler
- Http2Options
- Redirects
- TlsListener
- TlsHandler
- ClientCertificatesVerification
- SniMatch
- AutoScalePolicy
- LogOptions
- LogDiscardRule
- operation.Operation
Creates an application load balancer in the specified folder.
gRPC request
rpc Create (CreateLoadBalancerRequest) returns (operation.Operation)
CreateLoadBalancerRequest
{
"folder_id": "string",
"name": "string",
"description": "string",
"labels": "map<string, string>",
"region_id": "string",
"network_id": "string",
"allocation_policy": {
"locations": [
{
"zone_id": "string",
"subnet_id": "string",
"disable_traffic": "bool",
"zonal_shift_active": "bool",
"zonal_traffic_disabled": "bool"
}
]
},
"listener_specs": [
{
"name": "string",
"endpoint_specs": [
{
"address_specs": [
{
// Includes only one of the fields `external_ipv4_address_spec`, `internal_ipv4_address_spec`, `external_ipv6_address_spec`
"external_ipv4_address_spec": {
"address": "string"
},
"internal_ipv4_address_spec": {
"address": "string",
"subnet_id": "string"
},
"external_ipv6_address_spec": {
"address": "string"
}
// end of the list of possible fields
}
],
"ports": [
"int64"
]
}
],
// Includes only one of the fields `stream`, `http`, `tls`
"stream": {
"handler": {
"backend_group_id": "string",
"idle_timeout": "google.protobuf.Duration"
}
},
"http": {
"handler": {
"http_router_id": "string",
"rewrite_request_id": "bool",
// Includes only one of the fields `http2_options`, `allow_http10`
"http2_options": {
"max_concurrent_streams": "int64"
},
"allow_http10": "bool",
// end of the list of possible fields
"preserve_http1_header_casing": "bool"
},
"redirects": {
"http_to_https": "bool"
}
},
"tls": {
"default_handler": {
// Includes only one of the fields `stream_handler`, `http_handler`
"stream_handler": {
"backend_group_id": "string",
"idle_timeout": "google.protobuf.Duration"
},
"http_handler": {
"http_router_id": "string",
"rewrite_request_id": "bool",
// Includes only one of the fields `http2_options`, `allow_http10`
"http2_options": {
"max_concurrent_streams": "int64"
},
"allow_http10": "bool",
// end of the list of possible fields
"preserve_http1_header_casing": "bool"
},
// end of the list of possible fields
"certificate_ids": [
"string"
],
"client_certificates_verification": {
"require_client_certificate": "bool",
// Includes only one of the fields `bytes`
"bytes": "string"
// end of the list of possible fields
}
},
"sni_handlers": [
{
"name": "string",
"server_names": [
"string"
],
"handler": {
// Includes only one of the fields `stream_handler`, `http_handler`
"stream_handler": {
"backend_group_id": "string",
"idle_timeout": "google.protobuf.Duration"
},
"http_handler": {
"http_router_id": "string",
"rewrite_request_id": "bool",
// Includes only one of the fields `http2_options`, `allow_http10`
"http2_options": {
"max_concurrent_streams": "int64"
},
"allow_http10": "bool",
// end of the list of possible fields
"preserve_http1_header_casing": "bool"
},
// end of the list of possible fields
"certificate_ids": [
"string"
],
"client_certificates_verification": {
"require_client_certificate": "bool",
// Includes only one of the fields `bytes`
"bytes": "string"
// end of the list of possible fields
}
}
}
]
}
// end of the list of possible fields
}
],
"security_group_ids": [
"string"
],
"auto_scale_policy": {
"min_zone_size": "int64",
"max_size": "int64"
},
"log_options": {
"log_group_id": "string",
"discard_rules": [
{
"http_codes": [
"int64"
],
"http_code_intervals": [
"HttpCodeInterval"
],
"grpc_codes": [
"google.rpc.Code"
],
"discard_percent": "google.protobuf.Int64Value"
}
],
"disable": "bool"
},
"allow_zonal_shift": "bool"
}
|
Field |
Description |
|
folder_id |
string Required field. ID of the folder to create an application load balancer in. |
|
name |
string Name of the application load balancer. Value must match the regular expression |
|
description |
string Description of the application load balancer. The maximum string length in characters is 256. |
|
labels |
object (map<string, string>) Application load balancer labels as The maximum string length in characters for each value is 63. The string length in characters for each key must be 1-63. Each key must match the regular expression |
|
region_id |
string ID of the region that the application load balancer is located at. |
|
network_id |
string ID of the network that the application load balancer belongs to. |
|
allocation_policy |
Locality settings of the application load balancer. |
|
listener_specs[] |
Listeners that belong to the application load balancer. |
|
security_group_ids[] |
string ID's of the security groups attributed to the application load balancer. |
|
auto_scale_policy |
Scaling settings of the application load balancer. |
|
log_options |
Cloud logging settings of the application load balancer. |
|
allow_zonal_shift |
bool Specifies whether application load balancer is available to zonal shift. |
AllocationPolicy
A locality settings (allocation policy) resource.
|
Field |
Description |
|
locations[] |
Availability zones and subnets that the application load balancer resides. The minimum number of elements is 1. |
Location
An application load balancer location resource.
For details about the concept, see documentation.
|
Field |
Description |
|
zone_id |
string Required field. ID of the availability zone where the application load balancer resides. |
|
subnet_id |
string ID of the subnet that the application load balancer belongs to. |
|
disable_traffic |
bool Disables the load balancer node in the specified availability zone. |
|
zonal_shift_active |
bool Show zonal shift status for the location. |
|
zonal_traffic_disabled |
bool Computed field: will be set to true if all traffic in zone is disabled |
ListenerSpec
|
Field |
Description |
|
name |
string Required field. Name of the listener. The name is unique within the application load balancer. Value must match the regular expression |
|
endpoint_specs[] |
Endpoints of the listener. |
|
stream |
Unencrypted stream (TCP) listener settings. Includes only one of the fields Listener type and settings. |
|
http |
Unencrypted HTTP listener settings. Includes only one of the fields Listener type and settings. |
|
tls |
TLS-encrypted HTTP or TCP stream listener settings. Includes only one of the fields Listener type and settings. |
EndpointSpec
|
Field |
Description |
|
address_specs[] |
Endpoint public (external) and internal addresses. The number of elements must be greater than 0. |
|
ports[] |
int64 Endpoint ports. The number of elements must be greater than 0. Acceptable values are 1 to 65535, inclusive. |
AddressSpec
|
Field |
Description |
|
external_ipv4_address_spec |
Public IPv4 endpoint address. Includes only one of the fields Endpoint address of one of the types: public (external) IPv4 address, internal IPv4 address, public IPv6 address. |
|
internal_ipv4_address_spec |
Internal IPv4 endpoint address. Includes only one of the fields Endpoint address of one of the types: public (external) IPv4 address, internal IPv4 address, public IPv6 address. |
|
external_ipv6_address_spec |
Public IPv6 endpoint address. Includes only one of the fields Endpoint address of one of the types: public (external) IPv4 address, internal IPv4 address, public IPv6 address. |
ExternalIpv4AddressSpec
|
Field |
Description |
|
address |
string IPv4 address. |
InternalIpv4AddressSpec
|
Field |
Description |
|
address |
string IPv4 address. |
|
subnet_id |
string Required field. ID of the subnet that the address belongs to. |
ExternalIpv6AddressSpec
|
Field |
Description |
|
address |
string IPv6 address. |
StreamListener
A stream (TCP) listener resource.
|
Field |
Description |
|
handler |
Required field. Settings for handling stream (TCP) requests. |
StreamHandler
A stream (TCP) handler resource.
|
Field |
Description |
|
backend_group_id |
string Required field. ID of the backend group processing requests. For details about the concept, see |
|
idle_timeout |
The idle timeout is duration during which no data is transmitted or received on either the upstream or downstream connection. |
HttpListener
An HTTP listener resource.
|
Field |
Description |
|
handler |
Settings for handling HTTP requests. |
|
redirects |
Redirects settings. |
HttpHandler
An HTTP handler resource.
|
Field |
Description |
|
http_router_id |
string ID of the HTTP router processing requests. For details about the concept, see |
|
rewrite_request_id |
bool When unset, will preserve the incoming x-request-id header, otherwise would rewrite it with a new value. |
|
http2_options |
HTTP/2 settings. Includes only one of the fields Protocol settings. |
|
allow_http10 |
bool Enables support for incoming HTTP/1.0 and HTTP/1.1 requests and disables it for HTTP/2 requests. Includes only one of the fields Protocol settings. |
|
preserve_http1_header_casing |
bool When enabled, preserves the original casing of HTTP/1.1 header names (e.g. "CONTENT-Type" -> "CONTENT-Type"). |
Http2Options
An HTTP/2 options resource.
|
Field |
Description |
|
max_concurrent_streams |
int64 Maximum number of concurrent HTTP/2 streams in a connection. |
Redirects
A listener redirects resource.
|
Field |
Description |
|
http_to_https |
bool Redirects all unencrypted HTTP requests to the same URI with scheme changed to |
TlsListener
TLS-encrypted (HTTP or TCP stream) listener resource.
|
Field |
Description |
|
default_handler |
Required field. Settings for handling requests by default, with Server Name |
|
sni_handlers[] |
Settings for handling requests with Server Name Indication (SNI) |
TlsHandler
A TLS-encrypted (HTTP or TCP stream) handler resource.
|
Field |
Description |
|
stream_handler |
Stream (TCP) handler. Includes only one of the fields Settings for handling requests. |
|
http_handler |
HTTP handler. Includes only one of the fields Settings for handling requests. |
|
certificate_ids[] |
string ID's of the TLS server certificates from Certificate Manager. The string length in characters for each value must be greater than 1. The maximum number of elements is 1. |
|
client_certificates_verification |
ClientCertificatesVerification Client certificates verification settings. |
ClientCertificatesVerification
Client certificates verification settings.
|
Field |
Description |
|
require_client_certificate |
bool If true, ALB will reject connections without a valid client certificate. |
|
bytes |
string Trusted certificate authority certificates bundle (PEM text). Includes only one of the fields |
SniMatch
A SNI handler resource.
|
Field |
Description |
|
name |
string Required field. Name of the SNI handler. |
|
server_names[] |
string Server names that are matched by the SNI handler. The string length in characters for each value must be 1-255. Each value must match the regular expression |
|
handler |
Required field. Settings for handling requests with Server Name Indication (SNI) matching one of |
AutoScalePolicy
A resource for scaling settings of an application load balancer.
|
Field |
Description |
|
min_zone_size |
int64 Lower limit for the number of resource units in each availability zone. Acceptable values are 0 to 1000, inclusive. |
|
max_size |
int64 Upper limit for the total number of resource units across all availability zones. Acceptable values are 0 to 1000, inclusive. |
LogOptions
|
Field |
Description |
|
log_group_id |
string Cloud Logging log group ID to store access logs. Value must match the regular expression |
|
discard_rules[] |
ordered list of rules, first matching rule applies |
|
disable |
bool Do not send logs to Cloud Logging log group. |
LogDiscardRule
LogDiscardRule discards a fraction of logs with certain codes.
If neither codes or intervals are provided, rule applies to all logs.
|
Field |
Description |
|
http_codes[] |
int64 HTTP codes that should be discarded. Acceptable values are 100 to 599, inclusive. |
|
http_code_intervals[] |
enum HttpCodeInterval Groups of HTTP codes like 4xx that should be discarded.
|
|
grpc_codes[] |
GRPC codes that should be discarded |
|
discard_percent |
Percent of logs to be discarded: 0 - keep all, 100 or unset - discard all Acceptable values are 0 to 100, inclusive. |
operation.Operation
{
"id": "string",
"description": "string",
"created_at": "google.protobuf.Timestamp",
"created_by": "string",
"modified_at": "google.protobuf.Timestamp",
"done": "bool",
"metadata": "google.protobuf.Any",
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": "google.protobuf.Any"
// 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. |
|
created_at |
Creation timestamp. |
|
created_by |
string ID of the user or service account who initiated the operation. |
|
modified_at |
The time when the Operation resource was last modified. |
|
done |
bool If the value is |
|
metadata |
Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
|
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |