rulesets_versions
Creates, updates, deletes, gets or lists a rulesets_versions resource.
Overview
| Name | rulesets_versions |
| Type | Resource |
| Id | cloudflare.rulesets.rulesets_versions |
Fields
The following fields are returned by SELECT queries:
- get_by_account
- get_by_zone
- list_by_account
- list_by_zone
A ruleset response.
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the ruleset. (example: 2f2feab2026849078ba485f918791bdc, title: Ruleset ID) |
name | string | The human-readable name of the ruleset. (title: Name) |
description | string | An informative description of the ruleset. (default: , title: Description) |
kind | string | The kind of the ruleset. (managed, custom, root, zone) (example: root, title: Kind) |
last_updated | string (date-time) | The timestamp of when the ruleset was last modified. (title: Last Updated) |
phase | string | The phase of the ruleset. (ddos_l4, ddos_l7, http_config_settings, http_custom_errors, http_log_custom_fields, http_ratelimit, http_request_cache_settings, http_request_dynamic_redirect, http_request_firewall_custom, http_request_firewall_managed, http_request_late_transform, http_request_origin, http_request_redirect, http_request_sanitize, http_request_sbfm, http_request_transform, http_response_cache_settings, http_response_compression, http_response_firewall_managed, http_response_headers_transform, magic_transit, magic_transit_ids_managed, magic_transit_managed, magic_transit_ratelimit) (example: http_request_firewall_custom, title: Phase) |
rules | array | The list of rules in the ruleset. (title: Rules) |
version | string | The version of the ruleset. (example: 1, title: Version) |
A ruleset response.
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the ruleset. (example: 2f2feab2026849078ba485f918791bdc, title: Ruleset ID) |
name | string | The human-readable name of the ruleset. (title: Name) |
description | string | An informative description of the ruleset. (default: , title: Description) |
kind | string | The kind of the ruleset. (managed, custom, root, zone) (example: root, title: Kind) |
last_updated | string (date-time) | The timestamp of when the ruleset was last modified. (title: Last Updated) |
phase | string | The phase of the ruleset. (ddos_l4, ddos_l7, http_config_settings, http_custom_errors, http_log_custom_fields, http_ratelimit, http_request_cache_settings, http_request_dynamic_redirect, http_request_firewall_custom, http_request_firewall_managed, http_request_late_transform, http_request_origin, http_request_redirect, http_request_sanitize, http_request_sbfm, http_request_transform, http_response_cache_settings, http_response_compression, http_response_firewall_managed, http_response_headers_transform, magic_transit, magic_transit_ids_managed, magic_transit_managed, magic_transit_ratelimit) (example: http_request_firewall_custom, title: Phase) |
rules | array | The list of rules in the ruleset. (title: Rules) |
version | string | The version of the ruleset. (example: 1, title: Version) |
A rulesets response.
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the ruleset. (example: 2f2feab2026849078ba485f918791bdc, title: Ruleset ID) |
name | string | The human-readable name of the ruleset. (title: Name) |
description | string | An informative description of the ruleset. (default: , title: Description) |
kind | string | The kind of the ruleset. (managed, custom, root, zone) (example: root, title: Kind) |
last_updated | string (date-time) | The timestamp of when the ruleset was last modified. (title: Last Updated) |
phase | string | The phase of the ruleset. (ddos_l4, ddos_l7, http_config_settings, http_custom_errors, http_log_custom_fields, http_ratelimit, http_request_cache_settings, http_request_dynamic_redirect, http_request_firewall_custom, http_request_firewall_managed, http_request_late_transform, http_request_origin, http_request_redirect, http_request_sanitize, http_request_sbfm, http_request_transform, http_response_cache_settings, http_response_compression, http_response_firewall_managed, http_response_headers_transform, magic_transit, magic_transit_ids_managed, magic_transit_managed, magic_transit_ratelimit) (example: http_request_firewall_custom, title: Phase) |
version | string | The version of the ruleset. (example: 1, title: Version) |
A rulesets response.
| Name | Datatype | Description |
|---|---|---|
id | string | The unique ID of the ruleset. (example: 2f2feab2026849078ba485f918791bdc, title: Ruleset ID) |
name | string | The human-readable name of the ruleset. (title: Name) |
description | string | An informative description of the ruleset. (default: , title: Description) |
kind | string | The kind of the ruleset. (managed, custom, root, zone) (example: root, title: Kind) |
last_updated | string (date-time) | The timestamp of when the ruleset was last modified. (title: Last Updated) |
phase | string | The phase of the ruleset. (ddos_l4, ddos_l7, http_config_settings, http_custom_errors, http_log_custom_fields, http_ratelimit, http_request_cache_settings, http_request_dynamic_redirect, http_request_firewall_custom, http_request_firewall_managed, http_request_late_transform, http_request_origin, http_request_redirect, http_request_sanitize, http_request_sbfm, http_request_transform, http_response_cache_settings, http_response_compression, http_response_firewall_managed, http_response_headers_transform, magic_transit, magic_transit_ids_managed, magic_transit_managed, magic_transit_ratelimit) (example: http_request_firewall_custom, title: Phase) |
version | string | The version of the ruleset. (example: 1, title: Version) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_by_account | select | ruleset_version, ruleset_id, account_id | Fetches a specific version of an account or zone ruleset. | |
get_by_zone | select | ruleset_version, ruleset_id, zone_id | Fetches a specific version of an account or zone ruleset. | |
list_by_account | select | ruleset_id, account_id | Fetches the versions of an account or zone ruleset. | |
list_by_zone | select | ruleset_id, zone_id | Fetches the versions of an account or zone ruleset. |
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. |
ruleset_id | string | The ruleset ID. |
ruleset_version | string | |
zone_id | string | The Cloudflare zone ID. |
SELECT examples
- get_by_account
- get_by_zone
- list_by_account
- list_by_zone
Fetches a specific version of an account or zone ruleset.
SELECT
id,
name,
description,
kind,
last_updated,
phase,
rules,
version
FROM cloudflare.rulesets.rulesets_versions
WHERE ruleset_version = '{{ ruleset_version }}' -- required
AND ruleset_id = '{{ ruleset_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;
Fetches a specific version of an account or zone ruleset.
SELECT
id,
name,
description,
kind,
last_updated,
phase,
rules,
version
FROM cloudflare.rulesets.rulesets_versions
WHERE ruleset_version = '{{ ruleset_version }}' -- required
AND ruleset_id = '{{ ruleset_id }}' -- required
AND zone_id = '{{ zone_id }}' -- required
;
Fetches the versions of an account or zone ruleset.
SELECT
id,
name,
description,
kind,
last_updated,
phase,
version
FROM cloudflare.rulesets.rulesets_versions
WHERE ruleset_id = '{{ ruleset_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;
Fetches the versions of an account or zone ruleset.
SELECT
id,
name,
description,
kind,
last_updated,
phase,
version
FROM cloudflare.rulesets.rulesets_versions
WHERE ruleset_id = '{{ ruleset_id }}' -- required
AND zone_id = '{{ zone_id }}' -- required
;