Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Get-AzCosmosDBSqlRoleDefinition
- Module:
- Az.CosmosDB Module
Gets the CosmosDB Role Definition.
Syntax
ByNameParameterSet (Default)
Get-AzCosmosDBSqlRoleDefinition
-ResourceGroupName <String>
-AccountName <String>
[-Id <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByParentObjectParameterSet
Get-AzCosmosDBSqlRoleDefinition
-ParentObject <PSDatabaseAccountGetResults>
[-Id <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzCosmosDBSqlRoleDefinition cmdlet gets the list of all existing CosmosDB Sql Role Definitions for a given ResourceGroupName, AccountName and gets a single CosmosDB Sql Database for a given ResourceGroupName, AccountName, and Id. Id can be either fully qualified or just the Guid.
Examples
Example 1
Get-AzCosmosDBSqlRoleDefinition -AccountName accountName -ResourceGroupName resourceGroupName -Id id
RoleName : roleName
Id : /subscriptions/subId/resourceGroups/resourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/accountName/sqlRoleDefinitions/id
Type : CustomRole
Permissions : {Microsoft.Azure.Management.CosmosDB.Models.Permission}
AssignableScopes : {/subscriptions/subId/resourceGroups/resourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/accountName}
Parameters
-AccountName
Name of the Cosmos DB database account.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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
-Id
Role Definition Id.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ParentObject
CosmosDB Account object
Parameter properties
| Type: | PSDatabaseAccountGetResults |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ResourceGroupName
Name of resource group.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
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
PSSqlRoleDefinitionGetResults
Azure PowerShell
Feedback
Was this page helpful?
