Class OciConfig.BuilderBase.OciConfigImpl

java.lang.Object
io.helidon.integrations.oci.OciConfig.BuilderBase.OciConfigImpl
All Implemented Interfaces:
Prototype.Api, OciConfig
Enclosing class:
OciConfig.BuilderBase<BUILDER extends OciConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OciConfig>

protected static class OciConfig.BuilderBase.OciConfigImpl extends Object implements OciConfig
Generated implementation of the prototype, can be extended by descendant prototype implementations.
  • Field Details

    • AUTHENTICATION_METHOD_AUTO

      static final String AUTHENTICATION_METHOD_AUTO
      Default authentication method. The default is to use automatic discovery - i.e. cycle through possible providers until one yields an authentication details provider instance.
      See Also:
  • Constructor Details

    • OciConfigImpl

      protected OciConfigImpl(OciConfig.BuilderBase<?,?> builder)
      Create an instance providing a builder.
      Parameters:
      builder - extending builder base of this prototype
  • Method Details

    • region

      public Optional<com.oracle.bmc.Region> region()
      Description copied from interface: OciConfig
      Explicit region. The configured region will be used by region provider. This may be ignored by authentication detail providers, as in most cases region is provided by them.
      Specified by:
      region in interface OciConfig
      Returns:
      explicit region
    • authenticationMethod

      public String authenticationMethod()
      Description copied from interface: OciConfig
      Authentication method to use. If the configured method is not available, an exception would be thrown for OCI related services.

      Known and supported authentication strategies for public OCI:

      • "auto" - use the list of OciConfig.allowedAuthenticationMethods() (in the provided order), and choose the first one capable of providing data
      • "config" - use configuration of the application to obtain values needed to set up connectivity, uses SimpleAuthenticationDetailsProvider
      • "config-file" - use configuration file of OCI (home/.oci/config), uses ConfigFileAuthenticationDetailsProvider
      • resource-principal - use identity of the OCI resource the service is executed on (fn), uses ResourcePrincipalAuthenticationDetailsProvider, and is available in a separate module helidon-integrations-oci-authentication-resource
      • instance-principal - use identity of the OCI instance the service is running on, uses InstancePrincipalsAuthenticationDetailsProvider, and is available in a separate module helidon-integrations-oci-authentication-resource
      • oke-workload-identity - use identity of the OCI Kubernetes workload, uses com.oracle.bmc.auth.okeworkloadidentity.OkeWorkloadIdentityAuthenticationDetailsProvider, and is available in a separate module helidon-integrations-oci-authentication-oke-workload
      Specified by:
      authenticationMethod in interface OciConfig
      Returns:
      the authentication method to apply
    • allowedAuthenticationMethods

      public List<String> allowedAuthenticationMethods()
      Description copied from interface: OciConfig
      List of attempted authentication strategies in case OciConfig.authenticationMethod() is set to "auto".

      In case the list is empty, all available strategies will be tried, ordered by their Weight

      Specified by:
      allowedAuthenticationMethods in interface OciConfig
      Returns:
      list of authentication strategies to be tried
      See Also:
    • configMethodConfig

      public Optional<ConfigMethodConfig> configMethodConfig()
      Description copied from interface: OciConfig
      Config method configuration (if provided and used).
      Specified by:
      configMethodConfig in interface OciConfig
      Returns:
      information needed for config OciConfig.authenticationMethod()
    • configFileMethodConfig

      public Optional<ConfigFileMethodConfig> configFileMethodConfig()
      Description copied from interface: OciConfig
      Config file method configuration (if provided and used).
      Specified by:
      configFileMethodConfig in interface OciConfig
      Returns:
      information to customize config for OciConfig.authenticationMethod()
    • sessionTokenMethodConfig

      public Optional<SessionTokenMethodConfig> sessionTokenMethodConfig()
      Description copied from interface: OciConfig
      Session token method configuration (if provided and used).
      Specified by:
      sessionTokenMethodConfig in interface OciConfig
      Returns:
      information to customize config for OciConfig.authenticationMethod()
    • imdsTimeout

      public Duration imdsTimeout()
      Description copied from interface: OciConfig
      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.

      Specified by:
      imdsTimeout in interface OciConfig
      Returns:
      the OCI IMDS connection timeout
    • imdsBaseUri

      public Optional<URI> imdsBaseUri()
      Description copied from interface: OciConfig
      The OCI IMDS URI (http URL pointing to the metadata service, if customization needed).
      Specified by:
      imdsBaseUri in interface OciConfig
      Returns:
      the OCI IMDS URI
    • imdsDetectRetries

      public Optional<Integer> imdsDetectRetries()
      Description copied from interface: OciConfig
      Customize the number of retries to contact IMDS service.
      Specified by:
      imdsDetectRetries in interface OciConfig
      Returns:
      number of retries, each provider has its own defaults
    • authenticationTimeout

      public Duration authenticationTimeout()
      Description copied from interface: OciConfig
      Timeout of authentication operations, where applicable. This is a timeout for each operation (if there are retries, each timeout will be this duration). Defaults to 10 seconds.
      Specified by:
      authenticationTimeout in interface OciConfig
      Returns:
      authentication operation timeout
    • federationEndpoint

      public Optional<URI> federationEndpoint()
      Description copied from interface: OciConfig
      Customization of federation endpoint for authentication providers.
      Specified by:
      federationEndpoint in interface OciConfig
      Returns:
      custom federation endpoint URI
    • tenantId

      public Optional<String> tenantId()
      Description copied from interface: OciConfig
      OCI tenant id for Instance Principal, Resource Principal or OKE Workload.
      Specified by:
      tenantId in interface OciConfig
      Returns:
      the OCI tenant id
    • config

      public Optional<Config> config()
      Description copied from interface: OciConfig
      Get the config used to update the builder.
      Specified by:
      config in interface OciConfig
      Returns:
      configuration
    • toString

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object