I have an existing Cosmos database with many collections. RU is set on the collection level.
I want to update collections RU using Powershell on-demand basis. I tried below command but getting below errors
PS C:\WINDOWS\system32> Get-CosmosDbOffer -Context $cosmosDbContext -Id 'IuX1' |
Set-CosmosDbOffer -Context $cosmosDbContext -OfferThroughput 555 -OfferIsRUPerMinuteThroughputEnabled $true
Invoke-WebRequest : The remote server returned an error: (400) Bad Request. At C:\Program Files\WindowsPowerShell\Modules\CosmosDB\2.1.7.675\lib\utils.ps1:562 char:30 + ... estResult = Invoke-WebRequest -UseBasicParsing @invokeWebRequestParam ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Any suggestion?? I followed below links but same error
https://github.com/PankajRawat333/CosmosDB#working-with-offers https://github.com/PlagueHO/CosmosDB/wiki/Set-CosmosDbOffer