azure-docs-sdk-java/docs-ref-autogen/com.azure.security.keyvault...

226 строки
40 KiB
YAML

### 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 <xref uid=\"com.azure.security.keyvault.secrets.SecretAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"secret async client\"></xref> and <xref uid=\"com.azure.security.keyvault.secrets.SecretClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"secret client\"></xref>, by calling <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder.buildAsyncClient()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"buildAsyncClient\"></xref> and <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder.buildClient()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"buildClient\"></xref> respectively."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public final class **SecretClientBuilder**</br> implements <xref href=\"com.azure.core.client.traits.TokenCredentialTrait?alt=com.azure.core.client.traits.TokenCredentialTrait&text=TokenCredentialTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;, <xref href=\"com.azure.core.client.traits.HttpTrait?alt=com.azure.core.client.traits.HttpTrait&text=HttpTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;, <xref href=\"com.azure.core.client.traits.ConfigurationTrait?alt=com.azure.core.client.traits.ConfigurationTrait&text=ConfigurationTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;"
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 <xref uid=\"com.azure.core.http.policy.HttpPipelinePolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"pipeline policy\"></xref> to apply on each request sent."
parameters:
- description: "A <xref uid=\"com.azure.core.http.policy.HttpPipelinePolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"pipeline policy\"></xref>."
name: "policy"
type: "<xref href=\"com.azure.core.http.policy.HttpPipelinePolicy?alt=com.azure.core.http.policy.HttpPipelinePolicy&text=HttpPipelinePolicy\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SecretClientBuilder addPolicy(HttpPipelinePolicy policy)"
desc: "Adds a <xref uid=\"com.azure.core.http.policy.HttpPipelinePolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"pipeline policy\"></xref> 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 <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> 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 <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> 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 <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.buildAsyncClient()"
fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.buildAsyncClient()"
name: "buildAsyncClient()"
nameWithType: "SecretClientBuilder.buildAsyncClient()"
summary: "Creates a <xref uid=\"com.azure.security.keyvault.secrets.SecretAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretAsyncClient\"></xref> based on options set in the builder."
syntax: "public SecretAsyncClient buildAsyncClient()"
desc: "Creates a <xref uid=\"com.azure.security.keyvault.secrets.SecretAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretAsyncClient\"></xref> based on options set in the builder. Every time `buildAsyncClient()` is called, a new instance of <xref uid=\"com.azure.security.keyvault.secrets.SecretAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretAsyncClient\"></xref> is created.\n\nIf <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder.pipeline(com.azure.core.http.HttpPipeline)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"pipeline\"></xref> is set, then the `pipeline` and <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder.vaultUrl(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"serviceEndpoint\"></xref> are used to create the <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"client\"></xref>. All other builder settings are ignored. If `pipeline` is not set, then <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder.credential(com.azure.core.credential.TokenCredential)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key vault credential\"></xref>, and <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder.vaultUrl(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClientBuilder#vaultUrl(String)\"></xref> key vault url are required to build the <xref uid=\"com.azure.security.keyvault.secrets.SecretAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"client\"></xref>."
returns:
description: "A <xref uid=\"com.azure.security.keyvault.secrets.SecretAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretAsyncClient\"></xref> with the options set from the builder."
type: "<xref href=\"com.azure.security.keyvault.secrets.SecretAsyncClient?alt=com.azure.security.keyvault.secrets.SecretAsyncClient&text=SecretAsyncClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.security.keyvault.secrets.SecretClientBuilder.buildClient()"
fullName: "com.azure.security.keyvault.secrets.SecretClientBuilder.buildClient()"
name: "buildClient()"
nameWithType: "SecretClientBuilder.buildClient()"
summary: "Creates a <xref uid=\"com.azure.security.keyvault.secrets.SecretClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClient\"></xref> based on options set in the builder."
syntax: "public SecretClient buildClient()"
desc: "Creates a <xref uid=\"com.azure.security.keyvault.secrets.SecretClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClient\"></xref> based on options set in the builder. Every time `buildClient()` is called, a new instance of <xref uid=\"com.azure.security.keyvault.secrets.SecretClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClient\"></xref> is created.\n\nIf <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder.pipeline(com.azure.core.http.HttpPipeline)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"pipeline\"></xref> is set, then the `pipeline` and <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder.vaultUrl(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"serviceEndpoint\"></xref> are used to create the <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"client\"></xref>. All other builder settings are ignored. If `pipeline` is not set, then <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder.credential(com.azure.core.credential.TokenCredential)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"key vault credential\"></xref>, and <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder.vaultUrl(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClientBuilder#vaultUrl(String)\"></xref> key vault url are required to build the <xref uid=\"com.azure.security.keyvault.secrets.SecretClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"client\"></xref>."
returns:
description: "A <xref uid=\"com.azure.security.keyvault.secrets.SecretClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClient\"></xref> with the options set from the builder."
type: "<xref href=\"com.azure.security.keyvault.secrets.SecretClient?alt=com.azure.security.keyvault.secrets.SecretClient&text=SecretClient\" data-throw-if-not-resolved=\"False\" />"
- 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 <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpClientOptions\"></xref>."
name: "clientOptions"
type: "<xref href=\"com.azure.core.util.ClientOptions?alt=com.azure.core.util.ClientOptions&text=ClientOptions\" data-throw-if-not-resolved=\"False\" />"
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 <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpClientOptions\"></xref> class (a subclass of the <xref uid=\"com.azure.core.util.ClientOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ClientOptions\"></xref> 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 <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> 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 <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> 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 <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- 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: "<xref href=\"com.azure.core.util.Configuration?alt=com.azure.core.util.Configuration&text=Configuration\" data-throw-if-not-resolved=\"False\" />"
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 <xref uid=\"Configuration#getGlobalConfiguration()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"global\n configuration store\"></xref>, use <xref uid=\"com.azure.core.util.Configuration.NONE\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Configuration#NONE\"></xref> to bypass using configuration settings during construction."
returns:
description: "The updated <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- 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 <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> used to authorize requests sent to the service."
parameters:
- description: "<xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> used to authorize requests sent to the service."
name: "credential"
type: "<xref href=\"com.azure.core.credential.TokenCredential?alt=com.azure.core.credential.TokenCredential&text=TokenCredential\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SecretClientBuilder credential(TokenCredential credential)"
desc: "Sets the <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> 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 <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TokenCredential\"></xref> type.\n\n\n[identity and authentication]: https://aka.ms/azsdk/java/docs/identity"
returns:
description: "The updated <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- 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 <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- 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 <xref uid=\"com.azure.core.http.HttpClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpClient\"></xref> to use for sending and receiving requests to and from the service."
parameters:
- description: "The <xref uid=\"com.azure.core.http.HttpClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpClient\"></xref> to use for requests."
name: "client"
type: "<xref href=\"com.azure.core.http.HttpClient?alt=com.azure.core.http.HttpClient&text=HttpClient\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SecretClientBuilder httpClient(HttpClient client)"
desc: "Sets the <xref uid=\"com.azure.core.http.HttpClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpClient\"></xref> 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 <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> 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 <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> 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 <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- 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 <xref uid=\"com.azure.core.http.policy.HttpLogOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"logging configuration\"></xref> to use when sending and receiving requests to and from the service."
parameters:
- description: "The <xref uid=\"com.azure.core.http.policy.HttpLogOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"logging configuration\"></xref> to use when sending and receiving requests to\n and from the service."
name: "logOptions"
type: "<xref href=\"com.azure.core.http.policy.HttpLogOptions?alt=com.azure.core.http.policy.HttpLogOptions&text=HttpLogOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SecretClientBuilder httpLogOptions(HttpLogOptions logOptions)"
desc: "Sets the <xref uid=\"com.azure.core.http.policy.HttpLogOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"logging configuration\"></xref> to use when sending and receiving requests to and from the service. If a `logLevel` is not provided, default value of <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpLogDetailLevel#NONE\"></xref> is set.\n\n**Note:** It is important to understand the precedence order of the HttpTrait APIs. In particular, if a <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> 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 <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> 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 <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- 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 <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> to use for the service client."
parameters:
- description: "<xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> to use for sending service requests and receiving responses."
name: "pipeline"
type: "<xref href=\"com.azure.core.http.HttpPipeline?alt=com.azure.core.http.HttpPipeline&text=HttpPipeline\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SecretClientBuilder pipeline(HttpPipeline pipeline)"
desc: "Sets the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> 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 <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> 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 <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> 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 <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder.vaultUrl(java.lang.String)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"vaultUrl\"></xref> is not ignored when `pipeline` is set."
returns:
description: "The updated <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- 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 <xref uid=\"com.azure.core.http.policy.RetryOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RetryOptions\"></xref> for all the requests made through the client."
parameters:
- description: "The <xref uid=\"com.azure.core.http.policy.RetryOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RetryOptions\"></xref> to use for all the requests made through the client."
name: "retryOptions"
type: "<xref href=\"com.azure.core.http.policy.RetryOptions?alt=com.azure.core.http.policy.RetryOptions&text=RetryOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SecretClientBuilder retryOptions(RetryOptions retryOptions)"
desc: "Sets the <xref uid=\"com.azure.core.http.policy.RetryOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RetryOptions\"></xref> 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 <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> is specified, this takes precedence over all other APIs in the trait, and they will be ignored. If no <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> 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 <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> 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 <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder.retryPolicy(com.azure.core.http.policy.RetryPolicy)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#retryPolicy(RetryPolicy)\"></xref>."
returns:
description: "The updated <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- 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 <xref uid=\"com.azure.core.http.policy.RetryPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RetryPolicy\"></xref> that is used when each request is sent."
parameters:
- description: "user's retry policy applied to each request."
name: "retryPolicy"
type: "<xref href=\"com.azure.core.http.policy.RetryPolicy?alt=com.azure.core.http.policy.RetryPolicy&text=RetryPolicy\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SecretClientBuilder retryPolicy(RetryPolicy retryPolicy)"
desc: "Sets the <xref uid=\"com.azure.core.http.policy.RetryPolicy\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RetryPolicy\"></xref> that is used when each request is sent. Setting this is mutually exclusive with using <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder.retryOptions(com.azure.core.http.policy.RetryOptions)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#retryOptions(RetryOptions)\"></xref>. The default retry policy will be used in the pipeline, if not provided."
returns:
description: "The updated <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- 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 <xref uid=\"com.azure.security.keyvault.secrets.SecretServiceVersion\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretServiceVersion\"></xref> that is used when making API requests."
parameters:
- description: "<xref uid=\"com.azure.security.keyvault.secrets.SecretServiceVersion\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretServiceVersion\"></xref> of the service API used when making requests."
name: "version"
type: "<xref href=\"com.azure.security.keyvault.secrets.SecretServiceVersion?alt=com.azure.security.keyvault.secrets.SecretServiceVersion&text=SecretServiceVersion\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SecretClientBuilder serviceVersion(SecretServiceVersion version)"
desc: "Sets the <xref uid=\"com.azure.security.keyvault.secrets.SecretServiceVersion\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretServiceVersion\"></xref> 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 <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />"
- 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 <xref uid=\"com.azure.security.keyvault.secrets.models.KeyVaultSecretIdentifier\" data-throw-if-not-resolved=\"false\" data-raw-source=\"KeyVaultSecretIdentifier\"></xref> to parse it and obtain the <code>vaultUrl</code> and\n other information."
name: "vaultUrl"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
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 <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClientBuilder\"></xref> object."
type: "<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />"
type: "class"
desc: "This class provides a fluent builder API to help aid the configuration and instantiation of the <xref uid=\"com.azure.security.keyvault.secrets.SecretAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"secret async client\"></xref> and <xref uid=\"com.azure.security.keyvault.secrets.SecretClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"secret client\"></xref>, by calling <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder.buildAsyncClient()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"buildAsyncClient\"></xref> and <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder.buildClient()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"buildClient\"></xref> respectively. It constructs an instance of the desired client.\n\nThe <xref uid=\"com.azure.security.keyvault.secrets.SecretClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClient\"></xref>/<xref uid=\"com.azure.security.keyvault.secrets.SecretAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretAsyncClient\"></xref> both provide synchronous/asynchronous methods to manage <xref uid=\"com.azure.security.keyvault.secrets.models.KeyVaultSecret\" data-throw-if-not-resolved=\"false\" data-raw-source=\"secrets\"></xref> in the Azure Key Vault. The client supports creating, retrieving, updating, deleting, purging, backing up, restoring, and listing the <xref uid=\"com.azure.security.keyvault.secrets.models.KeyVaultSecret\" data-throw-if-not-resolved=\"false\" data-raw-source=\"secrets\"></xref>. The client also support listing <xref uid=\"com.azure.security.keyvault.secrets.models.DeletedSecret\" data-throw-if-not-resolved=\"false\" data-raw-source=\"deleted secrets\"></xref> for a soft-delete enabled Azure Key Vault.\n\nThe minimal configuration options required by <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"secretClientBuilder\"></xref> to build <xref uid=\"com.azure.security.keyvault.secrets.SecretAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretAsyncClient\"></xref> are <xref uid=\"java.lang.String\" data-throw-if-not-resolved=\"false\" data-raw-source=\"vaultUrl\"></xref> and <xref uid=\"com.azure.core.credential.TokenCredential\" data-throw-if-not-resolved=\"false\" data-raw-source=\"credential\"></xref>.\n\n```java\nSecretAsyncClient secretAsyncClient = new SecretClientBuilder()\n .credential(new DefaultAzureCredentialBuilder().build())\n .vaultUrl(\"<your-key-vault-url>\")\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(\"<your-key-vault-url>\")\n .buildClient();\n```\n\nThe <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"log detail level\"></xref>, multiple custom <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"policies\"></xref> and custom <xref uid=\"com.azure.core.http.HttpClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"http client\"></xref> can be optionally configured in the <xref uid=\"com.azure.security.keyvault.secrets.SecretClientBuilder\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SecretClientBuilder\"></xref>.\n\n```java\nSecretAsyncClient secretAsyncClient = new SecretClientBuilder()\n .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS))\n .vaultUrl(\"<your-key-vault-url>\")\n .credential(new DefaultAzureCredentialBuilder().build())\n .httpClient(HttpClient.createDefault())\n .buildAsyncClient();\n```"
implements:
- "<xref href=\"com.azure.core.client.traits.ConfigurationTrait?alt=com.azure.core.client.traits.ConfigurationTrait&text=ConfigurationTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;"
- "<xref href=\"com.azure.core.client.traits.HttpTrait?alt=com.azure.core.client.traits.HttpTrait&text=HttpTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;"
- "<xref href=\"com.azure.core.client.traits.TokenCredentialTrait?alt=com.azure.core.client.traits.TokenCredentialTrait&text=TokenCredentialTrait\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.security.keyvault.secrets.SecretClientBuilder?alt=com.azure.security.keyvault.secrets.SecretClientBuilder&text=SecretClientBuilder\" data-throw-if-not-resolved=\"False\" />&gt;"
metadata: {}
package: "com.azure.security.keyvault.secrets"
artifact: com.azure:azure-security-keyvault-secrets:4.8.6