Skip to content

Corrected content of CosmosDB ref docs #3652

New issue

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

Merged
merged 1 commit into from
Jun 23, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
70 changes: 47 additions & 23 deletions azps-12.5.0/Az.CosmosDB/Remove-AzCosmosDBMongoDBRoleDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,45 @@ content_git_url: https://github.com/Azure/azure-powershell/blob/main/src/CosmosD
original_content_git_url: https://github.com/Azure/azure-powershell/blob/main/src/CosmosDB/CosmosDB/help/Remove-AzCosmosDBMongoDBRoleDefinition.md
---

# Remove-AzCosmosDBMongoDBDatabase
# Remove-AzCosmosDBMongoDBRoleDefinition

## SYNOPSIS
Deletes a CosmosDB MongoDB Database.
This cmdlet removes a MongoDB role definition from a specified Cosmos DB account.

## SYNTAX

### ByNameParameterSet
### ByNameParameterSet (Default)
```
Remove-AzCosmosDBMongoDBDatabase -AccountName <String> -Name <String> -ResourceGroupName <String> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-AzCosmosDBMongoDBRoleDefinition -ResourceGroupName <String> -AccountName <String> -Id <String>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```

### ByParentObjectParameterSet
```
Remove-AzCosmosDBMongoDBRoleDefinition -Id <String> -DatabaseAccountObject <PSDatabaseAccountGetResults>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```

### ByObjectParameterSet
```
Remove-AzCosmosDBMongoDBDatabase -InputObject <PSMongoDBDatabaseGetResults> [-PassThru]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
Remove-AzCosmosDBMongoDBRoleDefinition -Id <String> -InputObject <PSMongoDBRoleDefinitionGetResults>
[-PassThru] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]
```

## DESCRIPTION
The **Remove-AzCosmosDBMongoDBDatabase** cmdlet deletes a CosmosDB MongoDB Database.
This cmdlet removes a MongoDB role definition from a specified Cosmos DB account.

## EXAMPLES

### Example 1
```powershell
Remove-AzCosmosDBMongoDBDatabase -ResourceGroupName "rgName" -AccountName "accountName" -Name "dbName"
Remove-AzCosmosDBMongoDBRoleDefinition -AccountName "account-name" -ResourceGroupName "resource-group-name" -Id "role-id"
```

The cmdlet returns an object of type bool(when -PassThru is passed) which is true, if the delete was successful.
This command removes a MongoDB role definition from a specified Cosmos DB account.

## PARAMETERS

Expand All @@ -55,6 +64,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -DatabaseAccountObject
CosmosDB Account object

```yaml
Type: Microsoft.Azure.Commands.CosmosDB.Models.PSDatabaseAccountGetResults
Parameter Sets: ByParentObjectParameterSet
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.

Expand All @@ -70,33 +94,33 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -InputObject
Mongo Database object.
### -Id
Unique ID (\<Databasename\>.\<RoleName\>) for the MongoDB Role Definition.

```yaml
Type: Microsoft.Azure.Commands.CosmosDB.Models.PSMongoDBDatabaseGetResults
Parameter Sets: ByObjectParameterSet
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept pipeline input: False
Accept wildcard characters: False
```

### -Name
Database name.
### -InputObject
A MongoDB Role Definition For Mongo DB.

```yaml
Type: System.String
Parameter Sets: ByNameParameterSet
Type: Microsoft.Azure.PowerShell.Cmdlets.CosmosDB.Models.MongoDB.PSMongoDBRoleDefinitionGetResults
Parameter Sets: ByObjectParameterSet
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

Expand Down Expand Up @@ -167,11 +191,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## INPUTS

### Microsoft.Azure.Commands.CosmosDB.Models.PSMongoDBDatabaseGetResults
### Microsoft.Azure.Commands.CosmosDB.Models.PSDatabaseAccountGetResults

## OUTPUTS
### Microsoft.Azure.PowerShell.Cmdlets.CosmosDB.Models.MongoDB.PSMongoDBRoleDefinitionGetResults

### System.Void
## OUTPUTS

### System.Boolean

Expand Down
Loading