Set-AzureRmResource issuing unnecessary GET even when -usepatchsemantics is specified
There are some resources that have secrets that don't support GET. Because of the bug described in the title, I can't use Set-AzureRmResource with them.
Repro
Here is the command I run:
Set-AzureRmResource -PropertyObject $ezAuthSettings -ResourceGroupName $rg -ResourceType Microsoft.Web/sites/config -ResourceName ($balSite + "/authsettings") -ApiVersion 2015-08-01 -UsePatchSemantics -Force
Here is the error:
Set-AzureRmResource : {"Message":"The requested resource does not support http method 'GET'."}
Expected
It should work, as the underlying cmdlet should not be making a GET
Fixed.
I'm not sure what was fixed... but I'm having the same issue. Any Idea how to get around it?
Set-AzureRmResource : The pipeline has been stopped. At line:1 char:1 Set-AzureRmResource -ResourceGroupName ResourceGrou ... CategoryInfo : CloseError: (:) [Set-AzureRmResource], PipelineStoppedException FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.SetAzureResourceCmdlet
Set-AzureRmResource :
I tried to use Invoke-AzureRmResourceAction instead, but I get another error, and there is no documentation around this cmdlet... Any ideas how to get past this?
Invoke-AzureRmResourceAction -Action "Post" -ResourceGroupName "ResourceGroupName" -ResourceName "test2/authsettings" -ResourceType "Microsoft.Web/sites/config" -ApiVersion '2015-06-01' -Parameters $PropertiesObject
Invoke-AzureRmResourceAction : At line:1 char:1 Invoke-AzureRmResourceAction -Action "Post" -ResourceGroupName "Resour ... CategoryInfo : CloseError: (:) [Invoke-AzureRmResourceAction], ErrorResponseMessageException FullyQualifiedErrorId : NotFound,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.InvokAzureResourceActionCmdlet
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @rthorn17