public class TableServiceClientBuilder extends Object
TableServiceClient and TableServiceAsyncClient objects. Call TableServiceClientBuilder.buildClient() or
TableServiceClientBuilder.buildAsyncClient(), respectively, to construct an instance of the desired client.| Constructor and Description |
|---|
TableServiceClientBuilder()
Creates a builder instance that is able to configure and construct
TableServiceClient and
TableServiceAsyncClient objects. |
| Modifier and Type | Method and Description |
|---|---|
TableServiceClientBuilder |
addPolicy(com.azure.core.http.policy.HttpPipelinePolicy pipelinePolicy)
Adds a pipeline policy to apply on each request sent.
|
TableServiceAsyncClient |
buildAsyncClient()
Creates a
TableServiceAsyncClient based on options set in the builder. |
TableServiceClient |
buildClient()
Creates a
TableServiceClient based on options set in the builder. |
TableServiceClientBuilder |
clientOptions(com.azure.core.util.ClientOptions clientOptions)
Sets the client options such as application ID and custom headers to set on a request.
|
TableServiceClientBuilder |
configuration(com.azure.core.util.Configuration configuration)
Sets the configuration object used to retrieve environment configuration values during building of the client.
|
TableServiceClientBuilder |
connectionString(String connectionString)
Sets the connection string to connect to the service.
|
TableServiceClientBuilder |
credential(com.azure.core.credential.AzureSasCredential credential)
Sets the
AzureSasCredential used to authorize requests sent to the service. |
TableServiceClientBuilder |
credential(TablesSharedKeyCredential credential)
Sets the
TablesSharedKeyCredential used to authorize requests sent to the service. |
TableServiceClientBuilder |
credential(com.azure.core.credential.TokenCredential credential)
Sets the
TokenCredential used to authorize requests sent to the service. |
TableServiceClientBuilder |
endpoint(String endpoint)
Sets the service endpoint.
|
TableServiceClientBuilder |
httpClient(com.azure.core.http.HttpClient httpClient)
Sets the
HttpClient to use for sending and receiving requests to and from the service. |
TableServiceClientBuilder |
httpLogOptions(com.azure.core.http.policy.HttpLogOptions logOptions)
Sets the logging configuration to use when sending and receiving requests to and from the service.
|
TableServiceClientBuilder |
pipeline(com.azure.core.http.HttpPipeline pipeline)
Sets the
HttpPipeline to use for the service client. |
TableServiceClientBuilder |
retryOptions(com.azure.storage.common.policy.RequestRetryOptions retryOptions)
Sets the request retry options for all the requests made through the client.
|
TableServiceClientBuilder |
sasToken(String sasToken)
Sets the SAS token used to authorize requests sent to the service.
|
TableServiceClientBuilder |
serviceVersion(TablesServiceVersion version)
Sets the
TablesServiceVersion that is used when making API requests. |
public TableServiceClientBuilder()
TableServiceClient and
TableServiceAsyncClient objects.public TableServiceClient buildClient()
TableServiceClient based on options set in the builder.TableServiceClient created from the configurations in this builder.IllegalStateException - If multiple credentials have been specified.public TableServiceAsyncClient buildAsyncClient()
TableServiceAsyncClient based on options set in the builder.TableServiceAsyncClient created from the configurations in this builder.IllegalStateException - If multiple credentials have been specified.public TableServiceClientBuilder connectionString(String connectionString)
connectionString - Connection string of the storage or CosmosDB table API account.TableServiceClientBuilder.IllegalArgumentException - if connectionString isn't a valid connection string.public TableServiceClientBuilder endpoint(String endpoint)
endpoint - The URL of the storage or CosmosDB table API account endpoint.TableServiceClientBuilder.IllegalArgumentException - if endpoint isn't a valid URL.public TableServiceClientBuilder pipeline(com.azure.core.http.HttpPipeline pipeline)
HttpPipeline to use for the service client. If pipeline is set, all other settings are
ignored, aside from endpoint.pipeline - HttpPipeline to use for sending service requests and receiving responses.TableServiceClientBuilder.public TableServiceClientBuilder configuration(com.azure.core.util.Configuration configuration)
global
configuration store, use Configuration.NONE to bypass using configuration settings during construction.configuration - Configuration store used to retrieve environment configurations.TableServiceClientBuilder.public TableServiceClientBuilder sasToken(String sasToken)
sasToken - The SAS token to use for authenticating requests.TableServiceClientBuilder.NullPointerException - if sasToken is null.public TableServiceClientBuilder credential(com.azure.core.credential.AzureSasCredential credential)
AzureSasCredential used to authorize requests sent to the service.credential - AzureSasCredential used to authorize requests sent to the service.TableServiceClientBuilder.NullPointerException - if credential is null.public TableServiceClientBuilder credential(TablesSharedKeyCredential credential)
TablesSharedKeyCredential used to authorize requests sent to the service.credential - TablesSharedKeyCredential used to authorize requests sent to the service.TableServiceClientBuilder.NullPointerException - if credential is null.public TableServiceClientBuilder credential(com.azure.core.credential.TokenCredential credential)
TokenCredential used to authorize requests sent to the service.credential - TokenCredential used to authorize requests sent to the service.TableServiceClientBuilder.NullPointerException - if credential is null.public TableServiceClientBuilder httpClient(com.azure.core.http.HttpClient httpClient)
HttpClient to use for sending and receiving requests to and from the service.httpClient - The HttpClient to use for requests.TableServiceClientBuilder.public TableServiceClientBuilder httpLogOptions(com.azure.core.http.policy.HttpLogOptions logOptions)
logLevel is not provided, default value of HttpLogDetailLevel.NONE is set.logOptions - The logging configuration to use when sending and receiving requests to and from the service.TableServiceClientBuilder.NullPointerException - if logOptions is null.public TableServiceClientBuilder addPolicy(com.azure.core.http.policy.HttpPipelinePolicy pipelinePolicy)
pipelinePolicy - A pipeline policy.TableServiceClientBuilder.NullPointerException - if pipelinePolicy is null.public TableServiceClientBuilder serviceVersion(TablesServiceVersion version)
TablesServiceVersion 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 - The TablesServiceVersion of the service to be used when making requests.TableServiceClientBuilder.public TableServiceClientBuilder retryOptions(com.azure.storage.common.policy.RequestRetryOptions retryOptions)
retryOptions - RequestRetryOptions.TableServiceClientBuilder.NullPointerException - if retryOptions is null.public TableServiceClientBuilder clientOptions(com.azure.core.util.ClientOptions clientOptions)
clientOptions - The ClientOptions.TableServiceClientBuilder.Copyright © 2021 Microsoft Corporation. All rights reserved.