Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Network Load Balancer
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Network load balancers
      • Create a network load balancer
      • Create an internal network load balancer
      • Start a load balancer
      • Stop a load balancer
      • Delete a load balancer
      • Check target health statuses
      • Add a listener
      • Delete a listener
    • Target groups
      • Create a target group
      • Attach a target group to a load balancer
      • Detach a target group from a load balancer
      • Delete a target group
  • Concepts
    • Network load balancer
    • Internal network load balancer
    • Listener
    • Targets and groups
    • Resource health checks
    • Quotas and limits
  • Best practices for using the service
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the 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
  • Questions and answers
  1. API reference
  2. REST
  3. NetworkLoadBalancer
  4. getTargetStates

Method getTargetStates

  • HTTP request
  • Path parameters
  • Query parameters
  • Response

Gets states of target resources in the attached target group.

HTTP request

GET https://load-balancer.api.cloud.yandex.net/network-load-balancer/v1alpha/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.
In this article:
  • HTTP request
  • Path parameters
  • Query parameters
  • Response
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC