In this episode, Sean Donahue is joined by Al Solorzano of E360 to discuss the worst disasters they've recovered from. Surprise twist, not all clouds are cumulonimbus and not all disasters are natural.<\/p><\/oembed>

Resources<\/p>

Question

API update VM categorie. "Cannot clear previously set time zone"

  • 30 January 2019
  • 2 replies
  • 1451 views

Badge
Hi,



I want to set a VM to a categorie, using the REST API.

However I Get the message INVALID_REQUEST

code:
"Cannot clear previously set time zone




Don't know what to do with this.



Please note that I had to add the "power_state", because if I don't I get an INVALID_REQUEST

code:
"VM power state must be specified for Update operation."


Which I dont understand, as API documentation saidpower_stateisoptional.



Endpoint used:PUT/vms/{uuid}



Body:

code:
{
"spec": {
"name": "BACHELOR2018",
"resources": {
"power_state": "ON"
}
},
"api_version": "3.1",
"metadata": {
"kind": "vm",
"spec_version": 3,
"categories": {
"SLA": "A3"
}
}
}




Response body:

code:
{
"api_version": "3.1",
"code": 422,
"message_list": [
{
"message": "Cannot clear previously set time zone",
"reason": "INVALID_REQUEST"
}
],
"state": "ERROR"
}
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