az cosmosdb mongodb user definition
Note
This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.
Manage Azure Cosmos DB Mongo user definitions.
Name | Description | Type | Status |
---|---|---|---|
az cosmosdb mongodb user definition create |
Create a Mongo DB user definition under an Azure Cosmos DB account. |
Core | GA |
az cosmosdb mongodb user definition create (cosmosdb-preview extension) |
Create a Mongo DB user definition under an Azure Cosmos DB account. |
Extension | GA |
az cosmosdb mongodb user definition delete |
Delete a CosmosDb MongoDb user definition under an Azure Cosmos DB account. |
Core | GA |
az cosmosdb mongodb user definition delete (cosmosdb-preview extension) |
Delete a CosmosDb MongoDb user definition under an Azure Cosmos DB account. |
Extension | GA |
az cosmosdb mongodb user definition exists |
Check if an Azure Cosmos DB MongoDb user definition exists. |
Core | GA |
az cosmosdb mongodb user definition exists (cosmosdb-preview extension) |
Check if an Azure Cosmos DB MongoDb user definition exists. |
Extension | GA |
az cosmosdb mongodb user definition list |
List all MongoDb user definitions under an Azure Cosmos DB account. |
Core | GA |
az cosmosdb mongodb user definition list (cosmosdb-preview extension) |
List all MongoDb user definitions under an Azure Cosmos DB account. |
Extension | GA |
az cosmosdb mongodb user definition show |
Show the properties of a MongoDb user definition under an Azure Cosmos DB account. |
Core | GA |
az cosmosdb mongodb user definition show (cosmosdb-preview extension) |
Show the properties of a MongoDb user definition under an Azure Cosmos DB account. |
Extension | GA |
az cosmosdb mongodb user definition update |
Update a MongoDb user definition under an Azure Cosmos DB account. |
Core | GA |
az cosmosdb mongodb user definition update (cosmosdb-preview extension) |
Update a MongoDb user definition under an Azure Cosmos DB account. |
Extension | GA |
Create a Mongo DB user definition under an Azure Cosmos DB account.
az cosmosdb mongodb user definition create --account-name
--body
--resource-group
Create a Mongo DB user definition under an Azure Cosmos DB account using a JSON string.
az cosmosdb mongodb user definition create --account-name MyAccount --resource-group MyResourceGroup --body '{
"Id": "MyDB.MyUName",
"UserName": "MyUName",
"Password": "MyPass",
"DatabaseName": "MyDB",
"CustomData": "TestCustomData",
"Mechanisms": "SCRAM-SHA-256",
"Roles": [
{
"Role": "myReadRole",
"Db": "MyDB"
}
]
}'
Create a Mongo DB user definition under an Azure Cosmos DB account using a JSON file.
az cosmosdb mongodb user definition create --account-name MyAccount --resource-group MyResourceGroup --body @mongo-user-definition.json
Cosmosdb account name.
User Definition body with Id (Optional for create), UserName, Password, DatabaseName, CustomData, Mechanisms, Roles. You can enter it as a string or as a file, e.g., --body @mongo-user_definition-body-file.json or --body "{"Id": "be79875a-2cc4-40d5-8958-566017875b39","UserName": "MyUserName","Password": "MyPass","CustomData": "MyCustomData","Mechanisms": "SCRAM-SHA-256""DatabaseName": "MyDb","Roles": [ {"Role": "myReadRole","Db": "MyDb"}]}".
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Create a Mongo DB user definition under an Azure Cosmos DB account.
az cosmosdb mongodb user definition create --account-name
--body
--resource-group
Create a Mongo DB user definition under an Azure Cosmos DB account using a JSON string.
az cosmosdb mongodb user definition create --account-name MyAccount --resource-group MyResourceGroup --body '{
"Id": "MyDB.MyUName",
"UserName": "MyUName",
"Password": "MyPass",
"DatabaseName": "MyDB",
"CustomData": "TestCustomData",
"Mechanisms": "SCRAM-SHA-256",
"Roles": [
{
"Role": "myReadRole",
"Db": "MyDB"
}
]
}'
Create a Mongo DB user definition under an Azure Cosmos DB account using a JSON file.
az cosmosdb mongodb user definition create --account-name MyAccount --resource-group MyResourceGroup --body @mongo-user-definition.json
Cosmosdb account name.
User Definition body with Id (Optional for create), UserName, Password, DatabaseName, CustomData, Mechanisms, Roles. You can enter it as a string or as a file, e.g., --body @mongo-user_definition-body-file.json or --body "{ "Id": "be79875a-2cc4-40d5-8958-566017875b39", "UserName": "MyUserName", "Password": "MyPass", "CustomData": "MyCustomData", "Mechanisms": "SCRAM-SHA-256" "DatabaseName": "MyDb", "Roles": [ {"Role": "myReadRole","Db": "MyDb"}] }".
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Delete a CosmosDb MongoDb user definition under an Azure Cosmos DB account.
az cosmosdb mongodb user definition delete --account-name
--id
--resource-group
[--yes]
Delete a Mongo user definition under an Azure Cosmos DB account.
az cosmosdb mongodb user definition delete --account-name MyAccount --resource-group MyResourceGroup --id be79875a-2cc4-40d5-8958-566017875b39
Cosmosdb account name.
Unique ID for the Mongo User Definition.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Delete a CosmosDb MongoDb user definition under an Azure Cosmos DB account.
az cosmosdb mongodb user definition delete --account-name
--id
--resource-group
[--yes]
Delete a Mongo user definition under an Azure Cosmos DB account.
az cosmosdb mongodb user definition delete --account-name MyAccount --resource-group MyResourceGroup --id be79875a-2cc4-40d5-8958-566017875b39
Cosmosdb account name.
Unique ID for the Mongo User Definition.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Check if an Azure Cosmos DB MongoDb user definition exists.
az cosmosdb mongodb user definition exists --account-name
--id
--resource-group
Check if an Azure Cosmos DB MongoDb user definition exists.
az cosmosdb mongodb user definition exists --account-name MyAccount --resource-group MyResourceGroup --id be79875a-2cc4-40d5-8958-566017875b39
Cosmosdb account name.
Unique ID for the Mongo User Definition.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Check if an Azure Cosmos DB MongoDb user definition exists.
az cosmosdb mongodb user definition exists --account-name
--id
--resource-group
Check if an Azure Cosmos DB MongoDb user definition exists.
az cosmosdb mongodb user definition exists --account-name MyAccount --resource-group MyResourceGroup --id be79875a-2cc4-40d5-8958-566017875b39
Cosmosdb account name.
Unique ID for the Mongo User Definition.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
List all MongoDb user definitions under an Azure Cosmos DB account.
az cosmosdb mongodb user definition list --account-name
--resource-group
List all Mongodb user definitions under an Azure Cosmos DB account.
az cosmosdb mongodb user definition list --account-name MyAccount --resource-group MyResourceGroup
Cosmosdb account name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
List all MongoDb user definitions under an Azure Cosmos DB account.
az cosmosdb mongodb user definition list --account-name
--resource-group
List all Mongodb user definitions under an Azure Cosmos DB account.
az cosmosdb mongodb user definition list --account-name MyAccount --resource-group MyResourceGroup
Cosmosdb account name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Show the properties of a MongoDb user definition under an Azure Cosmos DB account.
az cosmosdb mongodb user definition show --account-name
--id
--resource-group
Show the properties of a MongoDb user definition under an Azure Cosmos DB account.
az cosmosdb mongodb user definition show --account-name MyAccount --resource-group MyResourceGroup --id be79875a-2cc4-40d5-8958-566017875b39
Cosmosdb account name.
Unique ID for the Mongo User Definition.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Show the properties of a MongoDb user definition under an Azure Cosmos DB account.
az cosmosdb mongodb user definition show --account-name
--id
--resource-group
Show the properties of a MongoDb user definition under an Azure Cosmos DB account.
az cosmosdb mongodb user definition show --account-name MyAccount --resource-group MyResourceGroup --id be79875a-2cc4-40d5-8958-566017875b39
Cosmosdb account name.
Unique ID for the Mongo User Definition.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Update a MongoDb user definition under an Azure Cosmos DB account.
az cosmosdb mongodb user definition update --account-name
--body
--resource-group
Update a MongoDb user definition under an Azure Cosmos DB account.
az cosmosdb mongodb user definition update --account-name MyAccount --resource-group MyResourceGroup --body @mongo-user-definition.json
Cosmosdb account name.
User Definition body with Id (Optional for create), UserName, Password, DatabaseName, CustomData, Mechanisms, Roles. You can enter it as a string or as a file, e.g., --body @mongo-user_definition-body-file.json or --body "{"Id": "be79875a-2cc4-40d5-8958-566017875b39","UserName": "MyUserName","Password": "MyPass","CustomData": "MyCustomData","Mechanisms": "SCRAM-SHA-256""DatabaseName": "MyDb","Roles": [ {"Role": "myReadRole","Db": "MyDb"}]}".
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Update a MongoDb user definition under an Azure Cosmos DB account.
az cosmosdb mongodb user definition update --account-name
--body
--resource-group
Update a MongoDb user definition under an Azure Cosmos DB account.
az cosmosdb mongodb user definition update --account-name MyAccount --resource-group MyResourceGroup --body @mongo-user-definition.json
Cosmosdb account name.
User Definition body with Id (Optional for create), UserName, Password, DatabaseName, CustomData, Mechanisms, Roles. You can enter it as a string or as a file, e.g., --body @mongo-user_definition-body-file.json or --body "{ "Id": "be79875a-2cc4-40d5-8958-566017875b39", "UserName": "MyUserName", "Password": "MyPass", "CustomData": "MyCustomData", "Mechanisms": "SCRAM-SHA-256" "DatabaseName": "MyDb", "Roles": [ {"Role": "myReadRole","Db": "MyDb"}] }".
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI feedback
Azure CLI is an open source project. Select a link to provide feedback: