datasets_jobs
Creates, updates, deletes, gets or lists a datasets_jobs resource.
Overview
| Name | datasets_jobs |
| Type | Resource |
| Id | cloudflare.logpush.datasets_jobs |
Fields
The following fields are returned by SELECT queries:
- list_by_account
- list_by_zone
List Logpush jobs for a dataset response.
| Name | Datatype | Description |
|---|---|---|
id | integer | Unique id of the job. |
name | string | Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job. (example: example.com) |
dataset | string | Name of the dataset. A list of supported datasets can be found on the Developer Docs. (access_requests, audit_logs, audit_logs_v2, biso_user_actions, casb_findings, device_posture_results, dex_application_tests, dex_device_state_events, dlp_forensic_copies, dns_firewall_logs, dns_logs, email_security_alerts, email_security_post_delivery_events, firewall_events, gateway_dns, gateway_http, gateway_network, http_requests, ipsec_logs, magic_ids_detections, mcp_portal_logs, nel_reports, network_analytics_logs, page_shield_events, sinkhole_http_logs, spectrum_events, ssh_logs, warp_config_changes, warp_toggle_changes, workers_trace_events, zaraz_events, zero_trust_network_sessions) (default: http_requests, example: http_requests) |
destination_conf | string (uri) | Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included. (example: s3://mybucket/logs?region=us-west-2) |
enabled | boolean | Flag that indicates if the job is enabled. |
error_message | string | If not null, the job is currently failing. Failures are usually. repetitive (example: no permissions to write to destination bucket). Only the last failure is recorded. On successful execution of a job the error_message and last_error are set to null. |
frequency | string | This field is deprecated. Please use max_upload_* parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files. (high, low) (default: high, example: high) |
kind | string | The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset). (, edge) (default: , example: , x-stainless-terraform-configurability: computed_optional) |
last_complete | string (date-time) | Records the last time for which logs have been successfully pushed. If the last successful push was for logs range 2018-07-23T10:00:00Z to 2018-07-23T10:01:00Z then the value of this field will be 2018-07-23T10:01:00Z. If the job has never run or has just been enabled and hasn't run yet then the field will be empty. |
last_error | string (date-time) | Records the last time the job failed. If not null, the job is currently. failing. If null, the job has either never failed or has run successfully at least once since last failure. See also the error_message field. |
logpull_options | string (uri-reference) | This field is deprecated. Use output_options instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately. (example: fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339) |
max_upload_bytes | integer | The maximum uncompressed file size of a batch of logs. This setting value must be between 5 MB and 1 GB, or 0 to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch size. (0) |
max_upload_interval_seconds | integer | The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or 0 to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in shorter intervals than this. (0) |
max_upload_records | integer | The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or 0 to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer lines than this. (0) |
output_options | object | The structured replacement for logpull_options. When including this field, the logpull_option field will be ignored. |
List Logpush jobs for a dataset response.
| Name | Datatype | Description |
|---|---|---|
id | integer | Unique id of the job. |
name | string | Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job. (example: example.com) |
dataset | string | Name of the dataset. A list of supported datasets can be found on the Developer Docs. (access_requests, audit_logs, audit_logs_v2, biso_user_actions, casb_findings, device_posture_results, dex_application_tests, dex_device_state_events, dlp_forensic_copies, dns_firewall_logs, dns_logs, email_security_alerts, email_security_post_delivery_events, firewall_events, gateway_dns, gateway_http, gateway_network, http_requests, ipsec_logs, magic_ids_detections, mcp_portal_logs, nel_reports, network_analytics_logs, page_shield_events, sinkhole_http_logs, spectrum_events, ssh_logs, warp_config_changes, warp_toggle_changes, workers_trace_events, zaraz_events, zero_trust_network_sessions) (default: http_requests, example: http_requests) |
destination_conf | string (uri) | Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included. (example: s3://mybucket/logs?region=us-west-2) |
enabled | boolean | Flag that indicates if the job is enabled. |
error_message | string | If not null, the job is currently failing. Failures are usually. repetitive (example: no permissions to write to destination bucket). Only the last failure is recorded. On successful execution of a job the error_message and last_error are set to null. |
frequency | string | This field is deprecated. Please use max_upload_* parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files. (high, low) (default: high, example: high) |
kind | string | The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset). (, edge) (default: , example: , x-stainless-terraform-configurability: computed_optional) |
last_complete | string (date-time) | Records the last time for which logs have been successfully pushed. If the last successful push was for logs range 2018-07-23T10:00:00Z to 2018-07-23T10:01:00Z then the value of this field will be 2018-07-23T10:01:00Z. If the job has never run or has just been enabled and hasn't run yet then the field will be empty. |
last_error | string (date-time) | Records the last time the job failed. If not null, the job is currently. failing. If null, the job has either never failed or has run successfully at least once since last failure. See also the error_message field. |
logpull_options | string (uri-reference) | This field is deprecated. Use output_options instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately. (example: fields=RayID,ClientIP,EdgeStartTimestamp×tamps=rfc3339) |
max_upload_bytes | integer | The maximum uncompressed file size of a batch of logs. This setting value must be between 5 MB and 1 GB, or 0 to disable it. Note that you cannot set a minimum file size; this means that log files may be much smaller than this batch size. (0) |
max_upload_interval_seconds | integer | The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or 0 to disable it. Note that you cannot specify a minimum interval for log batches; this means that log files may be sent in shorter intervals than this. (0) |
max_upload_records | integer | The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or 0 to disable it. Note that you cannot specify a minimum number of log lines per batch; this means that log files may contain many fewer lines than this. (0) |
output_options | object | The structured replacement for logpull_options. When including this field, the logpull_option field will be ignored. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_by_account | select | dataset_id, account_id | Lists Logpush jobs for an account or zone for a dataset. | |
list_by_zone | select | dataset_id, zone_id | Lists Logpush jobs for an account or zone for a dataset. |
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 |
|---|---|---|
account_id | string | The Cloudflare account ID. |
dataset_id | string | The dataset ID. |
zone_id | string | The Cloudflare zone ID. |
SELECT examples
- list_by_account
- list_by_zone
Lists Logpush jobs for an account or zone for a dataset.
SELECT
id,
name,
dataset,
destination_conf,
enabled,
error_message,
frequency,
kind,
last_complete,
last_error,
logpull_options,
max_upload_bytes,
max_upload_interval_seconds,
max_upload_records,
output_options
FROM cloudflare.logpush.datasets_jobs
WHERE dataset_id = '{{ dataset_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;
Lists Logpush jobs for an account or zone for a dataset.
SELECT
id,
name,
dataset,
destination_conf,
enabled,
error_message,
frequency,
kind,
last_complete,
last_error,
logpull_options,
max_upload_bytes,
max_upload_interval_seconds,
max_upload_records,
output_options
FROM cloudflare.logpush.datasets_jobs
WHERE dataset_id = '{{ dataset_id }}' -- required
AND zone_id = '{{ zone_id }}' -- required
;