Open Claire-cloud31 opened 2 years ago
@jiasli for awareness
@jiasli , May I know if there is any update ? thanks
Message: The resource type 'rename' could not be found in the namespace 'Microsoft.Subscription' for api version '2021-10-01'. The supported api-versions are '2019-03-01-preview,2019-10-01-preview,2020-09-01,2021-01-01-privatepreview'.
@Ochirkhuyag Could you please take a look at this issue? May I ask is the rename
operation not currently supported in api-version 2021-10-01
?
@zhoxing-ms The rename operation is supported in the api version 2021-10-01
Message: The resource type 'rename' could not be found in the namespace 'Microsoft.Subscription' for api version '2021-10-01'. The supported api-versions are '2019-03-01-preview,2019-10-01-preview,2020-09-01,2021-01-01-privatepreview'.
@Ochirkhuyag Got it, thanks for conformation. Since this error message is returned by the REST service, could you help investigate this root cause?
@Vi-2022 Could you please show us the debug log (add --debug
parameter) to help us know more about the details of failed requests?
@zhoxing-ms , I use az version 2.35.0,with extension account 0.2.3, run command "az account subscription rename --id xxx --name test --debug" , the result is as following :
cli.knack.cli: Command arguments: ['account', 'subscription', 'rename', '--id', '
cli.azure.cli.core: Loaded 47 groups, 218 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : account subscription rename
cli.azure.cli.core: Command table: account subscription rename
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f9383dcb158>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/root/.azure/commands/2022-09-04.02-27-45.account_subscription_rename.5418.log'.
az_command_data_logger: command args: account subscription rename --id {} --name {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.
cli.azure.cli.core.azclierror: (InvalidResourceType) The resource type 'rename' could not be found in the namespace 'Microsoft.Subscription' for api version '2021-10-01'. The supported api-versions are '2019-03-01-preview,2019-10-01-preview,2020-09-01,2021-01-01-privatepreview'. Code: InvalidResourceType Message: The resource type 'rename' could not be found in the namespace 'Microsoft.Subscription' for api version '2021-10-01'. The supported api-versions are '2019-03-01-preview,2019-10-01-preview,2020-09-01,2021-01-01-privatepreview'. az_command_data_logger: (InvalidResourceType) The resource type 'rename' could not be found in the namespace 'Microsoft.Subscription' for api version '2021-10-01'. The supported api-versions are '2019-03-01-preview,2019-10-01-preview,2020-09-01,2021-01-01-privatepreview'. Code: InvalidResourceType Message: The resource type 'rename' could not be found in the namespace 'Microsoft.Subscription' for api version '2021-10-01'. The supported api-versions are '2019-03-01-preview,2019-10-01-preview,2020-09-01,2021-01-01-privatepreview'. cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f9383dcb378>] az_command_data_logger: exit code: 3 cli.main: Command ran in 1.351 seconds (init: 0.465, invoke: 0.886) telemetry.save: Save telemetry record of length 3654 in cache telemetry.check: Negative: The /root/.azure/telemetry.txt was modified at 2022-09-04 02:18:32.750025, which in less than 600.000000 s
@zhoxing-ms , @Ochirkhuyag , May I know if there is any update from your side ? thanks
Checked unsuccessful requests on the log for the last 1 month. There is nothing related to this error. Seems like the request did not hit the API. Before hitting, somebody responded.
so...how can I resolve it ?
@zhoxing-ms , could you please continue to investigate it ? looking forward your reply , thanks in advance .
@jiasli , could you please continue to investigate it ? looking forward your reply , thanks in advance .
This is the request URL:
https://management.chinacloudapi.cn:443 "POST /subscriptions//providers/Microsoft.Subscription/rename?api-version=2021-10-01 HTTP/1.1" 404 279
This is the response body from REST service:
{"error":{"code":"InvalidResourceType","message":"The resource type 'rename' could not be found in the namespace 'Microsoft.Subscription' for api version '2021-10-01'. The supported api-versions are '2019-03-01-preview,2019-10-01-preview,2020-09-01,2021-01-01-privatepreview'."}}
'x-ms-correlation-request-id': 'e9bcc76b-2e27-495-ba86-8a0f1a5dd938'
@Ochirkhuyag Please note that this is a request to China Cloud, could you query the request information related to this correlation id e9bcc76b-2e27-495-ba86-8a0f1a5dd938 for China Cloud?
hi All
I encountered the same issue in Azure China . Azure CLI version is 2.40.0. the error message is as below. please help fix the issue ASAP. Thanks.
cli.azure.cli.core.sdk.policies: Response status: 502 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': 'service' cli.azure.cli.core.sdk.policies: 'x-ms-request-id': 'b920c4ad-1a4e-4b0f-9518-cfd9f8aaa6ec' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'b920c4ad-1a4e-4b0f-9518-cfd9f8aaa6ec' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'CHINANORTH2:_**20220922T040407Z:b920c4ad-1a4e-4b0f-9518-cfd9f8aaa6ec' 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': 'Thu, 22 Sep 2022 04:04:07 GMT' cli.azure.cli.core.sdk.policies: 'Connection': 'close' cli.azure.cli.core.sdk.policies: 'Content-Length': '123' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: {"error":{"code":"InvalidGatewayCertificate","message":"The gateway certificate is invalid for 'Microsoft.Subscription'."}} cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception: cli.azure.cli.core.util: Traceback (most recent call last): File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 663, in execute File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 726, in _run_jobs_serially File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 697, in _run_job File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 333, in call File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler File "C:\Users\zuo.teng.azure\cliextensions\account\azext_account\generated\custom.py", line 16, in account_subscription_rename return client.rename(subscription_id=subscription_id, subscription_name=subscription_name) File "C:\Users\zuo.teng.azure\cliextensions\account\azext_account\vendored_sdks\subscription\operations_subscription_operations.py", line 334, in rename raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) azure.core.exceptions.HttpResponseError: (InvalidGatewayCertificate) The gateway certificate is invalid for 'Microsoft.Subscription'. Code: InvalidGatewayCertificate Message: The gateway certificate is invalid for 'Microsoft.Subscription'.
cli.azure.cli.core.azclierror: (InvalidGatewayCertificate) The gateway certificate is invalid for 'Microsoft.Subscription'. Code: InvalidGatewayCertificate Message: The gateway certificate is invalid for 'Microsoft.Subscription'. az_command_data_logger: (InvalidGatewayCertificate) The gateway certificate is invalid for 'Microsoft.Subscription'. Code: InvalidGatewayCertificate Message: The gateway certificate is invalid for 'Microsoft.Subscription'.
@Ochirkhuyag @zhoxing-ms Is there any update? Thanks.
@Ochirkhuyag @zhoxing-ms @jiasli Is there any update? we still encounter the issue. Thanks.
az rest --method post --url https://management.chinacloudapi.cn/subscriptions/e215f72c-02a5-4e2a-8a6e-1469ce59478d/providers/Microsoft.Subscription/rename?api-version=2020-09-01 --body @C:\Users\test01\Desktop\rename.json Bad Gateway({"error":{"code":"InvalidGatewayCertificate","message":"The gateway certificate is invalid for 'Microsoft.Subscription'."}})
@Ochirkhuyag @zhoxing-ms @jiasli Is there any update? Thanks.
az rest --method post --url https://management.chinacloudapi.cn/subscriptions/e215f72c-02a5-4e2a-8a6e-1469ce59478d/providers/Microsoft.Subscription/rename?api-version=2020-09-01 --body @C:\Users\test01\Desktop\rename.json Bad Gateway({"error":{"code":"InvalidGatewayCertificate","message":"The gateway certificate is invalid for 'Microsoft.Subscription'."}})
This is the problem of directly requesting REST, so I believe it should be a service issue. @Ochirkhuyag Could you confirm whether there is a problem with the China Cloud?
Checking. Will respond soon.
@Ochirkhuyag Thanks for your response. May I know if there is any update?
@Ochirkhuyag May I know if there is any update? thanks
We are working to enable APIs on ARM side. Once it is done, will update here.
@Ochirkhuyag May I know if there is any update? thanks
We enabled APIs on ARM side previous week. It would be reflected in a few days. Let me check today!
@Ochirkhuyag Thanks for your update. but the issue is still here.
az account subscription rename --id "e215f72c-021469ce59478d" --name "" Command group 'account subscription' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus (InvalidGatewayCertificate) The gateway certificate is invalid for 'Microsoft.Subscription'. Code: InvalidGatewayCertificate Message: The gateway certificate is invalid for 'Microsoft.Subscription'.
We enabled the APIs on the ARM a week ago. It would take 1 day on each region to apply. It should be done for now, or would be done very soon.
@Ochirkhuyag Thanks for your support. but the issue is still here.
cli.azure.cli.core.sdk.policies: 'Date': 'Mon, 31 Oct 2022 02:13:01 GMT' cli.azure.cli.core.sdk.policies: 'Connection': 'close' cli.azure.cli.core.sdk.policies: 'Content-Length': '123' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: {"error":{"code":"InvalidGatewayCertificate","message":"The gateway certificate is invalid for 'Microsoft.Subscription'."}} cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception: cli.azure.cli.core.util: Traceback (most recent call last): File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 663, in execute File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 726, in _run_jobs_serially File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 697, in _run_job File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 333, in call File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler File "C:\Users\zuo.teng.azure\cliextensions\account\azext_account\manual\custom.py", line 17, in account_subscription_rename return client.rename(subscription_id=subscription_id, body=body) File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 73, in wrapper_use_tracer File "C:\Users\zuo.teng.azure\cliextensions\account\azext_account\vendored_sdks\subscription\operations_subscription_operations.py", line 338, in rename raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) azure.core.exceptions.HttpResponseError: (InvalidGatewayCertificate) The gateway certificate is invalid for 'Microsoft.Subscription'. Code: InvalidGatewayCertificate Message: The gateway certificate is invalid for 'Microsoft.Subscription'.
The ARM changes still in progress in Mooncake. Let me check it with ARM team.
@chicago7 The ARM changes are applied. Could you please check it from your side?
@Ochirkhuyag Thanks for your support. but the issue is still here.
Azure CLI is up to date.
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.42.0 (MSI) azsdk-python-subscriptionclient/unknown Python/3.10.8 (Windows-10-10.0.19045-SP0)' cli.azure.cli.core.sdk.policies: 'Authorization': '*' cli.azure.cli.core.sdk.policies: Request body: cli.azure.cli.core.sdk.policies: {"subscriptionName": "**"} urllib3.connectionpool: Starting new HTTPS connection (1): management.chinacloudapi.cn:443 urllib3.connectionpool: https://management.chinacloudapi.cn:443 "POST /subscriptions/e215f7**8a6e-1469ce59478d/providers/Microsoft.Subscription/rename?api-version=2020-09-01 HTTP/1.1" 502 123 cli.azure.cli.core.sdk.policies: Response status: 502 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': 'service' cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '9f430cf2-f810-4e0c-9523-9d2a0fcc5f1c' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '9f430cf2-f810-4e0c-9523-9d2a0fcc5f1c' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'CHINANORTH2:20221105T064357Z:9f430cf2-f810-4e0c-9523-9d2a0fcc5f1c' 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': 'Sat, 05 Nov 2022 06:43:57 GMT' cli.azure.cli.core.sdk.policies: 'Connection': 'close' cli.azure.cli.core.sdk.policies: 'Content-Length': '123' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: {"error":{"code":"InvalidGatewayCertificate","message":"The gateway certificate is invalid for 'Microsoft.Subscription'."}}
@Ochirkhuyag Thanks for your support. but the issue is still here.
Azure CLI is up to date.
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.42.0 (MSI) azsdk-python-subscriptionclient/unknown Python/3.10.8 (Windows-10-10.0.19045-SP0)' cli.azure.cli.core.sdk.policies: 'Authorization': '*' cli.azure.cli.core.sdk.policies: Request body: cli.azure.cli.core.sdk.policies: {"subscriptionName": "**"} urllib3.connectionpool: Starting new HTTPS connection (1): management.chinacloudapi.cn:443 urllib3.connectionpool: https://management.chinacloudapi.cn:443 "POST /subscriptions/e215f7**8a6e-1469ce59478d/providers/Microsoft.Subscription/rename?api-version=2020-09-01 HTTP/1.1" 502 123 cli.azure.cli.core.sdk.policies: Response status: 502 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': 'service' cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '9f430cf2-f810-4e0c-9523-9d2a0fcc5f1c' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '9f430cf2-f810-4e0c-9523-9d2a0fcc5f1c' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'CHINANORTH2:20221105T064357Z:9f430cf2-f810-4e0c-9523-9d2a0fcc5f1c' 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': 'Sat, 05 Nov 2022 06:43:57 GMT' cli.azure.cli.core.sdk.policies: 'Connection': 'close' cli.azure.cli.core.sdk.policies: 'Content-Length': '123' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: {"error":{"code":"InvalidGatewayCertificate","message":"The gateway certificate is invalid for 'Microsoft.Subscription'."}}
ARM is enabled for the version 2021-10-01. Seems like this one is for 2020-09-01. Those should be enabled. But let me check and will update you tomorrow morning.
@Ochirkhuyag Thanks for your support. I tried to send the request by version 2021-10-01. but I still encounter the issue.
az rest --method post --url https://management.chinacloudapi.cn/subscriptions/e2******-02a5-4e2a-8a6e-1469ce59478d/providers/Microsoft.Subscription/rename?api-version=2021-10-01 --body @C:\Users\test01\Desktop\name.json Bad Gateway({"error":{"code":"InvalidGatewayCertificate","message":"The gateway certificate is invalid for 'Microsoft.Subscription'."}})
Could you guys please try again? It should be okay for now.
@Ochirkhuyag , it works fine now , and I think this issue should be resolved . thank you all for your help .
What was the fix? I have the same issue, except with Microsoft.AlertsManagement
Dear Team, We experience an error when using command "az account subscription rename --id xxxx-xxx --name "xxx"" to rename subscription. Error message InvalidGatewayCertificate) The gateway certificate is invalid for 'Microsoft.Subscription'. Code: InvalidGatewayCertificate Message: The gateway certificate is invalid for 'Microsoft.Subscription'.
The cli version is as following : azure-cli 2.35.0 core 2.35.0 telemetry 1.0.6 * Extensions: account 0.2.1 Dependencies: msal 1.17.0 azure-mgmt-resource 20.0.0 Python location '/bin/python3.6' Extensions directory '/root/.azure/cliextensions' Python (Linux) 3.6.8 (default, Apr 16 2020, 01:36:27) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]
And we remove account extension 0.2.1 and add account extension 0.2.3 with below command az extension remove --name account az extension add --name account --version 0.2.1
Then cli version is as following { "azure-cli": "2.35.0", "azure-cli-core": "2.35.0", "azure-cli-telemetry": "1.0.6", "extensions": { "account": "0.2.3" }
We attempt to rename subscription and encounter the new error . Command group 'account subscription' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus (InvalidResourceType) The resource type 'rename' could not be found in the namespace 'Microsoft.Subscription' for api version '2021-10-01'. The supported api-versions are '2019-03-01-preview,2019-10-01-preview,2020-09-01,2021-01-01-privatepreview'. Code: InvalidResourceType Message: The resource type 'rename' could not be found in the namespace 'Microsoft.Subscription' for api version '2021-10-01'. The supported api-versions are '2019-03-01-preview,2019-10-01-preview,2020-09-01,2021-01-01-privatepreview'.
Could you please help to confirm it ? thanks