Updating a Health Check
Function
This API is used to update a health check.
Calling Method
For details, see Calling APIs.
URI
PUT /v1/health-checks/{health_check_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
health_check_id |
Yes |
String |
Specifies the health check ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. The token can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
health_check |
Yes |
UpdateHealthCheckOption object |
Specifies the detailed information about updating a health check. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
protocol |
No |
String |
Specifies the health check protocol. |
port |
No |
Integer |
Specifies the port used for the health check. |
interval |
No |
Integer |
Specifies the health check interval, in seconds. |
timeout |
No |
Integer |
Specifies the timeout duration of the health check, in seconds. It is recommended that you set a value less than that of parameter interval. |
max_retries |
No |
Integer |
Specifies the maximum number of retries. Specifies the number of consecutive health checks when the health check result of an endpoint changes from HEALTHY to UNHEALTHY, or from UNHEALTHY to HEALTHY. |
enabled |
No |
Boolean |
Specifies whether to enable health check. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
health_check |
HealthCheckDetail object |
Specifies the details of a health check. |
request_id |
String |
Specifies the request ID. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the health check ID. |
endpoint_group_id |
String |
Specifies the endpoint group ID. |
protocol |
String |
Specifies the health check protocol. |
status |
String |
Specifies the provisioning status. The value can be one of the following:
|
port |
Integer |
Specifies the port used for the health check. |
interval |
Integer |
Specifies the health check interval, in seconds. |
timeout |
Integer |
Specifies the maximum time required for waiting for a response from the health check, in seconds. It is recommended that you set a value less than that of parameter interval. |
max_retries |
Integer |
Specifies the maximum number of retries. Specifies the number of consecutive health checks when the health check result of an endpoint changes from HEALTHY to UNHEALTHY, or from UNHEALTHY to HEALTHY. |
created_at |
String |
Specifies when the health check was configured. |
updated_at |
String |
Specifies when the health check was updated. |
domain_id |
String |
Specifies the tenant ID. |
enabled |
Boolean |
Specifies whether to enable health check. |
frozen_info |
FrozenInfo object |
Specifies the frozen details of cloud services or resources. |
Parameter |
Type |
Description |
---|---|---|
status |
Integer |
Specifies the status of a cloud service or resource. The value can be one of the following:
|
effect |
Integer |
Specifies the status of the resource after being frozen. The value can be one of the following:
|
scene |
Array of strings |
Specifies the service scenario. The value can be one of the following:
|
Example Requests
Changing the port to 3334, the interval and timeout durations to 20 seconds, the maximum retries to 2, and disabling health check
PUT https://{ga_endpoint}/v1/health-checks/c2b210b2-60c4-449d-91e2-9e9ea1dd7442 { "health_check" : { "protocol" : "TCP", "port" : 3334, "interval" : 20, "timeout" : 20, "max_retries" : 2, "enabled" : false } }
Example Responses
Status code: 200
Operation succeeded.
{ "health_check" : { "id" : "c2b210b2-60c4-449d-91e2-9e9ea1dd7442", "endpoint_group_id" : "3a9f50bb-f041-4eac-a117-82472d8a0007", "protocol" : "TCP", "status" : "ACTIVE", "port" : 3334, "interval" : 20, "timeout" : 20, "max_retries" : 2, "created_at" : "2019-01-08T01:21:37.151Z", "updated_at" : "2019-01-08T01:21:37.151Z", "domain_id" : "99a3fff0d03c428eac3678da6a7d0f24", "enabled" : false, "frozen_info" : { "status" : 2, "effect" : 1, "scene" : [ "ARREAR", "POLICE" ] } }, "request_id" : "915a14a6-867b-4af7-83d1-70efceb146f9" }
Status Codes
Status Code |
Description |
---|---|
200 |
Operation succeeded. |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot