Interface BaremetalCloudClient
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
SDKBaremetalCloudClient
-
Method Summary
Modifier and TypeMethodDescriptionvoidcom.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>Get the compartment listList<com.oracle.bmc.core.model.Image>getImagesList(String compartmentId) Get the available image listgetInstanceIp(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.GetSubnetResponseGet 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.TenancyGet 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 idstopInstance(String instanceId) Stop instance with the specified instance idterminateInstance(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 completeMethods inherited from interface java.lang.AutoCloseable
close
-
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 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
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
Get the compartment list- Returns:
- compartment list
- Throws:
Exception- if an error occurs
-
getTenant
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
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
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
Get the sub net- Parameters:
subnetId- subnet id- Returns:
- GetSubnetResponse
- Throws:
Exception- if an error occurs
-
terminateInstance
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 or null for any AD- Returns:
- Instance.LifecycleState
- Throws:
Exception- if an error occurs
-
stopInstance
Stop instance with the specified instance id- Parameters:
instanceId- the instance id created before- Returns:
- Instance.LifecycleState
- Throws:
Exception- if an error occurs
-
startInstance
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
-