【问题标题】:InvalidApiVersionParameter-When I am trying to create VM on AzureInvalidApiVersionParameter - 当我尝试在 Azure 上创建 VM 时
【发布时间】:2016-01-14 19:12:15
【问题描述】:

当我尝试通过 Azure Java SDK 在 Azure 上创建 VM 时,我收到如下所示的错误消息。

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'.

看来我的 api 版本不正确。但是,我没有在代码中设置这个 api-version。如何修复此错误?谢谢。

【问题讨论】:

  • 它是 SDK 的最后一个版本吗?

标签: java azure azure-virtual-machine azure-resource-manager


【解决方案1】:

您可以尝试使用 Maven 安装最新版本的 Azure Java SDK。

the Maven Repositories of Azure Java SDKs

根据你的需要,如果你想创建Azure VM,你可以在你的项目的pom.xml文件下面添加maven依赖。

<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>

【讨论】:

    猜你喜欢
    • 2016-11-16
    • 2019-01-14
    • 1970-01-01
    • 2021-05-16
    • 2020-12-22
    • 1970-01-01
    • 1970-01-01
    • 2016-09-30
    • 1970-01-01
    相关资源
    最近更新 更多