Skip to main content

link_routing_rules

Creates, updates, deletes, gets or lists a link_routing_rules resource.

Overview

Namelink_routing_rules
TypeResource
Idaws.rtbfabric.link_routing_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
conditionsobjectThe 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_atstring (date-time)The timestamp of when the routing rule was created.
gateway_idstringThe unique identifier of the gateway. (pattern: <code>rtb-gw-[a-z0-9-]{1,25}</code>)
link_idstringThe unique identifier of the link. (pattern: <code>link-[a-z0-9-]{1,25}</code>)
priorityintegerWAF-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_idstringIdentifier for a routing rule (pattern: <code>rule-[a-z0-9-]{1,25}</code>)
statusstringThe status of the routing rule. (CREATION_IN_PROGRESS, ACTIVE, UPDATE_IN_PROGRESS, DELETION_IN_PROGRESS, DELETED, FAILED)
tagsobjectA map of the key-value pairs for the tag or tags assigned to the specified resource.
updated_atstring (date-time)The timestamp of when the routing rule was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_link_routing_ruleselectgateway_id, link_id, rule_id, regionRetrieves the details of a routing rule for a link.
list_link_routing_rulesselectgateway_id, link_id, regionnextToken, maxResultsLists the routing rules for a link.
create_link_routing_ruleinsertgateway_id, link_id, region, clientToken, priority, conditionsCreates 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_ruleupdategateway_id, link_id, rule_id, region, priority, conditionsUpdates a routing rule for a link.
delete_link_routing_ruledeletegateway_id, link_id, rule_id, regionDeletes 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.

NameDatatypeDescription
gateway_idstringThe unique identifier of the gateway.
regionstringAWS region (default: us-east-1)
rule_idstringThe unique identifier of the routing rule.
maxResultsintegerThe 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.
nextTokenstringIf 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

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
;

INSERT examples

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
;

UPDATE examples

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

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
;