Method list

Retrieves the list of NetworkLoadBalancer resources in the specified folder.

HTTP request

GET https://load-balancer.api.cloud.yandex.net/load-balancer/v1/networkLoadBalancers

Query parameters

Parameter Description
folderId Required. ID of the folder that the network load balancer belongs to. To get the folder ID, use a list request. The maximum string length in characters is 50.
pageSize The maximum number of results per page to return. If the number of available results is larger than pageSize, 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.
pageToken Page token. To get the next page of results, set pageToken to the nextPageToken returned by a previous list request. The maximum string length in characters is 100.
filter 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. Can be either = or != for single values, or IN or NOT IN for lists of values. 3. The value. 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.

Response

HTTP Code: 200 - OK

{
  "networkLoadBalancers": [
    {
      "id": "string",
      "folderId": "string",
      "createdAt": "string",
      "name": "string",
      "description": "string",
      "labels": "object",
      "regionId": "string",
      "status": "string",
      "type": "string",
      "sessionAffinity": "string",
      "listeners": [
        {
          "name": "string",
          "address": "string",
          "port": "string",
          "protocol": "string",
          "targetPort": "string"
        }
      ],
      "attachedTargetGroups": [
        {
          "targetGroupId": "string",
          "healthChecks": [
            {
              "name": "string",
              "interval": "string",
              "timeout": "string",
              "unhealthyThreshold": "string",
              "healthyThreshold": "string",

              // `networkLoadBalancers[].attachedTargetGroups[].healthChecks[]` includes only one of the fields `tcpOptions`, `httpOptions`
              "tcpOptions": {
                "port": "string"
              },
              "httpOptions": {
                "port": "string",
                "path": "string"
              },
              // end of the list of possible fields`networkLoadBalancers[].attachedTargetGroups[].healthChecks[]`

            }
          ]
        }
      ]
    }
  ],
  "nextPageToken": "string"
}
Field Description
networkLoadBalancers[] object

A NetworkLoadBalancer resource. For more information, see Network Load Balancer.

networkLoadBalancers[].
id
string

ID of the network load balancer.

networkLoadBalancers[].
folderId
string

ID of the folder that the network load balancer belongs to.

networkLoadBalancers[].
createdAt
string (date-time)

Creation timestamp in RFC3339 text format.

String in RFC3339 text format.

networkLoadBalancers[].
name
string

Name of the network load balancer. The name is unique within the folder. 3-63 characters long.

networkLoadBalancers[].
description
string

Optional description of the network load balancer. 0-256 characters long.

networkLoadBalancers[].
labels
object

Resource labels as key:value pairs. Мaximum of 64 per resource.

networkLoadBalancers[].
regionId
string

ID of the region that the network load balancer belongs to.

networkLoadBalancers[].
status
string

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.
networkLoadBalancers[].
type
string

Type of the network load balancer. Only external network load balancers are available now.

Type of the load balancer. Only external load balancers are currently available.

  • EXTERNAL: External network load balancer.
networkLoadBalancers[].
sessionAffinity
string

Type of the session affinity. Only 5-tuple affinity is available now.

Type of session affinity. Only 5-tuple affinity is currently available. For more information, see Load Balancer concepts.

  • CLIENT_IP_PORT_PROTO: 5-tuple affinity.
networkLoadBalancers[].
listeners[]
object

A Listener resource. For more information, see Listener

networkLoadBalancers[].
listeners[].
name
string

Name of the listener. The name must be unique for each listener on a single load balancer. 3-63 characters long.

networkLoadBalancers[].
listeners[].
address
string

IP address for the listener.

networkLoadBalancers[].
listeners[].
port
string (int64)

Port.

networkLoadBalancers[].
listeners[].
protocol
string

Network protocol for incoming traffic.

Network protocol to use.

networkLoadBalancers[].
listeners[].
targetPort
string (int64)

Port of a target.

networkLoadBalancers[].
attachedTargetGroups[]
object

An AttachedTargetGroup resource. For more information, see Targets and groups.

networkLoadBalancers[].
attachedTargetGroups[].
targetGroupId
string

Required. ID of the target group.

The maximum string length in characters is 50.

networkLoadBalancers[].
attachedTargetGroups[].
healthChecks[]
object

A HealthCheck resource. For more information, see Health check.

networkLoadBalancers[].
attachedTargetGroups[].
healthChecks[].
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].

networkLoadBalancers[].
attachedTargetGroups[].
healthChecks[].
interval
string

The interval between health checks. The default is 2 seconds.

networkLoadBalancers[].
attachedTargetGroups[].
healthChecks[].
timeout
string

Timeout for a target to return a response for the health check. The default is 1 second.

networkLoadBalancers[].
attachedTargetGroups[].
healthChecks[].
unhealthyThreshold
string (int64)

Number of failed health checks before changing the status to UNHEALTHY. The default is 2.

Acceptable values are 2 to 10, inclusive.

networkLoadBalancers[].
attachedTargetGroups[].
healthChecks[].
healthyThreshold
string (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.

networkLoadBalancers[].
attachedTargetGroups[].
healthChecks[].
tcpOptions
object
Options for TCP health check.
networkLoadBalancers[].attachedTargetGroups[].healthChecks[] includes only one of the fields tcpOptions, httpOptions

Configuration option for a TCP health check.

networkLoadBalancers[].
attachedTargetGroups[].
healthChecks[].
tcpOptions.
port
string (int64)

Port to use for TCP health checks.

Acceptable values are 1 to 32767, inclusive.

networkLoadBalancers[].
attachedTargetGroups[].
healthChecks[].
httpOptions
object
Options for HTTP health check.
networkLoadBalancers[].attachedTargetGroups[].healthChecks[] includes only one of the fields tcpOptions, httpOptions

Configuration option for an HTTP health check.

networkLoadBalancers[].
attachedTargetGroups[].
healthChecks[].
httpOptions.
port
string (int64)

Port to use for HTTP health checks.

Acceptable values are 1 to 32767, inclusive.

networkLoadBalancers[].
attachedTargetGroups[].
healthChecks[].
httpOptions.
path
string

URL path to set for health checking requests for every target in the target group. For example /ping. The default path is /.

nextPageToken string

This token allows you to get the next page of results for list requests. If the number of results is larger than pageSize, use the nextPageToken as the value for the pageToken query parameter in the next list request. Each subsequent list request will have its own nextPageToken to continue paging through the results.