New-AzCosmosDBSqlIndexingPolicy

新しい CosmosDB Sql IndexingPolicy オブジェクトを作成します。

構文

New-AzCosmosDBSqlIndexingPolicy
   [-IncludedPath <PSIncludedPath[]>]
   [-SpatialSpec <PSSpatialSpec[]>]
   [-CompositePath <PSCompositePath[][]>]
   [-ExcludedPath <String[]>]
   [-Automatic <Boolean>]
   [-IndexingMode <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

説明

New-AzCosmosDBSqlIndexingPolicy コマンドレットは 、PSSqlIndexingPolicy 型の新しいオブジェクトを作成します。

例 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}

パラメーター

-Automatic

インデックス作成ポリシーが自動かどうかを示すブール値

Type:Nullable<T>[Boolean]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CompositePath

Microsoft.Azure.Commands.CosmosDB.PSCompositePath 型のオブジェクトの配列の配列

Type:PSCompositePath[][]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

Azure との通信のために使用される資格情報、アカウント、テナント、サブスクリプションです。

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExcludedPath

excludedPath(Azure Cosmos DB サービスで除外する JSON ドキュメント内のパスを指定します)要素を含む文字列の配列。

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IncludedPath

includedPath (Azure Cosmos DB サービスに含める JSON ドキュメント内のパスを指定します) 要素を含む文字列の配列。

Type:PSIncludedPath[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IndexingMode

はインデックス作成モードを示します。 指定できる値は、"Consistent"、"Lazy"、"None" です。

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SpatialSpec

Microsoft.Azure.Commands.CosmosDB.PSSpatialSpec 型のオブジェクトの配列

Type:PSSpatialSpec[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

入力

None

出力

PSSqlIndexingPolicy