Skip to main content

jobs

Creates, updates, deletes, gets or lists a jobs resource.

Overview​

Namejobs
TypeResource
Idsumologic.archive.jobs

Fields​

The following fields are returned by SELECT queries:

A paginated list of ingestion jobs for an Archive Source.

NameDatatypeDescription
idstringThe unique identifier of the ingestion job. (example: 4e214571-cf27-4114-93e6-69a98c017f3)
namestringThe name of the ingestion job.
created_atstring (date-time)The creation timestamp in UTC of the ingestion job. (example: 2018-10-16T09:10:00.000Z) (wire: createdAt)
created_bystringThe identifier of the user who created the ingestion job. (example: 0000000006743FDD) (wire: createdBy)
end_timestring (date-time)The ending timestamp of the ingestion job. (example: 2018-10-16T10:10:00.000Z) (wire: endTime)
start_timestring (date-time)The starting timestamp of the ingestion job. (example: 2018-10-16T09:10:00.000Z) (wire: startTime)
statusstringThe status of the ingestion job, either Pending,Scanning,Ingesting,Failed, or Succeeded. (example: Scanning)
total_bytes_ingestedinteger (int64)The total bytes ingested by the ingestion job. (wire: totalBytesIngested)
total_objects_ingestedinteger (int64)The total number of objects ingested by the ingestion job. (wire: totalObjectsIngested)
total_objects_scannedinteger (int64)The total number of objects scanned by the ingestion job. (wire: totalObjectsScanned)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectsource_id, regionlimit, tokenGet a list of all the ingestion jobs created on an Archive Source. The response is paginated with a default limit of 10 jobs per page.
createinsertsource_id, region, end_time, name, start_timeCreate an ingestion job to pull data from your S3 bucket.
deletedeletesource_id, id, regionDelete an ingestion job with the given identifier from the organization. The delete operation is only possible for jobs with a Succeeded or Failed status.

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
idstringThe identifier of the ingestion job to delete.
regionstringSumo 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)
source_idstringThe identifier of the Archive Source. (wire: sourceId)
limitinteger (int32)Limit the number of jobs returned in the response. The number of jobs 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. token is set to null when no more pages are left.

SELECT examples​

Get a list of all the ingestion jobs created on an Archive Source. The response is paginated with a default limit of 10 jobs per page.

SELECT
id,
name,
created_at,
created_by,
end_time,
start_time,
status,
total_bytes_ingested,
total_objects_ingested,
total_objects_scanned
FROM sumologic.archive.jobs
WHERE source_id = '{{ source_id }}' -- required
AND region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
AND limit = '{{ limit }}'
AND token = '{{ token }}'
;

INSERT examples​

Create an ingestion job to pull data from your S3 bucket.

INSERT INTO sumologic.archive.jobs (
name,
start_time,
end_time,
source_id,
region
)
SELECT
'{{ name }}' /* required */,
'{{ start_time }}' /* required */,
'{{ end_time }}' /* required */,
'{{ source_id }}',
'{{ region }}'
RETURNING
id,
name,
created_at,
created_by,
end_time,
start_time,
status,
total_bytes_ingested,
total_objects_ingested,
total_objects_scanned
;

DELETE examples​

Delete an ingestion job with the given identifier from the organization. The delete operation is only possible for jobs with a Succeeded or Failed status.

DELETE FROM sumologic.archive.jobs
WHERE source_id = '{{ source_id }}' --required
AND id = '{{ id }}' --required
AND region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
;