Edit

Share via


New-AzCosmosDBMongoDBRole

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

Syntax

Default (Default)

New-AzCosmosDBMongoDBRole
    -Database <String>
    -Role <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

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

Examples

Example 1

$db = 'test'
$role = 'testRoleName'

New-AzCosmosDBMongoDBRole -Database $db -Role $role
Object
Microsoft.Azure.Commands.CosmosDB.Models.PSMongoRole

Parameters

-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

-Role

Role 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

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.PSMongoRole