### YamlMime:JavaType uid: "com.azure.security.keyvault.secrets.SecretClientBuilder" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder" name: "SecretClientBuilder" nameWithType: "SecretClientBuilder" summary: "This class provides a fluent builder API to help aid the configuration and instantiation of the and , by calling and respectively." inheritances: - "" inheritedClassMethods: - classRef: "java.lang.Object" methodsRef: - "clone" - "equals" - "finalize" - "getClass" - "hashCode" - "notify" - "notifyAll" - "toString" - "wait" - "wait" - "wait" syntax: "public final class **SecretClientBuilder**
implements <>, <>, <>" constructors: - uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.SecretClientBuilder()" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.SecretClientBuilder()" name: "SecretClientBuilder()" nameWithType: "SecretClientBuilder.SecretClientBuilder()" summary: "The constructor with defaults." syntax: "public SecretClientBuilder()" desc: "The constructor with defaults." methods: - uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.addPolicy(com.azure.core.http.policy.HttpPipelinePolicy)" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.addPolicy(HttpPipelinePolicy policy)" name: "addPolicy(HttpPipelinePolicy policy)" nameWithType: "SecretClientBuilder.addPolicy(HttpPipelinePolicy policy)" summary: "Adds a to apply on each request sent." parameters: - description: "A ." name: "policy" type: "" syntax: "public SecretClientBuilder addPolicy(HttpPipelinePolicy policy)" desc: "Adds a to apply on each request sent.\n\n**Note:** It is important to understand the precedence order of the HttpTrait APIs. In particular, if a is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if an is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications." returns: description: "The updated object." type: "" - uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.buildAsyncClient()" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.buildAsyncClient()" name: "buildAsyncClient()" nameWithType: "SecretClientBuilder.buildAsyncClient()" summary: "Creates a based on options set in the builder." syntax: "public SecretAsyncClient buildAsyncClient()" desc: "Creates a based on options set in the builder. Every time `buildAsyncClient()` is called, a new instance of is created.\n\nIf is set, then the `pipeline` and are used to create the . All other builder settings are ignored. If `pipeline` is not set, then , and key vault url are required to build the ." returns: description: "A with the options set from the builder." type: "" - uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.buildClient()" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.buildClient()" name: "buildClient()" nameWithType: "SecretClientBuilder.buildClient()" summary: "Creates a based on options set in the builder." syntax: "public SecretClient buildClient()" desc: "Creates a based on options set in the builder. Every time `buildClient()` is called, a new instance of is created.\n\nIf is set, then the `pipeline` and are used to create the . All other builder settings are ignored. If `pipeline` is not set, then , and key vault url are required to build the ." returns: description: "A with the options set from the builder." type: "" - uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.clientOptions(com.azure.core.util.ClientOptions)" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.clientOptions(ClientOptions clientOptions)" name: "clientOptions(ClientOptions clientOptions)" nameWithType: "SecretClientBuilder.clientOptions(ClientOptions clientOptions)" summary: "Allows for setting common properties such as application ID, headers, proxy configuration, etc." parameters: - description: "A configured instance of ." name: "clientOptions" type: "" syntax: "public SecretClientBuilder clientOptions(ClientOptions clientOptions)" desc: "Allows for setting common properties such as application ID, headers, proxy configuration, etc. Note that it is recommended that this method be called with an instance of the class (a subclass of the base class). The HttpClientOptions subclass provides more configuration options suitable for HTTP clients, which is applicable for any class that implements this HttpTrait interface.\n\n**Note:** It is important to understand the precedence order of the HttpTrait APIs. In particular, if a is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if an is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications." returns: description: "The updated object." type: "" - uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.configuration(com.azure.core.util.Configuration)" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.configuration(Configuration configuration)" name: "configuration(Configuration configuration)" nameWithType: "SecretClientBuilder.configuration(Configuration configuration)" summary: "Sets the configuration store that is used during construction of the service client." parameters: - description: "The configuration store used to" name: "configuration" type: "" syntax: "public SecretClientBuilder configuration(Configuration configuration)" desc: "Sets the configuration store that is used during construction of the service client. The default configuration store is a clone of the , use to bypass using configuration settings during construction." returns: description: "The updated object." type: "" - uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.credential(com.azure.core.credential.TokenCredential)" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.credential(TokenCredential credential)" name: "credential(TokenCredential credential)" nameWithType: "SecretClientBuilder.credential(TokenCredential credential)" summary: "Sets the used to authorize requests sent to the service." parameters: - description: " used to authorize requests sent to the service." name: "credential" type: "" syntax: "public SecretClientBuilder credential(TokenCredential credential)" desc: "Sets the used to authorize requests sent to the service. Refer to the Azure SDK for Java [identity and authentication][] documentation for more details on proper usage of the type.\n\n\n[identity and authentication]: https://aka.ms/azsdk/java/docs/identity" returns: description: "The updated object." type: "" - uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.disableChallengeResourceVerification()" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.disableChallengeResourceVerification()" name: "disableChallengeResourceVerification()" nameWithType: "SecretClientBuilder.disableChallengeResourceVerification()" summary: "Disables verifying if the authentication challenge resource matches the Key Vault domain." syntax: "public SecretClientBuilder disableChallengeResourceVerification()" desc: "Disables verifying if the authentication challenge resource matches the Key Vault domain. This verification is performed by default." returns: description: "The updated object." type: "" - uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.httpClient(com.azure.core.http.HttpClient)" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.httpClient(HttpClient client)" name: "httpClient(HttpClient client)" nameWithType: "SecretClientBuilder.httpClient(HttpClient client)" summary: "Sets the to use for sending and receiving requests to and from the service." parameters: - description: "The to use for requests." name: "client" type: "" syntax: "public SecretClientBuilder httpClient(HttpClient client)" desc: "Sets the to use for sending and receiving requests to and from the service.\n\n**Note:** It is important to understand the precedence order of the HttpTrait APIs. In particular, if a is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if an is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications." returns: description: "The updated object." type: "" - uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.httpLogOptions(com.azure.core.http.policy.HttpLogOptions)" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.httpLogOptions(HttpLogOptions logOptions)" name: "httpLogOptions(HttpLogOptions logOptions)" nameWithType: "SecretClientBuilder.httpLogOptions(HttpLogOptions logOptions)" summary: "Sets the to use when sending and receiving requests to and from the service." parameters: - description: "The to use when sending and receiving requests to\n and from the service." name: "logOptions" type: "" syntax: "public SecretClientBuilder httpLogOptions(HttpLogOptions logOptions)" desc: "Sets the to use when sending and receiving requests to and from the service. If a `logLevel` is not provided, default value of is set.\n\n**Note:** It is important to understand the precedence order of the HttpTrait APIs. In particular, if a is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if an is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications." returns: description: "The updated object." type: "" - uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.pipeline(com.azure.core.http.HttpPipeline)" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.pipeline(HttpPipeline pipeline)" name: "pipeline(HttpPipeline pipeline)" nameWithType: "SecretClientBuilder.pipeline(HttpPipeline pipeline)" summary: "Sets the to use for the service client." parameters: - description: " to use for sending service requests and receiving responses." name: "pipeline" type: "" syntax: "public SecretClientBuilder pipeline(HttpPipeline pipeline)" desc: "Sets the to use for the service client.\n\n**Note:** It is important to understand the precedence order of the HttpTrait APIs. In particular, if a is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if an is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications.\n\nThe is not ignored when `pipeline` is set." returns: description: "The updated object." type: "" - uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.retryOptions(com.azure.core.http.policy.RetryOptions)" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.retryOptions(RetryOptions retryOptions)" name: "retryOptions(RetryOptions retryOptions)" nameWithType: "SecretClientBuilder.retryOptions(RetryOptions retryOptions)" summary: "Sets the for all the requests made through the client." parameters: - description: "The to use for all the requests made through the client." name: "retryOptions" type: "" syntax: "public SecretClientBuilder retryOptions(RetryOptions retryOptions)" desc: "Sets the for all the requests made through the client.\n\n**Note:** It is important to understand the precedence order of the HttpTrait APIs. In particular, if a is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no is specified, a HTTP pipeline will be constructed internally based on the settings provided to this trait. Additionally, there may be other APIs in types that implement this trait that are also ignored if an is specified, so please be sure to refer to the documentation of types that implement this trait to understand the full set of implications.\n\nSetting this is mutually exclusive with using ." returns: description: "The updated object." type: "" - uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.retryPolicy(com.azure.core.http.policy.RetryPolicy)" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.retryPolicy(RetryPolicy retryPolicy)" name: "retryPolicy(RetryPolicy retryPolicy)" nameWithType: "SecretClientBuilder.retryPolicy(RetryPolicy retryPolicy)" summary: "Sets the that is used when each request is sent." parameters: - description: "user's retry policy applied to each request." name: "retryPolicy" type: "" syntax: "public SecretClientBuilder retryPolicy(RetryPolicy retryPolicy)" desc: "Sets the that is used when each request is sent. Setting this is mutually exclusive with using . The default retry policy will be used in the pipeline, if not provided." returns: description: "The updated object." type: "" - uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.serviceVersion(com.azure.security.keyvault.secrets.SecretServiceVersion)" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.serviceVersion(SecretServiceVersion version)" name: "serviceVersion(SecretServiceVersion version)" nameWithType: "SecretClientBuilder.serviceVersion(SecretServiceVersion version)" summary: "Sets the that is used when making API requests." parameters: - description: " of the service API used when making requests." name: "version" type: "" syntax: "public SecretClientBuilder serviceVersion(SecretServiceVersion version)" desc: "Sets the that is used when making API requests.\n\nIf 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 the client library will have the result of potentially moving to a newer service version." returns: description: "The updated object." type: "" - uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.vaultUrl(java.lang.String)" fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.vaultUrl(String vaultUrl)" name: "vaultUrl(String vaultUrl)" nameWithType: "SecretClientBuilder.vaultUrl(String vaultUrl)" summary: "Sets the vault endpoint URL to send HTTP requests to." parameters: - description: "The vault url is used as destination on Azure to send requests to. If you have a secret\n identifier, create a new to parse it and obtain the vaultUrl and\n other information." name: "vaultUrl" type: "String" syntax: "public SecretClientBuilder vaultUrl(String vaultUrl)" desc: "Sets the vault endpoint URL to send HTTP requests to. You should validate that this URL references a valid Key Vault resource. Refer to the following [documentation][] for details.\n\n\n[documentation]: https://aka.ms/azsdk/blog/vault-uri" returns: description: "The updated object." type: "" type: "class" desc: "This class provides a fluent builder API to help aid the configuration and instantiation of the and , by calling and respectively. It constructs an instance of the desired client.\n\nThe / both provide synchronous/asynchronous methods to manage in the Azure Key Vault. The client supports creating, retrieving, updating, deleting, purging, backing up, restoring, and listing the . The client also support listing for a soft-delete enabled Azure Key Vault.\n\nThe minimal configuration options required by to build are and .\n\n```java\nSecretAsyncClient secretAsyncClient = new SecretClientBuilder()\n .credential(new DefaultAzureCredentialBuilder().build())\n .vaultUrl(\"\")\n .buildAsyncClient();\n```\n\n**Samples to construct the sync client**\n\n```java\nSecretClient secretClient = new SecretClientBuilder()\n .credential(new DefaultAzureCredentialBuilder().build())\n .vaultUrl(\"\")\n .buildClient();\n```\n\nThe , multiple custom and custom can be optionally configured in the .\n\n```java\nSecretAsyncClient secretAsyncClient = new SecretClientBuilder()\n .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS))\n .vaultUrl(\"\")\n .credential(new DefaultAzureCredentialBuilder().build())\n .httpClient(HttpClient.createDefault())\n .buildAsyncClient();\n```" implements: - "<>" - "<>" - "<>" metadata: {} package: "com.azure.security.keyvault.secrets" artifact: com.azure:azure-security-keyvault-secrets:4.8.6