public function setSshKey($pp, $pca, $key)
{
if (!$pp) {
throw new BadMethodCallException('Missing parameter $pp (OVH cloud passport).');
}
if (!$pca) {
throw new BadMethodCallException('Missing parameter $pca (PCA ServiceName).');
}
if (!$key) {
throw new BadMethodCallException('Missing parameter $key (Public key for this pca).');
}
$payload = array('sshkey' => $key);
try {
$this->put('cloud/' . $pp . '/pca/' . $pca, array('Content-Type' => 'application/json;charset=UTF-8'), json_encode($payload))->send();
} catch (\Exception $e) {
throw new CloudException($e->getMessage(), $e->getCode(), $e);
}
}