services/preview/security/mgmt/v1.0/securityv46.4.0go1.15.1 linux/amd64When trying to create or update an automation using the SDK and the CreateOrUpdate function, the following error is returned
StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="LocationRequired" Message="The location property is required for this definition."
I expect this package within the SDK has never worked due to this error
The CreateOrUpdate operation to succeed and the resource is created in Azure
The Automation struct has the READ-ONLY comment above the Location field
Link to code in the SDK
The MarshallJSON() function does not include the Location field
Link to code in the SDK
I suspect this is due to an error in the upstream API spec where that field has been marked read-only
Sample code to easily reproduce the bug is here https://gist.github.com/benc-uk/c6114689e978c834b92b6fcd9656c020
Nothing of note
Hi @benc-uk thanks for this issue and sorry for the inconvenience.
I have identified the root cause of this issue, and this will be resolved in the next major version
Thanks @ArcturusZhang this is great news. I spotted v47 in the PR section, will this fix make that release or the one after?
Thanks @ArcturusZhang this is great news. I spotted v47 in the PR section, will this fix make that release or the one after?
Should be included in this release, I am working on it
Hi @benc-uk the v47.0.0 has been released and the issue should have been resolved, please have a try, thanks!
As you can see here, the location is now properly marshaled.
@ArcturusZhang I just checked my code, and v47 fixes this
Thanks for the speedy turn around on this one! Great stuff