1

When I am trying to create VM on Azure by Azure Java SDK, I got the error message shown below.

InvalidApiVersionParameter: The api-version '2015-06-15' is invalid. The supported versions are '2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.

It seems my api-version is incorrect. However, I didn't set this api-version in the code. How to fix this error? Thanks.

Will Shao - MSFT
  • 1,189
  • 7
  • 14
jack
  • 125
  • 1
  • 9

1 Answers1

0

You can try to install the latest version of Azure Java SDK by using Maven.

There are the Maven Repositories of Azure Java SDKs.

According to your needs, you can add the maven dependencies below in the pom.xml file of your project if you want to create Azure VMs.

<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-svc-mgmt</artifactId>
    <version>0.9.0</version>
</dependency>   

<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-svc-mgmt-compute</artifactId>
    <version>0.9.0</version>
</dependency>
Peter Pan
  • 23,476
  • 4
  • 25
  • 43