问题

API更新虚拟机类别。“无法清除先前设置的时区”

  • 2019年1月30日
  • 2回答
  • 1422的浏览量

徽章
你好,

我想使用REST API将一个VM设置为一个类别。
然而,我得到消息INVALID_REQUEST
代码:
"无法清除先前设置的时区


我不知道该拿这个怎么办。

请注意,我必须添加“power_state”,因为如果不添加,就会得到一个INVALID_REQUEST
代码:
“更新操作必须指定虚拟机电源状态。”

我不理解,正如API文档说的power_state可选

端点使用:/ vm / {uuid}


身体:
代码:

"规范":{
“名称”:“BACHELOR2018”,
"资源":{
“power_state”:“”

},
“api_version”:“3.1”,
“元数据”:{
“类型”:“虚拟机”,
“spec_version”:3,
"类别":{
:“SLA A3”





身体反应:
代码:

“api_version”:“3.1”,
“代码”:422年,
“message_list”:(

“message”:“无法清除之前设置的时区”,
“原因”:“INVALID_REQUEST”

],
“状态”:“错误”

Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.<\/a>","cookiepolicy.modal.level1":"Basic
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">
Baidu