Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
8 changes: 6 additions & 2 deletions src/MongoDB/MongoDB.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - MongoDb")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.0")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.1")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]




7 changes: 5 additions & 2 deletions src/MongoDB/MongoDB.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ For information on how to develop for `Az.MongoDB`, see [how-to.md](how-to.md).

```yaml
# pin the swagger version by using the commit id instead of branch name
commit: 589f71f4a7fe1c6ca70b0988cadd93687df8f73c
# Updated to include Projects and Clusters resources from 2026-03-01-preview (PR #43780)
commit: 5c97134820f1145742a874df3838b28e515e4ba1
require:
# readme.azure.noprofile.md is the common configuration file
- $(this-folder)/../../readme.azure.noprofile.md
Expand All @@ -40,7 +41,9 @@ require:
try-require:
- $(repo)/specification/liftrmongodb/resource-manager/readme.powershell.md

module-version: 1.0.0
# Use the 2026-03-01-preview tag which includes Organization, Project, and Cluster resources
tag: package-2026-03-01-preview
module-version: 1.1.0
Comment on lines +44 to +46

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is expected and consistent with every other AutoRest module in the repo. For example, Az.Cdn has module-version: 0.1.0 in its AutoRest README but ModuleVersion = '6.0.2' in the .psd1. The module-version in the AutoRest configuration is a code-generation metadata field, not the shipped module version. These are intentionally decoupled.

# Normally, title is the service name
title: MongoDB
service-name: MongoDB
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"resourceType": "organizations/projects/clusters",
"apiVersion": "2026-03-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.mongodb"
},
"commands": [
{
"name": "Get-AzMongoDBCluster",
"description": "Get a Cluster",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}/clusters/{clusterName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.mongodb/get-azmongodbcluster"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-OrganizationName <String>",
"-ProjectName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "Get a Cluster",
"parameters": [
{
"name": "-Name",
"value": "[Path.clusterName]"
},
{
"name": "-OrganizationName",
"value": "[Path.organizationName]"
},
{
"name": "-ProjectName",
"value": "[Path.projectName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzMongoDBCluster",
"description": "Delete a Cluster",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}/clusters/{clusterName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.mongodb/remove-azmongodbcluster"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-OrganizationName <String>",
"-ProjectName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Delete a Cluster",
"parameters": [
{
"name": "-Name",
"value": "[Path.clusterName]"
},
{
"name": "-OrganizationName",
"value": "[Path.organizationName]"
},
{
"name": "-ProjectName",
"value": "[Path.projectName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
{
"resourceType": "organizations/projects",
"apiVersion": "2026-03-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.mongodb"
},
"commands": [
{
"name": "Get-AzMongoDBProject",
"description": "Get a Project",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.mongodb/get-azmongodbproject"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-OrganizationName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "Get a Project",
"parameters": [
{
"name": "-Name",
"value": "[Path.projectName]"
},
{
"name": "-OrganizationName",
"value": "[Path.organizationName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Limit-AzMongoDBProject",
"description": "Check if tier limit is reached for the project.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}/tierLimitReached",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.mongodb/limit-azmongodbproject"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-OrganizationName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Check if tier limit is reached for the project.",
"parameters": [
{
"name": "-Name",
"value": "[Path.projectName]"
},
{
"name": "-OrganizationName",
"value": "[Path.organizationName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzMongoDBProject",
"description": "Delete a Project",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}/projects/{projectName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.mongodb/remove-azmongodbproject"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-OrganizationName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Delete a Project",
"parameters": [
{
"name": "-Name",
"value": "[Path.projectName]"
},
{
"name": "-OrganizationName",
"value": "[Path.organizationName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "organizations",
"apiVersion": "2025-06-01",
"apiVersion": "2026-03-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.mongodb"
},
Expand Down
4 changes: 2 additions & 2 deletions src/MongoDB/MongoDB.Autorest/custom/Az.MongoDB.custom.psm1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# region Generated
# Load the private module dll
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '../bin/Az.MongoDB.private.dll')
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.MongoDB.private.dll')

# Load the internal module
$internalModulePath = Join-Path $PSScriptRoot '../internal/Az.MongoDB.internal.psm1'
$internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.MongoDB.internal.psm1'
if(Test-Path $internalModulePath) {
$null = Import-Module -Name $internalModulePath
}
Expand Down
6 changes: 3 additions & 3 deletions src/MongoDB/MongoDB.Autorest/custom/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Custom
This directory contains custom implementation for non-generated cmdlets for the `Az.MongoDB` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `../exports` folder. The only generated file into this folder is the `Az.MongoDB.custom.psm1`. This file should not be modified.
This directory contains custom implementation for non-generated cmdlets for the `Az.MongoDB` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.MongoDB.custom.psm1`. This file should not be modified.

## Info
- Modifiable: yes
Expand All @@ -15,10 +15,10 @@ For C# cmdlets, they are compiled with the rest of the generated low-level cmdle
For script cmdlets, these are loaded via the `Az.MongoDB.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.

## Purpose
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `../exports` folder.
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.

## Usage
The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `../exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
- Break
- DefaultProfile
- HttpPipelineAppend
Expand Down
26 changes: 25 additions & 1 deletion src/MongoDB/MongoDB.Autorest/docs/Az.MongoDB.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.MongoDB
Module Guid: e8abde8d-9c45-4aea-9875-390bd042d9ea
Module Guid: 97fe2d21-7b64-4cee-b8b9-e39d12750776
Download Help Link: https://learn.microsoft.com/powershell/module/az.mongodb
Help Version: 1.0.0.0
Locale: en-US
Expand All @@ -11,12 +11,36 @@ Locale: en-US
Microsoft Azure PowerShell: MongoDb cmdlets

## Az.MongoDB Cmdlets
### [Get-AzMongoDBCluster](Get-AzMongoDBCluster.md)
Get a Cluster

### [Get-AzMongoDBOrganization](Get-AzMongoDBOrganization.md)
Get a OrganizationResource

### [Get-AzMongoDBProject](Get-AzMongoDBProject.md)
Get a Project

### [Get-AzMongoDBProjectClusterTierRegion](Get-AzMongoDBProjectClusterTierRegion.md)
List available regions by cluster tier for the project.

### [Limit-AzMongoDBProject](Limit-AzMongoDBProject.md)
Check if tier limit is reached for the project.

### [New-AzMongoDBCluster](New-AzMongoDBCluster.md)
Create a Cluster

### [New-AzMongoDBOrganization](New-AzMongoDBOrganization.md)
Create a OrganizationResource

### [New-AzMongoDBProject](New-AzMongoDBProject.md)
Create a Project

### [Remove-AzMongoDBCluster](Remove-AzMongoDBCluster.md)
Delete a Cluster

### [Remove-AzMongoDBOrganization](Remove-AzMongoDBOrganization.md)
Delete a OrganizationResource

### [Remove-AzMongoDBProject](Remove-AzMongoDBProject.md)
Delete a Project

Loading