Interface BaremetalCloudClient
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
SDKBaremetalCloudClient
public interface BaremetalCloudClient extends AutoCloseable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidauthenticate()com.oracle.bmc.core.model.InstancecreateInstance(String name, BaremetalCloudAgentTemplate template)Creates an instance with the specified templateList<com.oracle.bmc.identity.model.AvailabilityDomain>getAvailabilityDomainsList(String compartmentId)Get the available domain responseList<com.oracle.bmc.identity.model.Compartment>getCompartmentsList()Get the compartment listList<com.oracle.bmc.core.model.Image>getImagesList(String compartmentId)Get the available image listStringgetInstanceIp(BaremetalCloudAgentTemplate template, String instanceId)Get an instance public or private ip with the specified instance idcom.oracle.bmc.core.model.Instance.LifecycleStategetInstanceState(String instanceId)Check instance's stateInteger[]getMinMaxMemory(String compartmentId, String availableDomain, String imageId, String shape)Get the memory options of Flex shapesInteger[]getMinMaxOcpus(String compartmentId, String availableDomain, String imageId, String shape)Get the OCPUs optionsList<com.oracle.bmc.core.model.NetworkSecurityGroup>getNsgIdsList(String compartmentId)Get the network security group listList<com.oracle.bmc.core.model.Shape>getShapesList(String compartmentId, String availableDomain, String imageId)Get the shape listList<com.oracle.bmc.core.model.Instance>getStoppedInstances(String compartmentId, String availableDomain)Get a list of stopped instances on OCIcom.oracle.bmc.core.responses.GetSubnetResponsegetSubNet(String subnetId)Get the sub netList<com.oracle.bmc.core.model.Subnet>getSubNetList(String tenantId, String vcnId)Get the sub net listList<com.oracle.bmc.identity.model.TagNamespaceSummary>getTagNamespaces(String compartmentId)Start instance with the specified instance idcom.oracle.bmc.identity.model.TenancygetTenant()Get root compartmentList<com.oracle.bmc.core.model.Vcn>getVcnList(String tenantId)Get the Virtual Cloud Network listcom.oracle.bmc.core.model.InstancestartInstance(String instanceId)Start instance with the specified instance idStringstopInstance(String instanceId)Stop instance with the specified instance idStringterminateInstance(String instanceId)Terminate instance with the specified instance idcom.oracle.bmc.core.model.InstancewaitForInstanceProvisioningToComplete(String instanceId)Creates an instance with the specified instance idcom.oracle.bmc.core.model.InstancewaitForInstanceTerminationToComplete(String instanceId)Wait for the termination with the specified instance id to complete-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
authenticate
void authenticate() throws com.oracle.bmc.model.BmcException- Throws:
com.oracle.bmc.model.BmcException- if an error occurs
-
createInstance
com.oracle.bmc.core.model.Instance createInstance(String name, BaremetalCloudAgentTemplate template) throws Exception
Creates an instance with the specified template- Parameters:
template- the instance configurationname- instance name- Returns:
- Instance
- Throws:
Exception- if an error occurs
-
waitForInstanceProvisioningToComplete
com.oracle.bmc.core.model.Instance waitForInstanceProvisioningToComplete(String instanceId) throws Exception
Creates an instance with the specified instance id- Parameters:
instanceId- the instance id created before- Returns:
- Instance
- Throws:
Exception- if an error occurs
-
getInstanceIp
String getInstanceIp(BaremetalCloudAgentTemplate template, String instanceId) throws Exception
Get an instance public or private ip with the specified instance id- Parameters:
instanceId- the instance id created beforetemplate- baremetal cloud agent template- Returns:
- the instance ip
- Throws:
Exception- if an error occurs
-
getCompartmentsList
List<com.oracle.bmc.identity.model.Compartment> getCompartmentsList() throws Exception
Get the compartment list- Returns:
- compartment list
- Throws:
Exception- if an error occurs
-
getTenant
com.oracle.bmc.identity.model.Tenancy getTenant() throws ExceptionGet root compartment- Returns:
- tenancy
- Throws:
Exception- if an error occurs
-
getAvailabilityDomainsList
List<com.oracle.bmc.identity.model.AvailabilityDomain> getAvailabilityDomainsList(String compartmentId) throws Exception
Get the available domain response- Parameters:
compartmentId- the compartment id- Returns:
- ad list
- Throws:
Exception- if an error occurs
-
getImagesList
List<com.oracle.bmc.core.model.Image> getImagesList(String compartmentId) throws Exception
Get the available image list- Parameters:
compartmentId- the compartment id- Returns:
- image list
- Throws:
Exception- if an error occurs
-
getShapesList
List<com.oracle.bmc.core.model.Shape> getShapesList(String compartmentId, String availableDomain, String imageId) throws Exception
Get the shape list- Parameters:
compartmentId- the compartment idavailableDomain- available domainimageId- image id- Returns:
- shape list
- Throws:
Exception- if an error occurs
-
getMinMaxOcpus
Integer[] getMinMaxOcpus(String compartmentId, String availableDomain, String imageId, String shape) throws Exception
Get the OCPUs options- Parameters:
compartmentId- the compartment idavailableDomain- available domainimageId- image idshape- shape name- Returns:
- an array with min (array[0]) and max (array[1])
- Throws:
Exception- if an error occurs
-
getMinMaxMemory
Integer[] getMinMaxMemory(String compartmentId, String availableDomain, String imageId, String shape) throws Exception
Get the memory options of Flex shapes- Parameters:
compartmentId- the compartment idavailableDomain- available domainimageId- image idshape- shape name- Returns:
- an array with min (array[0]) and max (array[1])
- Throws:
Exception- if an error occurs
-
getVcnList
List<com.oracle.bmc.core.model.Vcn> getVcnList(String tenantId) throws Exception
Get the Virtual Cloud Network list- Parameters:
tenantId- the tenant id- Returns:
- vcn list
- Throws:
Exception- if an error occurs
-
getSubNetList
List<com.oracle.bmc.core.model.Subnet> getSubNetList(String tenantId, String vcnId) throws Exception
Get the sub net list- Parameters:
tenantId- the tenant idvcnId- vcn id- Returns:
- subnet list
- Throws:
Exception- if an error occurs
-
getNsgIdsList
List<com.oracle.bmc.core.model.NetworkSecurityGroup> getNsgIdsList(String compartmentId) throws Exception
Get the network security group list- Parameters:
compartmentId- the compartment id- Returns:
- network security group list
- Throws:
Exception- if an error occurs
-
getSubNet
com.oracle.bmc.core.responses.GetSubnetResponse getSubNet(String subnetId) throws Exception
Get the sub net- Parameters:
subnetId- subnet id- Returns:
- GetSubnetResponse
- Throws:
Exception- if an error occurs
-
terminateInstance
String terminateInstance(String instanceId) throws Exception
Terminate instance with the specified instance id- Parameters:
instanceId- the instance id created before- Returns:
- Opc Request Id
- Throws:
Exception- if an error occurs
-
waitForInstanceTerminationToComplete
com.oracle.bmc.core.model.Instance waitForInstanceTerminationToComplete(String instanceId) throws Exception
Wait for the termination with the specified instance id to complete- Parameters:
instanceId- the instance id created before- Returns:
- Instance
- Throws:
Exception- if an error occurs
-
getInstanceState
com.oracle.bmc.core.model.Instance.LifecycleState getInstanceState(String instanceId) throws Exception
Check instance's state- Parameters:
instanceId- the instance id created before- Returns:
- Instance.LifecycleState
- Throws:
Exception- if an error occurs
-
getStoppedInstances
List<com.oracle.bmc.core.model.Instance> getStoppedInstances(String compartmentId, String availableDomain) throws Exception
Get a list of stopped instances on OCI- Parameters:
compartmentId- the compartment idavailableDomain- available domain- Returns:
- Instance.LifecycleState
- Throws:
Exception- if an error occurs
-
stopInstance
String stopInstance(String instanceId) throws Exception
Stop instance with the specified instance id- Parameters:
instanceId- the instance id created before- Returns:
- Instance.LifecycleState
- Throws:
Exception- if an error occurs
-
startInstance
com.oracle.bmc.core.model.Instance startInstance(String instanceId) throws Exception
Start instance with the specified instance id- Parameters:
instanceId- the instance id created before- Returns:
- Instance.LifecycleState
- Throws:
Exception- if an error occurs
-
-