Class OciConfigProfile.Builder
- java.lang.Object
 - 
- io.helidon.integrations.oci.connect.OciConfigProfile.Builder
 
 
- 
- All Implemented Interfaces:
 Builder<OciConfigProfile>,Supplier<OciConfigProfile>
- Enclosing class:
 - OciConfigProfile
 
public static class OciConfigProfile.Builder extends Object implements Builder<OciConfigProfile>
Fluent API builder forOciConfigProfile. 
- 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OciConfigProfilebuild()Build the instance from this builder.OciConfigProfile.Builderconfig(Config config)Update this builder from configuration.booleanconfigured()Whether this builder has the required configuration.OciConfigProfile.BuilderfromOciConfig()Update this builder from OCI configuration on default path with default profile.OciConfigProfile.BuilderfromOciConfig(String profile)Update this builder from OCI configuration on default path with custom profile.OciConfigProfile.BuilderfromOciConfig(Path path)Update this builder from OCI configuration on custom path with default profile.OciConfigProfile.BuilderfromOciConfig(Path path, String profile)Attempts to read the profile from the OCI config file.OciConfigProfile.BuilderkeyFingerprint(String keyFingerprint)Key fingerprint.OciConfigProfile.BuilderprivateKey(String privateKey)PEM encoded private key.OciConfigProfile.BuilderprivateKey(RSAPrivateKey privateKey)Configure an explicit RSA private key.voidproperty(String key, String value)Add property as defined in OCI config file.OciConfigProfile.Builderregion(String region)OCI region.OciConfigProfile.BuildertenancyOcid(String tenancyOcid)Tenancy OCID.OciConfigProfile.BuilderuserOcid(String userOcid)User OCID. 
 - 
 
- 
- 
Method Detail
- 
build
public OciConfigProfile build()
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
 buildin interfaceBuilder<OciConfigProfile>- Returns:
 - instance of the built type
 
 
- 
config
public OciConfigProfile.Builder config(Config config)
Update this builder from configuration.- Parameters:
 config- config located on the node of OCI configuration- Returns:
 - updated builder
 
 
- 
userOcid
public OciConfigProfile.Builder userOcid(String userOcid)
User OCID.- Parameters:
 userOcid- OCID of the user- Returns:
 - updated builder
 
 
- 
tenancyOcid
public OciConfigProfile.Builder tenancyOcid(String tenancyOcid)
Tenancy OCID.- Parameters:
 tenancyOcid- OCID of the tenancy- Returns:
 - updated builder
 
 
- 
keyFingerprint
public OciConfigProfile.Builder keyFingerprint(String keyFingerprint)
Key fingerprint.- Parameters:
 keyFingerprint- key fingerprint- Returns:
 - updated builder
 
 
- 
region
public OciConfigProfile.Builder region(String region)
OCI region.- Parameters:
 region- region- Returns:
 - updated builder
 
 
- 
privateKey
public OciConfigProfile.Builder privateKey(String privateKey)
PEM encoded private key.- Parameters:
 privateKey- private key- Returns:
 - updated builder
 
 
- 
privateKey
public OciConfigProfile.Builder privateKey(RSAPrivateKey privateKey)
Configure an explicit RSA private key.- Parameters:
 privateKey- private key to use- Returns:
 - updated builder
 
 
- 
property
public void property(String key, String value)
Add property as defined in OCI config file.- Parameters:
 key- keyvalue- value
 
- 
fromOciConfig
public OciConfigProfile.Builder fromOciConfig()
Update this builder from OCI configuration on default path with default profile.- Returns:
 - updated builder
 
 
- 
fromOciConfig
public OciConfigProfile.Builder fromOciConfig(String profile)
Update this builder from OCI configuration on default path with custom profile.- Parameters:
 profile- name of the profile- Returns:
 - updated builder
 
 
- 
fromOciConfig
public OciConfigProfile.Builder fromOciConfig(Path path)
Update this builder from OCI configuration on custom path with default profile.- Parameters:
 path- path to the profile- Returns:
 - updated builder
 
 
- 
fromOciConfig
public OciConfigProfile.Builder fromOciConfig(Path path, String profile)
Attempts to read the profile from the OCI config file. This method does not fail in case the path is invalid.- Parameters:
 path- path of the OCI config (may not exist)profile- profile to read- Returns:
 - updated builder instance
 - Throws:
 OciRestException- in case the file exists, but the profile name is not valid
 
- 
configured
public boolean configured()
Whether this builder has the required configuration.- Returns:
 trueif this builder is valid
 
 - 
 
 -