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:
- list
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. |
created_at | string (date-time) | The creation timestamp in UTC of the ingestion job. (example: 2018-10-16T09:10:00.000Z) (wire: createdAt) |
created_by | string | The identifier of the user who created the ingestion job. (example: 0000000006743FDD) (wire: createdBy) |
end_time | string (date-time) | The ending timestamp of the ingestion job. (example: 2018-10-16T10:10:00.000Z) (wire: endTime) |
start_time | string (date-time) | The starting timestamp of the ingestion job. (example: 2018-10-16T09:10:00.000Z) (wire: startTime) |
status | string | The status of the ingestion job, either Pending,Scanning,Ingesting,Failed, or Succeeded. (example: Scanning) |
total_bytes_ingested | integer (int64) | The total bytes ingested by the ingestion job. (wire: totalBytesIngested) |
total_objects_ingested | integer (int64) | The total number of objects ingested by the ingestion job. (wire: totalObjectsIngested) |
total_objects_scanned | integer (int64) | The total number of objects scanned by the ingestion job. (wire: totalObjectsScanned) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | source_id, 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. |
create | insert | source_id, region, end_time, name, start_time | Create an ingestion job to pull data from your S3 bucket. | |
delete | delete | source_id, 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 | Sumo 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_id | string | The identifier of the Archive Source. (wire: sourceId) |
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​
- list
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
- Manifest
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
;
# Description fields are for documentation purposes
- name: jobs
props:
- name: source_id
value: "{{ source_id }}"
description: Required parameter for the jobs resource.
- name: region
value: "{{ region }}"
description: Required parameter for the jobs resource.
- name: name
value: "{{ name }}"
description: |
The name of the ingestion job.
- name: start_time
value: "{{ start_time }}"
description: |
The starting timestamp of the ingestion job.
- name: end_time
value: "{{ end_time }}"
description: |
The ending timestamp of the ingestion job.
DELETE examples​
- delete
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
;