Edit

Share via


New-AzCosmosDBMongoDBPrivilegeResource

Creates a new CosmosDB MongoDB PrivilegeResource object to be used to create or update a CosmosDB MongoDB Role Definition.

Syntax

Default (Default)

New-AzCosmosDBMongoDBPrivilegeResource
    -Database <String>
    -Collection <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

Creates a new CosmosDB MongoDB PrivilegeResource object to be used to create or update a CosmosDB MongoDB Role Definition.

Examples

Example 1

$db = 'test'
$collection = 'coll'

New-AzCosmosDBMongoDBPrivilegeResource -Database $db -Collection $collection
Object
Microsoft.Azure.Commands.CosmosDB.Models.PSMongoPrivilegeResource

Parameters

-Collection

Collection Name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Database

Database Name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
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

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.

Inputs

None

Outputs

Microsoft.Azure.Commands.CosmosDB.Models.PSMongoPrivilegeResource