Skip to main content

ingest_budgets_v2

Creates, updates, deletes, gets or lists an ingest_budgets_v2 resource.

Overview

Nameingest_budgets_v2
TypeResource
Idsumologic.ingest_budgets.ingest_budgets_v2

Fields

The following fields are returned by SELECT queries:

Ingest budget object that was requested.

NameDatatypeDescription
idstringUnique identifier for the ingest budget. (example: 0000000003343FDD)
namestringDisplay name of the ingest budget. (example: Developer Budget)
actionstringAction 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)
auditThresholdinteger (int32)The threshold as a percentage of when an ingest budget's capacity usage is logged in the Audit Index.
budgetVersioninteger (int32)The version of the Ingest Budget
capacityBytesinteger (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.
createdAtstring (date-time)The creation timestamp in UTC of the Ingest Budget. (example: 2018-10-16T09:10:00Z)
createdBystringThe identifier of the user who created the Ingest Budget. (example: 0000000006743FDD)
descriptionstringDescription of the ingest budget.
modifiedAtstring (date-time)The modified timestamp in UTC of the Ingest Budget. (example: 2018-10-16T09:10:00Z)
modifiedBystringThe identifier of the user who modified the Ingest Budget. (example: 0000000001243FDD)
resetTimestringReset time of the ingest budget in HH:MM format. (example: 23:30)
scopestringA 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*)
timezonestringTime zone of the reset time for the ingest budget. Follow the format in the IANA Time Zone Database. (example: America/Los_Angeles)
usageBytesinteger (int64)Current usage since the last reset, in bytes.
usageStatusstringStatus 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)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getIngestBudgetV2selectid, regionGet an ingest budget by the given identifier.
listIngestBudgetsV2selectregionlimit, tokenGet a list of all ingest budgets. The response is paginated with a default limit of 100 budgets per page.
createIngestBudgetV2insertregion, data__action, data__capacityBytes, data__name, data__resetTime, data__scope, data__timezoneCreate a new ingest budget.
deleteIngestBudgetV2deleteid, regionDelete an ingest budget with the given identifier.
updateIngestBudgetV2execid, region, action, capacityBytes, name, resetTime, scope, timezoneUpdate 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.

NameDatatypeDescription
idstringIdentifier of the ingest budget to update.
regionstringSumoLogic region (enum: [us2, au, ca, de, eu, fed, in, jp], default: us2)
limitinteger (int32)Limit the number of budgets returned in the response. The number of budgets returned may be less than the limit.
tokenstringContinuation 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 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
;

INSERT examples

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
;

DELETE examples

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

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 }}
}'
;