Updating a Single Property of a Model Service
Function
This API is used to update a single property of a model service. Currently, only instance_count (number of instances of the model service) is supported. This operation can be performed only for real-time services in the running, alarm, or abnormal state.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
PUT /v1/{project_id}/services/{service_id}/property
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. |
service_id |
Yes |
String |
Service ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
changed_property |
Yes |
String |
Property name. Currently, only instance_count (number of instances of the model service) is supported. |
configs |
No |
Array of UpdateServiceConfig objects |
Service configurations. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
X-Request-Id |
String |
Tracing ID. |
Parameter |
Type |
Description |
---|---|---|
update_time |
String |
Update time. This parameter is returned only when the service configuration upgrade is triggered. For example, if the config parameter is modified, the update result can be filtered from the service update records based on this time. This parameter is not returned when the description is modified or the service is started or stopped. |
resource_ids |
String |
Updated resource IDs. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
X-Request-Id |
String |
Tracing ID. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Internal service error code. |
error_msg |
String |
Error message. |
Example Requests
Update a single property of a model service.
PUT https://{endpoint}/v1/{project_id}/services/{service_id}/property { "changed_property" : "instance_count", "configs" : [ { "model_id" : "98240f41-6c69-437c-b894-9c488b1d9c43", "changed_value" : 2 } ] }
Example Responses
Status code: 200
OK
{ "update_time" : 1712026426703 }
Status code: 401
Unauthorized
{ "error_code" : "ModelArts.0203", "error_msg" : "Invalid token." }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
401 |
Unauthorized |
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