ovh\Cloud\CloudClient::setPassword PHP Méthode

setPassword() public méthode

Set password to PCA
public setPassword ( string $pp, string $pca, string $passwd )
$pp string OVH cloud passport
$pca string PCA service name
$passwd string
    public function setPassword($pp, $pca, $passwd)
    {
        if (!$pp) {
            throw new BadMethodCallException('Missing parameter $pp (OVH cloud passport).');
        }
        if (!$pca) {
            throw new BadMethodCallException('Missing parameter $pca (PCA ServiceName).');
        }
        if (!$passwd) {
            throw new BadMethodCallException('Missing parameter $passwd (Password for this pca).');
        }
        $payload = array('password' => $passwd);
        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);
        }
    }