你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
New-AzCosmosDBMongoDBIndex
Creates a new CosmosDB MongoDB Index.
Syntax
New-AzCosmosDBMongoDBIndex
[-TtlInSeconds <Int32>]
[-Unique <Boolean>]
[-Key <String[]>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The New-AzCosmosDBMongoDBIndex creates a new CosmosDB MongoDB Index.
Examples
Example 1
New-AzCosmosDBMongoDBIndex -TtlInSeconds 604800 -Unique 1 -Key "key1"
Key Options
--- -------
Microsoft.Azure.Commands.CosmosDB.Models.PSMongoIndexKeys Microsoft.Azure.Commands.CosmosDB.Models.PSMongoIndexOptions
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Key
Array of key values as strings.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TtlInSeconds
Number of seconds after which the index expires.
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Unique
Bool to indicate if the index is unique or not.
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None