We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For a mongo 3.2 collection with a shard key, Get-AzCosmosDBMongoDBCollection does not return the shard key whereas Azure CLI does
Sample PS: $collection = Get-AzCosmosDBMongoDBCollection -ResourceGroupName $resourceGroupName -AccountName $accountName -DatabaseName $databaseName -Name $collectionName
PS output: $collection.Resource
Id : ShardKey : Indexes : {Microsoft.Azure.Commands.CosmosDB.Models.PSMongoIndexKeys, Microsoft.Azure.Commands.CosmosDB.Models.PSMongoIndexKeys, Microsoft.Azure.Commands.CosmosDB.Models.PSMongoIndexKeys, Microsoft.Azure.Commands.CosmosDB.Models.PSMongoIndexKeys} _rid : 08V3AI-vnrA= _ts : 1584377689 _etag : "0000b500-0000-0100-0000-5e6faf590000"
Sample Azure CLI: az cosmosdb mongodb collection show -g cosmos -a cdb-mongo-makz -d db1 -n c1
CLI output (note shard key): Command group 'cosmosdb mongodb' is in preview. It may be changed/removed in a future release. { "id": "/subscriptions/e61e4c75-268b-4c94-ad48-237aa3231481/resourceGroups/cosmos/providers/Microsoft.DocumentDB/databaseAccounts/cdb-mongo-makz/mongodbDatabases/db1/collections/c1", "location": null, "name": "c1", "resource": { "id": "c1", "indexes": [ { "key": { "keys": [ "_id" ] }, "options": { "expireAfterSeconds": null, "unique": null } }, { "key": { "keys": [ "_ts" ] }, "options": { "expireAfterSeconds": 604800, "unique": null } }, { "key": { "keys": [ "user_id", "user_address" ] }, "options": { "expireAfterSeconds": null, "unique": true } }, { "key": { "keys": [ "DocumentDBDefaultIndex" ] }, "options": { "expireAfterSeconds": null, "unique": null } } ], "shardKey": { "user_id": "Hash" } }, "resourceGroup": "cosmos", "tags": null, "type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections" }
The text was updated successfully, but these errors were encountered:
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @kushagraThapar, @srinathnarayanan, @southpolesteve, @shurd.
Sorry, something went wrong.
Thanks @plzm for reporting this, working on it. Targeting the S168.
Addressed in #11388
MehaKaushik
No branches or pull requests
For a mongo 3.2 collection with a shard key, Get-AzCosmosDBMongoDBCollection does not return the shard key whereas Azure CLI does
Sample PS:
$collection = Get-AzCosmosDBMongoDBCollection -ResourceGroupName $resourceGroupName -AccountName $accountName -DatabaseName $databaseName -Name $collectionName
PS output:
$collection.Resource
Id :
ShardKey :
Indexes : {Microsoft.Azure.Commands.CosmosDB.Models.PSMongoIndexKeys, Microsoft.Azure.Commands.CosmosDB.Models.PSMongoIndexKeys,
Microsoft.Azure.Commands.CosmosDB.Models.PSMongoIndexKeys, Microsoft.Azure.Commands.CosmosDB.Models.PSMongoIndexKeys}
_rid : 08V3AI-vnrA=
_ts : 1584377689
_etag : "0000b500-0000-0100-0000-5e6faf590000"
Sample Azure CLI:
az cosmosdb mongodb collection show -g cosmos -a cdb-mongo-makz -d db1 -n c1
CLI output (note shard key):
Command group 'cosmosdb mongodb' is in preview. It may be changed/removed in a future release.
{
"id": "/subscriptions/e61e4c75-268b-4c94-ad48-237aa3231481/resourceGroups/cosmos/providers/Microsoft.DocumentDB/databaseAccounts/cdb-mongo-makz/mongodbDatabases/db1/collections/c1",
"location": null,
"name": "c1",
"resource": {
"id": "c1",
"indexes": [
{
"key": {
"keys": [
"_id"
]
},
"options": {
"expireAfterSeconds": null,
"unique": null
}
},
{
"key": {
"keys": [
"_ts"
]
},
"options": {
"expireAfterSeconds": 604800,
"unique": null
}
},
{
"key": {
"keys": [
"user_id",
"user_address"
]
},
"options": {
"expireAfterSeconds": null,
"unique": true
}
},
{
"key": {
"keys": [
"DocumentDBDefaultIndex"
]
},
"options": {
"expireAfterSeconds": null,
"unique": null
}
}
],
"shardKey": {
"user_id": "Hash"
}
},
"resourceGroup": "cosmos",
"tags": null,
"type": "Microsoft.DocumentDB/databaseAccounts/mongodbDatabases/collections"
}
The text was updated successfully, but these errors were encountered: