azure-sdk-for-go icon indicating copy to clipboard operation
azure-sdk-for-go copied to clipboard

ResourceGroupPatchable Field not Patchable

Open wenjungaogaogao opened this issue 1 year ago • 1 comments

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}
  • 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

wenjungaogaogao avatar Aug 17 '22 05:08 wenjungaogaogao

Thank you for your feedback. This has been routed to the support team for assistance.

msftbot[bot] avatar Aug 17 '22 16:08 msftbot[bot]

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}
  • 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:

ARM, Service Attention, Mgmt

Milestone: -

msftbot[bot] avatar Aug 19 '22 02:08 msftbot[bot]

Adding Service team to look into this.

@armleads-azure could you please look into this and provide an update ?

navba-MSFT avatar Aug 19 '22 02:08 navba-MSFT

appears that the managedBy property is readonly after the RG create PUT. in what scenario are you trying to edit/change it?

vladimirjoanovic avatar Aug 19 '22 23:08 vladimirjoanovic

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?

wenjungaogaogao avatar Aug 22 '22 23:08 wenjungaogaogao