Java Azure SDK,如何删除网络接口中的次要IP?

Java Azure SDK, How to delete Secondary IP in network interface?

我正在尝试删除网络接口中的辅助 IP,但无法找到如何使用 Azure java SDK 进行操作。 可能吗?

问题请参考以下cdoe

创建服务主体并将 Azure RABC 角色 Contributor 分配给 sp

SDK

<dependency>
      <groupId>com.microsoft.azure</groupId>
      <artifactId>azure</artifactId>
      <version>1.38.1</version>
    </dependency>

代码

 String clientId="232a1***";
        String clientSecret="?****";
        String tenant="e***";
        String subId="e*****";
        ApplicationTokenCredentials credentials = new ApplicationTokenCredentials(clientId,
                tenant,
                clientSecret,
                AzureEnvironment.AZURE);

        Azure azure= Azure.configure()
                .withLogLevel(LogLevel.BODY_AND_HEADERS)
                .authenticate(credentials)
                .withSubscription(subId);

        NetworkInterface nic = azure.networkInterfaces().getByResourceGroup("andywin7","testnic");

        nic.update().withoutIPConfiguration("ipconfig2")
                .apply();

在运行代码之前

运行代码后