PlagueHO / CosmosDB

PowerShell Module for working with Azure Cosmos DB databases, collections, documents, attachments, offers, users, permissions, triggers, stored procedures and user defined functions.
http://dscottraynsford.com
MIT License
154 stars 46 forks source link

Add Support for Setting Index Policy via JSON #360

Closed PlagueHO closed 4 years ago

PlagueHO commented 4 years ago

There may be some situations where setting the index policy for a collection needs to be set via passing the JSON directly in.

Add a parameter -IndexingPolicyJson to New-CosmosDbCollection and Set-CosmosDbCollection that will use the JSON directly in the indexingPolicy of the collection.

It should have a parameter set that prevents both the IndexingPolicy and IndexingPolicyJson from being passed.