答えは Page Not Found だったので、次のコードでパブリック IP のサイズを取得しようとしました。
Configuration config = ManagementConfiguration.configure(
new URI(uri),
subscriptionId,
keyStoreLocation, // the file path to the JKS
keyStorePassword, // the password for the JKS
KeyStoreType.jks // flags that I'm using a JKS keystore
);
NetworkResourceProviderClient networkResourceProviderClient = NetworkResourceProviderService.create(config);
PublicIpAddressListResponse PublicIpAddressListResponse =networkResourceProviderClient.getPublicIpAddressesOperations().listAll();
ArrayList<PublicIpAddress> PublicIpAddressList =PublicIpAddressListResponse.getPublicIpAddresses();
System.out.println(PublicIpAddressList.size());
Azure AD ServicePrincipal 認証を使用すると、-0 が返されます
" https://management.azure.com/ " API で証明書認証を使用すると、 AuthenticationFailed: が返されます。
Exception in thread "main" com.microsoft.windowsazure.exception.ServiceException: AuthenticationFailed: Authentication failed. The 'Authorization' header is not present or provided in an invalid format.
at com.microsoft.windowsazure.exception.ServiceException.createFromJson(ServiceException.java:290)
at com.microsoft.azure.management.network.PublicIpAddressOperationsImpl.listAll(PublicIpAddressOperationsImpl.java:1443)
at com.microsoft.azure.auth.Program.main(Program.java:50)
すべての仮想マシンのパブリック IP アドレスを取得する方法はありますか? または、IP値を取得するために認証する方法は?