Update management center api is giving error

Azuretech 90 Reputation points
2023-02-27T13:06:38.28+00:00

I am trying to run below api to patch vm through apicall as mentioned in Microsoft documentation https://learn.microsoft.com/en-us/azure/update-center/manage-vms-programmatically?tabs=cli%2Cazurecli

    az rest --method post --uri "https://management.azure.com/subscriptions/x-x-x/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/test/installPatches?api-version==2020-12-01"


I am getting below error however i have valid resource provider .Tried using other suggested api-version also. still getting same error. Could you please suggest correct api-version name which i can use in api-call

Bad Request({"error":{"code":"NoRegisteredProviderFound","message":"No registered resource provider found for location 'eastus2' and API version '=2020-12-01' for type 'virtualMachines'. The supported api-versions are '2015-05-01-preview, 2015-06-15, 2016-03-30, 2016-04-30-preview, 2016-08-30, 2017-03-30, 2017-12-01, 2018-04-01, 2018-06-01, 2018-10-01, 2019-03-01, 2019-07-01, 2019-12-01, 2020-06-01, 2020-12-01, 2021-03-01, 2021-04-01, 2021-07-01, 2021-11-01, 2022-03-01, 2022-08-01, 2022-11-01'. The supported locations are 'eastus, eastus2, westus, centralus, northcentralus, southcentralus, northeurope, westeurope, eastasia, southeastasia, japaneast, japanwest, australiaeast, australiasoutheast, australiacentral, brazilsouth, southindia, centralindia, westindia, canadacentral, canadaeast, westus2, westcentralus, uksouth, ukwest, koreacentral, koreasouth, francecentral, southafricanorth, uaenorth, switzerlandnorth, germanywestcentral, norwayeast, jioindiawest, westus3, swedencentral, qatarcentral'."}})
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,390 questions
Azure Update Manager
Azure Update Manager
An Azure service to centrally manages updates and compliance at scale.
240 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Limitless Technology 43,971 Reputation points
    2023-02-28T14:41:28.83+00:00

    Hi. Thank you for your question and reaching out. I’d be more than happy to help you with your query

    Try checking the API's documentation becuase there might be any known limitations/requirements that needs to be met.

    I also highly suggest to you to update your API version to make sure that the resource type in the call is supported in the specific region.

    If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.

    0 comments No comments