usages
Creates, updates, deletes, gets or lists a usages resource.
Overview
| Name | usages |
| Type | Resource |
| Id | sumologic.budgets.usages |
Fields
The following fields are returned by SELECT queries:
- get
- list
The requested budget usage.
| Name | Datatype | Description |
|---|---|---|
budget_id | string | Budget id. (wire: budgetId) |
usage | integer (int64) | Budget usage (in bytes). |
usage_percentage | integer (int64) | Budget usage percentage. (wire: usagePercentage) |
Scan budget usages.
| Name | Datatype | Description |
|---|---|---|
budget_id | string | Budget id. (wire: budgetId) |
usage | integer (int64) | Budget usage (in bytes). |
usage_percentage | integer (int64) | Budget usage percentage. (wire: usagePercentage) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | budget_id, region | Get budget usage | |
list | select | region | limit, token | Get budget usages |
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 |
|---|---|---|
budget_id | string | The id of the budget. (wire: budgetId) |
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) |
limit | integer (int32) | Limit the number of budget usages returned in the response. The number of budget usages returned may be less than the limit. |
token | string | Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. |
SELECT examples
- get
- list
Get budget usage
SELECT
budget_id,
usage,
usage_percentage
FROM sumologic.budgets.usages
WHERE budget_id = '{{ budget_id }}' -- required
AND region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
;
Get budget usages
SELECT
budget_id,
usage,
usage_percentage
FROM sumologic.budgets.usages
WHERE region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
AND limit = '{{ limit }}'
AND token = '{{ token }}'
;