Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade subscription operation api version to 2022-12-01 #27033

Closed
1 task done
gauravkumar1491 opened this issue Jul 28, 2023 · 9 comments · Fixed by #27400
Closed
1 task done

Upgrade subscription operation api version to 2022-12-01 #27033

gauravkumar1491 opened this issue Jul 28, 2023 · 9 comments · Fixed by #27400
Assignees
Labels
Account az login/account ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team feature-request

Comments

@gauravkumar1491
Copy link

Preconditions

  • No need to upgrade Python SDK or the Python SDK is ready.

Related command

az account list-locations

Resource Provider

N/A

Description of Feature or Work Requested

feature request to add a new parameters in the response list-locations API as part of new version 2022-12-01.

The new parameters are as follows :

  • availabilityZoneMappings
  • geography (part of metadata)

The rest-api Subscriptions - List Locations response would look like :

{
"value": [
{
"id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations/eastus",
"name": "eastus",
"type": "Region",
"displayName": "East US",
"regionalDisplayName": "(US) East US",
"metadata": {
"regionType": "Physical",
"regionCategory": "Recommended",
"geography": "United States",
"geographyGroup": "US",
"longitude": "-79.8164",
"latitude": "37.3719",
"physicalLocation": "Virginia",
"pairedRegion": [
{
"name": "westus",
"id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations/westus"
}
]
},
"availabilityZoneMappings": [
{
"logicalZone": "1",
"physicalZone": "eastus-az1"
},
{
"logicalZone": "2",
"physicalZone": "eastus-az3"
},
{
"logicalZone": "3",
"physicalZone": "eastus-az2"
}
]
},

Minimum API Version Required

2022-12-01

Swagger PR link / SDK link

Azure/azure-rest-api-specs#23292

Request Example

Request :
GET https://management.azure.com/subscriptions/{subscriptionId}/locations?api-version=2022-12-01

Response :

{
"value": [
{
"id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations/eastus",
"name": "eastus",
"type": "Region",
"displayName": "East US",
"regionalDisplayName": "(US) East US",
"metadata": {
"regionType": "Physical",
"regionCategory": "Recommended",
"geography": "United States",
"geographyGroup": "US",
"longitude": "-79.8164",
"latitude": "37.3719",
"physicalLocation": "Virginia",
"pairedRegion": [
{
"name": "westus",
"id": "/subscriptions/a1ffc958-d2c7-493e-9f1e-125a0477f536/locations/westus"
}
]
},
"availabilityZoneMappings": [
{
"logicalZone": "1",
"physicalZone": "eastus-az1"
},
{
"logicalZone": "2",
"physicalZone": "eastus-az3"
},
{
"logicalZone": "3",
"physicalZone": "eastus-az2"
}
]
},

Target Date

2023-08-01

PM Contact

ifeoluwa.okunoren@microsoft.com

Engineer Contact

gakumar@microsoft.com

Additional context

As per release 231.0b1, it should contain additional parameters that I added :

image

However, when I run the API via az cli on az account | Microsoft Learn, the response doesn’t contain the parameters, likely its using the older version of Python SDK :

image

The reason for that is :

In fact, this is because Azure CLI did not upgrade the api-version for subscriptions operation, as CLI only upgraded the SDK version without upgrading the api-version of subscription operation (the api-version and SDK version are not in a binding upgrade relationship in Azure CLI)
At present, the api-version set for subscription operation is still 2019-11-01, so it may not return the contents included in the later api-version from REST.

image

@ghost ghost added Auto-Assign Auto assign by bot Account az login/account labels Jul 28, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Jul 28, 2023

Thank you for opening this issue, we will look into it.

@ghost ghost assigned jiasli Jul 28, 2023
@ghost ghost added this to the Backlog milestone Jul 28, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group label Jul 28, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jul 28, 2023
@yonzhan yonzhan removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Jul 28, 2023
@zhoxing-ms
Copy link
Contributor

zhoxing-ms commented Jul 31, 2023

@gauravkumar1491 As our work for this sprint is already scheduled, we plan to develop and release it in the next sprint. Could you accept us releasing it on 09-26?

@gauravkumar1491
Copy link
Author

@zhoxing-ms 09-26 would be too late. Can we do it by 08-15 ?

@zhoxing-ms
Copy link
Contributor

zhoxing-ms commented Aug 11, 2023

@gauravkumar1491 Sorry, we usually do not release the out of boundary release for normal features but only for hot fix. Moreover, due to the late submission of this feature, our work schedule was already very full.
Could you accept us providing you with a private package from edge build in early September and release it on 09-26?

@gauravkumar1491
Copy link
Author

@zhoxing-ms Yes, please proceed and update as soon as possible

@zhoxing-ms
Copy link
Contributor

Hi @gauravkumar1491 We found that there are some issues that need to be discussed for directly adding the new parameter --include-extended-locations to command az account list-locations, as the previous design of command az account list-locations was not very reasonable and easy to confuse, especially in the account extension, there is a az account subscription list-location command with similar functionality and naming.
For the more detailed discussions, please refer to #27400 (comment)
Therefore, we would like to postpone the release of this feature to the next sprint (11-15), so that we can design a better solution for customers. Do you think this is acceptable?

@gauravkumar1491
Copy link
Author

@zhoxing-ms I saw the discussion where you're planning to deprecate az account list-locations and change it to az subscription list-locations .
But before you do that can you first implement this feature in this sprint to use the latest Python SDK which adds availabilityZoneMappings and geography as part of response.

adding the new parameter --include-extended-locations doesn't describe this feature request, I am not sure where this came from.

But can you please make the availabilityZoneMappings and geography change for az account list-locations in this sprint and then move this to az subscription list-locations .

@zhoxing-ms
Copy link
Contributor

@Jing-song Could you please take a look at the above question?

@Jing-song
Copy link
Contributor

Jing-song commented Sep 21, 2023

@zhoxing-ms I saw the discussion where you're planning to deprecate az account list-locations and change it to az subscription list-locations . But before you do that can you first implement this feature in this sprint to use the latest Python SDK which adds availabilityZoneMappings and geography as part of response.

adding the new parameter --include-extended-locations doesn't describe this feature request, I am not sure where this came from.

But can you please make the availabilityZoneMappings and geography change for az account list-locations in this sprint and then move this to az subscription list-locations .

Hi @gauravkumar1491 The link(Subscriptions - List Locations) in the description contains this parameter(--include-extended-locations)

availabilityZoneMappings and geography are included in the new response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Account az login/account ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team feature-request
Projects
None yet
5 participants