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

AzureRM relation to Azure REST Api

Open andreasschild opened this issue 7 years ago • 3 comments

Hi, I am currently on a project where we are using multiple AzureRM modules and also the direct access to the REST Api. In the past, we faced quite a lot of breaking changes in the REST Api and because of that, we need to know the REST Api Version which is used by the different AzureRM modules.

For example: Latest version on Hosted Agent VS2017 is AzureRm 6.7.0, which is using AzureRm.ApiManagement 6.1.3 to access the Api Management. Now it would be interesting which Azure REST api version is behind this Api Management Module.

Is there a way to see it in GitHub? https://github.com/Azure/azure-powershell/tree/master/src/ApiManagement/ApiManagement

Is there a way to get access to the tags as well? Currently 404. https://github.com/Azure/azure-powershell/tree/v6.7.0-August2018/src/ApiManagement/ApiManagement

Is there a way to add this information to the PowerShell Module manifest?

Long story short: Is there an easy way to retrieve the Azure REST Api version for a specific Azure ARM Powershell module?

Thanks a lot, Andy

You can also write me via Teams --> Andreas Schild ([email protected])

andreasschild avatar Jun 06 '19 12:06 andreasschild

@andreasschild under the hood each module uses the nuget package from the .Net SDK as per this repo https://github.com/Azure/azure-sdk-for-net

For example with the APIM Module it refernces the APIM Package from the SDK at https://github.com/Azure/azure-powershell/blob/46dadf936f13913067706a76dcf8dd221c7c7987/src/ApiManagement/ApiManagement/ApiManagement.csproj#L16

Digging into this and the latest PR for this I can see that the API Version is set here

https://github.com/solankisamir/azure-sdk-for-net/blob/c523090be7e73de38300d03cfce4918d2e2417b8/src/SDKs/ApiManagement/Management.ApiManagement/Generated/ApiManagementClient.cs#L687

Is there a way to add this information to the PowerShell Module manifest?

Yes this could be surfaced in the Private Data Section of a PowerShell Module Manifest easily enough, as this allows for any additions without breaking PowerShell importing - an example of this would be this PSD1 from an old module of mine where I include my Twitter Handle - https://www.powershellgallery.com/packages/ISE_Cew/0.1.10/Content/ISE_Cew.psd1

However this I think would for ease need this surfacing easier in packages manifests for the the underlying SDK components and this isn't something that I know all that much about

So this may be better need an issue raised in the SDK for them to surface that property somewhere in the Nuget package.

Hope that helps

kilasuit avatar Jun 06 '19 15:06 kilasuit

@andreasschild I have good news and kind of good news for you.

The good news is that this summer, we will be previewing a version of the cmdlets that ships multiple api versions in the same package, and allows you to lock to an api-version profile, to lock out breaking changes.

The kind of good news is that, while we don't have an easy correlation between api-versions and current modules, we do have a rigorous breaking change policy and strictly implement semantic versioning, so that modules that ship with Az (and modules that used to ship with AzureRM`) are only allowed to break twice per year, and have to provide a migration guide if they do. Also, you can tell that two versions of a module with the same major version have no breaking changes. So, on the breaking change front, you wouldn't need api-version to manage breaks.

Also, Az is the module under current development. AzureRM is no longer actively developed.

markcowl avatar Jun 07 '19 19:06 markcowl

Closing for now, based on the answer above. Please let me know if you have questions/comments

markcowl avatar Jun 07 '19 19:06 markcowl