jobs
Creates, updates, deletes, gets or lists a jobs
resource.
Overview
Name | jobs |
Type | Resource |
Id | sumologic.archive.jobs |
Fields
The following fields are returned by SELECT
queries:
- listArchiveJobsBySourceId
A paginated list of ingestion jobs for an Archive Source.
Name | Datatype | Description |
---|---|---|
id | string | The unique identifier of the ingestion job. (example: 4e214571-cf27-4114-93e6-69a98c017f3) |
name | string | The name of the ingestion job. |
createdAt | string (date-time) | The creation timestamp in UTC of the ingestion job. (example: 2018-10-16T09:10:00Z) |
createdBy | string | The identifier of the user who created the ingestion job. (example: 0000000006743FDD) |
endTime | string (date-time) | The ending timestamp of the ingestion job. (example: 2018-10-16T10:10:00Z) |
startTime | string (date-time) | The starting timestamp of the ingestion job. (example: 2018-10-16T09:10:00Z) |
status | string | The status of the ingestion job, either Pending ,Scanning ,Ingesting ,Failed , or Succeeded . (example: Scanning) |
totalBytesIngested | integer (int64) | The total bytes ingested by the ingestion job. |
totalObjectsIngested | integer (int64) | The total number of objects ingested by the ingestion job. |
totalObjectsScanned | integer (int64) | The total number of objects scanned by the ingestion job. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
listArchiveJobsBySourceId | select | sourceId , region | limit , token | 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. |
createArchiveJob | insert | sourceId , region , data__endTime , data__name , data__startTime | Create an ingestion job to pull data from your S3 bucket. | |
deleteArchiveJob | delete | sourceId , id , region | 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. |
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 | The identifier of the ingestion job to delete. |
region | string | SumoLogic region (enum: [us2, au, ca, de, eu, fed, in, jp], default: us2) |
sourceId | string | The identifier of the Archive Source. |
limit | integer (int32) | Limit the number of jobs returned in the response. The number of jobs 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. token is set to null when no more pages are left. |
SELECT
examples
- listArchiveJobsBySourceId
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,
createdAt,
createdBy,
endTime,
startTime,
status,
totalBytesIngested,
totalObjectsIngested,
totalObjectsScanned
FROM sumologic.archive.jobs
WHERE sourceId = '{{ sourceId }}' -- required
AND region = '{{ region }}' -- required
AND limit = '{{ limit }}'
AND token = '{{ token }}'
;
INSERT
examples
- createArchiveJob
- Manifest
Create an ingestion job to pull data from your S3 bucket.
INSERT INTO sumologic.archive.jobs (
data__name,
data__startTime,
data__endTime,
sourceId,
region
)
SELECT
'{{ name }}' /* required */,
'{{ startTime }}' /* required */,
'{{ endTime }}' /* required */,
'{{ sourceId }}',
'{{ region }}'
RETURNING
id,
name,
createdAt,
createdBy,
endTime,
startTime,
status,
totalBytesIngested,
totalObjectsIngested,
totalObjectsScanned
;
# Description fields are for documentation purposes
- name: jobs
props:
- name: sourceId
value: string
description: Required parameter for the jobs resource.
- name: region
value: string
description: Required parameter for the jobs resource.
- name: name
value: string
description: |
The name of the ingestion job.
- name: startTime
value: string
description: |
The starting timestamp of the ingestion job.
- name: endTime
value: string
description: |
The ending timestamp of the ingestion job.
DELETE
examples
- deleteArchiveJob
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 sourceId = '{{ sourceId }}' --required
AND id = '{{ id }}' --required
AND region = '{{ region }}' --required
;