HPCloud-PHP  1.2.0
PHP bindings for HPCloud and OpenStack services.
 All Classes Namespaces Files Functions Variables Pages
Instance Class Reference
Inheritance diagram for Instance:
Operations

Public Member Functions

 __construct ($token, $projectId, $endpoint)
 describe ($instanceId)
 listInstances ()
 create ($name, $flavor= 'medium', $typeSpec=NULL)
 Create a new database.
 delete ($instanceId)
 restart ($instanceId)
 resetPassword ($instanceId)
 Reset the primary password on this instance.

Protected Attributes

 $token
 $projectId
 $url
 $client
- Protected Attributes inherited from Operations
 $token
 $projectId

Additional Inherited Members

- Protected Member Functions inherited from Operations
 headers ($merge=array())
 Generate the base headers needed by DBaaS requests.

Detailed Description

Definition at line 32 of file Instance.php.

Constructor & Destructor Documentation

__construct (   $token,
  $projectId,
  $endpoint 
)

Member Function Documentation

create (   $name,
  $flavor = 'medium',
  $typeSpec = NULL 
)

Create a new database.

This creates a database tuned according to the $flavor settings. The return data will include login/password and connection information.

Attention
This is the only time that the login and password info will be returned.
Parameters
string$nameThe name of the database.
string$flavorThe string flavor name. Known values are:
  • medium
array$typeSpecA typespec array. Currently, only 'mysql', '5.5' is supported.
Return values
HPCloud::Services::DBaaS::InstanceDetails
Returns
The details of creation, including login and password info.
See Also
http://api-docs.hpcloud.com/hpcloud-dbaas/1.0/content/instance-create.html

Definition at line 87 of file Instance.php.

References $name, DBaaS\$url, Operations\headers(), DBaaS\projectId(), and DBaaS\url().

delete (   $instanceId)

Definition at line 124 of file Instance.php.

References DBaaS\$url, Operations\headers(), and DBaaS\url().

describe (   $instanceId)

Definition at line 46 of file Instance.php.

References DBaaS\$url, Operations\headers(), and DBaaS\url().

listInstances ( )

Definition at line 54 of file Instance.php.

References DBaaS\$url, Operations\headers(), and DBaaS\url().

resetPassword (   $instanceId)

Reset the primary password on this instance.

Return values
string
Returns
string The new (autogenerated) password.

Definition at line 144 of file Instance.php.

References DBaaS\$url, Operations\headers(), and DBaaS\url().

restart (   $instanceId)

Definition at line 130 of file Instance.php.

References DBaaS\$url, Operations\headers(), and DBaaS\url().

Member Data Documentation

$client
protected

Definition at line 37 of file Instance.php.

$projectId
protected

Definition at line 35 of file Instance.php.

$token
protected

Definition at line 34 of file Instance.php.

$url
protected

Definition at line 36 of file Instance.php.


The documentation for this class was generated from the following file: