Get-AzLocation
取得所有位置和每個位置支援的資源提供者。
Syntax
Get-AzLocation
[-ExtendedLocation <Boolean>]
[-ApiVersion <String>]
[-Pre]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Get-AzLocation Cmdlet 會取得每個位置的所有位置和支持的資源提供者。
範例
範例 1:取得所有位置和支持的資源提供者
Get-AzLocation
此命令會取得每個位置的所有位置和支持的資源提供者。
範例 2:取得支持資源提供者 Microsoft.AppConfiguration 的所有位置
Get-AzLocation | Where-Object {$_.Providers -contains "Microsoft.AppConfiguration"}
Location : eastasia
DisplayName : East Asia
Providers : {Microsoft.Devices, Microsoft.Cache, Microsoft.AppConfiguration, microsoft.insights…}
Location : southeastasia
DisplayName : Southeast Asia
Providers : {Microsoft.Devices, Microsoft.Cache, Microsoft.AppConfiguration, microsoft.insights…}
Location : centralus
DisplayName : Central US
Providers : {Microsoft.Devices, Microsoft.Cache, Microsoft.AppConfiguration, microsoft.insights…}
...
此範例會取得支持資源提供者 「Microsoft.AppConfiguration」 的所有位置。
參數
-ApiVersion
指定資源提供者支援的 API 版本。 您可以指定與預設版本不同的版本。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ExtendedLocation
是否要包含擴充位置。
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Pre
指出此 Cmdlet 會在自動判斷要使用的版本時,考慮發行前版本 API 版本。
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
輸入
None
輸出
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應