Свойство | Тип | Описание | |
---|---|---|---|
$cadb | ADODB_mysqli | Analytics database connection |
Метод | Описание | |
---|---|---|
__construct ( ADODB_mysqli $cadb ) | Constructor | |
get ( Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity | string $price ) : Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity | boolean | Gets price | |
getActualPrices ( string $platform, string $cloudLocation, string $url = null, DateTime $applied = null, integer $accountId = null, string $instanceType = null, integer $os = null ) : |
Gets actual prices on specified date | |
getCloudLocations ( string $platform ) : array | Gets all known cloud locations for the specified platform. | |
getDetails ( Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity | string $price ) : |
Gets the collection of the prices for the specified price_id | |
getHistory ( string $platform, string $cloudLocation, string $url = null, string $accountId = null ) : |
Gets the history of the changes of the specified price | |
getSupportedClouds ( ) : array | Gets array of supported clouds | |
getUnsupportedClouds ( ) : array | Gets array of unsupported clouds | |
hasPriceForUrl ( string $platform, string $url, string $cloudLocation = null ) : boolean | Checks whether there is some price for specified platform and url | |
normalizeUrl ( string $url ) : string | Normalizes an url from environment settings to use for price_history table | |
save ( Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity $price ) | Saves price |
public __construct ( ADODB_mysqli $cadb ) | ||
$cadb | ADODB_mysqli |
public get ( Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity | string $price ) : Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity | boolean | ||
$price | Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity | string | The identifier of the price or PriceHistoryEntity object. If you provide with object either priceId or both platform and cloudLocation properties must be set for it. Identifier must be provided as UUID without hyphens. |
Результат | Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity | boolean | Returns price history entity that contains current prices on success or false if nothing found. |
public getActualPrices ( string $platform, string $cloudLocation, string $url = null, DateTime $applied = null, integer $accountId = null, string $instanceType = null, integer $os = null ) : |
||
$platform | string | The name of the cloud platform |
$cloudLocation | string | The location of the cloud |
$url | string | optional The keystone url for the private clouds |
$applied | DateTime | optional The date in UTC |
$accountId | integer | optional ID of the account (global level by default) |
$instanceType | string | optional Type of the instance |
$os | integer | optional Os type [Linux - 0, Windows - 1] |
Результат | Returns a collection of price entities |
public getCloudLocations ( string $platform ) : array | ||
$platform | string | The cloud platform |
Результат | array | Returns array looks like array(url1 => array(cloudLocation1, cloudLocation2, ...), url2 => ...); |
public getDetails ( Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity | string $price ) : |
||
$price | Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity | string | The PriceHistoryEntity or identifier of the price. Identifier must be provided as UUID without hyphens. |
Результат | Returns all prices which are associated with this price history ID |
public getHistory ( string $platform, string $cloudLocation, string $url = null, string $accountId = null ) : |
||
$platform | string | The cloud platform |
$cloudLocation | string | The cloud location |
$url | string | optional The keystone url for the private cloud |
$accountId | string | optional The identifier of the account for overridden price |
Результат | Returns collection of the PriceHistoryEntity objects |
public getSupportedClouds ( ) : array | ||
Результат | array |
public getUnsupportedClouds ( ) : array | ||
Результат | array |
public hasPriceForUrl ( string $platform, string $url, string $cloudLocation = null ) : boolean | ||
$platform | string | Cloud platform |
$url | string | The endpoint url |
$cloudLocation | string | optional The cloud location |
Результат | boolean | Returns TRUE if there is some price for specified platform and url or FALSE otherwise |
public normalizeUrl ( string $url ) : string | ||
$url | string | Original url |
Результат | string | Returns normalized url to use in price_history database table |
public save ( Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity $price ) | ||
$price | Scalr\Stats\CostAnalytics\Entity\PriceHistoryEntity | The PriceHistoryEntity with details set. |