azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Set-AzureRmResource issuing unnecessary GET even when -usepatchsemantics is specified

Open mohitsriv opened this issue 11 years ago • 4 comments

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

mohitsriv avatar Nov 11 '15 16:11 mohitsriv

Fixed.

ravbhatnagar avatar Feb 11 '16 19:02 ravbhatnagar

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 : The requested resource does not support http method 'GET'. At line:1 char:1 Set-AzureRmResource -ResourceGroupName ResourceGrou ... CategoryInfo : CloseError: (:) [Set-AzureRmResource], ErrorResponseMessageException FullyQualifiedErrorId : MethodNotAllowed,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.SetAzureResourceCmdlet

matendie avatar Oct 31 '17 18:10 matendie

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

matendie avatar Nov 01 '17 15:11 matendie

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @rthorn17

ghost avatar Aug 14 '19 19:08 ghost