共用方式為


ArmCosmosDBModelFactory.MongoDBRoleDefinitionData Method

Definition

Initializes a new instance of MongoDBRoleDefinitionData.

public static Azure.ResourceManager.CosmosDB.MongoDBRoleDefinitionData MongoDBRoleDefinitionData (Azure.Core.ResourceIdentifier id = default, string name = default, Azure.Core.ResourceType resourceType = default, Azure.ResourceManager.Models.SystemData systemData = default, string roleName = default, Azure.ResourceManager.CosmosDB.Models.MongoDBRoleDefinitionType? roleDefinitionType = default, string databaseName = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.CosmosDB.Models.MongoDBPrivilege> privileges = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.CosmosDB.Models.MongoDBRole> roles = default);
static member MongoDBRoleDefinitionData : Azure.Core.ResourceIdentifier * string * Azure.Core.ResourceType * Azure.ResourceManager.Models.SystemData * string * Nullable<Azure.ResourceManager.CosmosDB.Models.MongoDBRoleDefinitionType> * string * seq<Azure.ResourceManager.CosmosDB.Models.MongoDBPrivilege> * seq<Azure.ResourceManager.CosmosDB.Models.MongoDBRole> -> Azure.ResourceManager.CosmosDB.MongoDBRoleDefinitionData
Public Shared Function MongoDBRoleDefinitionData (Optional id As ResourceIdentifier = Nothing, Optional name As String = Nothing, Optional resourceType As ResourceType = Nothing, Optional systemData As SystemData = Nothing, Optional roleName As String = Nothing, Optional roleDefinitionType As Nullable(Of MongoDBRoleDefinitionType) = Nothing, Optional databaseName As String = Nothing, Optional privileges As IEnumerable(Of MongoDBPrivilege) = Nothing, Optional roles As IEnumerable(Of MongoDBRole) = Nothing) As MongoDBRoleDefinitionData

Parameters

id
ResourceIdentifier

The id.

name
String

The name.

resourceType
ResourceType

The resourceType.

systemData
SystemData

The systemData.

roleName
String

A user-friendly name for the Role Definition. Must be unique for the database account.

roleDefinitionType
Nullable<MongoDBRoleDefinitionType>

Indicates whether the Role Definition was built-in or user created.

databaseName
String

The database name for which access is being granted for this Role Definition.

privileges
IEnumerable<MongoDBPrivilege>

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.

roles
IEnumerable<MongoDBRole>

The set of roles inherited by this Role Definition.

Returns

A new MongoDBRoleDefinitionData instance for mocking.

Applies to