Updates the model or processor of a service. If only the metadata.instance field is updated, manual scaling can be performed.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eas:UpdateService |
update |
*Service
|
None | None |
Request syntax
PUT /api/v2/services/{ClusterId}/{ServiceName} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClusterId |
string |
Yes |
The region ID of the service. |
cn-shanghai |
| ServiceName |
string |
Yes |
The service name. For more information about how to query the service name, see ListServices. |
foo |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| UpdateType |
string |
No |
The update type. Valid values: merge and replace. Default value: merge.
Valid values:
|
merge |
| body |
string |
No |
The request body that contains the parameters to update. For more information about the parameters, see CreateService. |
{ "name": "foo", "model_path": "http://path/to/model.tar.gz", "processor": "tensorflow_cpu", "metadata": { "instance": 2, "memory": 7000, "cpu": 4 } } |
For more information about the request parameters, see CreateService.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
40325405-579C-4D82**** |
| Message |
string |
The returned message. |
Succeed to update service [foo] in region [cn-shanghai] |
Examples
Success response
JSON format
{
"RequestId": "40325405-579C-4D82****",
"Message": "Succeed to update service [foo] in region [cn-shanghai]"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.