public class DataLakeServiceClientBuilder extends Object
DataLakeServiceClients
and DataLakeServiceAsyncClients
, call buildClient
and buildAsyncClient
respectively to construct an instance of the desired client.
The following information must be provided on this builder:
.endpoint()
, in the format of https://{accountName}.dfs.core.windows.net
.
.credential()
or .connectionString()
.
Constructor and Description |
---|
DataLakeServiceClientBuilder()
Creates a builder instance that is able to configure and construct
DataLakeServiceClients and DataLakeServiceAsyncClients . |
Modifier and Type | Method and Description |
---|---|
DataLakeServiceClientBuilder |
addPolicy(com.azure.core.http.policy.HttpPipelinePolicy pipelinePolicy)
Adds a pipeline policy to apply on each request sent.
|
DataLakeServiceAsyncClient |
buildAsyncClient() |
DataLakeServiceClient |
buildClient() |
DataLakeServiceClientBuilder |
configuration(com.azure.core.util.Configuration configuration)
Sets the configuration object used to retrieve environment configuration values during building of the client.
|
DataLakeServiceClientBuilder |
credential(com.azure.storage.common.StorageSharedKeyCredential credential)
Sets the
StorageSharedKeyCredential used to authorize requests sent to the service. |
DataLakeServiceClientBuilder |
credential(com.azure.core.credential.TokenCredential credential)
Sets the
TokenCredential used to authorize requests sent to the service. |
DataLakeServiceClientBuilder |
endpoint(String endpoint)
Sets the data lake service endpoint, additionally parses it for information (SAS token)
|
static com.azure.core.http.policy.HttpLogOptions |
getDefaultHttpLogOptions()
Gets the default Storage whitelist log headers and query parameters.
|
DataLakeServiceClientBuilder |
httpClient(com.azure.core.http.HttpClient httpClient)
Sets the
HttpClient to use for sending a receiving requests to and from the service. |
DataLakeServiceClientBuilder |
httpLogOptions(com.azure.core.http.policy.HttpLogOptions logOptions)
Sets the
HttpLogOptions for service requests. |
DataLakeServiceClientBuilder |
pipeline(com.azure.core.http.HttpPipeline httpPipeline)
Sets the
HttpPipeline to use for the service client. |
DataLakeServiceClientBuilder |
retryOptions(com.azure.storage.common.policy.RequestRetryOptions retryOptions)
Sets the request retry options for all the requests made through the client.
|
DataLakeServiceClientBuilder |
sasToken(String sasToken)
Sets the SAS token used to authorize requests sent to the service.
|
DataLakeServiceClientBuilder |
serviceVersion(DataLakeServiceVersion version)
Sets the
DataLakeServiceVersion that is used when making API requests. |
public DataLakeServiceClientBuilder()
DataLakeServiceClients
and DataLakeServiceAsyncClients
.public DataLakeServiceClient buildClient()
DataLakeServiceClient
created from the configurations in this builder.public DataLakeServiceAsyncClient buildAsyncClient()
DataLakeServiceAsyncClient
created from the configurations in this builder.public DataLakeServiceClientBuilder endpoint(String endpoint)
endpoint
- URL of the serviceIllegalArgumentException
- If endpoint
is null
or is a malformed URL.public DataLakeServiceClientBuilder credential(com.azure.storage.common.StorageSharedKeyCredential credential)
StorageSharedKeyCredential
used to authorize requests sent to the service.credential
- StorageSharedKeyCredential
.NullPointerException
- If credential
is null
.public DataLakeServiceClientBuilder credential(com.azure.core.credential.TokenCredential credential)
TokenCredential
used to authorize requests sent to the service.credential
- TokenCredential
.NullPointerException
- If credential
is null
.public DataLakeServiceClientBuilder sasToken(String sasToken)
sasToken
- The SAS token to use for authenticating requests.NullPointerException
- If sasToken
is null
.public DataLakeServiceClientBuilder httpClient(com.azure.core.http.HttpClient httpClient)
HttpClient
to use for sending a receiving requests to and from the service.httpClient
- HttpClient to use for requests.public DataLakeServiceClientBuilder addPolicy(com.azure.core.http.policy.HttpPipelinePolicy pipelinePolicy)
pipelinePolicy
- a pipeline policyNullPointerException
- If pipelinePolicy
is null
.public DataLakeServiceClientBuilder httpLogOptions(com.azure.core.http.policy.HttpLogOptions logOptions)
HttpLogOptions
for service requests.logOptions
- The logging configuration to use when sending and receiving HTTP requests/responses.NullPointerException
- If logOptions
is null
.public static com.azure.core.http.policy.HttpLogOptions getDefaultHttpLogOptions()
public DataLakeServiceClientBuilder configuration(com.azure.core.util.Configuration configuration)
configuration
- Configuration store used to retrieve environment configurations.public DataLakeServiceClientBuilder retryOptions(com.azure.storage.common.policy.RequestRetryOptions retryOptions)
retryOptions
- RequestRetryOptions
.NullPointerException
- If retryOptions
is null
.public DataLakeServiceClientBuilder pipeline(com.azure.core.http.HttpPipeline httpPipeline)
HttpPipeline
to use for the service client.
If pipeline
is set, all other settings are ignored, aside from endpoint
.httpPipeline
- HttpPipeline to use for sending service requests and receiving responses.public DataLakeServiceClientBuilder serviceVersion(DataLakeServiceVersion version)
DataLakeServiceVersion
that is used when making API requests.
If a service version is not provided, the service version that will be used will be the latest known service version based on the version of the client library being used. If no service version is specified, updating to a newer version of the client library will have the result of potentially moving to a newer service version.
Targeting a specific service version may also mean that the service will return an error for newer APIs.
version
- DataLakeServiceVersion
of the service to be used when making requests.Copyright © 2020 Microsoft Corporation. All rights reserved.