This API request turns on the maintenance of the cluster.
To execute this request, you need the Service Provider API (ServiceProviderAPI) permission assigned to your API token. Generate your API token via Cluster Management Console (CMC). To learn how to obtain and use it, see Cluster API - Authentication.
/api/v1.0/cluster/maintenance/on
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| body | Ip | JSON body of the request. Contains basic details about the cluster maintenance | body | required |
IpMigrationMaintenanceRequestDto object| Element | Type | Description | Required |
|---|---|---|---|
| nodeId | integer | An ID of the node that the migration is performed on. | required |
| reason | string | A reason for the maintenance.
| required |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"nodeId": 1,"reason": "IP_MIGRATION"}
| Code | Type | Description |
|---|---|---|
| 200 | - | Success. The maintenance is now enabled. |
| 400 | Error | Failed. The input is invalid. |
| 409 | Error | Failed. Can't enable the maintenance state, because the previous hasn't finished. |
{"nodeId": 1,"reason": "IP_MIGRATION"}
{"error": {"code": 0,"constraintViolations": [{"location": "string","message": "string","parameterLocation": "HEADER","path": "string"}],"message": "string"}}
200