New-AzCosmosDBSqlIndexingPolicy
Crée un objet Sql IndexingPolicy CosmosDB.
Syntax
New-AzCosmosDBSqlIndexingPolicy
[-IncludedPath <PSIncludedPath[]>]
[-SpatialSpec <PSSpatialSpec[]>]
[-CompositePath <PSCompositePath[][]>]
[-ExcludedPath <String[]>]
[-Automatic <Boolean>]
[-IndexingMode <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
L’applet de commande New-AzCosmosDBSqlIndexingPolicy crée un objet de type PSSqlIndexingPolicy.
Exemples
Exemple 1
$ipath1 = New-AzCosmosDBSqlIncludedPathIndex -DataType String -Precision -1 -Kind Hash
$ipath2 = New-AzCosmosDBSqlIncludedPathIndex -DataType String -Precision -1 -Kind Hash
$IncludedPath = New-AzCosmosDBSqlIncludedPath -Path "/*" -Index $ipath1, $ipath2
$SpatialSpec = New-AzCosmosDBSqlSpatialSpec -Path "/mySpatialPath/*" -Type "Point", "LineString", "Polygon", "MultiPolygon"
$cp1 = New-AzCosmosDBSqlCompositePath -Path "/abc" -Order Ascending
$cp2 = New-AzCosmosDBSqlCompositePath -Path "/aberc" -Order Descending
$compositePath = (($cp1, $cp2), ($cp2, $cp1))
New-AzCosmosDBSqlIndexingPolicy -IncludedPath $IncludedPath -SpatialSpec $SpatialSpec -CompositePath $compositePath -ExcludedPath "/myPathToNotIndex/*" -Automatic 1 -IndexingMode Consistent
Automatic : True
IndexingMode : Consistent
IncludedPaths : {Microsoft.Azure.Commands.CosmosDB.Models.PSIncludedPath}
ExcludedPaths : {Microsoft.Azure.Commands.CosmosDB.Models.PSExcludedPath}
CompositeIndexes : {Microsoft.Azure.Commands.CosmosDB.Models.PSCompositePath Microsoft.Azure.Commands.CosmosDB.Models.PSCompositePath,
Microsoft.Azure.Commands.CosmosDB.Models.PSCompositePath Microsoft.Azure.Commands.CosmosDB.Models.PSCompositePath}
SpatialIndexes : {Microsoft.Azure.Commands.CosmosDB.Models.PSSpatialSpec}
Paramètres
-Automatic
Bool pour indiquer si la stratégie d’indexation est automatique
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CompositePath
Tableau d’objets de type Microsoft.Azure.Commands.CosmosDB.PSCompositePath
Type: | PSCompositePath[][] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Informations d’identification, compte, locataire et abonnement utilisés pour la communication avec Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ExcludedPath
Tableau de chaînes contenant excludedPath(Spécifie un chemin d’accès dans un document JSON à exclure dans les éléments du service Azure Cosmos DB.).
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IncludedPath
Tableau de chaînes contenant includedPath (Spécifie un chemin d’accès dans un document JSON à inclure dans les éléments du service Azure Cosmos DB.).
Type: | PSIncludedPath[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IndexingMode
indique le mode d’indexation. Les valeurs possibles sont les suivantes : « Cohérent », « Lazy », « None »
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SpatialSpec
Tableau d’objets de type Microsoft.Azure.Commands.CosmosDB.PSSpatialSpec
Type: | PSSpatialSpec[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Entrées
None
Sorties
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour