@Factory
public class OracleCloudCoreFactory
extends java.lang.Object
AuthenticationDetailsProvider
ClientConfiguration.ClientConfigurationBuilder
ClientConfiguration
com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider;
,
ResourcePrincipalAuthenticationDetailsProvider
,
SimpleAuthenticationDetailsProvider
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
METADATA_SERVICE_URL |
static java.lang.String |
ORACLE_CLOUD |
Modifier | Constructor and Description |
---|---|
protected |
OracleCloudCoreFactory(java.lang.String profile) |
Modifier and Type | Method and Description |
---|---|
protected com.oracle.bmc.ClientConfiguration |
clientConfiguration(com.oracle.bmc.ClientConfiguration.ClientConfigurationBuilder builder)
Configures the default
ClientConfiguration if no other configuration is present. |
protected com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider |
configFileAuthenticationDetailsProvider()
Configures a
ConfigFileAuthenticationDetailsProvider if no other AuthenticationDetailsProvider is present and
a file is found at $USER_HOME/.oci/config or specified by the user with oci.config . |
protected com.oracle.bmc.ClientConfiguration.ClientConfigurationBuilder |
configurationBuilder(OracleCloudClientConfigurationProperties props)
Produces a
ClientConfiguration.ClientConfigurationBuilder bean for the given properties. |
java.util.Optional<java.lang.String> |
getProfile() |
protected com.oracle.bmc.auth.InstancePrincipalsAuthenticationDetailsProvider |
instancePrincipalAuthenticationDetailsProvider(InstancePrincipalConfiguration instancePrincipalConfiguration)
Configures a
InstancePrincipalsAuthenticationDetailsProvider if no other AuthenticationDetailsProvider is present and
the specified by the user with oci.config.use-instance-principal . |
protected com.oracle.bmc.auth.ResourcePrincipalAuthenticationDetailsProvider |
resourcePrincipalAuthenticationDetailsProvider()
Configures a
ResourcePrincipalAuthenticationDetailsProvider if no other AuthenticationDetailsProvider is present and
the OCI_RESOURCE_PRINCIPAL_VERSION variable is available in the environment. |
protected com.oracle.bmc.auth.SimpleAuthenticationDetailsProvider |
simpleAuthenticationDetailsProvider(OracleCloudAuthConfigurationProperties config)
Configures a
SimpleAuthenticationDetailsProvider if no other AuthenticationDetailsProvider is present. |
protected TenancyIdProvider |
tenantIdProvider(com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) |
public static final java.lang.String ORACLE_CLOUD
public static final java.lang.String METADATA_SERVICE_URL
protected OracleCloudCoreFactory(@Nullable @Property(name="oci.config.profile") java.lang.String profile)
profile
- The configured profile@Singleton @Requires(condition=io.micronaut.oci.core.OracleCloudConfigCondition.class) @Requires(missingProperty="oci.tenant-id") @Requires(missingProperty="oci.config.instance-principal") @Primary protected com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider configFileAuthenticationDetailsProvider() throws java.io.IOException
ConfigFileAuthenticationDetailsProvider
if no other AuthenticationDetailsProvider
is present and
a file is found at $USER_HOME/.oci/config
or specified by the user with oci.config
.ConfigFileAuthenticationDetailsProvider
.java.io.IOException
- If an exception occurs reading configuration.ConfigFileAuthenticationDetailsProvider
@Singleton @Requires(missingProperty="oci.config.instance-principal") @Requires(property="oci.tenant-id") @Primary protected com.oracle.bmc.auth.SimpleAuthenticationDetailsProvider simpleAuthenticationDetailsProvider(OracleCloudAuthConfigurationProperties config)
SimpleAuthenticationDetailsProvider
if no other AuthenticationDetailsProvider
is present.config
- The config to useSimpleAuthenticationDetailsProvider
.SimpleAuthenticationDetailsProvider
@Singleton @Requires(missingProperty="oci.config.instance-principal") @Requires(property="OCI_RESOURCE_PRINCIPAL_VERSION") @Primary protected com.oracle.bmc.auth.ResourcePrincipalAuthenticationDetailsProvider resourcePrincipalAuthenticationDetailsProvider()
ResourcePrincipalAuthenticationDetailsProvider
if no other AuthenticationDetailsProvider
is present and
the OCI_RESOURCE_PRINCIPAL_VERSION
variable is available in the environment.ResourcePrincipalAuthenticationDetailsProvider
.ResourcePrincipalAuthenticationDetailsProvider
@Singleton @Requires(beans=InstancePrincipalConfiguration.class) @Primary protected com.oracle.bmc.auth.InstancePrincipalsAuthenticationDetailsProvider instancePrincipalAuthenticationDetailsProvider(InstancePrincipalConfiguration instancePrincipalConfiguration)
InstancePrincipalsAuthenticationDetailsProvider
if no other AuthenticationDetailsProvider
is present and
the specified by the user with oci.config.use-instance-principal
.instancePrincipalConfiguration
- The configurationInstancePrincipalsAuthenticationDetailsProvider
.InstancePrincipalsAuthenticationDetailsProvider
@Singleton @Primary protected com.oracle.bmc.ClientConfiguration.ClientConfigurationBuilder configurationBuilder(OracleCloudClientConfigurationProperties props)
ClientConfiguration.ClientConfigurationBuilder
bean for the given properties.props
- The props@Singleton @Primary @Context protected TenancyIdProvider tenantIdProvider(@Nullable com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider)
@Singleton @Requires(missingBeans=com.oracle.bmc.ClientConfiguration.class) @Primary protected com.oracle.bmc.ClientConfiguration clientConfiguration(com.oracle.bmc.ClientConfiguration.ClientConfigurationBuilder builder)
ClientConfiguration
if no other configuration is present.builder
- The builderpublic java.util.Optional<java.lang.String> getProfile()