Skip to content

Commit

Permalink
generate site rule docs (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnps authored Mar 16, 2023
1 parent 321b0c2 commit bd377ae
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions docs/resources/site_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ resource "sigsci_site_rule" "test-signal-exclusion" {

### Required

- `actions` (Block Set, Min: 1, Max: 2) Actions (see [below for nested schema](#nestedblock--actions))
- `conditions` (Block Set, Min: 1, Max: 10) Conditions (see [below for nested schema](#nestedblock--conditions))
- `enabled` (Boolean) enable the rule
- `expiration` (String) Date the rule will automatically be disabled. If rule is always enabled, will return empty string
Expand All @@ -124,6 +123,7 @@ resource "sigsci_site_rule" "test-signal-exclusion" {

### Optional

- `actions` (Block Set, Max: 2) Actions (see [below for nested schema](#nestedblock--actions))
- `rate_limit` (Map of String) Rate Limit
- `requestlogging` (String) Indicates whether to store the logs for requests that match the rule's conditions (sampled) or not store them (none). This field is only available for request rules that have a block or allow action.
- `signal` (String) The signal id of the signal being excluded
Expand All @@ -132,19 +132,6 @@ resource "sigsci_site_rule" "test-signal-exclusion" {

- `id` (String) The ID of this resource.

<a id="nestedblock--actions"></a>
### Nested Schema for `actions`

Required:

- `type` (String) (block, allow, excludeSignal, addSignal) (rateLimit rule valid values: logRequest, blockSignal)

Optional:

- `response_code` (Number) HTTP code agent for agent to respond with. range: 400-499, defaults to '406' if not provided
- `signal` (String) signal id to tag


<a id="nestedblock--conditions"></a>
### Nested Schema for `conditions`

Expand Down Expand Up @@ -189,6 +176,21 @@ Optional:
- `operator` (String) type: single - (equals, doesNotEqual, contains, doesNotContain, like, notLike, exists, doesNotExist, inList, notInList)
- `value` (String) type: single - See request fields (https://docs.signalsciences.net/using-signal-sciences/features/rules/#request-fields)




<a id="nestedblock--actions"></a>
### Nested Schema for `actions`

Required:

- `type` (String) (block, allow, excludeSignal, addSignal) (rateLimit rule valid values: logRequest, blockSignal)

Optional:

- `response_code` (Number) HTTP code agent for agent to respond with. range: 400-499, defaults to '406' if not provided
- `signal` (String) signal id to tag

### Templated Signals
We have curated a list of templates for common rules, the full list of available signals is available below.

Expand Down

0 comments on commit bd377ae

Please sign in to comment.