Class KmsClient.KmsClientBuilder

java.lang.Object
com.salesforce.multicloudj.kms.client.KmsClient.KmsClientBuilder
Enclosing class:
KmsClient

public static class KmsClient.KmsClientBuilder extends Object
Builder class for KmsClient.
  • Constructor Details

    • KmsClientBuilder

      public KmsClientBuilder(String providerId)
      Constructor for KmsClientBuilder.
      Parameters:
      providerId - the ID of the provider such as "aws", "gcp", or "ali"
  • Method Details

    • withRegion

      public KmsClient.KmsClientBuilder withRegion(String region)
      Method to supply region
      Parameters:
      region - Region
      Returns:
      An instance of self
    • withEndpoint

      public KmsClient.KmsClientBuilder withEndpoint(URI endpoint)
      Method to supply an endpoint override
      Parameters:
      endpoint - The endpoint override
      Returns:
      An instance of self
    • withProxyEndpoint

      public KmsClient.KmsClientBuilder withProxyEndpoint(URI proxyEndpoint)
      Method to supply a proxy endpoint that requests to the key management service are sent through
      Parameters:
      proxyEndpoint - The proxy endpoint override
      Returns:
      An instance of self
    • withKeyContainer

      public KmsClient.KmsClientBuilder withKeyContainer(String keyContainer)
      Method to supply the provider resource that keys are created in and short key ids are resolved against. Providers that do not group keys under a parent resource ignore it.
      Parameters:
      keyContainer - Fully qualified native name of the key container
      Returns:
      An instance of self
    • withCredentialsOverrider

      public KmsClient.KmsClientBuilder withCredentialsOverrider(CredentialsOverrider credentialsOverrider)
      Method to supply credentialsOverrider
      Parameters:
      credentialsOverrider - CredentialsOverrider
      Returns:
      An instance of self
    • withRetryConfig

      public KmsClient.KmsClientBuilder withRetryConfig(RetryConfig retryConfig)
      Method to supply retry configuration
      Parameters:
      retryConfig - The retry configuration to use for retrying failed requests
      Returns:
      An instance of self
    • withProperties

      public KmsClient.KmsClientBuilder withProperties(Properties properties)
      Method to supply provider-specific settings that have no portable builder method.
      Parameters:
      properties - Provider-specific settings
      Returns:
      An instance of self
    • build

      public KmsClient build()
      Builds and returns an instance of KmsClient.
      Returns:
      An instance of KmsClient.