Module io.helidon.integrations.oci
Package io.helidon.integrations.oci
Class OciConfig.BuilderBase<BUILDER extends OciConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OciConfig>
java.lang.Object
io.helidon.integrations.oci.OciConfig.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER
- type of the builder extending this abstract builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.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
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAllowedAuthenticationMethods
(List<? extends String> allowedAuthenticationMethods) List of attempted authentication strategies in caseOciConfigBlueprint.authenticationMethod()
is set to "auto".List of attempted authentication strategies in caseOciConfigBlueprint.authenticationMethod()
is set to "auto".allowedAuthenticationMethods
(List<? extends String> allowedAuthenticationMethods) List of attempted authentication strategies in caseOciConfigBlueprint.authenticationMethod()
is set to "auto".Authentication method to use.authenticationMethod
(String authenticationMethod) Authentication method to use.Timeout of authentication operations, where applicable.authenticationTimeout
(Duration authenticationTimeout) Timeout of authentication operations, where applicable.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.config()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).Config file method configuration (if provided and used).configFileMethodConfig
(ConfigFileMethodConfig configFileMethodConfig) Config file method configuration (if provided and used).Config file method configuration (if provided and used).Config method configuration (if provided and used).configMethodConfig
(ConfigMethodConfig configMethodConfig) Config method configuration (if provided and used).configMethodConfig
(Consumer<ConfigMethodConfig.Builder> consumer) Config method configuration (if provided and used).Customization of federation endpoint for authentication providers.federationEndpoint
(URI federationEndpoint) Customization of federation endpoint for authentication providers.Update this builder from an existing prototype instance.from
(OciConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.The OCI IMDS URI (http URL pointing to the metadata service, if customization needed).imdsBaseUri
(URI imdsBaseUri) The OCI IMDS URI (http URL pointing to the metadata service, if customization needed).Customize the number of retries to contact IMDS service.imdsDetectRetries
(int imdsDetectRetries) Customize the number of retries to contact IMDS service.The OCI IMDS connection timeout.imdsTimeout
(Duration imdsTimeout) The OCI IMDS connection timeout.protected void
Handles providers and decorators.Optional
<com.oracle.bmc.Region> region()
Explicit region.region
(com.oracle.bmc.Region region) Explicit region.Session token method configuration (if provided and used).sessionTokenMethodConfig
(SessionTokenMethodConfig sessionTokenMethodConfig) Session token method configuration (if provided and used).Session token method configuration (if provided and used).toString()
protected void
Validates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
Methods inherited from interface io.helidon.builder.api.Prototype.ConfiguredBuilder
discoverService, discoverServices
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype
- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
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 interfacePrototype.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
-
clearRegion
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
region
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.- Parameters:
region
- explicit region- Returns:
- updated builder instance
- See Also:
-
authenticationMethod
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
OciConfigBlueprint.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
), usesConfigFileAuthenticationDetailsProvider
resource-principal
- use identity of the OCI resource the service is executed on (fn), usesResourcePrincipalAuthenticationDetailsProvider
, and is available in a separate modulehelidon-integrations-oci-authentication-resource
instance-principal
- use identity of the OCI instance the service is running on, usesInstancePrincipalsAuthenticationDetailsProvider
, and is available in a separate modulehelidon-integrations-oci-authentication-resource
workload
- use workload identity of the OCI Kubernetes workload, available in a separate modulehelidon-integrations-oci-authentication-workload
- Parameters:
authenticationMethod
- the authentication method to apply- Returns:
- updated builder instance
- See Also:
- "auto" - use the list of
-
allowedAuthenticationMethods
List of attempted authentication strategies in caseOciConfigBlueprint.authenticationMethod()
is set to "auto".In case the list is empty, all available strategies will be tried, ordered by their
Weight
- Parameters:
allowedAuthenticationMethods
- list of authentication strategies to be tried- Returns:
- updated builder instance
- See Also:
-
addAllowedAuthenticationMethods
List of attempted authentication strategies in caseOciConfigBlueprint.authenticationMethod()
is set to "auto".In case the list is empty, all available strategies will be tried, ordered by their
Weight
- Parameters:
allowedAuthenticationMethods
- list of authentication strategies to be tried- Returns:
- updated builder instance
- See Also:
-
clearConfigMethodConfig
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
configMethodConfig
Config method configuration (if provided and used).- Parameters:
configMethodConfig
- information needed for configOciConfigBlueprint.authenticationMethod()
- Returns:
- updated builder instance
- See Also:
-
configMethodConfig
Config method configuration (if provided and used).- Parameters:
consumer
- information needed for configOciConfigBlueprint.authenticationMethod()
- Returns:
- updated builder instance
- See Also:
-
clearConfigFileMethodConfig
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
configFileMethodConfig
Config file method configuration (if provided and used).- Parameters:
configFileMethodConfig
- information to customize config forOciConfigBlueprint.authenticationMethod()
- Returns:
- updated builder instance
- See Also:
-
configFileMethodConfig
Config file method configuration (if provided and used).- Parameters:
consumer
- information to customize config forOciConfigBlueprint.authenticationMethod()
- Returns:
- updated builder instance
- See Also:
-
clearSessionTokenMethodConfig
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
sessionTokenMethodConfig
Session token method configuration (if provided and used).- Parameters:
sessionTokenMethodConfig
- information to customize config forOciConfigBlueprint.authenticationMethod()
- Returns:
- updated builder instance
- See Also:
-
sessionTokenMethodConfig
Session token method configuration (if provided and used).- Parameters:
consumer
- information to customize config forOciConfigBlueprint.authenticationMethod()
- Returns:
- updated builder instance
- See Also:
-
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:
-
clearImdsBaseUri
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
imdsBaseUri
The OCI IMDS URI (http URL pointing to the metadata service, if customization needed).- Parameters:
imdsBaseUri
- the OCI IMDS URI- Returns:
- updated builder instance
- See Also:
-
clearImdsDetectRetries
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
imdsDetectRetries
Customize the number of retries to contact IMDS service.- Parameters:
imdsDetectRetries
- number of retries, each provider has its own defaults- Returns:
- updated builder instance
- See Also:
-
authenticationTimeout
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.- Parameters:
authenticationTimeout
- authentication operation timeout- Returns:
- updated builder instance
- See Also:
-
clearFederationEndpoint
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
federationEndpoint
Customization of federation endpoint for authentication providers.- Parameters:
federationEndpoint
- custom federation endpoint URI- Returns:
- updated builder instance
- See Also:
-
region
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.- Returns:
- the region
-
authenticationMethod
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
OciConfigBlueprint.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
), usesConfigFileAuthenticationDetailsProvider
resource-principal
- use identity of the OCI resource the service is executed on (fn), usesResourcePrincipalAuthenticationDetailsProvider
, and is available in a separate modulehelidon-integrations-oci-authentication-resource
instance-principal
- use identity of the OCI instance the service is running on, usesInstancePrincipalsAuthenticationDetailsProvider
, and is available in a separate modulehelidon-integrations-oci-authentication-resource
workload
- use workload identity of the OCI Kubernetes workload, available in a separate modulehelidon-integrations-oci-authentication-workload
- Returns:
- the authentication method
- "auto" - use the list of
-
allowedAuthenticationMethods
List of attempted authentication strategies in caseOciConfigBlueprint.authenticationMethod()
is set to "auto".In case the list is empty, all available strategies will be tried, ordered by their
Weight
- Returns:
- the allowed authentication methods
- See Also:
-
configMethodConfig
Config method configuration (if provided and used).- Returns:
- the config method config
-
configFileMethodConfig
Config file method configuration (if provided and used).- Returns:
- the config file method config
-
sessionTokenMethodConfig
Session token method configuration (if provided and used).- Returns:
- the session token method config
-
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
-
imdsBaseUri
The OCI IMDS URI (http URL pointing to the metadata service, if customization needed).- Returns:
- the imds base uri
-
imdsDetectRetries
Customize the number of retries to contact IMDS service.- Returns:
- the imds detect retries
-
authenticationTimeout
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.- Returns:
- the authentication timeout
-
federationEndpoint
Customization of federation endpoint for authentication providers.- Returns:
- the federation endpoint
-
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
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-