[Management] Configuration - Azure/azure-sdk-for-java GitHub Wiki
Configure AzureResourceManager
Other than calling AzureResourceManager.authenticate() directly, you can also call AzureResourceManager.configure() to configure the client before calling .authenticate().
Note that instances of AzureResourceManager and AzureResourceManager.Authenticated are immutable. No configurations can be applied after .authenticate() is called.
Configuration on HTTP Client
With the Azure Management Libraries for Java, you can choose an HttpClient implementation, or even provide a custom one.
By default, management libraries use the HTTP client loaded in runtime. Specifically, you can configure and use Netty HTTP client.
HttpClient httpClient = new NettyAsyncHttpClientBuilder()
.readTimeout(Duration.ofMinutes(2))
.build();
AzureResourceManager azureResourceManager = AzureResourceManager
.configure()
.withHttpClient(httpClient)
...
Configuration on HTTP Pipeline
The available configurations are:
withHttpClient()set the HTTP clientwithLogOptions()set the option of HTTP logging, including log level, allowed query parameter names, and header nameswithRetryPolicy()set the retry policywithAuxiliaryCredential()andwithAuxiliaryCredentials()set the cross-tenant auxiliary credentialswithPolicy()add the additional policy to the HTTP pipeline