Azure / Azure/azure-powershell

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

Open
#20,836 6 comments 1 reaction 0 assignees View on GitHub
act-codegen-extensibility-squad CosmosDB feature-request Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 14h
Merged PRs (30d)
54

Description

### 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_

Contributor guide

Open the contributing guide

Research direction

Start in src/CosmosDB/CosmosDB/CosmosDBAccount/NewAzCosmosDBAccount.cs around lines 162-170, then compare the New-AzCosmosDBAccount documentation with Get-AzCosmosDBAccount's Serverless capability handling. Done means the New cmdlet accepts the serverless capacity mode and can create a serverless Cosmos DB account consistently with the capability exposed by Get.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, powershell
Domain
cli, cloud
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
63/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.