ingest_budgets_v2
Creates, updates, deletes, gets or lists an ingest_budgets_v2
resource.
Overview
Name | ingest_budgets_v2 |
Type | Resource |
Id | sumologic.ingest_budgets.ingest_budgets_v2 |
Fields
The following fields are returned by SELECT
queries:
- getIngestBudgetV2
- listIngestBudgetsV2
Ingest budget object that was requested.
Name | Datatype | Description |
---|---|---|
id | string | Unique identifier for the ingest budget. (example: 0000000003343FDD) |
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. |
budgetVersion | integer (int32) | The version of the Ingest Budget |
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) | The creation timestamp in UTC of the Ingest Budget. (example: 2018-10-16T09:10:00Z) |
createdBy | string | The identifier of the user who created the Ingest Budget. (example: 0000000006743FDD) |
description | string | Description of the ingest budget. |
modifiedAt | string (date-time) | The modified timestamp in UTC of the Ingest Budget. (example: 2018-10-16T09:10:00Z) |
modifiedBy | string | The identifier of the user who modified the Ingest Budget. (example: 0000000001243FDD) |
resetTime | string | Reset time of the ingest budget in HH:MM format. (example: 23:30) |
scope | string | A scope is a constraint that will be used to identify the messages on which budget needs to be applied. A scope is consists of key and value separated by =. The field must be enabled in the fields table. Value supports wildcard. e.g. _sourceCategory=prodpayment*, cluster=kafka. If the scope is defined _sourceCategory=nginx in this budget will be applied on messages having fields _sourceCategory=prod/nginx, _sourceCategory=dev/nginx, or _sourceCategory=dev/nginx/error (example: _sourceCategory=prodnginx*) |
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). (pattern: ^(Normal|Approaching|Exceeded|Unknown)$ , example: Approaching, x-pattern-message: must be either Normal , Approaching , Exceeded , or Unknown ) |
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 |
---|---|---|---|---|
getIngestBudgetV2 | select | id , region | Get an ingest budget by the given identifier. | |
listIngestBudgetsV2 | select | region | limit , token | Get a list of all ingest budgets. The response is paginated with a default limit of 100 budgets per page. |
createIngestBudgetV2 | insert | region , data__action , data__capacityBytes , data__name , data__resetTime , data__scope , data__timezone | Create a new ingest budget. | |
deleteIngestBudgetV2 | delete | id , region | Delete an ingest budget with the given identifier. | |
updateIngestBudgetV2 | exec | id , region , action , capacityBytes , name , resetTime , scope , 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
- getIngestBudgetV2
- listIngestBudgetsV2
Get an ingest budget by the given identifier.
SELECT
id,
name,
action,
auditThreshold,
budgetVersion,
capacityBytes,
createdAt,
createdBy,
description,
modifiedAt,
modifiedBy,
resetTime,
scope,
timezone,
usageBytes,
usageStatus
FROM sumologic.ingest_budgets.ingest_budgets_v2
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_v2
WHERE region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND token = '{{ token }}'
;
INSERT
examples
- createIngestBudgetV2
- Manifest
Create a new ingest budget.
INSERT INTO sumologic.ingest_budgets.ingest_budgets_v2 (
data__name,
data__scope,
data__capacityBytes,
data__timezone,
data__resetTime,
data__description,
data__action,
data__auditThreshold,
region
)
SELECT
'{{ name }}' /* required */,
'{{ scope }}' /* required */,
{{ capacityBytes }} /* required */,
'{{ timezone }}' /* required */,
'{{ resetTime }}' /* required */,
'{{ description }}',
'{{ action }}' /* required */,
{{ auditThreshold }},
'{{ region }}'
RETURNING
id,
name,
action,
auditThreshold,
budgetVersion,
capacityBytes,
createdAt,
createdBy,
description,
modifiedAt,
modifiedBy,
resetTime,
scope,
timezone,
usageBytes,
usageStatus
;
# Description fields are for documentation purposes
- name: ingest_budgets_v2
props:
- name: region
value: string
description: Required parameter for the ingest_budgets_v2 resource.
- name: name
value: string
description: |
Display name of the ingest budget.
- name: scope
value: string
description: |
A scope is a constraint that will be used to identify the messages on which budget needs to be applied. A scope is consists of key and value separated by =. The field must be enabled in the fields table. Value supports wildcard. e.g. _sourceCategory=*prod*payment*, cluster=kafka. If the scope is defined _sourceCategory=*nginx* in this budget will be applied on messages having fields _sourceCategory=prod/nginx, _sourceCategory=dev/nginx, or _sourceCategory=dev/nginx/error
- 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
- deleteIngestBudgetV2
Delete an ingest budget with the given identifier.
DELETE FROM sumologic.ingest_budgets.ingest_budgets_v2
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- updateIngestBudgetV2
Update an existing ingest budget. All properties specified in the request are required.
EXEC sumologic.ingest_budgets.ingest_budgets_v2.updateIngestBudgetV2
@id='{{ id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"name": "{{ name }}",
"scope": "{{ scope }}",
"capacityBytes": {{ capacityBytes }},
"timezone": "{{ timezone }}",
"resetTime": "{{ resetTime }}",
"description": "{{ description }}",
"action": "{{ action }}",
"auditThreshold": {{ auditThreshold }}
}'
;