ingest_budgets_v1
Creates, updates, deletes, gets or lists an ingest_budgets_v1
resource.
Overview
Name | ingest_budgets_v1 |
Type | Resource |
Id | sumologic.ingest_budgets.ingest_budgets_v1 |
Fields
The following fields are returned by SELECT
queries:
- getIngestBudget
- listIngestBudgets
Ingest budget object that was requested.
Name | Datatype | Description |
---|---|---|
id | string | Unique identifier for the ingest budget. |
name | string | Display name of the ingest budget. (example: Developer Budget) |
action | string | Action to take when ingest budget's capacity is reached. All actions are audited. Supported values are: * stopCollecting * keepCollecting (pattern: ^(keepCollecting|stopCollecting)$ , example: stopCollecting, x-pattern-message: must be either keepCollecting or stopCollecting ) |
auditThreshold | integer (int32) | The threshold as a percentage of when an ingest budget's capacity usage is logged in the Audit Index. |
capacityBytes | integer (int64) | Capacity of the ingest budget, in bytes. It takes a few minutes for Collectors to stop collecting when capacity is reached. We recommend setting a soft limit that is lower than your needed hard limit. |
createdAt | string (date-time) | Creation timestamp in UTC in RFC3339 format. |
createdByUser | object | |
description | string | Description of the ingest budget. |
fieldValue | string | Custom field value that is used to assign Collectors to the ingest budget. (example: dev_30_gb) |
modifiedAt | string (date-time) | Last modification timestamp in UTC in RFC3339 format. |
modifiedByUser | object | |
numberOfCollectors | integer (int64) | Number of collectors assigned to the ingest budget. |
resetTime | string | Reset time of the ingest budget in HH:MM format. (example: 23:30) |
timezone | string | Time zone of the reset time for the ingest budget. Follow the format in the IANA Time Zone Database. (example: America/Los_Angeles) |
usageBytes | integer (int64) | Current usage since the last reset, in bytes. |
usageStatus | string | Status of the current usage. Can be Normal , Approaching , Exceeded , or Unknown (unable to retrieve usage). (example: Approaching) |
A paginated list of budgets.
Name | Datatype | Description |
---|---|---|
data | array | List of ingest budgets. |
next | string | Next continuation token. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
getIngestBudget | select | id , region | Get an ingest budget by the given identifier. | |
listIngestBudgets | select | region | limit , token | Get a list of all ingest budgets. The response is paginated with a default limit of 100 budgets per page. |
createIngestBudget | insert | region , data__action , data__capacityBytes , data__fieldValue , data__name , data__resetTime , data__timezone | Create a new ingest budget. | |
deleteIngestBudget | delete | id , region | Delete an ingest budget with the given identifier. | |
updateIngestBudget | exec | id , region , action , capacityBytes , fieldValue , name , resetTime , timezone | Update an existing ingest budget. All properties specified in the request are required. |
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 |
---|---|---|
id | string | Identifier of the ingest budget to update. |
region | string | SumoLogic region (enum: [us2, au, ca, de, eu, fed, in, jp], default: us2) |
limit | integer (int32) | Limit the number of budgets returned in the response. The number of budgets 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
- getIngestBudget
- listIngestBudgets
Get an ingest budget by the given identifier.
SELECT
id,
name,
action,
auditThreshold,
capacityBytes,
createdAt,
createdByUser,
description,
fieldValue,
modifiedAt,
modifiedByUser,
numberOfCollectors,
resetTime,
timezone,
usageBytes,
usageStatus
FROM sumologic.ingest_budgets.ingest_budgets_v1
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;
Get a list of all ingest budgets. The response is paginated with a default limit of 100 budgets per page.
SELECT
data,
next
FROM sumologic.ingest_budgets.ingest_budgets_v1
WHERE region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND token = '{{ token }}'
;
INSERT
examples
- createIngestBudget
- Manifest
Create a new ingest budget.
INSERT INTO sumologic.ingest_budgets.ingest_budgets_v1 (
data__name,
data__fieldValue,
data__capacityBytes,
data__timezone,
data__resetTime,
data__description,
data__action,
data__auditThreshold,
region
)
SELECT
'{{ name }}' /* required */,
'{{ fieldValue }}' /* required */,
{{ capacityBytes }} /* required */,
'{{ timezone }}' /* required */,
'{{ resetTime }}' /* required */,
'{{ description }}',
'{{ action }}' /* required */,
{{ auditThreshold }},
'{{ region }}'
RETURNING
id,
name,
action,
auditThreshold,
capacityBytes,
createdAt,
createdByUser,
description,
fieldValue,
modifiedAt,
modifiedByUser,
numberOfCollectors,
resetTime,
timezone,
usageBytes,
usageStatus
;
# Description fields are for documentation purposes
- name: ingest_budgets_v1
props:
- name: region
value: string
description: Required parameter for the ingest_budgets_v1 resource.
- name: name
value: string
description: |
Display name of the ingest budget.
- name: fieldValue
value: string
description: |
Custom field value that is used to assign Collectors to the ingest budget.
- name: capacityBytes
value: integer
description: |
Capacity of the ingest budget, in bytes. It takes a few minutes for Collectors to stop collecting when capacity is reached. We recommend setting a soft limit that is lower than your needed hard limit.
- name: timezone
value: string
description: |
Time zone of the reset time for the ingest budget. Follow the format in the [IANA Time Zone Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List).
- name: resetTime
value: string
description: |
Reset time of the ingest budget in HH:MM format.
- name: description
value: string
description: |
Description of the ingest budget.
- name: action
value: string
description: |
Action to take when ingest budget's capacity is reached. All actions are audited. Supported values are:
* `stopCollecting`
* `keepCollecting`
- name: auditThreshold
value: integer
description: |
The threshold as a percentage of when an ingest budget's capacity usage is logged in the Audit Index.
DELETE
examples
- deleteIngestBudget
Delete an ingest budget with the given identifier.
DELETE FROM sumologic.ingest_budgets.ingest_budgets_v1
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- updateIngestBudget
Update an existing ingest budget. All properties specified in the request are required.
EXEC sumologic.ingest_budgets.ingest_budgets_v1.updateIngestBudget
@id='{{ id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"name": "{{ name }}",
"fieldValue": "{{ fieldValue }}",
"capacityBytes": {{ capacityBytes }},
"timezone": "{{ timezone }}",
"resetTime": "{{ resetTime }}",
"description": "{{ description }}",
"action": "{{ action }}",
"auditThreshold": {{ auditThreshold }}
}'
;