The databaseAccounts/mongodbUserDefinitions resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions resource, add the following JSON to your template.
{
"type": "Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions",
"apiVersion": "2024-02-15-preview",
"name": "string",
"properties": {
"customData": "string",
"databaseName": "string",
"mechanisms": "string",
"password": "string",
"roles": [
{
"db": "string",
"role": "string"
}
],
"userName": "string"
}
}
Name | Description | Value |
---|---|---|
type | The resource type | 'Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions' |
apiVersion | The resource api version | '2024-02-15-preview' |
name | The resource name See how to set names and types for child resources in JSON ARM templates. |
string (required) |
properties | Properties to create and update an Azure Cosmos DB Mongo User Definition. | MongoUserDefinitionResource |
Name | Description | Value |
---|---|---|
customData | A custom definition for the USer Definition. | string |
databaseName | The database name for which access is being granted for this User Definition. | string |
mechanisms | The Mongo Auth mechanism. For now, we only support auth mechanism SCRAM-SHA-256. | string |
password | The password for User Definition. Response does not contain user password. | string |
roles | The set of roles inherited by the User Definition. | Role[] |
userName | The user name for User Definition. | string |
Name | Description | Value |
---|---|---|
db | The database name the role is applied. | string |
role | The role name. | string |