usage_forecast
Creates, updates, deletes, gets or lists a usage_forecast resource.
Overview​
| Name | usage_forecast |
| Type | Resource |
| Id | sumologic.account.usage_forecast |
Fields​
The following fields are returned by SELECT queries:
- get
Usage Forecast.
| Name | Datatype | Description |
|---|---|---|
average_usage | number (double) | Average credit usage per day till now. (wire: averageUsage) |
forecasted_usage | number (double) | Total expected usage by the end of contract period. (wire: forecastedUsage) |
forecasted_usage_percentage | number (double) | Percentage of allocated credits that will be used in the contract period. (wire: forecastedUsagePercentage) |
remaining_days | number (double) | Days remaining till all the credits are consumed. (wire: remainingDays) |
usage_percentage | number (double) | Percentage of total credits used till date. (wire: usagePercentage) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | region | number_of_days | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | Sumo 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_days | number | Number of days to use for calculating average usage and forecast. (wire: numberOfDays) |
SELECT examples​
- get
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 }}'
;