NetworkLoadBalancer

A set of methods for managing NetworkLoadBalancer resources.

JSON Representation

{
  "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",

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

        }
      ]
    }
  ]
}
Field Description
id string

ID of the network load balancer.

folderId string

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

createdAt string (date-time)

Creation timestamp in RFC3339 text format.

String 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 object

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

regionId string

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

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.
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.
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.
listeners[] object

A Listener resource. For more information, see Listener

listeners[].
name
string

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

listeners[].
address
string

IP address for the listener.

listeners[].
port
string (int64)

Port.

listeners[].
protocol
string

Network protocol for incoming traffic.

Network protocol to use.

listeners[].
targetPort
string (int64)

Port of a target.

attachedTargetGroups[] object

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

attachedTargetGroups[].
targetGroupId
string

Required. ID of the target group.

The maximum string length in characters is 50.

attachedTargetGroups[].
healthChecks[]
object

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

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].

attachedTargetGroups[].
healthChecks[].
interval
string

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

attachedTargetGroups[].
healthChecks[].
timeout
string

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

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.

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.

attachedTargetGroups[].
healthChecks[].
tcpOptions
object
attachedTargetGroups[].healthChecks[] includes only one of the fields tcpOptions, httpOptions

Configuration option for a TCP health check.

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

Port to use for TCP health checks.

Acceptable values are 1 to 32767, inclusive.

attachedTargetGroups[].
healthChecks[].
httpOptions
object
attachedTargetGroups[].healthChecks[] includes only one of the fields tcpOptions, httpOptions

Configuration option for an HTTP health check.

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

Port to use for HTTP health checks.

Acceptable values are 1 to 32767, inclusive.

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 /.

Methods

Method Description
addListener Adds a listener to the specified network load balancer.
attachTargetGroup Attaches a target group to the specified network load balancer.
create Creates a network load balancer in the specified folder using the data specified in the request.
delete Deletes the specified network load balancer.
detachTargetGroup Detaches the target group from the specified network load balancer.
get Returns the specified NetworkLoadBalancer resource.
getTargetStates Gets states of target resources in the attached target group.
list Retrieves the list of NetworkLoadBalancer resources in the specified folder.
listOperations Lists operations for the specified network load balancer.
removeListener Removes the listener from the specified network load balancer.
start Starts load balancing and health checking with the specified network load balancer with specified settings. Changes network load balancer status to ACTIVE.
stop Stops load balancing and health checking with the specified network load balancer. Changes load balancer status to STOPPED.
update Updates the specified network load balancer.