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