Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
e9617c3
[documentdb] Add user/replica/restore tests and fix argument consistency
amatarritamicrosoft Jul 13, 2026
f1b0021
[documentdb] Split mongocluster tests per scenario; add identity and CMK
amatarritamicrosoft Jul 14, 2026
eff958e
[documentdb] Fix replica promote request shape and add promote test
amatarritamicrosoft Jul 14, 2026
ae4f750
[documentdb] Add negative-case scenario test for mongocluster
amatarritamicrosoft Jul 14, 2026
3bc8edb
[documentdb] Address PR review: password aliases, explicit wait, CMK …
amatarritamicrosoft Jul 16, 2026
6965d92
[documentdb] Rename user command group to entra-user; clarify object-…
amatarritamicrosoft Jul 17, 2026
60b2d8d
[documentdb] Rename entra-user create/delete to assign/remove
amatarritamicrosoft Jul 20, 2026
13d9f21
[documentdb] Bump extension version to 1.0.0b2
amatarritamicrosoft Jul 21, 2026
a3b670d
[documentdb] Mark commands as Preview and rebrand to Azure DocumentDB
amatarritamicrosoft Jul 23, 2026
2fce81c
Rename replica parent args to parent-cluster-name and parent-location
amatarritamicrosoft Jul 23, 2026
deac08e
documentdb: gap-analysis fixes for mongocluster CLI
Aug 6, 2026
b3c3462
documentdb: re-record replica and promote scenario tests (live)
Aug 6, 2026
ea1fff1
[documentdb] Fix stale entra-user/parent-cluster-name references in R…
Aug 6, 2026
1945c07
[documentdb] Add tests for --ids, identity list, and promote source-c…
Aug 6, 2026
844515b
[documentdb] Make 'mongocluster update' a true sparse HTTP PATCH (gap…
Aug 6, 2026
579eccf
[documentdb] Add exhaustive property-coverage test and decouple GeoRe…
Aug 7, 2026
4a1abbb
[documentdb] Fix flake8 E303 (too many blank lines) in custom.py
Aug 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions src/documentdb/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,27 @@
Release History
===============

1.0.0b2
+++++++
* Rename ``az documentdb mongocluster user`` to ``entra-user``; the group only supports
Microsoft Entra ID principals, so the name makes that explicit.
* The user identifier is now ``--object-id`` (the Entra object/client ID GUID), keeping the
``-n``/``--name`` aliases.
* Rename ``entra-user create``/``delete`` to ``assign``/``remove``: the Entra principal already
exists, so the command grants or revokes its data-plane access, matching
``mongocluster identity assign/remove``.
* Add ``--password``/``-p`` aliases to the administrator password across create, update,
reset-password, and restore.
* Mark all commands and groups as Preview so the reference docs reflect the preview status.
* Rebrand the extension name to Azure DocumentDB.

1.0.0b1
+++++++
* Initial release of the DocumentDB (Azure Cosmos DB for MongoDB vCore) extension.
* Initial release of the Azure DocumentDB extension.
* Add ``az documentdb mongocluster`` commands to create, update, show, list, and delete
mongo clusters, list connection strings, and check name availability.
* Add ``az documentdb mongocluster firewall-rule`` commands to manage IP firewall rules.
* Add ``az documentdb mongocluster user`` commands to manage Microsoft Entra-backed
* Add ``az documentdb mongocluster entra-user`` commands to manage Microsoft Entra ID
database users.
* Add ``az documentdb mongocluster identity`` commands to manage the cluster's
user-assigned managed identity.
Expand Down
29 changes: 16 additions & 13 deletions src/documentdb/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Azure CLI DocumentDB Extension #

This is an extension to Azure CLI to manage **Azure Cosmos DB for MongoDB (vCore)**
clusters the `Microsoft.DocumentDB/mongoClusters` resource under the
This is an extension to Azure CLI to manage **Azure DocumentDB**
clusters (the `Microsoft.DocumentDB/mongoClusters` resource) under the
`az documentdb mongocluster` command group.

## How to install ##
Expand All @@ -12,7 +12,7 @@ az extension add --name documentdb

## Background ##

DocumentDB (Mongo vCore) is a fully managed, MongoDB-compatible database service.
Azure DocumentDB is a fully managed, MongoDB-compatible database service.
This extension exposes the management-plane operations for mongo clusters and their
sub-resources: IP firewall rules, Microsoft Entra-backed database users, user-assigned
managed identity, cross-region read replicas, and point-in-time restore.
Expand All @@ -23,7 +23,7 @@ managed identity, cross-region read replicas, and point-in-time restore.
|--|--|
| `az documentdb mongocluster` | Create and manage mongo clusters |
| `az documentdb mongocluster firewall-rule` | Manage IP firewall rules (public access) |
| `az documentdb mongocluster user` | Manage Microsoft Entra-backed database users |
| `az documentdb mongocluster microsoft-entra-user` | Manage Microsoft Entra ID database users |
| `az documentdb mongocluster identity` | Manage the cluster's user-assigned managed identity |
| `az documentdb mongocluster replica` | List, create, and promote cross-region read replicas |

Expand Down Expand Up @@ -60,11 +60,12 @@ az documentdb mongocluster firewall-rule create -n AllowMyIp --cluster-name MyCl
az documentdb mongocluster firewall-rule list --cluster-name MyCluster -g MyResourceGroup
```

### Microsoft Entra-backed users
### Microsoft Entra ID users

```bash
az documentdb mongocluster user create -n alice --cluster-name MyCluster -g MyResourceGroup \
--type User --role db=admin role=root
# The user is identified by its Microsoft Entra object (client) ID, not a friendly name.
az documentdb mongocluster microsoft-entra-user assign --object-id 11111111-1111-1111-1111-111111111111 \
--cluster-name MyCluster -g MyResourceGroup --type User --role db=admin role=root
```

### Managed identity (user-assigned)
Expand All @@ -78,15 +79,17 @@ az documentdb mongocluster identity show -n MyCluster -g MyResourceGroup
### Replicas (cross-region)

```bash
# List the parent cluster's replicas
az documentdb mongocluster replica list --cluster-name MyCluster -g MyResourceGroup
# List the source cluster's replicas
az documentdb mongocluster replica list --source-cluster MyCluster -g MyResourceGroup

# Create a cross-region GeoReplica (the source must have the GeoReplicas preview feature enabled)
# Create a cross-region GeoReplica (the source must have the GeoReplicas preview feature enabled).
# --source-cluster accepts the source cluster name or its full ARM resource ID; the source
# location is resolved automatically.
az documentdb mongocluster replica create -n MyReplica -g MyResourceGroup -l centralus \
--source-cluster MyCluster --source-location eastus2
--source-cluster MyCluster

# Promote a replica to primary
az documentdb mongocluster replica promote -n MyReplica -g MyResourceGroup
# Promote a replica to primary (--source-cluster guards against promoting the wrong replica)
az documentdb mongocluster replica promote -n MyReplica -g MyResourceGroup --source-cluster MyCluster
```

### Point-in-time restore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@

@register_command_group(
"documentdb",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage Document Db
"""Manage Azure DocumentDB clusters.
"""
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@

@register_command_group(
"documentdb mongocluster",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage Mongo Cluster
"""Manage Azure DocumentDB mongo clusters.
"""
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"documentdb mongocluster check-name-availability",
is_preview=True,
)
class CheckNameAvailability(AAZCommand):
"""Check if mongo cluster name is available for use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"documentdb mongocluster create",
is_preview=True,
)
class Create(AAZCommand):
"""Create a mongo cluster. Update overwrites all properties for the resource. To only modify some of the properties, use PATCH.
Expand Down Expand Up @@ -63,7 +64,7 @@ def _build_arguments_schema(cls, *args, **kwargs):

_args_schema = cls._args_schema
_args_schema.admin_password = AAZPasswordArg(
options=["-p", "--admin-password"],
options=["-p", "--password", "--admin-password"],
arg_group="Administrator",
help="The administrator password.",
required=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"documentdb mongocluster delete",
is_preview=True,
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"documentdb mongocluster list",
is_preview=True,
)
class List(AAZCommand):
"""List all the mongo clusters in a given subscription.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"documentdb mongocluster list-connection-strings",
is_preview=True,
)
class ListConnectionStrings(AAZCommand):
"""List mongo cluster connection strings. This includes the default connection string using SCRAM-SHA-256, as well as other connection strings supported by the cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

@register_command(
"documentdb mongocluster show",
is_preview=True,
)
class Show(AAZCommand):
"""Get information about a mongo cluster.
Expand Down
Loading
Loading