azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

[Azure China] Cannot find 'chinaeast3' region in PowerShell

Open caiwan-msft opened this issue 4 years ago • 11 comments

Description

Some certain subscriptions have the privilege to create resources on the new Data Center 'chinaeast 3', and accordingly we can get 'China East 3' information via restful API. However, it cannot find 'China East 3' region in PowerShell.

image

image

image

Issue script & Debug output

PS > Get-AzLocation

Environment data

PS C:\WINDOWS\system32> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.22000.613
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22000.613
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Module versions

PS C:\WINDOWS\system32> Get-InstalledModule

Version    Name                                Repository           Description
-------    ----                                ----------           -----------
7.5.0      Az                                  PSGallery            Microsoft Azure PowerShell - Cmdlets to manage resources in Azure. This module is compatible with PowerShell and Windows PowerShell....
2.7.6      Az.Accounts                         PSGallery            Microsoft Azure PowerShell - Accounts credential management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.2      Az.Advisor                          PSGallery            Microsoft Azure PowerShell - Azure Advisor Cmdlets for Advisor in Windows PowerShell and PowerShell Core. Get Advisor recommendations, Manage Advisor configurations.
3.1.3      Az.Aks                              PSGallery            Microsoft Azure PowerShell - Azure managed Kubernetes cmdlets for Windows PowerShell and PowerShell Core....
1.1.4      Az.AnalysisServices                 PSGallery            Microsoft Azure PowerShell - Analysis Services cmdlets for Windows PowerShell and PowerShell Core....
2.3.2      Az.ApiManagement                    PSGallery            Microsoft Azure PowerShell - Api Management service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.0      Az.AppConfiguration                 PSGallery            Microsoft Azure PowerShell: AppConfiguration cmdlets
1.3.1      Az.ApplicationInsights              PSGallery            Microsoft Azure PowerShell - Application Insights management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.  Creates and manages application insights in Azure Resou...
1.0.0      Az.Attestation                      PSGallery            Microsoft Azure PowerShell - Attestation service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.7.3      Az.Automation                       PSGallery            Microsoft Azure PowerShell - Automation service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
3.2.0      Az.Batch                            PSGallery            Microsoft Azure PowerShell - Batch service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
2.0.0      Az.Billing                          PSGallery            Microsoft Azure PowerShell - Billing service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.8.3      Az.Cdn                              PSGallery            Microsoft Azure PowerShell - CDN service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.0      Az.CloudService                     PSGallery            Microsoft Azure PowerShell: CloudService cmdlets
1.11.0     Az.CognitiveServices                PSGallery            Microsoft Azure PowerShell - Cognitive Services management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. Creates and manages cognitive services accounts in Azure R...
4.26.0     Az.Compute                          PSGallery            Microsoft Azure PowerShell - Compute service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.  Manages virtual machines, hosted services, and related resources in Azu...
3.1.0      Az.ContainerInstance                PSGallery            Microsoft Azure PowerShell: ContainerInstance cmdlets
2.2.3      Az.ContainerRegistry                PSGallery            Microsoft Azure PowerShell - Container Registry service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.7.0      Az.CosmosDB                         PSGallery            Microsoft Azure PowerShell - CosmosDB service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.0      Az.DataBoxEdge                      PSGallery            Microsoft Azure PowerShell - DataBoxEdge service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.2.0      Az.Databricks                       PSGallery            Microsoft Azure PowerShell: Databricks cmdlets
1.16.6     Az.DataFactory                      PSGallery            Microsoft Azure PowerShell - Data Factory service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.0.2      Az.DataLakeAnalytics                PSGallery            Microsoft Azure PowerShell - Data Lake Analytics in Windows PowerShell and PowerShell Core....
1.3.0      Az.DataLakeStore                    PSGallery            Microsoft Azure PowerShell - Azure Data Lake Store cmdlets in Windows PowerShell and PowerShell Core....
1.0.1      Az.DataShare                        PSGallery            Microsoft Azure PowerShell - DataShare service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.
1.1.0      Az.DeploymentManager                PSGallery            PowerShell .Net Core Microsoft Azure PowerShell - Deployment Manager cmdlets for Azure Resource Manager....
3.1.0      Az.DesktopVirtualization            PSGallery            Microsoft Azure PowerShell: DesktopVirtualization cmdlets
1.0.2      Az.DevTestLabs                      PSGallery            Microsoft Azure PowerShell - DevTest Labs service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.2      Az.Dns                              PSGallery            Microsoft Azure PowerShell - DNS service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.3.0      Az.EventGrid                        PSGallery            Microsoft Azure PowerShell - Event Grid service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.11.1     Az.EventHub                         PSGallery            Microsoft Azure PowerShell - Event Hubs service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.9.0      Az.FrontDoor                        PSGallery            Microsoft Azure PowerShell - Front Door service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
4.0.2      Az.Functions                        PSGallery            Microsoft Azure PowerShell - Azure Functions service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
5.0.1      Az.HDInsight                        PSGallery            Microsoft Azure PowerShell - HDInsight service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.3.2      Az.HealthcareApis                   PSGallery            Microsoft Azure PowerShell - HealthcareApis management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. Creates and manages HealthcareApis service accounts in Azure R...
2.7.4      Az.IotHub                           PSGallery            Microsoft Azure PowerShell - IoT Hub service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
4.4.0      Az.KeyVault                         PSGallery            Microsoft Azure PowerShell - Key Vault service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
2.1.0      Az.Kusto                            PSGallery            Microsoft Azure PowerShell: Kusto cmdlets
1.5.0      Az.LogicApp                         PSGallery            Microsoft Azure PowerShell - Logic Apps cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.3      Az.MachineLearning                  PSGallery            Microsoft Azure PowerShell - Machine Learning Web Services cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.2.0      Az.Maintenance                      PSGallery            Microsoft Azure PowerShell - Maintenance cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
0.7.3      Az.ManagedServiceIdentity           PSGallery            Microsoft Azure PowerShell - Managed Service Identity cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.  Manages user assigned identities in Azure Resource Manager....
3.0.0      Az.ManagedServices                  PSGallery            Microsoft Azure PowerShell: ManagedServices cmdlets
1.0.2      Az.MarketplaceOrdering              PSGallery            Microsoft Azure PowerShell - Marketplace Ordering agreements service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.1      Az.Media                            PSGallery            Microsoft Azure PowerShell - Media service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.2      Az.Migrate                          PSGallery            Microsoft Azure PowerShell: Migrate cmdlets
3.0.1      Az.Monitor                          PSGallery            Microsoft Azure PowerShell - Monitor service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.0.0      Az.MySql                            PSGallery            Microsoft Azure PowerShell: MySql cmdlets
4.16.1     Az.Network                          PSGallery            Microsoft Azure PowerShell - Networking service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.1      Az.NotificationHubs                 PSGallery            Microsoft Azure PowerShell - Notification Hubs cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
3.1.0      Az.OperationalInsights              PSGallery            Microsoft Azure PowerShell - Operational Insights service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.
1.5.0      Az.PolicyInsights                   PSGallery            Microsoft Azure PowerShell - Azure Policy Insights cmdlets for Windows PowerShell and PowerShell Core. Allows querying policy evaluation events and compliance states....
1.1.0      Az.PostgreSql                       PSGallery            Microsoft Azure PowerShell: PostgreSql cmdlets
1.1.2      Az.PowerBIEmbedded                  PSGallery            Microsoft Azure PowerShell - Power BI Embedded service management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.  Creates and manages Power BI Embedded workspace co...
1.0.3      Az.PrivateDns                       PSGallery            Microsoft Azure PowerShell - Private DNS service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
5.3.1      Az.RecoveryServices                 PSGallery            Microsoft Azure PowerShell - Recovery Services cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.6.0      Az.RedisCache                       PSGallery            Microsoft Azure PowerShell - Redis Cache service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.0.0      Az.RedisEnterpriseCache             PSGallery            Microsoft Azure PowerShell: RedisEnterpriseCache cmdlets
1.0.3      Az.Relay                            PSGallery            Microsoft Azure PowerShell - Relay service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.0      Az.ResourceMover                    PSGallery            Microsoft Azure PowerShell: ResourceMover cmdlets
5.6.0      Az.Resources                        PSGallery            Microsoft Azure PowerShell - Azure Resource Manager and Active Directory cmdlets in Windows PowerShell and PowerShell Core.  Manages subscriptions, tenants, resource groups, deployment templates,...
1.2.0      Az.Security                         PSGallery            Microsoft Azure PowerShell - Azure Security Center cmdlets in Windows PowerShell and PowerShell Core. Allows managing and monitoring the security posture of your resources....
1.1.0      Az.SecurityInsights                 PSGallery            Microsoft Azure PowerShell - Azure Sentinel cmdlets in Windows PowerShell and PowerShell Core. Allows managing and monitoring the security posture of your resources....
1.8.1      Az.ServiceBus                       PSGallery            Microsoft Azure PowerShell - Service Bus service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
3.0.2      Az.ServiceFabric                    PSGallery            Microsoft Azure PowerShell - Service Fabric cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.4.1      Az.SignalR                          PSGallery            Microsoft Azure PowerShell - Azure SignalR service commands for Windows PowerShell and PowerShell Core....
3.8.0      Az.Sql                              PSGallery            Microsoft Azure PowerShell - SQL service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.0      Az.SqlVirtualMachine                PSGallery            Microsoft Azure PowerShell - SqlVirtualMachine service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.
1.1.1      Az.StackHCI                         PSGallery            Microsoft Azure PowerShell: Azure Stack HCI registration cmdlets
4.5.0      Az.Storage                          PSGallery            Microsoft Azure PowerShell - Storage service data plane and management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.  Creates and manages storage accounts in Azure...
1.7.0      Az.StorageSync                      PSGallery            Microsoft Azure PowerShell - Storage Sync cmdlets in Windows PowerShell and PowerShell Core. Manages operations pertaining to Azure File Sync in PowerShell.
2.0.0      Az.StreamAnalytics                  PSGallery            Microsoft Azure PowerShell: StreamAnalytics cmdlets
1.0.0      Az.Support                          PSGallery            Microsoft Azure PowerShell - Azure Support cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.
1.3.0      Az.Synapse                          PSGallery            Microsoft Azure PowerShell - Azure Synapse Analytics in Windows PowerShell and PowerShell Core....
1.1.0      Az.TrafficManager                   PSGallery            Microsoft Azure PowerShell - Traffic Manager service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
2.11.1     Az.Websites                         PSGallery            Microsoft Azure PowerShell - App Service (Web Apps) service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....

Error output

N/A

No 'China East 3' information in Get-AzLocation

caiwan-msft avatar Apr 28 '22 01:04 caiwan-msft

Thanks for reporting. The last module is using API version 2021-04-01. The location may not sync to that API version, please wait for couple days.

dingmeng-xue avatar Apr 28 '22 13:04 dingmeng-xue

Hi @dingmeng ,
Thank you for your reply and confirmation. May I have an update about the ETA of new API version? Thanks.

caiwan-msft avatar May 05 '22 01:05 caiwan-msft

@caiwan-msft , the different API version may return different result if data is out of sync. Since this is a new created region, you can wait couple days. If new location is not shown up, please let us know.

As a client, we have no idea about the deployment schedule of each service. . For the time being, you can send request to API version 2021-04-01 using Postman and check its response. If there is that region in response payload, it is client side issue.

dingmeng-xue avatar May 05 '22 01:05 dingmeng-xue

Get-AzLocation relies on 2 APIs /locations and /providers. The API version of /locations is 2016-06-01 and it doesn't return new region. As the result, the merged result of /locations and /providers doesn't contain new region either.

It is feature request. We will update its API version to 2021-01-01.

dingmeng-xue avatar May 05 '22 12:05 dingmeng-xue

Hi Dingmeng,

We can't get China East3 by using Get-Azlocation at present. Will it be updated in the next version of Az Powershell module? Then what's the ETA of your next release?

I understand that the command "Get-Azlocation" will call two APIs (providers /locations). I have updated the latest module. This command uses the 2020-10-01 version of providers and 2016-06-01 version of locations.

In addition, I also did the test of calling API directly. China East3 cannot be obtained using the 2021-04-01 version of providers, nor can it be obtained using 2020-01-01 version of locations.

chenzheng1988 avatar May 27 '22 15:05 chenzheng1988

@chenzheng, we had upgraded API version in the latest Az.Resources. If you still have the issue, please let us know.

dingmeng-xue avatar May 27 '22 15:05 dingmeng-xue

@dingmeng-xue I have updated the Az module. Isn't this the latest version?

PS C:\Users\chenzheng> Update-Module -Name Az

PS C:\Users\chenzheng> Get-Module Az*

ModuleType Version Name ExportedCommands


Script 2.5.0 Az.Accounts {Add-AzEnvironment, Clear-AzContext, Clear-AzDefault, Connect-AzAccount...}
Script 4.2.0 Az.Resources {Add-AzADGroupMember, Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzADAppCredential...}

chenzheng1988 avatar May 27 '22 15:05 chenzheng1988

The latest Az.Resources is 6.0.0. Please try Update-Module -Name Az.Resources -Force. Please remember to restart your PowerShell.

dingmeng-xue avatar May 27 '22 15:05 dingmeng-xue

@dingmeng-xue Thanks for dingmeng's reply. Is this version the latest?

PS C:\Users\chenzheng> Get-Module Az*

ModuleType Version Name ExportedCommands


Script 2.8.0 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault...}
Script 6.0.0 Az.Resources {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment...}

But there is still no China East3. Is it because my subscription has not opened China East3?

PS C:\Users\chenzheng> Get-Azlocation

Location : global DisplayName : Global Type : Region Longitude : Latitude : PhysicalLocation : RegionType : Logical RegionCategory : Other GeographyGroup : PairedRegion : Providers : {microsoft.insights, Microsoft.AlertsManagement, Microsoft.PowerBI, Microsoft.Network...}

Location : chinanorth3 DisplayName : China North 3 Type : Region Longitude : 114.8863 Latitude : 40.7675 PhysicalLocation : Zhangjiakou RegionType : Physical RegionCategory : Other GeographyGroup : Asia Pacific PairedRegion : [ { "Name": "chinaeast3", "Id": "/subscriptions/xxxxx/locations/chinaeast3", "SubscriptionId": null } ] Providers : {Microsoft.HDInsight, Microsoft.Storage, microsoft.insights, Microsoft.Batch...}

Location : chinaeast DisplayName : China East Type : Region Longitude : 121.5891 Latitude : 31.3209 PhysicalLocation : Shanghai RegionType : Physical RegionCategory : Other GeographyGroup : Asia Pacific PairedRegion : [ { "Name": "chinanorth", "Id": "/subscriptions/xxxx/locations/chinanorth", "SubscriptionId": null } ] Providers : {Microsoft.Devices, Microsoft.HDInsight, Microsoft.Storage, microsoft.insights...}

Location : chinaeast2 DisplayName : China East 2 Type : Region Longitude : 121.5891 Latitude : 31.3209 PhysicalLocation : Shanghai RegionType : Physical RegionCategory : Other GeographyGroup : Asia Pacific PairedRegion : [ { "Name": "chinanorth2", "Id": "/subscriptions/xxxxx/locations/chinanorth2", "SubscriptionId": null } ] Providers : {Microsoft.Devices, Microsoft.HDInsight, Microsoft.Storage, microsoft.insights...}

Location : chinanorth DisplayName : China North Type : Region Longitude : 116.4959 Latitude : 39.9788 PhysicalLocation : Beijing RegionType : Physical RegionCategory : Other GeographyGroup : Asia Pacific PairedRegion : [ { "Name": "chinaeast", "Id": "/subscriptions/xxxxxx/locations/chinaeast", "SubscriptionId": null } ] Providers : {Microsoft.Devices, Microsoft.HDInsight, Microsoft.Storage, microsoft.insights...}

Location : chinanorth2 DisplayName : China North 2 Type : Region Longitude : 116.4959 Latitude : 39.9788 PhysicalLocation : Beijing RegionType : Physical RegionCategory : Other GeographyGroup : Asia Pacific PairedRegion : [ { "Name": "chinaeast2", "Id": "/subscriptions/xxxxx/locations/chinaeast2", "SubscriptionId": null } ] Providers : {Microsoft.Devices, Microsoft.HDInsight, Microsoft.Storage, microsoft.insights...}

chenzheng1988 avatar May 27 '22 16:05 chenzheng1988

@chenzheng1988 It's the latest version. Please double-check your subscription. As I know, CE3 is open for partial subscriptions for now.

Nickcandy avatar May 27 '22 16:05 Nickcandy

@Nickcandy @dingmeng-xue Thank you very much for your help.

chenzheng1988 avatar May 27 '22 16:05 chenzheng1988