Package com.azure.monitor.ingestion
Class LogsIngestionClientBuilder
java.lang.Object
com.azure.monitor.ingestion.LogsIngestionClientBuilder
- All Implemented Interfaces:
ConfigurationTrait<LogsIngestionClientBuilder>
,EndpointTrait<LogsIngestionClientBuilder>
,HttpTrait<LogsIngestionClientBuilder>
,TokenCredentialTrait<LogsIngestionClientBuilder>
public final class LogsIngestionClientBuilder
extends Object
implements ConfigurationTrait<LogsIngestionClientBuilder>, HttpTrait<LogsIngestionClientBuilder>, EndpointTrait<LogsIngestionClientBuilder>, TokenCredentialTrait<LogsIngestionClientBuilder>
Fluent builder for creating instances of
LogsIngestionClient
and LogsIngestionAsyncClient
.-
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.retryOptions
(RetryOptions retryOptions) Sets the retry options for this client.retryPolicy
(RetryPolicy retryPolicy) Sets The retry policy that will attempt to retry failed requests, if applicable.serviceVersion
(LogsIngestionServiceVersion serviceVersion) The service version to use when creating the client.
-
Constructor Details
-
LogsIngestionClientBuilder
public LogsIngestionClientBuilder()
-
-
Method Details
-
endpoint
Sets the log query endpoint.- Specified by:
endpoint
in interfaceEndpointTrait<LogsIngestionClientBuilder>
- Parameters:
endpoint
- the host value.- Returns:
- the updated
LogsIngestionClientBuilder
.
-
pipeline
Sets The HTTP pipeline to send requests through.- Specified by:
pipeline
in interfaceHttpTrait<LogsIngestionClientBuilder>
- Parameters:
pipeline
- the pipeline value.- Returns:
- the updated
LogsIngestionClientBuilder
.
-
httpClient
Sets The HTTP client used to send the request.- Specified by:
httpClient
in interfaceHttpTrait<LogsIngestionClientBuilder>
- Parameters:
httpClient
- the httpClient value.- Returns:
- the updated
LogsIngestionClientBuilder
.
-
configuration
Sets The configuration store that is used during construction of the service client.- Specified by:
configuration
in interfaceConfigurationTrait<LogsIngestionClientBuilder>
- Parameters:
configuration
- the configuration value.- Returns:
- the updated
LogsIngestionClientBuilder
.
-
httpLogOptions
Sets The logging configuration for HTTP requests and responses.- Specified by:
httpLogOptions
in interfaceHttpTrait<LogsIngestionClientBuilder>
- Parameters:
httpLogOptions
- the httpLogOptions value.- Returns:
- the updated
LogsIngestionClientBuilder
.
-
retryPolicy
Sets The retry policy that will attempt to retry failed requests, if applicable.- Parameters:
retryPolicy
- the retryPolicy value.- Returns:
- the updated
LogsIngestionClientBuilder
.
-
addPolicy
Adds a custom Http pipeline policy.- Specified by:
addPolicy
in interfaceHttpTrait<LogsIngestionClientBuilder>
- Parameters:
customPolicy
- The custom Http pipeline policy to add.- Returns:
- the updated
LogsIngestionClientBuilder
.
-
retryOptions
Sets the retry options for this client.- Specified by:
retryOptions
in interfaceHttpTrait<LogsIngestionClientBuilder>
- Parameters:
retryOptions
- the retry options for this client.- Returns:
- the updated
LogsIngestionClientBuilder
.
-
credential
Sets The TokenCredential used for authentication.- Specified by:
credential
in interfaceTokenCredentialTrait<LogsIngestionClientBuilder>
- Parameters:
tokenCredential
- the tokenCredential value.- Returns:
- the updated
LogsIngestionClientBuilder
.
-
clientOptions
Set theClientOptions
used for creating the client.- Specified by:
clientOptions
in interfaceHttpTrait<LogsIngestionClientBuilder>
- Parameters:
clientOptions
- TheClientOptions
.- Returns:
- the updated
LogsIngestionClientBuilder
. - See Also:
-
serviceVersion
The service version to use when creating the client.- Parameters:
serviceVersion
- TheLogsIngestionServiceVersion
.- Returns:
- the updated
LogsIngestionClientBuilder
.
-
buildClient
Creates a synchronous client with the configured options in this builder.- Returns:
- A synchronous
LogsIngestionClient
.
-
buildAsyncClient
Creates an asynchronous client with the configured options in this builder.- Returns:
- An asynchronous
LogsIngestionAsyncClient
.
-