historical_jobs
Creates, updates, deletes, gets or lists a historical_jobs resource.
Overview
| Name | historical_jobs |
| Type | Resource |
| Id | datadog.security.historical_jobs |
Fields
The following fields are returned by SELECT queries:
- get_historical_job
- list_historical_jobs
| Name | Datatype | Description |
|---|---|---|
id | string | ID of the job. |
attributes | object | Historical job attributes. |
type | string | Type of payload. |
| Name | Datatype | Description |
|---|---|---|
id | string | ID of the job. |
attributes | object | Historical job attributes. |
type | string | Type of payload. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_historical_job | select | job_id, region | Get a job's details. | |
list_historical_jobs | select | region | page[size], page[number], sort, filter[query] | List historical jobs. |
run_historical_job | insert | region | Run a historical job. | |
cancel_historical_job | update | job_id, region | Cancel a historical job. | |
delete_historical_job | delete | job_id, region | Delete an existing job. |
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 |
|---|---|---|
job_id | string | The ID of the job. |
region | string | (default: datadoghq.com) |
filter[query] | string | Query used to filter items from the fetched list. (example: security:attack status:high) |
page[number] | integer (int64) | Specific page number to return. |
page[size] | integer (int64) | Size for a given page. The maximum allowed value is 100. |
sort | string | The order of the jobs in results. (example: status) |
SELECT examples
- get_historical_job
- list_historical_jobs
Get a job's details.
SELECT
id,
attributes,
type
FROM datadog.security.historical_jobs
WHERE job_id = '{{ job_id }}' -- required
AND region = '{{ region }}' -- required
;
List historical jobs.
SELECT
id,
attributes,
type
FROM datadog.security.historical_jobs
WHERE region = '{{ region }}' -- required
AND page[size] = '{{ page[size] }}'
AND page[number] = '{{ page[number] }}'
AND sort = '{{ sort }}'
AND filter[query] = '{{ filter[query] }}'
;
INSERT examples
- run_historical_job
- Manifest
Run a historical job.
INSERT INTO datadog.security.historical_jobs (
data__data,
region
)
SELECT
'{{ data }}',
'{{ region }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: historical_jobs
props:
- name: region
value: string
description: Required parameter for the historical_jobs resource.
- name: data
value: object
description: |
Data for running a historical job request.
UPDATE examples
- cancel_historical_job
Cancel a historical job.
UPDATE datadog.security.historical_jobs
SET
-- No updatable properties
WHERE
job_id = '{{ job_id }}' --required
AND region = '{{ region }}' --required;
DELETE examples
- delete_historical_job
Delete an existing job.
DELETE FROM datadog.security.historical_jobs
WHERE job_id = '{{ job_id }}' --required
AND region = '{{ region }}' --required
;