detections
Creates, updates, deletes, gets or lists a detections resource.
Overview
| Name | detections |
| Type | Resource |
| Id | cloudflare.leaked_credential_checks.detections |
Fields
The following fields are returned by SELECT queries:
- get
- list
Get Leaked Credential Checks custom detection response.
| Name | Datatype | Description |
|---|---|---|
id | string | Defines the unique ID for this custom detection. (example: 18a14bafaa8eb1df04ce683ec18c765e) |
password | string | Defines ehe ruleset expression to use in matching the password in a request. (example: lookup_json_string(http.request.body.raw, "secret")) |
username | string | Defines the ruleset expression to use in matching the username in a request. (example: lookup_json_string(http.request.body.raw, "user")) |
List Leaked Credential Checks custom detections response.
| Name | Datatype | Description |
|---|---|---|
id | string | Defines the unique ID for this custom detection. (example: 18a14bafaa8eb1df04ce683ec18c765e) |
password | string | Defines ehe ruleset expression to use in matching the password in a request. (example: lookup_json_string(http.request.body.raw, "secret")) |
username | string | Defines the ruleset expression to use in matching the username in a request. (example: lookup_json_string(http.request.body.raw, "user")) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | zone_id, detection_id | Get user-defined detection pattern for Leaked Credential Checks. | |
list | select | zone_id | List user-defined detection patterns for Leaked Credential Checks. | |
create | insert | zone_id | Create user-defined detection pattern for Leaked Credential Checks. | |
update | replace | zone_id, detection_id | Update user-defined detection pattern for Leaked Credential Checks. | |
delete | delete | zone_id, detection_id | Remove user-defined detection pattern for Leaked Credential Checks. |
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 |
|---|---|---|
detection_id | string | |
zone_id | string | The Cloudflare zone ID. |
SELECT examples
- get
- list
Get user-defined detection pattern for Leaked Credential Checks.
SELECT
id,
password,
username
FROM cloudflare.leaked_credential_checks.detections
WHERE zone_id = '{{ zone_id }}' -- required
AND detection_id = '{{ detection_id }}' -- required
;
List user-defined detection patterns for Leaked Credential Checks.
SELECT
id,
password,
username
FROM cloudflare.leaked_credential_checks.detections
WHERE zone_id = '{{ zone_id }}' -- required
;
INSERT examples
- create
- Manifest
Create user-defined detection pattern for Leaked Credential Checks.
INSERT INTO cloudflare.leaked_credential_checks.detections (
password,
username,
zone_id
)
SELECT
'{{ password }}',
'{{ username }}',
'{{ zone_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: detections
props:
- name: zone_id
value: "{{ zone_id }}"
description: Required parameter for the detections resource.
- name: password
value: "{{ password }}"
description: |
Defines ehe ruleset expression to use in matching the password in a request.
- name: username
value: "{{ username }}"
description: |
Defines the ruleset expression to use in matching the username in a request.
REPLACE examples
- update
Update user-defined detection pattern for Leaked Credential Checks.
REPLACE cloudflare.leaked_credential_checks.detections
SET
password = '{{ password }}',
username = '{{ username }}'
WHERE
zone_id = '{{ zone_id }}' --required
AND detection_id = '{{ detection_id }}' --required
RETURNING
errors,
messages,
result,
success;
DELETE examples
- delete
Remove user-defined detection pattern for Leaked Credential Checks.
DELETE FROM cloudflare.leaked_credential_checks.detections
WHERE zone_id = '{{ zone_id }}' --required
AND detection_id = '{{ detection_id }}' --required
;