• Elastic Load Balancing

elb
  1. Help Center
  2. Elastic Load Balancing
  3. API Reference
  4. Classic Load Balancer APIs
  5. Health Check
  6. Modifying a Health Check

Modifying a Health Check

Function

This API is used to modify a health check.

URI

PUT /v1.0/{project_id}/elbaas/healthcheck/{healthcheck_id}
Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID of the operator.

healthcheck_id

Yes

String

Specifies the health check ID.

healthcheck_protocol

No

String

  • Specifies the health check protocol.
  • The value can be HTTP or TCP (case-insensitive).

healthcheck_uri

No

String

  • Specifies the health check URI. This parameter is valid when healthcheck_protocol is HTTP.
  • The value is a string of 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 threshold at which the health check result is success, that is, the number of consecutive successful health checks when the health check result of backend ECSs changes from fail to success.
  • The value ranges from 1 to 10.

unhealthy_threshold

No

Integer

  • Specifies the threshold at which the health check result is fail, that is, the number of consecutive failed health checks when the health check result of backend ECSs 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 interval between health checks in the unit of second.
  • The value ranges from 1 to 50.

Request

  • Request parameters

    None

  • Example request
    {
        "healthcheck_connect_port": 88,
        "healthcheck_interval": 5,
        "healthcheck_protocol": "HTTP",
        "healthcheck_timeout": 10,
        "healthcheck_uri": "/",
        "healthy_threshold": 3,
        "unhealthy_threshold": 2
    }

Response

  • Response parameters
    Table 2 Parameter description

    Parameter

    Type

    Description

    healthcheck_interval

    Integer

    Specifies the interval between health checks in the unit of second.

    listener_id

    String

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

    id

    String

    Specifies the health check ID.

    healthcheck_protocol

    String

    Specifies the health check protocol.

    unhealthy_threshold

    Integer

    Specifies the threshold at which the health check result is fail, that is, the number of consecutive failed health checks when the health check result of backend ECSs changes from success to fail.

    update_time

    String

    Specifies the time when the certificate was updated.

    create_time

    String

    Specifies the time when the health check was created.

    healthcheck_connect_port

    Integer

    Specifies the health check port.

    healthcheck_timeout

    Integer

    Specifies the maximum time required for waiting for a response from the health check in the unit of second.

    healthcheck_uri

    String

    Specifies the health check URI. This parameter is valid when healthcheck_protocol is HTTP.

    healthy_threshold

    Integer

    Specifies the threshold at which the health check result is success, that is, the number of consecutive successful health checks when the health check result of backend ECSs changes from fail to success.

  • Example response
    {
        "healthcheck_interval": 5,
        "listener_id": "3ce8c4429478a5eb6ef4930de2d75b28",
        "id": "134e5ea962327c6a574b83e6e7f31f35",
        "healthcheck_protocol": "HTTP",
        "unhealthy_threshold": 2,
        "update_time": "2015-12-25 03:57:23",
        "create_time": "2015-12-25 03:57:23",
        "healthcheck_connect_port": 88,
        "healthcheck_timeout": 10,
        "healthcheck_uri": "/",
        "healthy_threshold": 3
    }

Returned Values

  • Normal

    200

  • Abnormal

    Returned Value

    Description

    400 badRequest

    Request error.

    401 unauthorized

    Authentication failed.

    403 userDisabled

    You do not have the rights to perform the operation.

    404 Not Found

    The requested page does not exist.

    500 authFault

    System error.

    503 serviceUnavailable

    The service is unavailable.