retention
Creates, updates, deletes, gets or lists a retention resource.
Overview
| Name | retention |
| Type | Resource |
| Id | cloudflare.logs.retention |
Fields
The following fields are returned by SELECT queries:
- list
Get log retention flag response
| Name | Datatype | Description |
|---|---|---|
flag | boolean | The log retention flag for Logpull API. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | zone_id | Gets log retention flag for Logpull API. | |
create | insert | zone_id | Updates log retention flag for Logpull API. |
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 |
|---|---|---|
zone_id | string | The Cloudflare zone ID. |
SELECT examples
- list
Gets log retention flag for Logpull API.
SELECT
flag
FROM cloudflare.logs.retention
WHERE zone_id = '{{ zone_id }}' -- required
;
INSERT examples
- create
- Manifest
Updates log retention flag for Logpull API.
INSERT INTO cloudflare.logs.retention (
flag,
zone_id
)
SELECT
{{ flag }},
'{{ zone_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: retention
props:
- name: zone_id
value: "{{ zone_id }}"
description: Required parameter for the retention resource.
- name: flag
value: {{ flag }}
description: |
The log retention flag for Logpull API.