-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the bug
The current API version is 2024-05-01-preview in az-cli 2.67.0. But this API version is not supported currently in Azure China.
Related command
az container
Errors
PS C:\Program Files\PowerShell\7> az container show -g testaci -n testh
(NoRegisteredProviderFound) No registered resource provider found for location 'chinanorth3' and API version '2024-05-01-preview' for type 'containerGroups'. The supported api-versions are '2017-08-01-preview, 2017-10-01-preview, 2017-12-01-preview, 2018-02-01-preview, 2018-04-01, 2018-06-01, 2018-07-01, 2018-09-01, 2018-10-01, 2019-12-01, 2020-11-01, 2021-03-01, 2021-07-01, 2021-09-01, 2021-10-01, 2022-04-01-preview, 2022-09-01, 2022-10-01-preview, 2023-02-01-preview, 2023-05-01, 2023-05-15-preview'. The supported locations are 'chinaeast2, chinanorth3'.
Code: NoRegisteredProviderFound
Message: No registered resource provider found for location 'chinanorth3' and API version '2024-05-01-preview' for type 'containerGroups'. The supported api-versions are '2017-08-01-preview, 2017-10-01-preview, 2017-12-01-preview, 2018-02-01-preview, 2018-04-01, 2018-06-01, 2018-07-01, 2018-09-01, 2018-10-01, 2019-12-01, 2020-11-01, 2021-03-01, 2021-07-01, 2021-09-01, 2021-10-01, 2022-04-01-preview, 2022-09-01, 2022-10-01-preview, 2023-02-01-preview, 2023-05-01, 2023-05-15-preview'. The supported locations are 'chinaeast2, chinanorth3'.
Issue script & Debug output
PS C:\Program Files\PowerShell\7> az container show -g testaci -n testh --debug
cli.knack.cli: Command arguments: ['container', 'show', '-g', 'testaci', '-n', 'testh', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x0000020D9E2172E0>, <function OutputProducer.on_global_arguments at 0x0000020D9E5BC040>, <function CLIQuery.on_global_arguments at 0x0000020D9E5E1440>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'container': ['azure.cli.command_modules.container']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: container 0.615 2 17
cli.azure.cli.core: Total (1) 0.615 2 17
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 2 groups, 17 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : container show
cli.azure.cli.core: Command table: container show
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x0000020DA093DC60>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\v-zhenxtang.azure\commands\2025-02-19.16-01-40.container_show.28448.log'.
az_command_data_logger: command args: container show -g {} -n {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x0000020DA0984220>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x0000020DA09D96C0>, <function register_cache_arguments..add_cache_arguments at 0x0000020DA09D9800>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x0000020DA09D98A0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x0000020D9E5BC0E0>, <function CLIQuery.handle_query_parameter at 0x0000020D9E5E14E0>, <function register_ids_argument..parse_ids_arguments at 0x0000020DA09D9760>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ContainerInstanceManagementClient
cli.azure.cli.core.auth.persistence: build_persistence: location='C:\Users\v-zhenxtang\.azure\msal_token_cache.bin', encrypt=True
cli.azure.cli.core.auth.binary_cache: load: C:\Users\v-zhenxtang.azure\msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.chinacloudapi.cn/954ddad8-66d7-47a8-8f9f-1316152d9587
msal.authority: openid_config("https://login.chinacloudapi.cn/954ddad8-66d7-47a8-8f9f-1316152d9587/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.chinacloudapi.cn/954ddad8-66d7-47a8-8f9f-1316152d9587/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.chinacloudapi.cn/954ddad8-66d7-47a8-8f9f-1316152d9587/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.partner.microsoftonline.cn/954ddad8-66d7-47a8-8f9f-1316152d9587/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://microsoftgraph.chinacloudapi.cn/oidc/userinfo', 'authorization_endpoint': 'https://login.chinacloudapi.cn/954ddad8-66d7-47a8-8f9f-1316152d9587/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.chinacloudapi.cn/954ddad8-66d7-47a8-8f9f-1316152d9587/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.chinacloudapi.cn/954ddad8-66d7-47a8-8f9f-1316152d9587/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.chinacloudapi.cn/954ddad8-66d7-47a8-8f9f-1316152d9587/kerberos', 'tenant_region_scope': 'AS', 'cloud_instance_name': 'partner.microsoftonline.cn', 'cloud_graph_host_name': 'graph.chinacloudapi.cn', 'msgraph_host': 'microsoftgraph.chinacloudapi.cn', 'rbac_url': 'https://pas.chinacloudapi.cn'}
msal.application: Broker enabled? True
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.chinacloudapi.cn//.default',), kwargs={}
cli.azure.cli.core.auth.msal_credentials: UserCredential.get_token: scopes=('https://management.core.chinacloudapi.cn//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: e0f80301-99fc-424f-a0bf-bbe14cc969f8
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.chinacloudapi.cn/subscriptions/a95d0374-b158-4cfc-b303-e17b60f57737/resourceGroups/testaci/providers/Microsoft.ContainerInstance/containerGroups/testh?api-version=2024-05-01-preview'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'c0221636-ee97-11ef-a677-c8cb9e2e58b9'
cli.azure.cli.core.sdk.policies: 'CommandName': 'container show'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '-g -n --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.67.0 (MSI) azsdk-python-core/1.31.0 Python/3.12.7 (Windows-11-10.0.26100-SP0)'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (1): management.chinacloudapi.cn:443
urllib3.connectionpool: https://management.chinacloudapi.cn:443 "GET /subscriptions/a95d0374-b158-4cfc-b303-e17b60f57737/resourceGroups/testaci/providers/Microsoft.ContainerInstance/containerGroups/testh?api-version=2024-05-01-preview HTTP/1.1" 400 592
cli.azure.cli.core.sdk.policies: Response status: 400
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies: 'Expires': '-1'
cli.azure.cli.core.sdk.policies: 'x-ms-failure-cause': 'gateway'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': 'ffe9ced0-7e02-435a-882e-6266090a0c7a'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'ffe9ced0-7e02-435a-882e-6266090a0c7a'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'CHINAEAST:20250219T080141Z:ffe9ced0-7e02-435a-882e-6266090a0c7a'
cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies: 'Date': 'Wed, 19 Feb 2025 08:01:41 GMT'
cli.azure.cli.core.sdk.policies: 'Content-Length': '592'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"error":{"code":"NoRegisteredProviderFound","message":"No registered resource provider found for location 'chinanorth3' and API version '2024-05-01-preview' for type 'containerGroups'. The supported api-versions are '2017-08-01-preview, 2017-10-01-preview, 2017-12-01-preview, 2018-02-01-preview, 2018-04-01, 2018-06-01, 2018-07-01, 2018-09-01, 2018-10-01, 2019-12-01, 2020-11-01, 2021-03-01, 2021-07-01, 2021-09-01, 2021-10-01, 2022-04-01-preview, 2022-09-01, 2022-10-01-preview, 2023-02-01-preview, 2023-05-01, 2023-05-15-preview'. The supported locations are 'chinaeast2, chinanorth3'."}}
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 666, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 733, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 703, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 336, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 363, in handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/arm.py", line 432, in show_exception_handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 361, in handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/container/custom.py", line 66, in get_container
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 94, in wrapper_use_tracer
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/containerinstance/operations/_container_groups_operations.py", line 602, in get
azure.core.exceptions.HttpResponseError: (NoRegisteredProviderFound) No registered resource provider found for location 'chinanorth3' and API version '2024-05-01-preview' for type 'containerGroups'. The supported api-versions are '2017-08-01-preview, 2017-10-01-preview, 2017-12-01-preview, 2018-02-01-preview, 2018-04-01, 2018-06-01, 2018-07-01, 2018-09-01, 2018-10-01, 2019-12-01, 2020-11-01, 2021-03-01, 2021-07-01, 2021-09-01, 2021-10-01, 2022-04-01-preview, 2022-09-01, 2022-10-01-preview, 2023-02-01-preview, 2023-05-01, 2023-05-15-preview'. The supported locations are 'chinaeast2, chinanorth3'.
Code: NoRegisteredProviderFound
Message: No registered resource provider found for location 'chinanorth3' and API version '2024-05-01-preview' for type 'containerGroups'. The supported api-versions are '2017-08-01-preview, 2017-10-01-preview, 2017-12-01-preview, 2018-02-01-preview, 2018-04-01, 2018-06-01, 2018-07-01, 2018-09-01, 2018-10-01, 2019-12-01, 2020-11-01, 2021-03-01, 2021-07-01, 2021-09-01, 2021-10-01, 2022-04-01-preview, 2022-09-01, 2022-10-01-preview, 2023-02-01-preview, 2023-05-01, 2023-05-15-preview'. The supported locations are 'chinaeast2, chinanorth3'.
cli.azure.cli.core.azclierror: (NoRegisteredProviderFound) No registered resource provider found for location 'chinanorth3' and API version '2024-05-01-preview' for type 'containerGroups'. The supported api-versions are '2017-08-01-preview, 2017-10-01-preview, 2017-12-01-preview, 2018-02-01-preview, 2018-04-01, 2018-06-01, 2018-07-01, 2018-09-01, 2018-10-01, 2019-12-01, 2020-11-01, 2021-03-01, 2021-07-01, 2021-09-01, 2021-10-01, 2022-04-01-preview, 2022-09-01, 2022-10-01-preview, 2023-02-01-preview, 2023-05-01, 2023-05-15-preview'. The supported locations are 'chinaeast2, chinanorth3'.
Code: NoRegisteredProviderFound
Message: No registered resource provider found for location 'chinanorth3' and API version '2024-05-01-preview' for type 'containerGroups'. The supported api-versions are '2017-08-01-preview, 2017-10-01-preview, 2017-12-01-preview, 2018-02-01-preview, 2018-04-01, 2018-06-01, 2018-07-01, 2018-09-01, 2018-10-01, 2019-12-01, 2020-11-01, 2021-03-01, 2021-07-01, 2021-09-01, 2021-10-01, 2022-04-01-preview, 2022-09-01, 2022-10-01-preview, 2023-02-01-preview, 2023-05-01, 2023-05-15-preview'. The supported locations are 'chinaeast2, chinanorth3'.
az_command_data_logger: (NoRegisteredProviderFound) No registered resource provider found for location 'chinanorth3' and API version '2024-05-01-preview' for type 'containerGroups'. The supported api-versions are '2017-08-01-preview, 2017-10-01-preview, 2017-12-01-preview, 2018-02-01-preview, 2018-04-01, 2018-06-01, 2018-07-01, 2018-09-01, 2018-10-01, 2019-12-01, 2020-11-01, 2021-03-01, 2021-07-01, 2021-09-01, 2021-10-01, 2022-04-01-preview, 2022-09-01, 2022-10-01-preview, 2023-02-01-preview, 2023-05-01, 2023-05-15-preview'. The supported locations are 'chinaeast2, chinanorth3'.
Code: NoRegisteredProviderFound
Message: No registered resource provider found for location 'chinanorth3' and API version '2024-05-01-preview' for type 'containerGroups'. The supported api-versions are '2017-08-01-preview, 2017-10-01-preview, 2017-12-01-preview, 2018-02-01-preview, 2018-04-01, 2018-06-01, 2018-07-01, 2018-09-01, 2018-10-01, 2019-12-01, 2020-11-01, 2021-03-01, 2021-07-01, 2021-09-01, 2021-10-01, 2022-04-01-preview, 2022-09-01, 2022-10-01-preview, 2023-02-01-preview, 2023-05-01, 2023-05-15-preview'. The supported locations are 'chinaeast2, chinanorth3'.
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x0000020DA093DEE0>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 2.248 seconds (init: 0.481, invoke: 1.767)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 4902 in cache file under C:\Users\v-zhenxtang.azure\telemetry\20250219160142126
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry_init_.pyc C:\Users\v-zhenxtang.azure C:\Users\v-zhenxtang.azure\telemetry\20250219160142126"
telemetry.process: Return from creating process 23928
telemetry.main: Finish creating telemetry upload process.
Expected behavior
The error should not be reported.
Environment Summary
PS C:\Program Files\PowerShell\7> az version
{
"azure-cli": "2.67.0",
"azure-cli-core": "2.67.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"acrquery": "1.0.1",
"bastion": "1.3.1",
"k8s-extension": "1.6.2",
"quota": "1.0.0",
"ssh": "2.0.6",
"storage-preview": "1.0.0b4",
"vm-repair": "2.0.1"
}
}
Additional context
No response