Updates the health check policy of a service in a cloud-native gateway.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
mse:UpdateGatewayServiceCheck |
update |
*Gateway
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ServiceId |
string |
No |
The ID of the service. |
12 |
| GatewayUniqueId |
string |
No |
The unique ID of the gateway. |
gw-8d410698bd7f4628ab76b*****72dd1d |
| Check |
boolean |
No |
Whether to enable the health check. |
true |
| ExpectedStatuses |
array |
No |
The expected status code. Required when the health check protocol is HTTP. |
|
|
integer |
No |
The HTTP status code indicating a healthy response. Required when the health check protocol is HTTP. Valid values:
|
200 |
|
| Protocol |
string |
No |
The health check protocol. Valid values:
|
HTTP |
| Timeout |
integer |
No |
The health check response timeout. Unit: seconds. |
5 |
| Interval |
integer |
No |
The health check interval. |
2 |
| HealthyThreshold |
integer |
No |
The healthy threshold. |
2 |
| UnhealthyThreshold |
integer |
No |
The unhealthy threshold. |
2 |
| HttpPath |
string |
No |
The health check path. Required when the health check protocol is HTTP. |
/healthz |
| HttpHost |
string |
No |
The health check domain name. Optional for the HTTP protocol. |
example.com |
| AcceptLanguage |
string |
No |
The language of the response. Valid values: zh (Chinese, default) and en (English). |
zh |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
62CBFCB8-DDC6-588C-BF1B-88828AF***** |
| HttpStatusCode |
integer |
The HTTP status code returned. |
200 |
| Message |
string |
The message returned. |
OK |
| Code |
integer |
The response code. 200 indicates success. |
200 |
| Success |
boolean |
Whether the request was successful. |
true |
| Data |
integer |
The service ID of the operation. |
12 |
Examples
Success response
JSON format
{
"RequestId": "62CBFCB8-DDC6-588C-BF1B-88828AF*****",
"HttpStatusCode": 200,
"Message": "OK",
"Code": 200,
"Success": true,
"Data": 12
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalRequest | Invalid request:%s | Invalid request: %s |
| 400 | InvalidParameter | Parameter error:%s | Request parameter error: %s |
| 500 | InternalError | Console error. Try again later:%s | Console error. Try again later: %s |
| 403 | NoPermission | You are not authorized to perform this operation:%s | You do not have the permission to use this interface:%s |
| 404 | NotFound | Not found:%s | The resource does not exist:%s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.