azure-sdk-for-go
azure-sdk-for-go copied to clipboard
ResourceGroupPatchable Field not Patchable
Bug Report
-
import path of package in question
- https://github.com/Azure/azure-sdk-for-go/blob/cf4e6a06bdd67435e431f42d4ddb1d8423907c85/sdk/resourcemanager/resources/armresources/zz_generated_models.go#L1411
-
SDK version e.g.
master
,latest
,18.1.0
- master
-
output of
go version
- go version go1.18.2 linux/amd64
-
What happened?
- When update a resource group (client defined here) it takes ResourceGroupPatchable as input. The managedBy field is one of the patchable field listed here, however when I try to patch it, I got the error:
- RESPONSE 400: 400 Bad Request\nERROR CODE: ResourceGroupManagedByMismatcherror": {\n "code": "ResourceGroupManagedByMismatch",\n "message": "The managed by property of the resource group cannot be changed from its current value '/subscriptions/.../resourcegroups/.../providers/Microsoft.ContainerService/managedClusters/xxx'."\n }\n}
- When update a resource group (client defined here) it takes ResourceGroupPatchable as input. The managedBy field is one of the patchable field listed here, however when I try to patch it, I got the error:
-
What did you expect or want to happen?
- If this field is patchable, why the response says it can't be changed?
- If this field is not patchable, why it's listed in the ResourceGroupPatchable type?
-
How can we reproduce it?
- By calling resourcegroup update / createorupdate API to change the managedBy field.
-
Anything we should know about your environment.
- NA
Thank you for your feedback. This has been routed to the support team for assistance.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @armleads-azure.
Issue Details
Bug Report
-
import path of package in question
- https://github.com/Azure/azure-sdk-for-go/blob/cf4e6a06bdd67435e431f42d4ddb1d8423907c85/sdk/resourcemanager/resources/armresources/zz_generated_models.go#L1411
-
SDK version e.g.
master
,latest
,18.1.0
- master
-
output of
go version
- go version go1.18.2 linux/amd64
-
What happened?
- When update a resource group (client defined here) it takes ResourceGroupPatchable as input. The managedBy field is one of the patchable field listed here, however when I try to patch it, I got the error:
- RESPONSE 400: 400 Bad Request\nERROR CODE: ResourceGroupManagedByMismatcherror": {\n "code": "ResourceGroupManagedByMismatch",\n "message": "The managed by property of the resource group cannot be changed from its current value '/subscriptions/.../resourcegroups/.../providers/Microsoft.ContainerService/managedClusters/xxx'."\n }\n}
- When update a resource group (client defined here) it takes ResourceGroupPatchable as input. The managedBy field is one of the patchable field listed here, however when I try to patch it, I got the error:
-
What did you expect or want to happen?
- If this field is patchable, why the response says it can't be changed?
- If this field is not patchable, why it's listed in the ResourceGroupPatchable type?
-
How can we reproduce it?
- By calling resourcegroup update / createorupdate API to change the managedBy field.
-
Anything we should know about your environment.
- NA
Author: | wenjungaogaogao |
---|---|
Assignees: | - |
Labels: |
|
Milestone: | - |
Adding Service team to look into this.
@armleads-azure could you please look into this and provide an update ?
appears that the managedBy property is readonly after the RG create PUT. in what scenario are you trying to edit/change it?
It's ok if I can't change it. It's just confusing on how this field works. Could you update the documentation and the ResourceGroupPatchable type if it's not intended to be patchable?