The databaseAccounts/mongodbRoleDefinitions 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/mongodbRoleDefinitions resource, add the following JSON to your template.
{
"type": "Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions",
"apiVersion": "2024-02-15-preview",
"name": "string",
"properties": {
"databaseName": "string",
"privileges": [
{
"actions": [ "string" ],
"resource": {
"collection": "string",
"db": "string"
}
}
],
"roleName": "string",
"roles": [
{
"db": "string",
"role": "string"
}
],
"type": "string"
}
}
Name | Description | Value |
---|---|---|
type | The resource type | 'Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions' |
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 Role Definition. | MongoRoleDefinitionResource |
Name | Description | Value |
---|---|---|
databaseName | The database name for which access is being granted for this Role Definition. | string |
privileges | A set of privileges contained by the Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Scopes higher than Database are not enforceable as privilege. | Privilege[] |
roleName | A user-friendly name for the Role Definition. Must be unique for the database account. | string |
roles | The set of roles inherited by this Role Definition. | Role[] |
type | 'BuiltInRole' 'CustomRole': Indicates whether the Role Definition was built-in or user created. |
Name | Description | Value |
---|---|---|
actions | An array of actions that are allowed. | string[] |
resource | An Azure Cosmos DB Mongo DB Resource. | PrivilegeResource |
Name | Description | Value |
---|---|---|
collection | The collection name the role is applied. | string |
db | The database name the role is applied. | string |
Name | Description | Value |
---|---|---|
db | The database name the role is applied. | string |
role | The role name. | string |