Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.26k stars 3.86k forks source link

[Feature]: New-AzCosmosDBAccount should support creating serverless capacity mode #20836

Open chshihMSFT opened 1 year ago

chshihMSFT commented 1 year ago

Description of the new feature

New-AzCosmosDBAccount should support creating serverless capacity mode It's possible now to Get-AzCosmosDBAccount and parse its Serverless property from Capabilities but seems not able to specify the same Capabilities then create a Serverless account. Can you review such a use case and add supportability of creating serverless account via Powershell? Thanks! ref : https://github.com/Azure/azure-powershell/blob/master/src/CosmosDB/CosmosDB/CosmosDBAccount/NewAzCosmosDBAccount.cs#L162-L170 https://learn.microsoft.com/en-us/powershell/module/az.cosmosdb/new-azcosmosdbaccount

Get-AzCosmosDBAccount image

New-AzCosmosDBAccount image

Proposed implementation details (optional)

No response

ArmaanMcleod commented 1 year ago

What about New-AzCosmosDBAccount -Capabilities 'EnableServerless'? That parameter is an array but you pass it with {EnableServerless}.

chshihMSFT commented 1 year ago

Thanks @ArmaanMcleod, you are correct. The parameter "-Capabilities" is a String array indeed. But check our doc again, the parameter seems not the correct parameter for enabling Serverless capacity mode. (And this is ambiguous with -Location parameter) ref : https://learn.microsoft.com/en-us/powershell/module/az.cosmosdb/new-azcosmosdbaccount?view=azps-9.3.0

Capabilities: Add a location to the Cosmos DB database account. Array of strings, ordered by failover priority Location: Add a location to the Cosmos DB database account. Array of strings, ordered by failover priority.

In addition, I searched for a few keywords (ex. "EnableServerless", "cosmos serverless") in this repo, but no results found. Seems we have no PowerShell cmdlet implementation of creating Cosmos DB account with Serverless capacity mode, so created this issue to track.

Also tested with the mentioned format, it creates a "Provisioned Throughput" account instead of "Serverless" capacity mode. image

image

isra-fel commented 1 year ago

Thanks for contacting us. Let me involve the correct team.

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @pjohari-ms, @kushagraThapar, @simplynaveen20.

Issue Details
### Description of the new feature **New-AzCosmosDBAccount** should support creating **serverless** capacity mode It's possible now to **Get-AzCosmosDBAccount** and parse its Serverless property from Capabilities but seems not able to specify the same Capabilities then create a Serverless account. Can you review such a use case and add supportability of creating serverless account via Powershell? Thanks! ref : https://github.com/Azure/azure-powershell/blob/master/src/CosmosDB/CosmosDB/CosmosDBAccount/NewAzCosmosDBAccount.cs#L162-L170 https://learn.microsoft.com/en-us/powershell/module/az.cosmosdb/new-azcosmosdbaccount Get-AzCosmosDBAccount ![image](https://user-images.githubusercontent.com/45855145/216297488-f36dcbff-9342-4ca7-beed-3564a28925af.png) New-AzCosmosDBAccount ![image](https://user-images.githubusercontent.com/45855145/216297515-95daa523-b7c1-4c86-af6f-e5131a8450b9.png) ### Proposed implementation details (optional) _No response_
Author: chshihMSFT
Assignees: -
Labels: `feature-request`, `Cosmos`, `Service Attention`
Milestone: -
chshihMSFT commented 1 year ago

adding related discussion here for some reference. https://github.com/MicrosoftDocs/azure-docs/issues/90922#issuecomment-1090939841