ovh\Cloud\CloudClient::getPcaUsage PHP Method

getPcaUsage() public method

public getPcaUsage ( string $pp, string $pca ) : string
$pp string OVH cloud passport
$pca string PCA service name
return string json encoded array)
    public function getPcaUsage($pp, $pca)
    {
        if (!$pp) {
            throw new BadMethodCallException('Missing parameter $pp (OVH cloud passport).');
        }
        if (!$pca) {
            throw new BadMethodCallException('Missing parameter $pca (PCA ServiceName).');
        }
        try {
            $r = $this->get('cloud/' . $pp . '/pca/' . $pca . '/usage')->send();
        } catch (\Exception $e) {
            throw new CloudException($e->getMessage(), $e->getCode(), $e);
        }
        return $r->getBody(true);
    }