Interface BaremetalCloudClient

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
SDKBaremetalCloudClient

public interface BaremetalCloudClient extends AutoCloseable
  • Method Details

    • 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 configuration
      name - 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 before
      template - 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 Exception
      Get 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 id
      availableDomain - available domain
      imageId - 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 id
      availableDomain - available domain
      imageId - image id
      shape - 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 id
      availableDomain - available domain
      imageId - image id
      shape - 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 id
      vcnId - 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 id
      availableDomain - available domain or null for any AD
      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
    • getTagNamespaces

      List<com.oracle.bmc.identity.model.TagNamespaceSummary> getTagNamespaces(String compartmentId) throws Exception
      Start instance with the specified instance id
      Parameters:
      compartmentId - the compartment id
      Returns:
      tag namespace summary list
      Throws:
      Exception - if an error occurs