You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bugThis issue requires a change to an existing behavior in the product in order to be resolved.MgmtThis issue is related to a management-plane library.
The REST API PATCH method is supposed to update part of the resource, in other words, if you send a PATCH request to update a resource, the server will only update the specified fields in the existing resource. However the VirtualMachineRunCommands_Update method will update the whole resource.
If omit properties.source in PATCH request payload, send payload like below one, the properties.source is updated to empty.
bugThis issue requires a change to an existing behavior in the product in order to be resolved.MgmtThis issue is related to a management-plane library.
API Spec link
azure-rest-api-specs/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2023-03-01/runCommand.json
Line 324 in 1a011ff
API Spec version
2023-03-01
Describe the bug
The REST API PATCH method is supposed to update part of the resource, in other words, if you send a PATCH request to update a resource, the server will only update the specified fields in the existing resource. However the
VirtualMachineRunCommands_Update
method will update the whole resource.If omit
properties.source
in PATCH request payload, send payload like below one, theproperties.source
is updated to empty.Expected behavior
if omit
properties.source
in PATCH request payload, theproperties.source
should be kept.Actual behavior
if omit
properties.source
in PATCH request payload, send payload like below one, theproperties.source
is updated to empty.Reproduction Steps
STEP 1 -- PUT https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/example-resources/providers/Microsoft.Compute/virtualMachines/example-VM/runCommands/example1-vmrc?api-version=2023-03-01&$expand=instanceView
x-ms-request-id: 30ae8dcc-b6d3-47fa-8190-1af1a787ebf8
x-ms-correlation-request-id: c5313ffc-2c9b-4b84-9285-ee6e3ed84646
request:
STEP 2 -- GET https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/example-resources/providers/Microsoft.Compute/virtualMachines/example-VM/runCommands/example1-vmrc?api-version=2023-03-01&$expand=instanceView
x-ms-request-id: 576eb9e5-6dd6-4049-a882-9ed356b9e70e
x-ms-correlation-request-id: 5fb94928-3779-4f81-8e56-30a01836272b
note that
protectedParameters
is by design not returned.response:
STEP 3 -- PATCH https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/example-resources/providers/Microsoft.Compute/virtualMachines/example-VM/runCommands/example1-vmrc?api-version=2023-03-01&$expand=instanceView
x-ms-request-id: ddd68723-7ca8-4748-b375-ce2d79c2908f
x-ms-correlation-request-id: fbf162da-e91f-4517-851e-a123d07a6b2e
request:
STEP 4 -- GET https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/example-resources/providers/Microsoft.Compute/virtualMachines/example-VM/runCommands/example1-vmrc?api-version=2023-03-01&$expand=instanceView
x-ms-request-id: f927a894-1ee3-4e3d-a26c-716b1f7f4c1e
x-ms-correlation-request-id: 46827455-b8e7-43aa-beab-3a11f3f9d60e
we can see the
source
andparameters
are updated to emptyresponse:
Environment
No response
The text was updated successfully, but these errors were encountered: