All notable changes and release history of the "cosmos-db" module will be documented in this file.
- Changed to Entra Id authentication by default.
- Adds a
-enableMasterKeyAuthflag toUse-CosmosDbInternalFlagwhich reverts auth to use master keys.
- Fixes a bug in commands like
Search-CosmosDbRecordsandGet-AllCosmosDbRecordswhich might run for long enough that their auth tokens expire and aren't refreshed. Auth tokens will now be refreshed every 10 min as these commands run. - Adds a
-enableAuthHeaderReuseflag toUse-CosmosDbInternalFlagwhich disables the 10 minute refresh period and forces auth header refreshes for every API call.
- Fixes
Search-CosmosDbRecordsfor partition key range uses where the PK range fetch call didn't use continuation tokens and might miss some results.
- Adds support for readonly keys via
Use-CosmosDbReadonlyKeys
- Adds support for optimistic concurrency (enabled by default) to
Update-CosmosDbRecord
- Fixes a bug where record ids were not encoded in the API calls which broke Get-, Remove-, and Update- for records with ids that contained characters such as
'/'
- Consistent handling of request errors in PS7 vs. PS5
- Gives a better error message if the database doesn't exist
- Fixes a bug that caused 401s with ids that contained uppercase characters
- Add support for pipelined objects in
Remove-CosmosDbRecord - Add optional
GetPartitionKeyBlockargument toRemove-CosmosDbRecord
- Bugfix for continuation tokens on Powershell version 7+
- Minor interface improvements
- Adds
Use-CosmosDbInternalFlagcommand to access some experimental features and debugging helpers - Fixes support for extra query features in
Search-CosmosDbRecordsfor DBs with more than one partition key range- Currently all partitions are scanned unless the experimental flag
EnablePartitionKeyRangeSearchesis set viaUse-CosmosDbInternalFlag - Later the flag will become enabled by default to improve the efficiency of all
Searchqueries
- Currently all partitions are scanned unless the experimental flag
- Fixes a bug for
New-andUpdate-commands for payloads with nested objects- Was using the default
ConvertTo-Jsonto serialize payload which only went 2 levels deep and used empty strings for objects deeper than that
- Was using the default
- Fixes incorrectly mandatory parameters to
Search-CosmosDbRecords
- Renames all
Subscriptionparameters toSubscriptionId - Renames all
Idparameters toRecordId - Adds support for
Get-Helpfor commands
- Add support for
Search-CosmosDbRecordshashtables in addition to name-value pairsSearch-CosmosDbRecords -Parameters @{ "@param1" = "value1"; "@param2" = "value2" }
- Update the module metadata to point to the repo, license, etc
- Initial release