org.jclouds.openstack.trove.v1.features
Interface InstanceApi


public interface InstanceApi

This API is for creating, listing, and deleting an Instance, and allows enabling a root user.

See Also:
Instance, api doc, api src

Method Summary
 Instance create(int flavor, int volumeSize, String name)
          Same as create(String, int, String) but accept an integer Flavor ID.
 Instance create(String flavor, int volumeSize, String name)
          Create a database instance by flavor type and volume size.
 boolean delete(String instanceId)
          Deletes an Instance by id.
 String enableRoot(String instanceId)
          Enables root for an instance.
 Instance get(String instanceId)
          Returns an Instance by id.
 boolean isRooted(String instanceId)
          Checks to see if root is enabled for an instance.
 com.google.common.collect.FluentIterable<Instance> list()
          Returns a summary list of Instances.
 

Method Detail

create

@Named(value="instance:create")
Instance create(int flavor,
                      int volumeSize,
                      String name)
Same as create(String, int, String) but accept an integer Flavor ID.

Parameters:
flavor - The flavor ID.
volumeSize - The size in GB of the instance volume.
name - The name of the instance.
Returns:
The instance created.
See Also:
create(String, int, String)

create

@Named(value="instance:create")
Instance create(String flavor,
                      int volumeSize,
                      String name)
Create a database instance by flavor type and volume size.

Parameters:
flavor - The flavor URL or flavor id as string.
volumeSize - The size in GB of the instance volume.
name - The name of the instance.
Returns:
The instance created.

delete

@Named(value="instances:delete/{id}")
boolean delete(String instanceId)
Deletes an Instance by id.

Parameters:
instanceId - The instance id.
Returns:
true if successful.

enableRoot

@Named(value="instances/{id}/root")
String enableRoot(String instanceId)
Enables root for an instance.

Parameters:
instanceId - The instance id.
Returns:
String The password for the root user.

isRooted

@Named(value="instances/{id}/root")
boolean isRooted(String instanceId)
Checks to see if root is enabled for an instance.

Parameters:
instanceId - The instance id.
Returns:
boolean True if root is enabled.
Throws:
ResourceNotFoundException

list

@Named(value="instance:list")
com.google.common.collect.FluentIterable<Instance> list()
Returns a summary list of Instances.

Returns:
The list of Instances.

get

@Named(value="instances:get/{id}")
@Nullable
Instance get(String instanceId)
Returns an Instance by id.

Parameters:
instanceId - The instance id.
Returns:
Instance or Null on not found.


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.