public class DataLakeFileSystemClientBuilder extends Object
FileSystemClients
and FileSystemAsyncClients
, call
buildClient
and buildAsyncClient
respectively to construct an
instance of the desired client.
The following information must be provided on this builder:
.endpoint()
, including the file system name, in the format of https://{accountName}.dfs.core.windows.net/{fileSystemName}
.
.credential()
or .connectionString()
if the file system is not publicly
accessible.
Constructor and Description |
---|
DataLakeFileSystemClientBuilder()
Creates a builder instance that is able to configure and construct
FileSystemClients
and FileSystemAsyncClients . |
Modifier and Type | Method and Description |
---|---|
DataLakeFileSystemClientBuilder |
addPolicy(com.azure.core.http.policy.HttpPipelinePolicy pipelinePolicy)
Adds a pipeline policy to apply on each request sent.
|
DataLakeFileSystemAsyncClient |
buildAsyncClient()
Code Samples
|
DataLakeFileSystemClient |
buildClient()
Code Samples
|
DataLakeFileSystemClientBuilder |
configuration(com.azure.core.util.Configuration configuration)
Sets the configuration object used to retrieve environment configuration values during building of the client.
|
DataLakeFileSystemClientBuilder |
credential(com.azure.storage.common.StorageSharedKeyCredential credential)
Sets the
StorageSharedKeyCredential used to authorize requests sent to the service. |
DataLakeFileSystemClientBuilder |
credential(com.azure.core.credential.TokenCredential credential)
Sets the
TokenCredential used to authorize requests sent to the service. |
DataLakeFileSystemClientBuilder |
endpoint(String endpoint)
Sets the service endpoint, additionally parses it for information (SAS token, file system name)
|
DataLakeFileSystemClientBuilder |
fileSystemName(String fileSystemName)
Sets the name of the file system.
|
static com.azure.core.http.policy.HttpLogOptions |
getDefaultHttpLogOptions()
Gets the default Storage whitelist log headers and query parameters.
|
DataLakeFileSystemClientBuilder |
httpClient(com.azure.core.http.HttpClient httpClient)
Sets the
HttpClient to use for sending a receiving requests to and from the service. |
DataLakeFileSystemClientBuilder |
httpLogOptions(com.azure.core.http.policy.HttpLogOptions logOptions)
Sets the
HttpLogOptions for service requests. |
DataLakeFileSystemClientBuilder |
pipeline(com.azure.core.http.HttpPipeline httpPipeline)
Sets the
HttpPipeline to use for the service client. |
DataLakeFileSystemClientBuilder |
retryOptions(com.azure.storage.common.policy.RequestRetryOptions retryOptions)
Sets the request retry options for all the requests made through the client.
|
DataLakeFileSystemClientBuilder |
sasToken(String sasToken)
Sets the SAS token used to authorize requests sent to the service.
|
DataLakeFileSystemClientBuilder |
serviceVersion(DataLakeServiceVersion version)
Sets the
DataLakeServiceVersion that is used when making API requests. |
DataLakeFileSystemClientBuilder |
setAnonymousAccess()
Clears the credential used to authorize the request.
|
public DataLakeFileSystemClientBuilder()
FileSystemClients
and FileSystemAsyncClients
.public DataLakeFileSystemClient buildClient()
Code Samples
DataLakeFileSystemClient client = new DataLakeFileSystemClientBuilder() .endpoint(endpoint) .credential(storageSharedKeyCredential) .buildClient();
DataLakeFileSystemClient
created from the configurations in this builder.public DataLakeFileSystemAsyncClient buildAsyncClient()
Code Samples
DataLakeFileSystemAsyncClient client = new DataLakeFileSystemClientBuilder() .endpoint(endpoint) .credential(storageSharedKeyCredential) .buildAsyncClient();
DataLakeFileSystemAsyncClient
created from the configurations in this builder.public DataLakeFileSystemClientBuilder endpoint(String endpoint)
endpoint
- URL of the serviceIllegalArgumentException
- If endpoint
is null
or is a malformed URL.public DataLakeFileSystemClientBuilder credential(com.azure.storage.common.StorageSharedKeyCredential credential)
StorageSharedKeyCredential
used to authorize requests sent to the service.credential
- StorageSharedKeyCredential
.NullPointerException
- If credential
is null
.public DataLakeFileSystemClientBuilder credential(com.azure.core.credential.TokenCredential credential)
TokenCredential
used to authorize requests sent to the service.credential
- TokenCredential
.NullPointerException
- If credential
is null
.public DataLakeFileSystemClientBuilder sasToken(String sasToken)
sasToken
- The SAS token to use for authenticating requests.NullPointerException
- If sasToken
is null
.public DataLakeFileSystemClientBuilder setAnonymousAccess()
This is for file systems that are publicly accessible.
public DataLakeFileSystemClientBuilder fileSystemName(String fileSystemName)
fileSystemName
- Name of the file system. If the value null
or empty the root file system,
$root
, will be used.public DataLakeFileSystemClientBuilder 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 static com.azure.core.http.policy.HttpLogOptions getDefaultHttpLogOptions()
public DataLakeFileSystemClientBuilder addPolicy(com.azure.core.http.policy.HttpPipelinePolicy pipelinePolicy)
pipelinePolicy
- a pipeline policyNullPointerException
- If pipelinePolicy
is null
.public DataLakeFileSystemClientBuilder 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 DataLakeFileSystemClientBuilder configuration(com.azure.core.util.Configuration configuration)
configuration
- Configuration store used to retrieve environment configurations.public DataLakeFileSystemClientBuilder retryOptions(com.azure.storage.common.policy.RequestRetryOptions retryOptions)
retryOptions
- RequestRetryOptions
.NullPointerException
- If retryOptions
is null
.public DataLakeFileSystemClientBuilder 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 DataLakeFileSystemClientBuilder 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.