Skip to main content

ingest_budgets_v1

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

Overview

Nameingest_budgets_v1
TypeResource
Idsumologic.ingest_budgets.ingest_budgets_v1

Fields

The following fields are returned by SELECT queries:

Ingest budget object that was requested.

NameDatatypeDescription
idstringUnique identifier for the ingest budget.
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.
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)Creation timestamp in UTC in RFC3339 format.
createdByUserobject
descriptionstringDescription of the ingest budget.
fieldValuestringCustom field value that is used to assign Collectors to the ingest budget. (example: dev_30_gb)
modifiedAtstring (date-time)Last modification timestamp in UTC in RFC3339 format.
modifiedByUserobject
numberOfCollectorsinteger (int64)Number of collectors assigned to the ingest budget.
resetTimestringReset time of the ingest budget in HH:MM format. (example: 23:30)
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). (example: Approaching)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getIngestBudgetselectid, regionGet an ingest budget by the given identifier.
listIngestBudgetsselectregionlimit, tokenGet a list of all ingest budgets. The response is paginated with a default limit of 100 budgets per page.
createIngestBudgetinsertregion, data__action, data__capacityBytes, data__fieldValue, data__name, data__resetTime, data__timezoneCreate a new ingest budget.
deleteIngestBudgetdeleteid, regionDelete an ingest budget with the given identifier.
updateIngestBudgetexecid, region, action, capacityBytes, fieldValue, name, resetTime, 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,
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
;

INSERT examples

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
;

DELETE examples

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

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