Yandex Cloud
  • Сервисы
  • Решения
  • Почему Yandex Cloud
  • Сообщество
  • Тарифы
  • Документация
  • Связаться с нами
Подключиться
Language / Region
© 2022 ООО «Яндекс.Облако»
Yandex Network Load Balancer
  • Начало работы
  • Пошаговые инструкции
    • Все инструкции
    • Сетевые балансировщики
      • Создать балансировщик
      • Создать внутренний балансировщик
      • Запустить балансировщик
      • Остановить балансировщик
      • Удалить балансировщик
      • Проверить состояние целевых ресурсов
      • Добавить обработчик
      • Удалить обработчик
    • Целевые группы
      • Создать целевую группу
      • Подключить целевую группу к балансировщику
      • Отключить целевую группу от балансировщика
      • Удалить целевую группу
  • Концепции
    • Сетевой балансировщик нагрузки
    • Внутренний сетевой балансировщик
    • Обработчик
    • Целевые ресурсы и группы
    • Проверка состояния ресурсов
    • Квоты и лимиты
  • Рекомендации по использованию сервиса
  • Управление доступом
  • Правила тарификации
  • Справочник API
    • Аутентификация в API
    • gRPC (англ.)
      • Overview
      • NetworkLoadBalancerService
      • TargetGroupService
      • OperationService
    • REST (англ.)
      • Overview
      • NetworkLoadBalancer
        • Overview
        • addListener
        • attachTargetGroup
        • create
        • delete
        • detachTargetGroup
        • get
        • getTargetStates
        • list
        • listOperations
        • removeListener
        • start
        • stop
        • update
      • TargetGroup
        • Overview
        • addTargets
        • create
        • delete
        • get
        • list
        • listOperations
        • removeTargets
        • update
      • Operation
        • Overview
        • get
  • Вопросы и ответы
  1. Справочник API
  2. gRPC (англ.)
  3. NetworkLoadBalancerService

NetworkLoadBalancerService

Статья создана
Yandex Cloud
  • Calls NetworkLoadBalancerService
  • Get
    • GetNetworkLoadBalancerRequest
    • NetworkLoadBalancer
    • Listener
    • AttachedTargetGroup
    • HealthCheck
    • TcpOptions
    • HttpOptions
  • List
    • ListNetworkLoadBalancersRequest
    • ListNetworkLoadBalancersResponse
    • NetworkLoadBalancer
    • Listener
    • AttachedTargetGroup
    • HealthCheck
    • TcpOptions
    • HttpOptions
  • Create
    • CreateNetworkLoadBalancerRequest
    • ListenerSpec
    • ExternalAddressSpec
    • InternalAddressSpec
    • AttachedTargetGroup
    • HealthCheck
    • TcpOptions
    • HttpOptions
    • Operation
    • CreateNetworkLoadBalancerMetadata
    • NetworkLoadBalancer
    • Listener
    • AttachedTargetGroup
    • HealthCheck
    • TcpOptions
    • HttpOptions
  • Update
    • UpdateNetworkLoadBalancerRequest
    • ListenerSpec
    • ExternalAddressSpec
    • InternalAddressSpec
    • AttachedTargetGroup
    • HealthCheck
    • TcpOptions
    • HttpOptions
    • Operation
    • UpdateNetworkLoadBalancerMetadata
    • NetworkLoadBalancer
    • Listener
    • AttachedTargetGroup
    • HealthCheck
    • TcpOptions
    • HttpOptions
  • Delete
    • DeleteNetworkLoadBalancerRequest
    • Operation
    • DeleteNetworkLoadBalancerMetadata
  • Start
    • StartNetworkLoadBalancerRequest
    • Operation
    • StartNetworkLoadBalancerMetadata
  • Stop
    • StopNetworkLoadBalancerRequest
    • Operation
    • StopNetworkLoadBalancerMetadata
  • AttachTargetGroup
    • AttachNetworkLoadBalancerTargetGroupRequest
    • AttachedTargetGroup
    • HealthCheck
    • TcpOptions
    • HttpOptions
    • Operation
    • AttachNetworkLoadBalancerTargetGroupMetadata
    • NetworkLoadBalancer
    • Listener
    • AttachedTargetGroup
    • HealthCheck
    • TcpOptions
    • HttpOptions
  • DetachTargetGroup
    • DetachNetworkLoadBalancerTargetGroupRequest
    • Operation
    • DetachNetworkLoadBalancerTargetGroupMetadata
    • NetworkLoadBalancer
    • Listener
    • AttachedTargetGroup
    • HealthCheck
    • TcpOptions
    • HttpOptions
  • GetTargetStates
    • GetTargetStatesRequest
    • GetTargetStatesResponse
    • TargetState
  • AddListener
    • AddNetworkLoadBalancerListenerRequest
    • ListenerSpec
    • ExternalAddressSpec
    • InternalAddressSpec
    • Operation
    • AddNetworkLoadBalancerListenerMetadata
    • NetworkLoadBalancer
    • Listener
    • AttachedTargetGroup
    • HealthCheck
    • TcpOptions
    • HttpOptions
  • RemoveListener
    • RemoveNetworkLoadBalancerListenerRequest
    • Operation
    • RemoveNetworkLoadBalancerListenerMetadata
    • NetworkLoadBalancer
    • Listener
    • AttachedTargetGroup
    • HealthCheck
    • TcpOptions
    • HttpOptions
  • ListOperations
    • ListNetworkLoadBalancerOperationsRequest
    • ListNetworkLoadBalancerOperationsResponse
    • Operation

A set of methods for managing NetworkLoadBalancer resources.

Call Description
Get Returns the specified NetworkLoadBalancer resource.
List Retrieves the list of NetworkLoadBalancer resources in the specified folder.
Create Creates a network load balancer in the specified folder using the data specified in the request.
Update Updates the specified network load balancer.
Delete Deletes the specified network load balancer.
Start Starts load balancing and health checking with the specified network load balancer with specified settings.
Stop Stops load balancing and health checking with the specified network load balancer.
AttachTargetGroup Attaches a target group to the specified network load balancer.
DetachTargetGroup Detaches the target group from the specified network load balancer.
GetTargetStates Gets states of target resources in the attached target group.
AddListener Adds a listener to the specified network load balancer.
RemoveListener Removes the listener from the specified network load balancer.
ListOperations Lists operations for the specified network load balancer.

Calls NetworkLoadBalancerService

Get

Returns the specified NetworkLoadBalancer resource.
Get the list of available NetworkLoadBalancer resources by making a List request.

rpc Get (GetNetworkLoadBalancerRequest) returns (NetworkLoadBalancer)

GetNetworkLoadBalancerRequest

Field Description
network_load_balancer_id string
ID of the NetworkLoadBalancer resource to return. To get the network load balancer ID, use a NetworkLoadBalancerService.List request. The maximum string length in characters is 50.

NetworkLoadBalancer

Field Description
id string
ID of the network load balancer.
folder_id string
ID of the folder that the network load balancer belongs to.
created_at google.protobuf.Timestamp
Creation timestamp in RFC3339 text format.
name string
Name of the network load balancer. The name is unique within the folder. 3-63 characters long.
description string
Optional description of the network load balancer. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
region_id string
ID of the region that the network load balancer belongs to.
status enum Status
Status of the network load balancer.
  • CREATING: Network load balancer is being created.
  • STARTING: Network load balancer is being started.
  • ACTIVE: Network load balancer is active and sends traffic to the targets.
  • STOPPING: Network load balancer is being stopped.
  • STOPPED: Network load balancer is stopped and doesn't send traffic to the targets.
  • DELETING: Network load balancer is being deleted.
  • INACTIVE: The load balancer doesn't have any listeners or target groups, or attached target groups are empty. The load balancer doesn't perform any health checks or send traffic in this state.
type enum Type
Type of the network load balancer. Only external network load balancers are available now.
  • EXTERNAL: External network load balancer.
  • INTERNAL: Internal network load balancer.
session_affinity enum SessionAffinity
Type of the session affinity. Only 5-tuple affinity is available now.
  • CLIENT_IP_PORT_PROTO: 5-tuple affinity.
listeners[] Listener
List of listeners for the network load balancer.
attached_target_groups[] AttachedTargetGroup
List of target groups attached to the network load balancer.

Listener

Field Description
name string
Name of the listener. The name must be unique for each listener on a single load balancer. 3-63 characters long.
address string
IP address for the listener.
port int64
Port.
protocol enum Protocol
Network protocol for incoming traffic.
target_port int64
Port of a target.
subnet_id string
ID of the subnet.
ip_version enum IpVersion
IP version of the external address.
  • IPV4: IPv4
  • IPV6: IPv6

AttachedTargetGroup

Field Description
target_group_id string
Required. ID of the target group. The maximum string length in characters is 50.
health_checks[] HealthCheck
A health check to perform on the target group. For now we accept only one health check per AttachedTargetGroup. The number of elemets must be exactly 1.

HealthCheck

Field Description
name string
Required. Name of the health check. The name must be unique for each target group that attached to a single load balancer. 3-63 characters long. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
interval google.protobuf.Duration
The interval between health checks. The default is 2 seconds.
timeout google.protobuf.Duration
Timeout for a target to return a response for the health check. The default is 1 second.
unhealthy_threshold int64
Number of failed health checks before changing the status to UNHEALTHY. The default is 2. Acceptable values are 2 to 10, inclusive.
healthy_threshold int64
Number of successful health checks required in order to set the HEALTHY status for the target. The default is 2. Acceptable values are 2 to 10, inclusive.
options oneof: tcp_options or http_options
Protocol to use for the health check. Either TCP or HTTP.
  tcp_options TcpOptions
Options for TCP health check.
  http_options HttpOptions
Options for HTTP health check.

TcpOptions

Field Description
port int64
Port to use for TCP health checks. Acceptable values are 1 to 65535, inclusive.

HttpOptions

Field Description
port int64
Port to use for HTTP health checks. Acceptable values are 1 to 65535, inclusive.
path string
URL path to set for health checking requests for every target in the target group. For example /ping. The default path is /.

List

Retrieves the list of NetworkLoadBalancer resources in the specified folder.

rpc List (ListNetworkLoadBalancersRequest) returns (ListNetworkLoadBalancersResponse)

ListNetworkLoadBalancersRequest

Field Description
folder_id string
Required. ID of the folder that the network load balancer belongs to. To get the folder ID, use a NetworkLoadBalancerService.List request. The maximum string length in characters is 50.
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 [.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 ListNetworkLoadBalancersResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100.
filter string
A filter expression that filters resources listed in the response. The expression must specify:
  1. The field name. Currently you can only filter by the NetworkLoadBalancer.name field.
  2. An = operator.
  3. The value in double quotes ("). Must be 3-63 characters long and match the regular expression [a-z][-a-z0-9]{1,61}[a-z0-9].
The maximum string length in characters is 1000.

ListNetworkLoadBalancersResponse

Field Description
network_load_balancers[] NetworkLoadBalancer
List of NetworkLoadBalancer resources.
next_page_token string
This token allows you to get the next page of results for list requests. If the number of results is larger than ListNetworkLoadBalancersRequest.page_size, use the next_page_token as the value for the ListNetworkLoadBalancersRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.

NetworkLoadBalancer

Field Description
id string
ID of the network load balancer.
folder_id string
ID of the folder that the network load balancer belongs to.
created_at google.protobuf.Timestamp
Creation timestamp in RFC3339 text format.
name string
Name of the network load balancer. The name is unique within the folder. 3-63 characters long.
description string
Optional description of the network load balancer. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
region_id string
ID of the region that the network load balancer belongs to.
status enum Status
Status of the network load balancer.
  • CREATING: Network load balancer is being created.
  • STARTING: Network load balancer is being started.
  • ACTIVE: Network load balancer is active and sends traffic to the targets.
  • STOPPING: Network load balancer is being stopped.
  • STOPPED: Network load balancer is stopped and doesn't send traffic to the targets.
  • DELETING: Network load balancer is being deleted.
  • INACTIVE: The load balancer doesn't have any listeners or target groups, or attached target groups are empty. The load balancer doesn't perform any health checks or send traffic in this state.
type enum Type
Type of the network load balancer. Only external network load balancers are available now.
  • EXTERNAL: External network load balancer.
  • INTERNAL: Internal network load balancer.
session_affinity enum SessionAffinity
Type of the session affinity. Only 5-tuple affinity is available now.
  • CLIENT_IP_PORT_PROTO: 5-tuple affinity.
listeners[] Listener
List of listeners for the network load balancer.
attached_target_groups[] AttachedTargetGroup
List of target groups attached to the network load balancer.

Listener

Field Description
name string
Name of the listener. The name must be unique for each listener on a single load balancer. 3-63 characters long.
address string
IP address for the listener.
port int64
Port.
protocol enum Protocol
Network protocol for incoming traffic.
target_port int64
Port of a target.
subnet_id string
ID of the subnet.
ip_version enum IpVersion
IP version of the external address.
  • IPV4: IPv4
  • IPV6: IPv6

AttachedTargetGroup

Field Description
target_group_id string
Required. ID of the target group. The maximum string length in characters is 50.
health_checks[] HealthCheck
A health check to perform on the target group. For now we accept only one health check per AttachedTargetGroup. The number of elemets must be exactly 1.

HealthCheck

Field Description
name string
Required. Name of the health check. The name must be unique for each target group that attached to a single load balancer. 3-63 characters long. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
interval google.protobuf.Duration
The interval between health checks. The default is 2 seconds.
timeout google.protobuf.Duration
Timeout for a target to return a response for the health check. The default is 1 second.
unhealthy_threshold int64
Number of failed health checks before changing the status to UNHEALTHY. The default is 2. Acceptable values are 2 to 10, inclusive.
healthy_threshold int64
Number of successful health checks required in order to set the HEALTHY status for the target. The default is 2. Acceptable values are 2 to 10, inclusive.
options oneof: tcp_options or http_options
Protocol to use for the health check. Either TCP or HTTP.
  tcp_options TcpOptions
Options for TCP health check.
  http_options HttpOptions
Options for HTTP health check.

TcpOptions

Field Description
port int64
Port to use for TCP health checks. Acceptable values are 1 to 65535, inclusive.

HttpOptions

Field Description
port int64
Port to use for HTTP health checks. Acceptable values are 1 to 65535, inclusive.
path string
URL path to set for health checking requests for every target in the target group. For example /ping. The default path is /.

Create

Creates a network load balancer in the specified folder using the data specified in the request.

rpc Create (CreateNetworkLoadBalancerRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:CreateNetworkLoadBalancerMetadata

    Operation.response:NetworkLoadBalancer

CreateNetworkLoadBalancerRequest

Field Description
folder_id string
Required. ID of the folder to create a network load balancer in. To get the folder ID, use a NetworkLoadBalancerService.List request. The maximum string length in characters is 50.
name string
Name of the network load balancer. The name must be unique within the folder. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
description string
Description of the network load balancer. The maximum string length in characters is 256.
labels map<string,string>
Resource labels as key:value pairs. 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]*.
region_id string
ID of the region where the network load balancer resides. The maximum string length in characters is 50.
type NetworkLoadBalancer.Type
Required. Type of the network load balancer. Only external network load balancers are currently available.
listener_specs[] ListenerSpec
List of listeners and their specs for the network load balancer. The maximum number of elements is 1000.
attached_target_groups[] AttachedTargetGroup
List of attached target groups for the network load balancer. The maximum number of elements is 1000.

ListenerSpec

Field Description
name string
Required. Name of the listener. The name must be unique for each listener on a single load balancer. 3-63 characters long. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
port int64
Port for incoming traffic. Acceptable values are 1 to 65535, inclusive.
protocol Listener.Protocol
Required. Protocol for incoming traffic.
address oneof: external_address_spec or internal_address_spec
IP address for incoming traffic. Either the ID of the previously created address or the address specification.
  external_address_spec ExternalAddressSpec
External IP address specification.
  internal_address_spec InternalAddressSpec
Internal IP address specification.
target_port int64
Port of a target. Acceptable values are 1 to 65535, inclusive.

ExternalAddressSpec

Field Description
address string
Public IP address for a listener. If you provide a static public IP address for the NetworkLoadBalancerService.Update method, it will replace the existing listener address.
ip_version enum IpVersion
IP version.
  • IPV4: IPv4
  • IPV6: IPv6

InternalAddressSpec

Field Description
address string
Internal IP address for a listener.
subnet_id string
ID of the subnet.
ip_version enum IpVersion
IP version.
  • IPV4: IPv4
  • IPV6: IPv6

AttachedTargetGroup

Field Description
target_group_id string
Required. ID of the target group. The maximum string length in characters is 50.
health_checks[] HealthCheck
A health check to perform on the target group. For now we accept only one health check per AttachedTargetGroup. The number of elemets must be exactly 1.

HealthCheck

Field Description
name string
Required. Name of the health check. The name must be unique for each target group that attached to a single load balancer. 3-63 characters long. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
interval google.protobuf.Duration
The interval between health checks. The default is 2 seconds.
timeout google.protobuf.Duration
Timeout for a target to return a response for the health check. The default is 1 second.
unhealthy_threshold int64
Number of failed health checks before changing the status to UNHEALTHY. The default is 2. Acceptable values are 2 to 10, inclusive.
healthy_threshold int64
Number of successful health checks required in order to set the HEALTHY status for the target. The default is 2. Acceptable values are 2 to 10, inclusive.
options oneof: tcp_options or http_options
Protocol to use for the health check. Either TCP or HTTP.
  tcp_options TcpOptions
Options for TCP health check.
  http_options HttpOptions
Options for HTTP health check.

TcpOptions

Field Description
port int64
Port to use for TCP health checks. Acceptable values are 1 to 65535, inclusive.

HttpOptions

Field Description
port int64
Port to use for HTTP health checks. Acceptable values are 1 to 65535, inclusive.
path string
URL path to set for health checking requests for every target in the target group. For example /ping. The default path is /.

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<CreateNetworkLoadBalancerMetadata>
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<NetworkLoadBalancer>
if operation finished successfully.

CreateNetworkLoadBalancerMetadata

Field Description
network_load_balancer_id string
ID of the network load balancer that is being created.

NetworkLoadBalancer

Field Description
id string
ID of the network load balancer.
folder_id string
ID of the folder that the network load balancer belongs to.
created_at google.protobuf.Timestamp
Creation timestamp in RFC3339 text format.
name string
Name of the network load balancer. The name is unique within the folder. 3-63 characters long.
description string
Optional description of the network load balancer. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
region_id string
ID of the region that the network load balancer belongs to.
status enum Status
Status of the network load balancer.
  • CREATING: Network load balancer is being created.
  • STARTING: Network load balancer is being started.
  • ACTIVE: Network load balancer is active and sends traffic to the targets.
  • STOPPING: Network load balancer is being stopped.
  • STOPPED: Network load balancer is stopped and doesn't send traffic to the targets.
  • DELETING: Network load balancer is being deleted.
  • INACTIVE: The load balancer doesn't have any listeners or target groups, or attached target groups are empty. The load balancer doesn't perform any health checks or send traffic in this state.
type enum Type
Type of the network load balancer. Only external network load balancers are available now.
  • EXTERNAL: External network load balancer.
  • INTERNAL: Internal network load balancer.
session_affinity enum SessionAffinity
Type of the session affinity. Only 5-tuple affinity is available now.
  • CLIENT_IP_PORT_PROTO: 5-tuple affinity.
listeners[] Listener
List of listeners for the network load balancer.
attached_target_groups[] AttachedTargetGroup
List of target groups attached to the network load balancer.

Listener

Field Description
name string
Name of the listener. The name must be unique for each listener on a single load balancer. 3-63 characters long.
address string
IP address for the listener.
port int64
Port.
protocol enum Protocol
Network protocol for incoming traffic.
target_port int64
Port of a target.
subnet_id string
ID of the subnet.
ip_version enum IpVersion
IP version of the external address.
  • IPV4: IPv4
  • IPV6: IPv6

AttachedTargetGroup

Field Description
target_group_id string
Required. ID of the target group. The maximum string length in characters is 50.
health_checks[] HealthCheck
A health check to perform on the target group. For now we accept only one health check per AttachedTargetGroup. The number of elemets must be exactly 1.

HealthCheck

Field Description
name string
Required. Name of the health check. The name must be unique for each target group that attached to a single load balancer. 3-63 characters long. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
interval google.protobuf.Duration
The interval between health checks. The default is 2 seconds.
timeout google.protobuf.Duration
Timeout for a target to return a response for the health check. The default is 1 second.
unhealthy_threshold int64
Number of failed health checks before changing the status to UNHEALTHY. The default is 2. Acceptable values are 2 to 10, inclusive.
healthy_threshold int64
Number of successful health checks required in order to set the HEALTHY status for the target. The default is 2. Acceptable values are 2 to 10, inclusive.
options oneof: tcp_options or http_options
Protocol to use for the health check. Either TCP or HTTP.
  tcp_options TcpOptions
Options for TCP health check.
  http_options HttpOptions
Options for HTTP health check.

TcpOptions

Field Description
port int64
Port to use for TCP health checks. Acceptable values are 1 to 65535, inclusive.

HttpOptions

Field Description
port int64
Port to use for HTTP health checks. Acceptable values are 1 to 65535, inclusive.
path string
URL path to set for health checking requests for every target in the target group. For example /ping. The default path is /.

Update

Updates the specified network load balancer.

rpc Update (UpdateNetworkLoadBalancerRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:UpdateNetworkLoadBalancerMetadata

    Operation.response:NetworkLoadBalancer

UpdateNetworkLoadBalancerRequest

Field Description
network_load_balancer_id string
Required. ID of the network load balancer to update. To get the network load balancer ID, use a NetworkLoadBalancerService.List request. The maximum string length in characters is 50.
update_mask google.protobuf.FieldMask
Field mask that specifies which fields of the NetworkLoadBalancer resource are going to be updated.
name string
Name of the network load balancer. The name must be unique within the folder. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
description string
Description of the network load balancer. The maximum string length in characters is 256.
labels map<string,string>
Resource labels as key:value pairs.
The existing set of labels is completely replaced with the provided set. 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]*.
listener_specs[] ListenerSpec
A list of listeners and their specs for the network load balancer. The maximum number of elements is 1000.
attached_target_groups[] AttachedTargetGroup
A list of attached target groups for the network load balancer. The maximum number of elements is 1000.

ListenerSpec

Field Description
name string
Required. Name of the listener. The name must be unique for each listener on a single load balancer. 3-63 characters long. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
port int64
Port for incoming traffic. Acceptable values are 1 to 65535, inclusive.
protocol Listener.Protocol
Required. Protocol for incoming traffic.
address oneof: external_address_spec or internal_address_spec
IP address for incoming traffic. Either the ID of the previously created address or the address specification.
  external_address_spec ExternalAddressSpec
External IP address specification.
  internal_address_spec InternalAddressSpec
Internal IP address specification.
target_port int64
Port of a target. Acceptable values are 1 to 65535, inclusive.

ExternalAddressSpec

Field Description
address string
Public IP address for a listener. If you provide a static public IP address for the NetworkLoadBalancerService.Update method, it will replace the existing listener address.
ip_version enum IpVersion
IP version.
  • IPV4: IPv4
  • IPV6: IPv6

InternalAddressSpec

Field Description
address string
Internal IP address for a listener.
subnet_id string
ID of the subnet.
ip_version enum IpVersion
IP version.
  • IPV4: IPv4
  • IPV6: IPv6

AttachedTargetGroup

Field Description
target_group_id string
Required. ID of the target group. The maximum string length in characters is 50.
health_checks[] HealthCheck
A health check to perform on the target group. For now we accept only one health check per AttachedTargetGroup. The number of elemets must be exactly 1.

HealthCheck

Field Description
name string
Required. Name of the health check. The name must be unique for each target group that attached to a single load balancer. 3-63 characters long. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
interval google.protobuf.Duration
The interval between health checks. The default is 2 seconds.
timeout google.protobuf.Duration
Timeout for a target to return a response for the health check. The default is 1 second.
unhealthy_threshold int64
Number of failed health checks before changing the status to UNHEALTHY. The default is 2. Acceptable values are 2 to 10, inclusive.
healthy_threshold int64
Number of successful health checks required in order to set the HEALTHY status for the target. The default is 2. Acceptable values are 2 to 10, inclusive.
options oneof: tcp_options or http_options
Protocol to use for the health check. Either TCP or HTTP.
  tcp_options TcpOptions
Options for TCP health check.
  http_options HttpOptions
Options for HTTP health check.

TcpOptions

Field Description
port int64
Port to use for TCP health checks. Acceptable values are 1 to 65535, inclusive.

HttpOptions

Field Description
port int64
Port to use for HTTP health checks. Acceptable values are 1 to 65535, inclusive.
path string
URL path to set for health checking requests for every target in the target group. For example /ping. The default path is /.

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<UpdateNetworkLoadBalancerMetadata>
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<NetworkLoadBalancer>
if operation finished successfully.

UpdateNetworkLoadBalancerMetadata

Field Description
network_load_balancer_id string
ID of the NetworkLoadBalancer resource that is being updated.

NetworkLoadBalancer

Field Description
id string
ID of the network load balancer.
folder_id string
ID of the folder that the network load balancer belongs to.
created_at google.protobuf.Timestamp
Creation timestamp in RFC3339 text format.
name string
Name of the network load balancer. The name is unique within the folder. 3-63 characters long.
description string
Optional description of the network load balancer. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
region_id string
ID of the region that the network load balancer belongs to.
status enum Status
Status of the network load balancer.
  • CREATING: Network load balancer is being created.
  • STARTING: Network load balancer is being started.
  • ACTIVE: Network load balancer is active and sends traffic to the targets.
  • STOPPING: Network load balancer is being stopped.
  • STOPPED: Network load balancer is stopped and doesn't send traffic to the targets.
  • DELETING: Network load balancer is being deleted.
  • INACTIVE: The load balancer doesn't have any listeners or target groups, or attached target groups are empty. The load balancer doesn't perform any health checks or send traffic in this state.
type enum Type
Type of the network load balancer. Only external network load balancers are available now.
  • EXTERNAL: External network load balancer.
  • INTERNAL: Internal network load balancer.
session_affinity enum SessionAffinity
Type of the session affinity. Only 5-tuple affinity is available now.
  • CLIENT_IP_PORT_PROTO: 5-tuple affinity.
listeners[] Listener
List of listeners for the network load balancer.
attached_target_groups[] AttachedTargetGroup
List of target groups attached to the network load balancer.

Listener

Field Description
name string
Name of the listener. The name must be unique for each listener on a single load balancer. 3-63 characters long.
address string
IP address for the listener.
port int64
Port.
protocol enum Protocol
Network protocol for incoming traffic.
target_port int64
Port of a target.
subnet_id string
ID of the subnet.
ip_version enum IpVersion
IP version of the external address.
  • IPV4: IPv4
  • IPV6: IPv6

AttachedTargetGroup

Field Description
target_group_id string
Required. ID of the target group. The maximum string length in characters is 50.
health_checks[] HealthCheck
A health check to perform on the target group. For now we accept only one health check per AttachedTargetGroup. The number of elemets must be exactly 1.

HealthCheck

Field Description
name string
Required. Name of the health check. The name must be unique for each target group that attached to a single load balancer. 3-63 characters long. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
interval google.protobuf.Duration
The interval between health checks. The default is 2 seconds.
timeout google.protobuf.Duration
Timeout for a target to return a response for the health check. The default is 1 second.
unhealthy_threshold int64
Number of failed health checks before changing the status to UNHEALTHY. The default is 2. Acceptable values are 2 to 10, inclusive.
healthy_threshold int64
Number of successful health checks required in order to set the HEALTHY status for the target. The default is 2. Acceptable values are 2 to 10, inclusive.
options oneof: tcp_options or http_options
Protocol to use for the health check. Either TCP or HTTP.
  tcp_options TcpOptions
Options for TCP health check.
  http_options HttpOptions
Options for HTTP health check.

TcpOptions

Field Description
port int64
Port to use for TCP health checks. Acceptable values are 1 to 65535, inclusive.

HttpOptions

Field Description
port int64
Port to use for HTTP health checks. Acceptable values are 1 to 65535, inclusive.
path string
URL path to set for health checking requests for every target in the target group. For example /ping. The default path is /.

Delete

Deletes the specified network load balancer.

rpc Delete (DeleteNetworkLoadBalancerRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:DeleteNetworkLoadBalancerMetadata

    Operation.response:google.protobuf.Empty

DeleteNetworkLoadBalancerRequest

Field Description
network_load_balancer_id string
Required. ID of the network load balancer to delete. To get the network load balancer ID, use a NetworkLoadBalancerService.List request. The maximum string length in characters is 50.

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<DeleteNetworkLoadBalancerMetadata>
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<google.protobuf.Empty>
if operation finished successfully.

DeleteNetworkLoadBalancerMetadata

Field Description
network_load_balancer_id string
ID of the NetworkLoadBalancer resource that is being deleted.

Start

Starts load balancing and health checking with the specified network load balancer with specified settings. Changes network load balancer status to ACTIVE.

rpc Start (StartNetworkLoadBalancerRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:StartNetworkLoadBalancerMetadata

    Operation.response:google.protobuf.Empty

StartNetworkLoadBalancerRequest

Field Description
network_load_balancer_id string
Required. ID of the network load balancer to start. To get the network load balancer ID, use a NetworkLoadBalancerService.List request. The maximum string length in characters is 50.

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<StartNetworkLoadBalancerMetadata>
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<google.protobuf.Empty>
if operation finished successfully.

StartNetworkLoadBalancerMetadata

Field Description
network_load_balancer_id string
ID of the NetworkLoadBalancer resource that is being started.

Stop

Stops load balancing and health checking with the specified network load balancer. Changes load balancer status to STOPPED.

rpc Stop (StopNetworkLoadBalancerRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:StopNetworkLoadBalancerMetadata

    Operation.response:google.protobuf.Empty

StopNetworkLoadBalancerRequest

Field Description
network_load_balancer_id string
Required. ID of the network load balancer to stop. To get the network load balancer ID, use a NetworkLoadBalancerService.List request. The maximum string length in characters is 50.

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<StopNetworkLoadBalancerMetadata>
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<google.protobuf.Empty>
if operation finished successfully.

StopNetworkLoadBalancerMetadata

Field Description
network_load_balancer_id string
ID of the NetworkLoadBalancer resource that is being stopped.

AttachTargetGroup

Attaches a target group to the specified network load balancer.

rpc AttachTargetGroup (AttachNetworkLoadBalancerTargetGroupRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:AttachNetworkLoadBalancerTargetGroupMetadata

    Operation.response:NetworkLoadBalancer

AttachNetworkLoadBalancerTargetGroupRequest

Field Description
network_load_balancer_id string
Required. ID of the network load balancer to attach the target group to. To get the network load balancer ID, use a NetworkLoadBalancerService.List request. The maximum string length in characters is 50.
attached_target_group AttachedTargetGroup
Required. ID of the attached target group to attach to the network load balancer. To get the network load balancer ID, use a NetworkLoadBalancerService.List request.

AttachedTargetGroup

Field Description
target_group_id string
Required. ID of the target group. The maximum string length in characters is 50.
health_checks[] HealthCheck
A health check to perform on the target group. For now we accept only one health check per AttachedTargetGroup. The number of elemets must be exactly 1.

HealthCheck

Field Description
name string
Required. Name of the health check. The name must be unique for each target group that attached to a single load balancer. 3-63 characters long. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
interval google.protobuf.Duration
The interval between health checks. The default is 2 seconds.
timeout google.protobuf.Duration
Timeout for a target to return a response for the health check. The default is 1 second.
unhealthy_threshold int64
Number of failed health checks before changing the status to UNHEALTHY. The default is 2. Acceptable values are 2 to 10, inclusive.
healthy_threshold int64
Number of successful health checks required in order to set the HEALTHY status for the target. The default is 2. Acceptable values are 2 to 10, inclusive.
options oneof: tcp_options or http_options
Protocol to use for the health check. Either TCP or HTTP.
  tcp_options TcpOptions
Options for TCP health check.
  http_options HttpOptions
Options for HTTP health check.

TcpOptions

Field Description
port int64
Port to use for TCP health checks. Acceptable values are 1 to 65535, inclusive.

HttpOptions

Field Description
port int64
Port to use for HTTP health checks. Acceptable values are 1 to 65535, inclusive.
path string
URL path to set for health checking requests for every target in the target group. For example /ping. The default path is /.

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<AttachNetworkLoadBalancerTargetGroupMetadata>
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<NetworkLoadBalancer>
if operation finished successfully.

AttachNetworkLoadBalancerTargetGroupMetadata

Field Description
network_load_balancer_id string
ID of the network load balancer that the target group is being attached to.
target_group_id string
ID of the target group.

NetworkLoadBalancer

Field Description
id string
ID of the network load balancer.
folder_id string
ID of the folder that the network load balancer belongs to.
created_at google.protobuf.Timestamp
Creation timestamp in RFC3339 text format.
name string
Name of the network load balancer. The name is unique within the folder. 3-63 characters long.
description string
Optional description of the network load balancer. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
region_id string
ID of the region that the network load balancer belongs to.
status enum Status
Status of the network load balancer.
  • CREATING: Network load balancer is being created.
  • STARTING: Network load balancer is being started.
  • ACTIVE: Network load balancer is active and sends traffic to the targets.
  • STOPPING: Network load balancer is being stopped.
  • STOPPED: Network load balancer is stopped and doesn't send traffic to the targets.
  • DELETING: Network load balancer is being deleted.
  • INACTIVE: The load balancer doesn't have any listeners or target groups, or attached target groups are empty. The load balancer doesn't perform any health checks or send traffic in this state.
type enum Type
Type of the network load balancer. Only external network load balancers are available now.
  • EXTERNAL: External network load balancer.
  • INTERNAL: Internal network load balancer.
session_affinity enum SessionAffinity
Type of the session affinity. Only 5-tuple affinity is available now.
  • CLIENT_IP_PORT_PROTO: 5-tuple affinity.
listeners[] Listener
List of listeners for the network load balancer.
attached_target_groups[] AttachedTargetGroup
List of target groups attached to the network load balancer.

Listener

Field Description
name string
Name of the listener. The name must be unique for each listener on a single load balancer. 3-63 characters long.
address string
IP address for the listener.
port int64
Port.
protocol enum Protocol
Network protocol for incoming traffic.
target_port int64
Port of a target.
subnet_id string
ID of the subnet.
ip_version enum IpVersion
IP version of the external address.
  • IPV4: IPv4
  • IPV6: IPv6

AttachedTargetGroup

Field Description
target_group_id string
Required. ID of the target group. The maximum string length in characters is 50.
health_checks[] HealthCheck
A health check to perform on the target group. For now we accept only one health check per AttachedTargetGroup. The number of elemets must be exactly 1.

HealthCheck

Field Description
name string
Required. Name of the health check. The name must be unique for each target group that attached to a single load balancer. 3-63 characters long. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
interval google.protobuf.Duration
The interval between health checks. The default is 2 seconds.
timeout google.protobuf.Duration
Timeout for a target to return a response for the health check. The default is 1 second.
unhealthy_threshold int64
Number of failed health checks before changing the status to UNHEALTHY. The default is 2. Acceptable values are 2 to 10, inclusive.
healthy_threshold int64
Number of successful health checks required in order to set the HEALTHY status for the target. The default is 2. Acceptable values are 2 to 10, inclusive.
options oneof: tcp_options or http_options
Protocol to use for the health check. Either TCP or HTTP.
  tcp_options TcpOptions
Options for TCP health check.
  http_options HttpOptions
Options for HTTP health check.

TcpOptions

Field Description
port int64
Port to use for TCP health checks. Acceptable values are 1 to 65535, inclusive.

HttpOptions

Field Description
port int64
Port to use for HTTP health checks. Acceptable values are 1 to 65535, inclusive.
path string
URL path to set for health checking requests for every target in the target group. For example /ping. The default path is /.

DetachTargetGroup

Detaches the target group from the specified network load balancer.

rpc DetachTargetGroup (DetachNetworkLoadBalancerTargetGroupRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:DetachNetworkLoadBalancerTargetGroupMetadata

    Operation.response:NetworkLoadBalancer

DetachNetworkLoadBalancerTargetGroupRequest

Field Description
network_load_balancer_id string
Required. ID of the network load balancer to detach the target group from. To get the network load balancer ID, use a NetworkLoadBalancerService.List request. The maximum string length in characters is 50.
target_group_id string
Required. ID of the target group. The maximum string length in characters is 50.

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<DetachNetworkLoadBalancerTargetGroupMetadata>
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<NetworkLoadBalancer>
if operation finished successfully.

DetachNetworkLoadBalancerTargetGroupMetadata

Field Description
network_load_balancer_id string
ID of the network load balancer that the target group is being detached from.
target_group_id string
ID of the target group.

NetworkLoadBalancer

Field Description
id string
ID of the network load balancer.
folder_id string
ID of the folder that the network load balancer belongs to.
created_at google.protobuf.Timestamp
Creation timestamp in RFC3339 text format.
name string
Name of the network load balancer. The name is unique within the folder. 3-63 characters long.
description string
Optional description of the network load balancer. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
region_id string
ID of the region that the network load balancer belongs to.
status enum Status
Status of the network load balancer.
  • CREATING: Network load balancer is being created.
  • STARTING: Network load balancer is being started.
  • ACTIVE: Network load balancer is active and sends traffic to the targets.
  • STOPPING: Network load balancer is being stopped.
  • STOPPED: Network load balancer is stopped and doesn't send traffic to the targets.
  • DELETING: Network load balancer is being deleted.
  • INACTIVE: The load balancer doesn't have any listeners or target groups, or attached target groups are empty. The load balancer doesn't perform any health checks or send traffic in this state.
type enum Type
Type of the network load balancer. Only external network load balancers are available now.
  • EXTERNAL: External network load balancer.
  • INTERNAL: Internal network load balancer.
session_affinity enum SessionAffinity
Type of the session affinity. Only 5-tuple affinity is available now.
  • CLIENT_IP_PORT_PROTO: 5-tuple affinity.
listeners[] Listener
List of listeners for the network load balancer.
attached_target_groups[] AttachedTargetGroup
List of target groups attached to the network load balancer.

Listener

Field Description
name string
Name of the listener. The name must be unique for each listener on a single load balancer. 3-63 characters long.
address string
IP address for the listener.
port int64
Port.
protocol enum Protocol
Network protocol for incoming traffic.
target_port int64
Port of a target.
subnet_id string
ID of the subnet.
ip_version enum IpVersion
IP version of the external address.
  • IPV4: IPv4
  • IPV6: IPv6

AttachedTargetGroup

Field Description
target_group_id string
Required. ID of the target group. The maximum string length in characters is 50.
health_checks[] HealthCheck
A health check to perform on the target group. For now we accept only one health check per AttachedTargetGroup. The number of elemets must be exactly 1.

HealthCheck

Field Description
name string
Required. Name of the health check. The name must be unique for each target group that attached to a single load balancer. 3-63 characters long. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
interval google.protobuf.Duration
The interval between health checks. The default is 2 seconds.
timeout google.protobuf.Duration
Timeout for a target to return a response for the health check. The default is 1 second.
unhealthy_threshold int64
Number of failed health checks before changing the status to UNHEALTHY. The default is 2. Acceptable values are 2 to 10, inclusive.
healthy_threshold int64
Number of successful health checks required in order to set the HEALTHY status for the target. The default is 2. Acceptable values are 2 to 10, inclusive.
options oneof: tcp_options or http_options
Protocol to use for the health check. Either TCP or HTTP.
  tcp_options TcpOptions
Options for TCP health check.
  http_options HttpOptions
Options for HTTP health check.

TcpOptions

Field Description
port int64
Port to use for TCP health checks. Acceptable values are 1 to 65535, inclusive.

HttpOptions

Field Description
port int64
Port to use for HTTP health checks. Acceptable values are 1 to 65535, inclusive.
path string
URL path to set for health checking requests for every target in the target group. For example /ping. The default path is /.

GetTargetStates

Gets states of target resources in the attached target group.

rpc GetTargetStates (GetTargetStatesRequest) returns (GetTargetStatesResponse)

GetTargetStatesRequest

Field Description
network_load_balancer_id string
ID of the NetworkLoadBalancer resource with an attached target group. The maximum string length in characters is 50.
target_group_id string
ID of the target group to get states of resources from. The maximum string length in characters is 50.

GetTargetStatesResponse

Field Description
target_states[] TargetState
List of states of targets within the target group that is specified in the GetTargetStatesRequest message.

TargetState

Field Description
subnet_id string
ID of the subnet that the target is connected to.
address string
IP address of the target.
status enum Status
Status of the target.
  • INITIAL: The network load balancer is setting up health checks for this target.
  • HEALTHY: Health check passed and the target is ready to receive traffic.
  • UNHEALTHY: Health check failed and the target is not receiving traffic.
  • DRAINING: Target is being deleted and the network load balancer is no longer sending traffic to this target.
  • INACTIVE: The network load balancer is stopped and not performing health checks on this target.

AddListener

Adds a listener to the specified network load balancer.

rpc AddListener (AddNetworkLoadBalancerListenerRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:AddNetworkLoadBalancerListenerMetadata

    Operation.response:NetworkLoadBalancer

AddNetworkLoadBalancerListenerRequest

Field Description
network_load_balancer_id string
Required. ID of the network load balancer to add a listener to. To get the network load balancer ID, use a NetworkLoadBalancerService.List request. The maximum string length in characters is 50.
listener_spec ListenerSpec
Required. Listener spec.

ListenerSpec

Field Description
name string
Required. Name of the listener. The name must be unique for each listener on a single load balancer. 3-63 characters long. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
port int64
Port for incoming traffic. Acceptable values are 1 to 65535, inclusive.
protocol Listener.Protocol
Required. Protocol for incoming traffic.
address oneof: external_address_spec or internal_address_spec
IP address for incoming traffic. Either the ID of the previously created address or the address specification.
  external_address_spec ExternalAddressSpec
External IP address specification.
  internal_address_spec InternalAddressSpec
Internal IP address specification.
target_port int64
Port of a target. Acceptable values are 1 to 65535, inclusive.

ExternalAddressSpec

Field Description
address string
Public IP address for a listener. If you provide a static public IP address for the NetworkLoadBalancerService.Update method, it will replace the existing listener address.
ip_version enum IpVersion
IP version.
  • IPV4: IPv4
  • IPV6: IPv6

InternalAddressSpec

Field Description
address string
Internal IP address for a listener.
subnet_id string
ID of the subnet.
ip_version enum IpVersion
IP version.
  • IPV4: IPv4
  • IPV6: IPv6

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<AddNetworkLoadBalancerListenerMetadata>
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<NetworkLoadBalancer>
if operation finished successfully.

AddNetworkLoadBalancerListenerMetadata

Field Description
network_load_balancer_id string
ID of the network load balancer that the listener is being added to.

NetworkLoadBalancer

Field Description
id string
ID of the network load balancer.
folder_id string
ID of the folder that the network load balancer belongs to.
created_at google.protobuf.Timestamp
Creation timestamp in RFC3339 text format.
name string
Name of the network load balancer. The name is unique within the folder. 3-63 characters long.
description string
Optional description of the network load balancer. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
region_id string
ID of the region that the network load balancer belongs to.
status enum Status
Status of the network load balancer.
  • CREATING: Network load balancer is being created.
  • STARTING: Network load balancer is being started.
  • ACTIVE: Network load balancer is active and sends traffic to the targets.
  • STOPPING: Network load balancer is being stopped.
  • STOPPED: Network load balancer is stopped and doesn't send traffic to the targets.
  • DELETING: Network load balancer is being deleted.
  • INACTIVE: The load balancer doesn't have any listeners or target groups, or attached target groups are empty. The load balancer doesn't perform any health checks or send traffic in this state.
type enum Type
Type of the network load balancer. Only external network load balancers are available now.
  • EXTERNAL: External network load balancer.
  • INTERNAL: Internal network load balancer.
session_affinity enum SessionAffinity
Type of the session affinity. Only 5-tuple affinity is available now.
  • CLIENT_IP_PORT_PROTO: 5-tuple affinity.
listeners[] Listener
List of listeners for the network load balancer.
attached_target_groups[] AttachedTargetGroup
List of target groups attached to the network load balancer.

Listener

Field Description
name string
Name of the listener. The name must be unique for each listener on a single load balancer. 3-63 characters long.
address string
IP address for the listener.
port int64
Port.
protocol enum Protocol
Network protocol for incoming traffic.
target_port int64
Port of a target.
subnet_id string
ID of the subnet.
ip_version enum IpVersion
IP version of the external address.
  • IPV4: IPv4
  • IPV6: IPv6

AttachedTargetGroup

Field Description
target_group_id string
Required. ID of the target group. The maximum string length in characters is 50.
health_checks[] HealthCheck
A health check to perform on the target group. For now we accept only one health check per AttachedTargetGroup. The number of elemets must be exactly 1.

HealthCheck

Field Description
name string
Required. Name of the health check. The name must be unique for each target group that attached to a single load balancer. 3-63 characters long. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
interval google.protobuf.Duration
The interval between health checks. The default is 2 seconds.
timeout google.protobuf.Duration
Timeout for a target to return a response for the health check. The default is 1 second.
unhealthy_threshold int64
Number of failed health checks before changing the status to UNHEALTHY. The default is 2. Acceptable values are 2 to 10, inclusive.
healthy_threshold int64
Number of successful health checks required in order to set the HEALTHY status for the target. The default is 2. Acceptable values are 2 to 10, inclusive.
options oneof: tcp_options or http_options
Protocol to use for the health check. Either TCP or HTTP.
  tcp_options TcpOptions
Options for TCP health check.
  http_options HttpOptions
Options for HTTP health check.

TcpOptions

Field Description
port int64
Port to use for TCP health checks. Acceptable values are 1 to 65535, inclusive.

HttpOptions

Field Description
port int64
Port to use for HTTP health checks. Acceptable values are 1 to 65535, inclusive.
path string
URL path to set for health checking requests for every target in the target group. For example /ping. The default path is /.

RemoveListener

Removes the listener from the specified network load balancer.

rpc RemoveListener (RemoveNetworkLoadBalancerListenerRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:RemoveNetworkLoadBalancerListenerMetadata

    Operation.response:NetworkLoadBalancer

RemoveNetworkLoadBalancerListenerRequest

Field Description
network_load_balancer_id string
Required. ID of the network load balancer to remove the listener from. To get the network load balancer ID, use a NetworkLoadBalancerService.List request. The maximum string length in characters is 50.
listener_name string
Required. Name of the listener to delete. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].

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<RemoveNetworkLoadBalancerListenerMetadata>
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<NetworkLoadBalancer>
if operation finished successfully.

RemoveNetworkLoadBalancerListenerMetadata

Field Description
network_load_balancer_id string
ID of the network load balancer that the listener is being removed from.

NetworkLoadBalancer

Field Description
id string
ID of the network load balancer.
folder_id string
ID of the folder that the network load balancer belongs to.
created_at google.protobuf.Timestamp
Creation timestamp in RFC3339 text format.
name string
Name of the network load balancer. The name is unique within the folder. 3-63 characters long.
description string
Optional description of the network load balancer. 0-256 characters long.
labels map<string,string>
Resource labels as key:value pairs. Maximum of 64 per resource.
region_id string
ID of the region that the network load balancer belongs to.
status enum Status
Status of the network load balancer.
  • CREATING: Network load balancer is being created.
  • STARTING: Network load balancer is being started.
  • ACTIVE: Network load balancer is active and sends traffic to the targets.
  • STOPPING: Network load balancer is being stopped.
  • STOPPED: Network load balancer is stopped and doesn't send traffic to the targets.
  • DELETING: Network load balancer is being deleted.
  • INACTIVE: The load balancer doesn't have any listeners or target groups, or attached target groups are empty. The load balancer doesn't perform any health checks or send traffic in this state.
type enum Type
Type of the network load balancer. Only external network load balancers are available now.
  • EXTERNAL: External network load balancer.
  • INTERNAL: Internal network load balancer.
session_affinity enum SessionAffinity
Type of the session affinity. Only 5-tuple affinity is available now.
  • CLIENT_IP_PORT_PROTO: 5-tuple affinity.
listeners[] Listener
List of listeners for the network load balancer.
attached_target_groups[] AttachedTargetGroup
List of target groups attached to the network load balancer.

Listener

Field Description
name string
Name of the listener. The name must be unique for each listener on a single load balancer. 3-63 characters long.
address string
IP address for the listener.
port int64
Port.
protocol enum Protocol
Network protocol for incoming traffic.
target_port int64
Port of a target.
subnet_id string
ID of the subnet.
ip_version enum IpVersion
IP version of the external address.
  • IPV4: IPv4
  • IPV6: IPv6

AttachedTargetGroup

Field Description
target_group_id string
Required. ID of the target group. The maximum string length in characters is 50.
health_checks[] HealthCheck
A health check to perform on the target group. For now we accept only one health check per AttachedTargetGroup. The number of elemets must be exactly 1.

HealthCheck

Field Description
name string
Required. Name of the health check. The name must be unique for each target group that attached to a single load balancer. 3-63 characters long. Value must match the regular expression |[a-z][-a-z0-9]{1,61}[a-z0-9].
interval google.protobuf.Duration
The interval between health checks. The default is 2 seconds.
timeout google.protobuf.Duration
Timeout for a target to return a response for the health check. The default is 1 second.
unhealthy_threshold int64
Number of failed health checks before changing the status to UNHEALTHY. The default is 2. Acceptable values are 2 to 10, inclusive.
healthy_threshold int64
Number of successful health checks required in order to set the HEALTHY status for the target. The default is 2. Acceptable values are 2 to 10, inclusive.
options oneof: tcp_options or http_options
Protocol to use for the health check. Either TCP or HTTP.
  tcp_options TcpOptions
Options for TCP health check.
  http_options HttpOptions
Options for HTTP health check.

TcpOptions

Field Description
port int64
Port to use for TCP health checks. Acceptable values are 1 to 65535, inclusive.

HttpOptions

Field Description
port int64
Port to use for HTTP health checks. Acceptable values are 1 to 65535, inclusive.
path string
URL path to set for health checking requests for every target in the target group. For example /ping. The default path is /.

ListOperations

Lists operations for the specified network load balancer.

rpc ListOperations (ListNetworkLoadBalancerOperationsRequest) returns (ListNetworkLoadBalancerOperationsResponse)

ListNetworkLoadBalancerOperationsRequest

Field Description
network_load_balancer_id string
Required. ID of the NetworkLoadBalancer resource to list operations for. 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 ListNetworkLoadBalancerOperationsResponse.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 ListNetworkLoadBalancerOperationsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100.

ListNetworkLoadBalancerOperationsResponse

Field Description
operations[] operation.Operation
List of operations for the specified network load balancer.
next_page_token string
This token allows you to get the next page of results for list requests. If the number of results is larger than ListNetworkLoadBalancerOperationsRequest.page_size, use the next_page_token as the value for the ListNetworkLoadBalancerOperationsRequest.page_token query parameter in the next list request. Each subsequent list request 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. 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.

Была ли статья полезна?

Language / Region
© 2022 ООО «Яндекс.Облако»
В этой статье:
  • Calls NetworkLoadBalancerService
  • Get
  • GetNetworkLoadBalancerRequest
  • NetworkLoadBalancer
  • Listener
  • AttachedTargetGroup
  • HealthCheck
  • TcpOptions
  • HttpOptions
  • List
  • ListNetworkLoadBalancersRequest
  • ListNetworkLoadBalancersResponse
  • NetworkLoadBalancer
  • Listener
  • AttachedTargetGroup
  • HealthCheck
  • TcpOptions
  • HttpOptions
  • Create
  • CreateNetworkLoadBalancerRequest
  • ListenerSpec
  • ExternalAddressSpec
  • InternalAddressSpec
  • AttachedTargetGroup
  • HealthCheck
  • TcpOptions
  • HttpOptions
  • Operation
  • CreateNetworkLoadBalancerMetadata
  • NetworkLoadBalancer
  • Listener
  • AttachedTargetGroup
  • HealthCheck
  • TcpOptions
  • HttpOptions
  • Update
  • UpdateNetworkLoadBalancerRequest
  • ListenerSpec
  • ExternalAddressSpec
  • InternalAddressSpec
  • AttachedTargetGroup
  • HealthCheck
  • TcpOptions
  • HttpOptions
  • Operation
  • UpdateNetworkLoadBalancerMetadata
  • NetworkLoadBalancer
  • Listener
  • AttachedTargetGroup
  • HealthCheck
  • TcpOptions
  • HttpOptions
  • Delete
  • DeleteNetworkLoadBalancerRequest
  • Operation
  • DeleteNetworkLoadBalancerMetadata
  • Start
  • StartNetworkLoadBalancerRequest
  • Operation
  • StartNetworkLoadBalancerMetadata
  • Stop
  • StopNetworkLoadBalancerRequest
  • Operation
  • StopNetworkLoadBalancerMetadata
  • AttachTargetGroup
  • AttachNetworkLoadBalancerTargetGroupRequest
  • AttachedTargetGroup
  • HealthCheck
  • TcpOptions
  • HttpOptions
  • Operation
  • AttachNetworkLoadBalancerTargetGroupMetadata
  • NetworkLoadBalancer
  • Listener
  • AttachedTargetGroup
  • HealthCheck
  • TcpOptions
  • HttpOptions
  • DetachTargetGroup
  • DetachNetworkLoadBalancerTargetGroupRequest
  • Operation
  • DetachNetworkLoadBalancerTargetGroupMetadata
  • NetworkLoadBalancer
  • Listener
  • AttachedTargetGroup
  • HealthCheck
  • TcpOptions
  • HttpOptions
  • GetTargetStates
  • GetTargetStatesRequest
  • GetTargetStatesResponse
  • TargetState
  • AddListener
  • AddNetworkLoadBalancerListenerRequest
  • ListenerSpec
  • ExternalAddressSpec
  • InternalAddressSpec
  • Operation
  • AddNetworkLoadBalancerListenerMetadata
  • NetworkLoadBalancer
  • Listener
  • AttachedTargetGroup
  • HealthCheck
  • TcpOptions
  • HttpOptions
  • RemoveListener
  • RemoveNetworkLoadBalancerListenerRequest
  • Operation
  • RemoveNetworkLoadBalancerListenerMetadata
  • NetworkLoadBalancer
  • Listener
  • AttachedTargetGroup
  • HealthCheck
  • TcpOptions
  • HttpOptions
  • ListOperations
  • ListNetworkLoadBalancerOperationsRequest
  • ListNetworkLoadBalancerOperationsResponse
  • Operation