New-AzCosmosDBSqlIndexingPolicy
Membuat objek CosmosDB Sql IndexingPolicy baru.
Sintaks
New-AzCosmosDBSqlIndexingPolicy
[-IncludedPath <PSIncludedPath[]>]
[-SpatialSpec <PSSpatialSpec[]>]
[-CompositePath <PSCompositePath[][]>]
[-ExcludedPath <String[]>]
[-Automatic <Boolean>]
[-IndexingMode <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Deskripsi
Cmdlet New-AzCosmosDBSqlIndexingPolicy membuat objek baru jenis PSSqlIndexingPolicy.
Contoh
Contoh 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}
Parameter
Bool untuk menunjukkan apakah kebijakan pengindeksan bersifat otomatis
| Type: | Nullable<T>[Boolean] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Array objek jenis Microsoft.Azure.Commands.CosmosDB.PSCompositePath
| Type: | PSCompositePath[][] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Kredensial, akun, penyewa, dan langganan yang digunakan untuk komunikasi dengan Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Array string yang berisi excludedPath(Menentukan jalur dalam dokumen JSON yang akan dikecualikan dalam elemen layanan Azure Cosmos DB.).
| Type: | String[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Array string yang berisi includedPath (Menentukan jalur dalam dokumen JSON yang akan disertakan dalam elemen layanan Azure Cosmos DB.).
| Type: | PSIncludedPath[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
menunjukkan mode pengindeksan. Nilai yang mungkin termasuk: 'Konsisten', 'Malas', 'Tidak Ada'
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Array objek jenis Microsoft.Azure.Commands.CosmosDB.PSSpatialSpec
| Type: | PSSpatialSpec[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Input
None
Output
Saran dan Komentar
Kirim dan lihat umpan balik untuk