Skip to main content

usage_forecast

Creates, updates, deletes, gets or lists a usage_forecast resource.

Overview​

Nameusage_forecast
TypeResource
Idsumologic.account.usage_forecast

Fields​

The following fields are returned by SELECT queries:

Usage Forecast.

NameDatatypeDescription
average_usagenumber (double)Average credit usage per day till now. (wire: averageUsage)
forecasted_usagenumber (double)Total expected usage by the end of contract period. (wire: forecastedUsage)
forecasted_usage_percentagenumber (double)Percentage of allocated credits that will be used in the contract period. (wire: forecastedUsagePercentage)
remaining_daysnumber (double)Days remaining till all the credits are consumed. (wire: remainingDays)
usage_percentagenumber (double)Percentage of total credits used till date. (wire: usagePercentage)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectregionnumber_of_daysGet usage forecast with respect to last number of days specified. If nothing is provided for last number of days, the average of term period will be taken to do the forecast.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringSumo Logic deployment (au, ca, ch, de, eu, fed, in, jp, kr, us1, us2). Resolved from the SUMOLOGIC_ENVIRONMENT environment variable when it is set (x-stackQL-envVar, the same variable the Terraform provider reads); otherwise defaults to us2. A WHERE region = '...' value always takes precedence. (enum: [au, ca, ch, de, eu, fed, in, jp, kr, us1, us2], default: us2, x-stackQL-envVar: SUMOLOGIC_ENVIRONMENT)
number_of_daysnumberNumber of days to use for calculating average usage and forecast. (wire: numberOfDays)

SELECT examples​

Get usage forecast with respect to last number of days specified. If nothing is provided for last number of days, the average of term period will be taken to do the forecast.

SELECT
average_usage,
forecasted_usage,
forecasted_usage_percentage,
remaining_days,
usage_percentage
FROM sumologic.account.usage_forecast
WHERE region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
AND number_of_days = '{{ number_of_days }}'
;