Skip to content

New-CosmosDbCollection cmdlet parameter AutoscaleThroughput parameter doesn't allow values lower than 4000 #493

@LenaVinogradov

Description

@LenaVinogradov

Issue

PS version: 5.1.22621.4249
Host: ISE, Visual Studio Code
OS: Windows 11, ADO latest Windows-2022 agent image
CosmosDB PS module v5.0.0.

Running New-CosmosDB collection with AutoscaleThroughput parameter with value 1000 results in the following error:

$Parameters = @{
Id = 'ScheduleSettings';
Context = (New-CosmosDbContext -Account 'xxx' -Database 'DocumentDatabase' -Key ([SecureString]::new()) );
DefaultTimeToLive = -1;
IndexingPolicy = (New-CosmosDbCollectionIndexingPolicy -IndexingMode 'Consistent' -Automatic $True <# Paths omitted #>);
PartitionKey = 'id';
AutoscaleThroughput = 1000;
Database = 'DocumentDatabase';
}

CosmosDB\New-CosmosDbCollection @parameters

ERROR: New-CosmosDbCollection : Cannot validate argument on parameter 'AutoscaleThroughput'. The 1000 argument is less than the minimum allowed range of 4000. Supply an argument that is greater than or equal
to 4000 and then try the command again.

If I update the value to 4000 it creates collection successfully, I can then lower it in the Azure Portal to 1000 successfully.
I can create collection in Azure Portal with autoscalethroughput 1000 without any problems as well.
Why is the 4000 min limit on the PS cmdlet? Can you please advise? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe issue is a bug.in progressThe issue is being actively worked on by someone.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions