-
Notifications
You must be signed in to change notification settings - Fork 2k
[Management] Configuration
Rujun Chen edited this page Aug 20, 2021
·
1 revision
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.
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)
...
The available configurations are:
-
withHttpClient()
set the HTTP client -
withLogOptions()
set the option of HTTP logging, including log level, allowed query parameter names, and header names -
withRetryPolicy()
set the retry policy -
withAuxiliaryCredential()
andwithAuxiliaryCredentials()
set the cross-tenant auxiliary credentials -
withPolicy()
add the additional policy to the HTTP pipeline
- Frequently Asked Questions
- Azure Identity Examples
- Configuration
- Performance Tuning
- Android Support
- Unit Testing
- Test Proxy Migration
- Azure Json Migration
- New Checkstyle and Spotbugs pattern migration
- Protocol Methods
- TypeSpec-Java Quickstart
- Getting Started Guidance
- Adding a Module
- Building
- Writing Performance Tests
- Working with AutoRest
- Deprecation
- BOM guidelines
- Release process
- Access helpers