New-AzCosmosDBMongoDBPrivilege
Creates a new CosmosDB MongoDB Privilege object to be used to create or update a CosmosDB MongoDB Role Definition.
Syntax
Default (Default)
New-AzCosmosDBMongoDBPrivilege
[-PrivilegeResource <PSMongoPrivilegeResource>]
[-Actions <String[]>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Creates a new CosmosDB MongoDB Privilege object to be used to create or update a CosmosDB MongoDB Role Definition.
Examples
Example 1
$db = 'test'
$collection = 'coll'
$Actions = 'insert', 'find'
$PrivilegeResource = New-AzCosmosDBMongoDBPrivilegeResource -Database $db -Collection $collection
New-AzCosmosDBMongoDBPrivilege -PrivilegeResource $PrivilegeResource -Actions $Actions
Object
Microsoft.Azure.Commands.CosmosDB.Models.PSMongoPrivilege
Parameters
-Actions
Array of valid Actions(e.g. insert, find).
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: | IAzureContextContainer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PrivilegeResource
Microsoft.Azure.Commands.CosmosDB.Models.PSMongoPrivilegeResource Object.
Parameter properties
Type: | PSMongoPrivilegeResource |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.