Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The databaseAccounts/mongodbRoleDefinitions resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
To create a Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions@2024-12-01-preview' = {
parent: resourceSymbolicName
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 |
---|---|---|
name | The resource name | string (required) |
parent | In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: databaseAccounts |
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 | Indicates whether the Role Definition was built-in or user created. | 'BuiltInRole' 'CustomRole' |
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 |
The databaseAccounts/mongodbRoleDefinitions resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
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-12-01-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 |
---|---|---|
apiVersion | The api version | '2024-12-01-preview' |
name | The resource name | string (required) |
properties | Properties to create and update an Azure Cosmos DB Mongo Role Definition. | MongoRoleDefinitionResource |
type | The resource type | 'Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions' |
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 | Indicates whether the Role Definition was built-in or user created. | 'BuiltInRole' 'CustomRole' |
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 |
The databaseAccounts/mongodbRoleDefinitions resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
To create a Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions@2024-12-01-preview"
name = "string"
body = {
properties = {
databaseName = "string"
privileges = [
{
actions = [
"string"
]
resource = {
collection = "string"
db = "string"
}
}
]
roleName = "string"
roles = [
{
db = "string"
role = "string"
}
]
type = "string"
}
}
}
Name | Description | Value |
---|---|---|
name | The resource name | string (required) |
parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: databaseAccounts |
properties | Properties to create and update an Azure Cosmos DB Mongo Role Definition. | MongoRoleDefinitionResource |
type | The resource type | "Microsoft.DocumentDB/databaseAccounts/mongodbRoleDefinitions@2024-12-01-preview" |
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 | Indicates whether the Role Definition was built-in or user created. | 'BuiltInRole' 'CustomRole' |
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 |