Get CosmosDbUri - PlagueHO/CosmosDB GitHub Wiki
Return the URI of the Cosmos DB that Rest APIs requests will be sent to.
Get-CosmosDbUri [-Account] <String> [[-BaseUri] <String>] [[-Environment] <Environment>]
[<CommonParameters>]
This cmdlet returns the root URI of the Cosmos DB.
PS C:\> $uri = Get-CosmosDbUri -Account 'MyAzureCosmosDB'
Generates the URI for accessing an Azure Cosmos DB account.
PS C:\>$uri = Get-CosmosDbUri -Account 'MyAzureCosmosDB' -BaseUri 'localhost'
Generates the URI for accessing a Cosmos DB emulator account on the localhost.
PS C:\>$uri = Get-CosmosDbUri -Account 'MyAzureCosmosDB' -Environment 'AzureUSGovernment'
Generates the URI for accessing a Cosmos DB account in the US Government cloud.
This is the name of the Cosmos DB Account to get the URI for.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This is the base URI of the Cosmos DB to use. If not specified it will default to 'documents.azure.com'.
Type: String
Parameter Sets: Uri
Aliases:
Required: False
Position: 2
Default value: Documents.azure.com
Accept pipeline input: False
Accept wildcard characters: False
This is the Azure environment hosting the Cosmos DB account.
The supported values are:
- AzureCloud
- AzureUSGovernment
Type: Environment
Parameter Sets: Environment
Aliases:
Required: False
Position: Named
Default value: AzureCloud
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).