link_routing_rules
Creates, updates, deletes, gets or lists a link_routing_rules resource.
Overview
| Name | link_routing_rules |
| Type | Resource |
| Id | aws.rtbfabric.link_routing_rules |
Fields
The following fields are returned by SELECT queries:
- get_link_routing_rule
- list_link_routing_rules
| Name | Datatype | Description |
|---|---|---|
conditions | object | The conditions for a routing rule. All specified fields must match for the rule to apply (AND logic). At least one condition field must be set. |
created_at | string (date-time) | The timestamp of when the routing rule was created. |
gateway_id | string | The unique identifier of the gateway. (pattern: <code>rtb-gw-[a-z0-9-]{1,25}</code>) |
link_id | string | The unique identifier of the link. (pattern: <code>link-[a-z0-9-]{1,25}</code>) |
priority | integer | WAF-style evaluation priority. Lower number = evaluated first (priority 1 before 10). Gaps are allowed (1, 10, 20 is valid). Must be between 1 and 1000 inclusive. Uniqueness per link among non-deleted rules is enforced at the API layer (HTTP 409 on conflict). |
rule_id | string | Identifier for a routing rule (pattern: <code>rule-[a-z0-9-]{1,25}</code>) |
status | string | The status of the routing rule. (CREATION_IN_PROGRESS, ACTIVE, UPDATE_IN_PROGRESS, DELETION_IN_PROGRESS, DELETED, FAILED) |
tags | object | A map of the key-value pairs for the tag or tags assigned to the specified resource. |
updated_at | string (date-time) | The timestamp of when the routing rule was last updated. |
| Name | Datatype | Description |
|---|---|---|
conditions | object | The conditions for a routing rule. All specified fields must match for the rule to apply (AND logic). At least one condition field must be set. |
created_at | string (date-time) | The timestamp of when the routing rule was created. |
priority | integer | WAF-style evaluation priority. Lower number = evaluated first (priority 1 before 10). Gaps are allowed (1, 10, 20 is valid). Must be between 1 and 1000 inclusive. Uniqueness per link among non-deleted rules is enforced at the API layer (HTTP 409 on conflict). |
rule_id | string | Identifier for a routing rule (pattern: <code>rule-[a-z0-9-]{1,25}</code>) |
status | string | The status of the routing rule. (CREATION_IN_PROGRESS, ACTIVE, UPDATE_IN_PROGRESS, DELETION_IN_PROGRESS, DELETED, FAILED) |
updated_at | string (date-time) | The timestamp of when the routing rule was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_link_routing_rule | select | gateway_id, link_id, rule_id, region | Retrieves the details of a routing rule for a link. | |
list_link_routing_rules | select | gateway_id, link_id, region | nextToken, maxResults | Lists the routing rules for a link. |
create_link_routing_rule | insert | gateway_id, link_id, region, clientToken, priority, conditions | Creates a routing rule for a link. Routing rules use priority-based evaluation where lower priority numbers are evaluated first. Each rule specifies conditions that must all match for the rule to apply. | |
update_link_routing_rule | update | gateway_id, link_id, rule_id, region, priority, conditions | Updates a routing rule for a link. | |
delete_link_routing_rule | delete | gateway_id, link_id, rule_id, region | Deletes a routing rule from a link. |
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 |
|---|---|---|
gateway_id | string | The unique identifier of the gateway. |
link_id | string | The unique identifier of the link. |
region | string | AWS region (default: us-east-1) |
rule_id | string | The unique identifier of the routing rule. |
maxResults | integer | The maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum. |
nextToken | string | If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error. |
SELECT examples
- get_link_routing_rule
- list_link_routing_rules
Retrieves the details of a routing rule for a link.
SELECT
conditions,
created_at,
gateway_id,
link_id,
priority,
rule_id,
status,
tags,
updated_at
FROM aws.rtbfabric.link_routing_rules
WHERE gateway_id = '{{ gateway_id }}' -- required
AND link_id = '{{ link_id }}' -- required
AND rule_id = '{{ rule_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists the routing rules for a link.
SELECT
conditions,
created_at,
priority,
rule_id,
status,
updated_at
FROM aws.rtbfabric.link_routing_rules
WHERE gateway_id = '{{ gateway_id }}' -- required
AND link_id = '{{ link_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_link_routing_rule
- Manifest
Creates a routing rule for a link. Routing rules use priority-based evaluation where lower priority numbers are evaluated first. Each rule specifies conditions that must all match for the rule to apply.
INSERT INTO aws.rtbfabric.link_routing_rules (
clientToken,
priority,
conditions,
tags,
gateway_id,
link_id,
region
)
SELECT
'{{ clientToken }}' /* required */,
{{ priority }} /* required */,
'{{ conditions }}' /* required */,
'{{ tags }}',
'{{ gateway_id }}',
'{{ link_id }}',
'{{ region }}'
RETURNING
created_at,
rule_id,
status
;
# Description fields are for documentation purposes
- name: link_routing_rules
props:
- name: gateway_id
value: "{{ gateway_id }}"
description: Required parameter for the link_routing_rules resource.
- name: link_id
value: "{{ link_id }}"
description: Required parameter for the link_routing_rules resource.
- name: region
value: "{{ region }}"
description: Required parameter for the link_routing_rules resource.
- name: clientToken
value: "{{ clientToken }}"
- name: priority
value: {{ priority }}
description: |
WAF-style evaluation priority. Lower number = evaluated first (priority 1 before 10). Gaps are allowed (1, 10, 20 is valid). Must be between 1 and 1000 inclusive. Uniqueness per link among non-deleted rules is enforced at the API layer (HTTP 409 on conflict).
- name: conditions
description: |
The conditions for a routing rule. All specified fields must match for the rule to apply (AND logic). At least one condition field must be set.
value:
hostHeader: "{{ hostHeader }}"
hostHeaderWildcard: "{{ hostHeaderWildcard }}"
pathPrefix: "{{ pathPrefix }}"
pathExact: "{{ pathExact }}"
queryStringEquals:
key: "{{ key }}"
value: "{{ value }}"
queryStringExists: "{{ queryStringExists }}"
- name: tags
value: "{{ tags }}"
UPDATE examples
- update_link_routing_rule
Updates a routing rule for a link.
UPDATE aws.rtbfabric.link_routing_rules
SET
priority = {{ priority }},
conditions = '{{ conditions }}'
WHERE
gateway_id = '{{ gateway_id }}' --required
AND link_id = '{{ link_id }}' --required
AND rule_id = '{{ rule_id }}' --required
AND region = '{{ region }}' --required
AND priority = '{{ priority }}' --required
AND conditions = '{{ conditions }}' --required
RETURNING
rule_id,
status,
updated_at;
DELETE examples
- delete_link_routing_rule
Deletes a routing rule from a link.
DELETE FROM aws.rtbfabric.link_routing_rules
WHERE gateway_id = '{{ gateway_id }}' --required
AND link_id = '{{ link_id }}' --required
AND rule_id = '{{ rule_id }}' --required
AND region = '{{ region }}' --required
;