Microsoft.DocumentDB databaseAccounts/sqlRoleAssignments 2021-06-15

The databaseAccounts/sqlRoleAssignments resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

To create a Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments@2021-06-15' = {
  name: 'string'
  properties: {
    principalId: 'string'
    roleDefinitionId: 'string'
    scope: 'string'
  }
}

Property values

databaseAccounts/sqlRoleAssignments

Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
'Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments'
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
'2021-06-15'
name The resource name

See how to set names and types for child resources in Bicep or JSON ARM templates.
string (required)
properties Azure Cosmos DB SQL Role Assignment resource object. SqlRoleAssignmentResource

SqlRoleAssignmentResource

Name Description Value
principalId The unique identifier for the associated AAD principal in the AAD graph to which access is being granted through this Role Assignment. Tenant ID for the principal is inferred using the tenant associated with the subscription. string
roleDefinitionId The unique identifier for the associated Role Definition. string
scope The data plane resource path for which access is being granted through this Role Assignment. string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Create an Azure Cosmos DB SQL Account with data plane RBAC

Deploy to Azure
This template will create a SQL Cosmos account, a natively maintained Role Definition, and a natively maintained Role Assignment for an AAD identity.