Class OciConfig.BuilderBase<BUILDER extends OciConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OciConfig>

java.lang.Object
io.helidon.integrations.oci.sdk.runtime.OciConfig.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>, Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
OciConfig.Builder
Enclosing interface:
OciConfig

public abstract static class OciConfig.BuilderBase<BUILDER extends OciConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OciConfig> extends Object implements Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for OciConfig.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(OciConfig prototype)
      Update this builder from an existing prototype instance.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(OciConfig.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • config

      public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface Prototype.ConfiguredBuilder<BUILDER extends OciConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OciConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • clearAuthStrategy

      public BUILDER clearAuthStrategy()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • authStrategy

      public BUILDER authStrategy(String authStrategy)
      The singular authentication strategy to apply. This will be preferred over authStrategies() if both are present.
      Parameters:
      authStrategy - the singular authentication strategy to be applied
      Returns:
      updated builder instance
      See Also:
    • authStrategies

      public BUILDER authStrategies(List<? extends String> authStrategies)
      The list of authentication strategies that will be attempted by AbstractAuthenticationDetailsProvider when one is called for. This is only used if authStrategy() is not present.
      • auto - if present in the list, or if no value for this property exists.
      • config - the SimpleAuthenticationDetailsProvider will be used, customized with other configuration properties described here.
      • config-file - the ConfigFileAuthenticationDetailsProvider will be used, customized with other configuration properties described here.
      • instance-principals - the InstancePrincipalsAuthenticationDetailsProvider will be used.
      • resource-principal - the ResourcePrincipalAuthenticationDetailsProvider will be used.

      If there are more than one strategy descriptors defined, the first one that is deemed to be available/suitable will be used and all others will be ignored.

      Parameters:
      authStrategies - the list of authentication strategies that will be applied, defaulting to auto
      Returns:
      updated builder instance
      See Also:
    • addAuthStrategies

      public BUILDER addAuthStrategies(List<? extends String> authStrategies)
      The list of authentication strategies that will be attempted by AbstractAuthenticationDetailsProvider when one is called for. This is only used if authStrategy() is not present.
      • auto - if present in the list, or if no value for this property exists.
      • config - the SimpleAuthenticationDetailsProvider will be used, customized with other configuration properties described here.
      • config-file - the ConfigFileAuthenticationDetailsProvider will be used, customized with other configuration properties described here.
      • instance-principals - the InstancePrincipalsAuthenticationDetailsProvider will be used.
      • resource-principal - the ResourcePrincipalAuthenticationDetailsProvider will be used.

      If there are more than one strategy descriptors defined, the first one that is deemed to be available/suitable will be used and all others will be ignored.

      Parameters:
      authStrategies - the list of authentication strategies that will be applied, defaulting to auto
      Returns:
      updated builder instance
      See Also:
    • clearConfigPath

      public BUILDER clearConfigPath()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • configPath

      public BUILDER configPath(String configPath)
      The OCI configuration profile path.

      This configuration property has an effect only when config-file is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as fileConfigIsPresent(). When it is present, this property must also be present and then the ConfigFileReader.parse(String) method will be passed this value. It is expected to be passed with a valid OCI configuration file path.

      Parameters:
      configPath - the OCI configuration profile path
      Returns:
      updated builder instance
      See Also:
    • clearConfigProfile

      public BUILDER clearConfigProfile()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • configProfile

      public BUILDER configProfile(String configProfile)
      The OCI configuration/auth profile name.

      This configuration property has an effect only when config-file is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as fileConfigIsPresent(). When it is present, this property may also be optionally provided in order to override the default "DEFAULT".

      Parameters:
      configProfile - the optional OCI configuration/auth profile name
      Returns:
      updated builder instance
      See Also:
    • clearAuthFingerprint

      public BUILDER clearAuthFingerprint()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • authFingerprint

      public BUILDER authFingerprint(String authFingerprint)
      The OCI authentication fingerprint.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the API signing key's fingerprint. See SimpleAuthenticationDetailsProvider.getFingerprint() for more details.

      Parameters:
      authFingerprint - the OCI authentication fingerprint
      Returns:
      updated builder instance
      See Also:
    • authKeyFile

      public BUILDER authKeyFile(String authKeyFile)
      The OCI authentication key file.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPrivateKey(). This file must exist in the user.home directory. Alternatively, this property can be set using either authPrivateKey() or using authPrivateKeyPath().

      Parameters:
      authKeyFile - the OCI authentication key file
      Returns:
      updated builder instance
      See Also:
    • clearAuthPrivateKeyPath

      public BUILDER clearAuthPrivateKeyPath()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • authPrivateKeyPath

      public BUILDER authPrivateKeyPath(String authPrivateKeyPath)
      The OCI authentication key file path.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPrivateKey(). This file path is an alternative for using authKeyFile() where the file must exist in the user.home directory. Alternatively, this property can be set using authPrivateKey().

      Parameters:
      authPrivateKeyPath - the OCI authentication key file path
      Returns:
      updated builder instance
      See Also:
    • clearAuthPrivateKey

      public BUILDER clearAuthPrivateKey()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • authPrivateKey

      public BUILDER authPrivateKey(char[] authPrivateKey)
      The OCI authentication private key.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPrivateKey(). Alternatively, this property can be set using either authKeyFile() residing in the user.home directory, or using authPrivateKeyPath().

      Parameters:
      authPrivateKey - the OCI authentication private key
      Returns:
      updated builder instance
      See Also:
    • authPrivateKey

      public BUILDER authPrivateKey(String authPrivateKey)
      The OCI authentication private key.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPrivateKey(). Alternatively, this property can be set using either authKeyFile() residing in the user.home directory, or using authPrivateKeyPath().

      Parameters:
      authPrivateKey - the OCI authentication private key
      Returns:
      updated builder instance
      See Also:
    • clearAuthPassphrase

      public BUILDER clearAuthPassphrase()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • authPassphrase

      public BUILDER authPassphrase(char[] authPassphrase)
      The OCI authentication passphrase.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPassphraseCharacters().

      Parameters:
      authPassphrase - the OCI authentication passphrase
      Returns:
      updated builder instance
      See Also:
    • authPassphrase

      public BUILDER authPassphrase(String authPassphrase)
      The OCI authentication passphrase.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPassphraseCharacters().

      Parameters:
      authPassphrase - the OCI authentication passphrase
      Returns:
      updated builder instance
      See Also:
    • clearAuthRegion

      public BUILDER clearAuthRegion()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • authRegion

      public BUILDER authRegion(String authRegion)
      The OCI region.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, either this property or RegionProvider must be provide a value in order to set the ConfigFileAuthenticationDetailsProvider.getRegion().

      Parameters:
      authRegion - the OCI region
      Returns:
      updated builder instance
      See Also:
    • clearAuthTenantId

      public BUILDER clearAuthTenantId()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • authTenantId

      public BUILDER authTenantId(String authTenantId)
      The OCI tenant id.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the ConfigFileAuthenticationDetailsProvider.getTenantId().

      Parameters:
      authTenantId - the OCI tenant id
      Returns:
      updated builder instance
      See Also:
    • clearAuthUserId

      public BUILDER clearAuthUserId()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • authUserId

      public BUILDER authUserId(String authUserId)
      The OCI user id.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). When it is present, this property must be provided in order to set the ConfigFileAuthenticationDetailsProvider.getUserId().

      Parameters:
      authUserId - the OCI user id
      Returns:
      updated builder instance
      See Also:
    • imdsHostName

      public BUILDER imdsHostName(String imdsHostName)
      The OCI IMDS hostname.

      This configuration property is used to identify the metadata service url.

      Parameters:
      imdsHostName - the OCI IMDS hostname
      Returns:
      updated builder instance
      See Also:
    • imdsTimeout

      public BUILDER imdsTimeout(Duration imdsTimeout)
      The OCI IMDS connection timeout. This is used to auto-detect availability.

      This configuration property is used when attempting to connect to the metadata service.

      Parameters:
      imdsTimeout - the OCI IMDS connection timeout
      Returns:
      updated builder instance
      See Also:
    • authStrategy

      public Optional<String> authStrategy()
      The singular authentication strategy to apply. This will be preferred over authStrategies() if both are present.
      Returns:
      the auth strategy
    • authStrategies

      public List<String> authStrategies()
      The list of authentication strategies that will be attempted by AbstractAuthenticationDetailsProvider when one is called for. This is only used if authStrategy() is not present.
      • auto - if present in the list, or if no value for this property exists.
      • config - the SimpleAuthenticationDetailsProvider will be used, customized with other configuration properties described here.
      • config-file - the ConfigFileAuthenticationDetailsProvider will be used, customized with other configuration properties described here.
      • instance-principals - the InstancePrincipalsAuthenticationDetailsProvider will be used.
      • resource-principal - the ResourcePrincipalAuthenticationDetailsProvider will be used.

      If there are more than one strategy descriptors defined, the first one that is deemed to be available/suitable will be used and all others will be ignored.

      Returns:
      the auth strategies
      See Also:
      • OciAuthenticationDetailsProvider.AuthStrategy
    • configPath

      public Optional<String> configPath()
      The OCI configuration profile path.

      This configuration property has an effect only when config-file is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as fileConfigIsPresent(). When it is present, this property must also be present and then the ConfigFileReader.parse(String) method will be passed this value. It is expected to be passed with a valid OCI configuration file path.

      Returns:
      the config path
    • configProfile

      public Optional<String> configProfile()
      The OCI configuration/auth profile name.

      This configuration property has an effect only when config-file is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as fileConfigIsPresent(). When it is present, this property may also be optionally provided in order to override the default "DEFAULT".

      Returns:
      the config profile
    • authFingerprint

      public Optional<String> authFingerprint()
      The OCI authentication fingerprint.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the API signing key's fingerprint. See SimpleAuthenticationDetailsProvider.getFingerprint() for more details.

      Returns:
      the auth fingerprint
    • authKeyFile

      public String authKeyFile()
      The OCI authentication key file.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPrivateKey(). This file must exist in the user.home directory. Alternatively, this property can be set using either authPrivateKey() or using authPrivateKeyPath().

      Returns:
      the auth key file
    • authPrivateKeyPath

      public Optional<String> authPrivateKeyPath()
      The OCI authentication key file path.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPrivateKey(). This file path is an alternative for using authKeyFile() where the file must exist in the user.home directory. Alternatively, this property can be set using authPrivateKey().

      Returns:
      the auth private key path
    • authPrivateKey

      public Optional<char[]> authPrivateKey()
      The OCI authentication private key.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPrivateKey(). Alternatively, this property can be set using either authKeyFile() residing in the user.home directory, or using authPrivateKeyPath().

      Returns:
      the auth private key
    • authPassphrase

      public Optional<char[]> authPassphrase()
      The OCI authentication passphrase.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the SimpleAuthenticationDetailsProvider.getPassphraseCharacters().

      Returns:
      the auth passphrase
    • authRegion

      public Optional<String> authRegion()
      The OCI region.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, either this property or RegionProvider must be provide a value in order to set the ConfigFileAuthenticationDetailsProvider.getRegion().

      Returns:
      the auth region
    • authTenantId

      public Optional<String> authTenantId()
      The OCI tenant id.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). This is also known as simpleConfigIsPresent(). When it is present, this property must be provided in order to set the ConfigFileAuthenticationDetailsProvider.getTenantId().

      Returns:
      the auth tenant id
    • authUserId

      public Optional<String> authUserId()
      The OCI user id.

      This configuration property has an effect only when config is, explicitly or implicitly, present in the value for the authStrategies(). When it is present, this property must be provided in order to set the ConfigFileAuthenticationDetailsProvider.getUserId().

      Returns:
      the auth user id
    • imdsHostName

      public String imdsHostName()
      The OCI IMDS hostname.

      This configuration property is used to identify the metadata service url.

      Returns:
      the imds host name
    • imdsTimeout

      public Duration imdsTimeout()
      The OCI IMDS connection timeout. This is used to auto-detect availability.

      This configuration property is used when attempting to connect to the metadata service.

      Returns:
      the imds timeout
      See Also:
    • config

      public Optional<Config> config()
      If this instance was configured, this would be the config instance used.
      Returns:
      config node used to configure this builder, or empty if not configured
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.