AI开发平台MODELARTS-通过patch操作对服务进行更新:请求示例

时间:2024-11-22 17:41:02

请求示例

通过patch操作对服务进行更新。

PATCH https://{endpoint}/v1/{project_id}/services/{service_id}

[ {
  "op" : "replace",
  "path" : "/config/0/envs",
  "value" : { }
}, {
  "op" : "replace",
  "path" : "/config/0/model_id",
  "value" : "a9542b46-8dfd-4184-bd81-c8d8946edb47"
}, {
  "op" : "replace",
  "path" : "/config/0/additional_properties",
  "value" : {
    "persistent_volumes" : [ {
      "storage_type" : "obs_pfs",
      "source_address" : "/dongcong4",
      "mount_path" : "/var/tmp",
      "storage_type_text" : "atelier_webservice_detail_model_config_volumes_type_obs"
    } ]
  }
}, {
  "op" : "replace",
  "path" : "/config/0/specification",
  "value" : "modelarts.vm.ai1.a310"
}, {
  "op" : "replace",
  "path" : "/config/0/pool_name",
  "value" : "pool-c8e2-04f258c84780d5a52f3bc00dc15aa5e7"
} ]
support.huaweicloud.com/api-modelarts/PatchServiceV2.html