Class KeyEncryptionKeyClientBuilder

    • Constructor Detail

      • KeyEncryptionKeyClientBuilder

        public KeyEncryptionKeyClientBuilder()
        The constructor with defaults.
    • Method Detail

      • buildKeyEncryptionKey

        public com.azure.core.cryptography.KeyEncryptionKey buildKeyEncryptionKey​(String keyId)
        Creates a KeyEncryptionKey based on options set in the builder. Every time buildKeyEncryptionKey(String) is called, a new instance of KeyEncryptionKey is created.

        If pipeline is set, then the pipeline and keyId are used to create the client. All other builder settings are ignored. If pipeline is not set, then an Azure Key Vault credential and keyId are required to build the client.

        Specified by:
        buildKeyEncryptionKey in interface com.azure.core.cryptography.KeyEncryptionKeyResolver
        Returns:
        A KeyEncryptionKeyClient with the options set from the builder.
        Throws:
        IllegalStateException - If credential(TokenCredential) or keyId have not been set.
      • buildKeyEncryptionKey

        public com.azure.core.cryptography.KeyEncryptionKey buildKeyEncryptionKey​(JsonWebKey key)
        Creates a local KeyEncryptionKeyClient for a given JSON Web Key. Every time buildKeyEncryptionKey(JsonWebKey) is called, a new instance of KeyEncryptionKey is created. For local clients, all other builder settings are ignored.

        The key is required to build the client.

        Parameters:
        key - The JsonWebKey to be used for cryptography operations.
        Returns:
        A KeyEncryptionKeyClient with the options set from the builder.
        Throws:
        IllegalStateException - If {key is not set.
      • httpLogOptions

        public KeyEncryptionKeyClientBuilder httpLogOptions​(com.azure.core.http.policy.HttpLogOptions logOptions)
        Sets the logging configuration for HTTP requests and responses.

        If logLevel is not provided, default value of HttpLogDetailLevel.NONE is set.

        Parameters:
        logOptions - The logging configuration to use when sending and receiving HTTP requests/responses.
        Returns:
        The updated KeyEncryptionKeyClientBuilder object.
      • httpClient

        public KeyEncryptionKeyClientBuilder httpClient​(com.azure.core.http.HttpClient client)
        Sets the HTTP client to use for sending and receiving requests to and from the service.
        Parameters:
        client - The HTTP client to use for requests.
        Returns:
        The updated KeyEncryptionKeyClientBuilder object.
      • pipeline

        public KeyEncryptionKeyClientBuilder pipeline​(com.azure.core.http.HttpPipeline pipeline)
        Sets the HTTP pipeline to use for the service client. If pipeline is set, all other settings are ignored, aside from jsonWebKey identifier or jsonWebKey to build the clients.
        Parameters:
        pipeline - The HTTP pipeline to use for sending service requests and receiving responses.
        Returns:
        The updated KeyEncryptionKeyClientBuilder object.
      • configuration

        public KeyEncryptionKeyClientBuilder configuration​(com.azure.core.util.Configuration configuration)
        Sets the configuration store that is used during construction of the service client. The default configuration store is a clone of the global configuration store, use Configuration.NONE to bypass using configuration settings during construction.
        Parameters:
        configuration - The configuration store used to get configuration details.
        Returns:
        The updated KeyEncryptionKeyClientBuilder object.
      • retryPolicy

        public KeyEncryptionKeyClientBuilder retryPolicy​(com.azure.core.http.policy.RetryPolicy retryPolicy)
        Sets the RetryPolicy that is used when each request is sent. The default retry policy will be used in the pipeline, if not provided.
        Parameters:
        retryPolicy - User's retry policy applied to each request.
        Returns:
        The updated KeyEncryptionKeyClientBuilder object.
      • clientOptions

        public KeyEncryptionKeyClientBuilder clientOptions​(com.azure.core.util.ClientOptions clientOptions)
        Sets the ClientOptions which enables various options to be set on the client. For example setting an applicationId using ClientOptions.setApplicationId(String) to configure the UserAgentPolicy for telemetry/monitoring purposes.

        More About Azure Core: Telemetry policy

        Parameters:
        clientOptions - The ClientOptions to be set on the client.
        Returns:
        The updated KeyEncryptionKeyClientBuilder object.