Configuring a Health Check

Function

This API is used to configure a health check for backend ECSs.

URI

POST /v1.0/{project_id}/elbaas/healthcheck

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

listener_id

Yes

String

Specifies the ID of the listener with which the health check is associated.

healthcheck_protocol

No

String

  • Specifies the health check protocol. A listener using UDP is not allowed for a private network load balancer.
  • The value can be HTTP, TCP, or UDP.

healthcheck_uri

No

String

  • Specifies the health check URI. This parameter is valid when healthcheck_protocol is HTTP.
  • The value can contain 1 to 80 characters that must start with a slash (/) and can contain only letters, digits, and special characters such as -/.%?#&_=

healthcheck_connect_port

No

Integer

  • Specifies the health check port.
  • The port number ranges from 1 to 65535.

healthy_threshold

No

Integer

  • Specifies the number of consecutive health checks when the health check result of a backend ECS changes from fail to success.
  • The value ranges from 1 to 10.

unhealthy_threshold

No

Integer

  • Specifies the number of consecutive health checks when the health check result of a backend ECS changes from success to fail.
  • The value ranges from 1 to 10.

healthcheck_timeout

No

Integer

  • Specifies the maximum time required for waiting for a response from the health check in the unit of second.
  • The value ranges from 1 to 50.

healthcheck_interval

No

Integer

  • Specifies the maximum time between health checks in the unit of second.
  • The value ranges from 1 to 50.

Request

Response

Status Code

Parent topic: Health Check