external help file | Module Name | online version | schema |
---|---|---|---|
Microsoft.Azure.PowerShell.Cmdlets.CosmosDB.dll-Help.xml |
Az.CosmosDB |
2.0.0 |
Gets the CosmosDB MongoDB Collection.
Get-AzCosmosDBMongoDBCollection -ResourceGroupName <String> [-Name <String>]
[-DefaultProfile <IAzureContextContainer>] -AccountName <String> -DatabaseName <String> [<CommonParameters>]
Get-AzCosmosDBMongoDBCollection [-Name <String>] -ParentObject <PSMongoDBDatabaseGetResults>
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
The Get-AzCosmosDBMongoDBCollection cmdlet gets the CosmosDB MongoDB Collection.
Get-AzCosmosDBMongoDBCollection -ResourceGroupName rgName -AccountName accountName -DatabaseName dbName -Name collectionName
Name : collectionName
Id : /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/mongodbDatabases/dbName/collections/collectionName
Location :
Tags :
Resource : Microsoft.Azure.Commands.CosmosDB.Models.PSMongoDBCollectionGetPropertiesResource
Resource Object contains AnalyticalStorageTtl, Id, Indexes, ShardKey, _etag, _rid, _ts properties.
(Get-AzCosmosDBMongoDBCollection -ResourceGroupName rgName -AccountName accountName -DatabaseName dbName -Name collectionName).Resource.ShardKey
Key Value
---- -----
<ShardKey> <Value>
This example gets the ShardKey of the retrieved collection
Name of the Cosmos DB database account.
Type: System.String
Parameter Sets: ByNameParameterSet
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Database name.
Type: System.String
Parameter Sets: ByNameParameterSet
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Collection name.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Mongo Database object.
Type: Microsoft.Azure.Commands.CosmosDB.Models.PSMongoDBDatabaseGetResults
Parameter Sets: ByParentObjectParameterSet
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Name of resource group.
Type: System.String
Parameter Sets: ByNameParameterSet
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.