你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Get-AzCosmosDBSqlRoleAssignment

Gets the CosmosDB Sql Role Assignment.

Syntax

Get-AzCosmosDBSqlRoleAssignment
   -ResourceGroupName <String>
   -AccountName <String>
   [-Id <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzCosmosDBSqlRoleAssignment
   [-Id <String>]
   -ParentObject <PSDatabaseAccountGetResults>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzCosmosDBSqlRoleAssignment cmdlet gets the list of all existing CosmosDB Sql Role Assignments for a given ResourceGroupName, AccountName and gets a single CosmosDB Sql Role Assignment for a given ResourceGroupName, AccountName, Id. Id can be either fully qualified or just the Guid.

Examples

Example 1

Get-AzCosmosDBSqlRoleAssignment -AccountName accountName -ResourceGroupName resourceGroupName -Id roleAssignmentId

Id               : /subscriptions/subId/resourceGroups/resourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlRoleAssignments/roleAssignmentId
Scope            : /subscriptions/subId/resourceGroups/resourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/
RoleDefinitionId : /subscriptions/subId/resourceGroups/resourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlRoleDefinitions/roleDefinitionId
PrincipalId      : principalId

Parameters

-AccountName

Name of the Cosmos DB database account.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Id

Role Assignment Id.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ParentObject

Cosmos DB Account object

Type:PSDatabaseAccountGetResults
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ResourceGroupName

Name of resource group.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PSSqlRoleAssignmentGetResults