0

次の方法を使用して、getVirtualMachineVMImagesOperations から OS データを取得しようとしていました。

ComputeManagementClient computeManagementClient = ComputeManagementService.create(config);
    System.out.println("OS Type"+computeManagementClient.getVirtualMachineVMImagesOperations().getDetails("WindowsRemoteServer").getOSDiskConfiguration().getOperatingSystem());

「ForbiddenError: この操作は、このサブスクリプションでは許可されていません」というエラーが表示されました。

Exception in thread "main" com.microsoft.windowsazure.exception.ServiceException: ForbiddenError: This operation is not allowed for this subscription.
    at com.microsoft.windowsazure.exception.ServiceException.createFromXml(ServiceException.java:208)
    at com.microsoft.windowsazure.management.compute.VirtualMachineVMImageOperationsImpl.getDetails(VirtualMachineVMImageOperationsImpl.java:1115)
    at com.microsoft.azure.auth.Program.main(Program.java:63)

ある種の許可エラーのようです。このエラーを克服するためのアイデアを共有してください。

4

1 に答える 1

-1

以下からOperatingSystemを取得しました。それでも、「ForbiddenError: この操作は、このサブスクリプションでは許可されていません」と表示されます。VirtualMachineVMImageOperations クラスを使用しようとしている間。

System.out.println("OS Type"+computeManagementClient.getVirtualMachinesOperations().get("WindowsRemoteServer", "WindowsRemoteServer", "WindowsRemoteServer").getOSVirtualHardDisk().getOperatingSystem());

アドバイスをいただければ幸いです。

于 2015-10-31T06:02:43.510 に答える