Azure / azure-libraries-for-java

Azure Management Libraries for Java
https://docs.microsoft.com/en-us/java/azure/
MIT License
94 stars 98 forks source link

[FEATURE REQ] Add License Type and Sku to SqlDatabase #1253

Closed markmassesnow closed 4 years ago

markmassesnow commented 4 years ago

Is your feature request related to a problem? Please describe. The SqlDatababse (DatabseInner) object is currently using the REST api version 2014-04-01. This version does not contain the licenseType or Sku values for SqlDatabases.

These values are required in order to figure out the costs associated with a sql database from the rate-card api. I would like to be able to display the current license state of a database regarding Azure Hybrid Benefit as well as the expected costs for a database. These fields first appeared in the api version 2017-10-01-preview version.

Describe the solution you'd like I would like to see the licenseType and Sku values added to the DatabaseInner and/or the SqlDatabase java classes. This would involve upgrading the api version that is being used to at least "2017-10-01-preview" access the databases from azure.

Ideally these fields would work the exact same way they do for ManagedInstanceInner that is using api version "2018-06-01-preview"

Describe alternatives you've considered The preferred way would be to add these fields to be base DatabaseInner and SqlDatabase classes.

Additional context Add any other context or screenshots about the feature request here.

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

weidongxu-microsoft commented 4 years ago

@markmassesnow It is unlikely this version of SDK getting upgrade to 2017-10-01-preview or above anytime soon (it is too many breaking changes between the versions).

If your current usage is not for mission-critical parts of the system, you might want to try the new version of SDK (2.0.0-beta.3). It has upgraded to latest sql service spec. Note that this new version is still in beta preview stage, hence there might be API changes later. https://aka.ms/azure-sdk-java-mgmt

Alternatively, if you do not want to use the new preview SDK, you can use this generated SDK. https://mvnrepository.com/artifact/com.microsoft.azure.sql.v2017_10_01_preview/azure-mgmt-sql

@nickzhums

markmassesnow commented 4 years ago

Thanks for the response. I see that the changes I need are in the 2.0.0-beta.3 version.

I will wait until 2.0.0 gets released.