Get-AzCosmosDBAccount
Get CosmosDB Account.
Syntax
ByNameParameterSet (Default)
Get-AzCosmosDBAccount
-ResourceGroupName <String>
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
ByResourceIdParameterSet
Get-AzCosmosDBAccount
-ResourceId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzCosmosDBAccount cmdlet gets the list of all existing CosmosDB accounts for a given ResourceGroupName and gets a single CosmosDB account for a given ResourceGroupName and AccountName.
Examples
Example 1
Get-AzCosmosDBAccount -ResourceGroupName "resourceGroupName" -Name "databaseAccountName"
Id : /subscriptions/{subscriptionid}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{databaseAccountName}
Name : {databaseAccountName}
FailoverPolicies : {databaseAccountName-region1}
ReadLocations : {databaseAccountName-region1}
WriteLocations : {databaseAccountName-region1}
Capabilities : {}
ConsistencyPolicy : Microsoft.Azure.Management.CosmosDB.Models.ConsistencyPolicy
EnableAutomaticFailover : False
IsVirtualNetworkFilterEnabled : False
IpRangeFilter :
DatabaseAccountOfferType : Standard
DocumentEndpoint : https://databaseAccountName.documents.azure.com:443/
ProvisioningState : Succeeded
Kind : GlobalDocumentDB
VirtualNetworkRules : {}
EnableMultipleWriteLocations : False
NetworkAclBypass : None
NetworkAclBypassResourceIds : {}
Get CosmosDB database account with name databaseAccountName in ResourceGroup resourceGroupName.
Parameters
-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 |
-Name
Name of the Cosmos DB database account.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
ByNameParameterSet
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-ResourceGroupName
Name of resource group.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
ByNameParameterSet
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-ResourceId
ResourceId of the resource.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
ByResourceIdParameterSet
| 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.