Method getTargetStates

Gets states of target resources in the attached target group.

HTTP request

GET https://load-balancer.api.cloud.yandex.net/load-balancer/v1/networkLoadBalancers/{networkLoadBalancerId}:getTargetStates

Path parameters

Parameter Description
networkLoadBalancerId ID of the NetworkLoadBalancer resource with an attached target group. The maximum string length in characters is 50.

Query parameters

Parameter Description
targetGroupId ID of the target group to get states of resources from. The maximum string length in characters is 50.

Response

HTTP Code: 200 - OK

{
  "targetStates": [
    {
      "subnetId": "string",
      "address": "string",
      "status": "string"
    }
  ]
}
Field Description
targetStates[] object

State of the target that was returned after the last health check.

targetStates[].
subnetId
string

ID of the subnet that the target is connected to.

targetStates[].
address
string

IP address of the target.

targetStates[].
status
string

Status of the target.

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.