man files for the cost functions

This commit is contained in:
yueguoguo 2017-06-14 11:31:44 +08:00
Родитель 05fea4dcf1
Коммит 8cfe1bf3eb
3 изменённых файлов: 79 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,24 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AzureCost.R
\name{azureDataConsumption}
\alias{azureDataConsumption}
\title{Get data consumption of an Azure subscription for a time period. Aggregation method can be either daily based or hourly based.}
\usage{
azureDataConsumption(azureActiveContext, instance, timeStart, timeEnd,
granularity = "Hourly")
}
\arguments{
\item{azureActiveContext}{AzureSMR context object.}
\item{instance}{Instance of Azure DSVM name that one would like to check expense.}
\item{timeStart}{Start time.}
\item{timeEnd}{End time.}
\item{granularity}{Aggregation granularity. Can be either "Daily" or "Hourly".}
}
\note{
Formats of start time point and end time point follow ISO 8601 standard. Say if one would like to calculate data consumption between Feb 21, 2017 to Feb 25, 2017, with an aggregation granularity of "daily based", the inputs should be "2017-02-21 00:00:00" and "2017-02-25 00:00:00", for start time point and end time point, respectively. If the aggregation granularity is hourly based, the inputs can be "2017-02-21 01:00:00" and "2017-02-21 02:00:00", for start and end time point, respectively. NOTE by default the Azure data consumption API does not allow an aggregation granularity that is finer than an hour. In the case of "hourly based" granularity, if the time difference between start and end time point is less than an hour, data consumption will still be calculated hourly based with end time postponed. For example, if the start time point and end time point are "2017-02-21 00:00:00" and "2017-02-21 00:45:00", the actual returned results are are data consumption in the interval of "2017-02-21 00:00:00" and "2017-02-21 01:00:00". However this calculation is merely for retrieving the information of an existing DSVM instance (e.g., meterId) with which the pricing rate is multiplied by to obtain the overall expense. Time zone of all time inputs are synchronized to UTC.
}

Просмотреть файл

@ -0,0 +1,35 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AzureCost.R
\name{azureExpenseCalculator}
\alias{azureExpenseCalculator}
\title{Calculate cost of using a specific instance of Azure for certain period.}
\usage{
azureExpenseCalculator(azureActiveContext, instance, timeStart, timeEnd,
granularity, currency, locale, offerId, region)
}
\arguments{
\item{azureActiveContext}{AzureSMR context.}
\item{instance}{Instance of Azure instance that one would like to check expense. No matter whether resource group is given or not, if a instance of instance is given, data consumption of that instance is returned.}
\item{timeStart}{Start time.}
\item{timeEnd}{End time.}
\item{granularity}{Aggregation granularity. Can be either "Daily" or "Hourly".}
\item{currency}{Currency in which price rating is measured.}
\item{locale}{Locality information of subscription.}
\item{offerId}{Offer ID of the subscription. Detailed information can be found at https://azure.microsoft.com/en-us/support/legal/offer-details/}
\item{region}{region information about the subscription.}
}
\value{
Total cost measured in the given currency of the specified Azure instance in the period.
}
\note{
Note if difference between \code{timeStart} and \code{timeEnd} is less than the finest granularity, e.g., "Hourly" (we notice this is a usual case when one needs to be aware of the charges of a job that takes less than an hour), the expense will be estimated based solely on computation hour. That is, the total expense is the multiplication of computation hour and pricing rate of the DSVM instance.
}

20
man/azurePricingRates.Rd Normal file
Просмотреть файл

@ -0,0 +1,20 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AzureCost.R
\name{azurePricingRates}
\alias{azurePricingRates}
\title{Get pricing details of resources under a subscription.}
\usage{
azurePricingRates(azureActiveContext, currency, locale, offerId, region)
}
\arguments{
\item{azureActiveContext}{- Azure Context Object.}
\item{currency}{Currency in which price rating is measured.}
\item{locale}{Locality information of subscription.}
\item{offerId}{Offer ID of the subscription. Detailed information can be found at https://azure.microsoft.com/en-us/support/legal/offer-details/}
\item{region}{region information about the subscription.}
}