Package com.azure.monitor.query
Class LogsQueryClientBuilder
java.lang.Object
com.azure.monitor.query.LogsQueryClientBuilder
Fluent builder for creating instances of
LogsQueryClient
and LogsQueryAsyncClient
.
Instantiating an asynchronous Logs query Client
LogsQueryAsyncClient logsQueryAsyncClient = new LogsQueryClientBuilder() .credential(tokenCredential) .buildAsyncClient();
Instantiating a synchronous Logs query Client
LogsQueryClient logsQueryClient = new LogsQueryClientBuilder() .credential(tokenCredential) .buildClient();
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddPolicy
(HttpPipelinePolicy customPolicy) Adds a custom Http pipeline policy.Creates an asynchronous client with the configured options in this builder.Creates a synchronous client with the configured options in this builder.clientOptions
(ClientOptions clientOptions) Set theClientOptions
used for creating the client.configuration
(Configuration configuration) Sets The configuration store that is used during construction of the service client.credential
(TokenCredential tokenCredential) Sets The TokenCredential used for authentication.Sets the log query endpoint.httpClient
(HttpClient httpClient) Sets The HTTP client used to send the request.httpLogOptions
(HttpLogOptions httpLogOptions) Sets The logging configuration for HTTP requests and responses.pipeline
(HttpPipeline pipeline) Sets The HTTP pipeline to send requests through.retryPolicy
(RetryPolicy retryPolicy) Sets The retry policy that will attempt to retry failed requests, if applicable.serviceVersion
(LogsQueryServiceVersion serviceVersion) The service version to use when creating the client.
-
Constructor Details
-
LogsQueryClientBuilder
public LogsQueryClientBuilder()
-
-
Method Details
-
endpoint
Sets the log query endpoint.- Parameters:
endpoint
- the host value.- Returns:
- the
LogsQueryClientBuilder
.
-
pipeline
Sets The HTTP pipeline to send requests through.- Parameters:
pipeline
- the pipeline value.- Returns:
- the
LogsQueryClientBuilder
.
-
httpClient
Sets The HTTP client used to send the request.- Parameters:
httpClient
- the httpClient value.- Returns:
- the
LogsQueryClientBuilder
.
-
configuration
Sets The configuration store that is used during construction of the service client.- Parameters:
configuration
- the configuration value.- Returns:
- the
LogsQueryClientBuilder
.
-
httpLogOptions
Sets The logging configuration for HTTP requests and responses.- Parameters:
httpLogOptions
- the httpLogOptions value.- Returns:
- the
LogsQueryClientBuilder
.
-
retryPolicy
Sets The retry policy that will attempt to retry failed requests, if applicable.- Parameters:
retryPolicy
- the retryPolicy value.- Returns:
- the
LogsQueryClientBuilder
.
-
addPolicy
Adds a custom Http pipeline policy.- Parameters:
customPolicy
- The custom Http pipeline policy to add.- Returns:
- the
LogsQueryClientBuilder
.
-
credential
Sets The TokenCredential used for authentication.- Parameters:
tokenCredential
- the tokenCredential value.- Returns:
- the
LogsQueryClientBuilder
.
-
clientOptions
Set theClientOptions
used for creating the client.- Parameters:
clientOptions
- TheClientOptions
.- Returns:
- the
LogsQueryClientBuilder
.
-
serviceVersion
The service version to use when creating the client.- Parameters:
serviceVersion
- TheLogsQueryServiceVersion
.- Returns:
- the
LogsQueryClientBuilder
.
-
buildClient
Creates a synchronous client with the configured options in this builder.- Returns:
- A synchronous
LogsQueryClient
.
-
buildAsyncClient
Creates an asynchronous client with the configured options in this builder.- Returns:
- An asynchronous
LogsQueryAsyncClient
.
-