Updating a Health Check
Function
This API is used to update a health check.
Constraints
The health check can be updated only when the provisioning status of the associated load balancer is ACTIVE.
Calling Method
For details, see Calling APIs.
URI
PUT /v3/{project_id}/elb/healthmonitors/{healthmonitor_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
healthmonitor_id |
Yes |
String |
Specifies the health check ID. |
project_id |
Yes |
String |
Definition: Specifies the project ID. For details about how to obtain a project ID, see Obtaining a Project ID. Constraints: N/A Range: The value can contain a maximum of 32 characters, including digits and lowercase letters. Default value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition: Specifies the token used for IAM authentication. Constraints: N/A Range: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
healthmonitor |
Yes |
UpdateHealthMonitorOption object |
Specifies the health check. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
admin_state_up |
No |
Boolean |
Definition: Specifies the administrative status of the health check. Range:
|
delay |
No |
Integer |
Specifies the interval between health checks, in seconds. The value ranges from 1 to 50. |
domain_name |
No |
String |
Specifies the domain name that HTTP requests are sent to during the health check. The value can contain only digits, letters, hyphens (-), and periods (.) and must start with a digit or letter. The value cannot be left blank, but can be specified as null or cannot be passed, indicating that the virtual IP address of the load balancer is used as the destination address of HTTP requests. This parameter is available only when type is set to HTTP or HTTPS. |
expected_codes |
No |
String |
Specifies the expected HTTP status code. This parameter will take effect only when type is set to HTTP, HTTPS, or GRPC. The value options are as follows:
|
http_method |
No |
String |
Specifies the HTTP method. The value can be GET, HEAD, or POST. The default value is GET. This parameter is available when type is set to HTTP or HTTPS. |
max_retries |
No |
Integer |
Specifies the number of consecutive health checks when the health check result of a backend server changes from OFFLINE to ONLINE. Range: 1 to 10 |
max_retries_down |
No |
Integer |
Specifies the number of consecutive health checks when the health check result of a backend server changes from ONLINE to OFFLINE. Range: 1 to 10 |
monitor_port |
No |
Integer |
Definition: Specifies the health check port. Constraints: If the backend server group protocol is IP, monitor_port cannot be 0. Range: 1 to 65535, or null (the port of a backend server will be used by default). |
name |
No |
String |
Specifies the health check name. |
timeout |
No |
Integer |
Specifies the maximum time required for waiting for a response from the health check, in seconds. It is recommended that you set the value less than that of parameter delay. |
url_path |
No |
String |
Specifies the HTTP request path for the health check. The value must start with a slash (/), and the default value is /. The value can contain letters, digits, hyphens (-), slashes (/), periods (.), percentage signs (%), question marks (?), pound signs (#), ampersand signs (&), and the extended character set: _;~!()*[]@$^:',+. Note: This parameter is available only when type is set to HTTP or HTTPS. |
type |
No |
String |
Specifies the health check protocol. The value can be TCP, UDP_CONNECT, HTTP, HTTPS, GRPC, or TLS. Note:
QUIC protocol is not supported. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Definition: Specifies the request ID. Range: The value is automatically generated, and can contain characters including digits, lowercase letters, and hyphens (-). |
healthmonitor |
HealthMonitor object |
Specifies the health check. |
Parameter |
Type |
Description |
---|---|---|
admin_state_up |
Boolean |
Specifies the administrative status of the health check. Range:
Default value: true |
delay |
Integer |
Specifies the interval between health checks, in seconds. The value ranges from 1 to 50. |
domain_name |
String |
Specifies the domain name that HTTP requests are sent to during the health check. The value can contain only digits, letters, hyphens (-), and periods (.) and must start with a digit or letter. The value is left blank by default, indicating that the virtual IP address of the load balancer is used as the destination address of HTTP requests. This parameter is available only when type is set to HTTP or HTTPS. |
expected_codes |
String |
Specifies the expected HTTP status code. Value options:
If type is set to GRPC, the default value is 0. If type is set to other protocols, the default value is 200. This parameter will take effect only when type is set to HTTP, HTTPS or GRPC. |
http_method |
String |
Specifies the HTTP method. The value can be GET, HEAD, or POST. The default value is GET. This parameter is available when type is set to HTTP or HTTPS. |
id |
String |
Specifies the health check ID. |
max_retries |
Integer |
Specifies the number of consecutive health checks when the health check result of a backend server changes from OFFLINE to ONLINE. Range: 1 to 10 |
max_retries_down |
Integer |
Specifies the number of consecutive health checks when the health check result of a backend server changes from ONLINE to OFFLINE. Range: 1 to 10. The default value is 3. |
monitor_port |
Integer |
Definition: Specifies the health check port. Constraints: If the backend server group protocol is IP, monitor_port cannot be 0. Range: 1 to 65535, or null (the port of a backend server will be used by default). Default value: null |
name |
String |
Specifies the health check name. |
pools |
Array of PoolRef objects |
Specifies the IDs of the backend server groups for which the health check is configured. Only one ID will be returned. |
project_id |
String |
Specifies the project ID. |
timeout |
Integer |
Specifies the maximum time required for waiting for a response from the health check, in seconds. It is recommended that you set the value less than that of parameter delay. |
type |
String |
Specifies the health check protocol. The value can be TCP, UDP_CONNECT, HTTP, HTTPS, GRPC, or TLS. Note:
QUIC protocol is not supported. |
url_path |
String |
Specifies the HTTP request path for the health check. The value must start with a slash (/), and the default value is /. The value can contain letters, digits, hyphens (-), slashes (/), periods (.), percentage signs (%), question marks (?), pound signs (#), ampersand signs (&), and the extended character set: _;~!()*[]@$^:',+. This parameter is available only when type is set to HTTP or HTTPS. |
created_at |
String |
Specifies the time when the health check was configured. The format is yyyy-MM-dd'T'HH:mm:ss'Z' (UTC time). |
updated_at |
String |
Specifies the time when the health check was updated. The format is yyyy-MM-dd'T'HH:mm:ss'Z' (UTC time). |
Example Requests
Modifying the interval between health checks
PUT https://{ELB_Endpoint}/v3/99a3fff0d03c428eac3678da6a7d0f24/elb/healthmonitors/c2b210b2-60c4-449d-91e2-9e9ea1dd7441 { "healthmonitor" : { "name" : "My Healthmonitor update", "max_retries" : 10, "delay" : 10 } }
Example Responses
Status code: 200
Successful request.
{ "request_id" : "08d6ffea-d092-4cfa-860a-e364f3bef1be", "healthmonitor" : { "monitor_port" : null, "id" : "c2b210b2-60c4-449d-91e2-9e9ea1dd7441", "project_id" : "99a3fff0d03c428eac3678da6a7d0f24", "domain_name" : null, "name" : "My Healthmonitor update", "delay" : 10, "max_retries" : 10, "pools" : [ { "id" : "488acc50-6bcf-423d-8f0a-0f4184f5b8a0" } ], "admin_state_up" : true, "timeout" : 30, "type" : "HTTP", "expected_codes" : "200", "url_path" : "/", "http_method" : "GET" } }
Status Codes
Status Code |
Description |
---|---|
200 |
Successful request. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.