When I am trying to create VM on Azure by Azure Java SDK, I got the error message shown below.
It seems my api-version is incorrect. However, I didn't set this api-version in the code. How to fix this error? Thanks.
When I am trying to create VM on Azure by Azure Java SDK, I got the error message shown below.
It seems my api-version is incorrect. However, I didn't set this api-version in the code. How to fix this error? Thanks.
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>