railway_domain_email_forwarding_rules
Creates, updates, deletes, gets or lists a railway_domain_email_forwarding_rules resource.
Overview​
| Name | railway_domain_email_forwarding_rules |
| Type | Resource |
| Id | railway.networking.railway_domain_email_forwarding_rules |
Fields​
The following fields are returned by SELECT queries:
- list
One row per RailwayDomainEmailForwardingRule.
| Name | Datatype | Description |
|---|---|---|
alias | string | Local part of the forwarded address, without the domain. |
destination | string | The external inbox mail for this alias is delivered to. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | domain, workspace_id | List email forwarding rules for a Railway domain. Backed by the Railway GraphQL query railwayDomainEmailForwardingRules. | |
create | insert | alias, destination, domain, workspace_id | Forward an address on this domain to an external inbox. Backed by the Railway GraphQL mutation railwayDomainEmailForwardingRuleCreate. | |
update | update | alias, destination, domain, workspace_id | Change where a forwarded address delivers. Backed by the Railway GraphQL mutation railwayDomainEmailForwardingRuleUpdate. | |
delete | delete | alias, domain, workspace_id | Stop forwarding an address on this domain. Backed by the Railway GraphQL mutation railwayDomainEmailForwardingRuleDelete. | |
remove_all | exec | domain, workspace_id | Stop forwarding every address on this domain, and remove the mail records that delivered them. Backed by the Railway GraphQL mutation railwayDomainEmailForwardingRemoveAll. | |
send_test | exec | alias, domain, workspace_id | Send a message to a forwarded address so the customer can confirm it delivers. Backed by the Railway GraphQL mutation railwayDomainEmailForwardingRuleSendTest. |
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 |
|---|---|---|
domain | string | |
workspace_id | string | |
alias | string | |
destination | string |
SELECT examples​
- list
List email forwarding rules for a Railway domain. Backed by the Railway GraphQL query railwayDomainEmailForwardingRules.
SELECT
alias,
destination
FROM railway.networking.railway_domain_email_forwarding_rules
WHERE domain = '{{ domain }}' -- required
AND workspace_id = '{{ workspace_id }}' -- required
;
INSERT examples​
- create
- Manifest
Forward an address on this domain to an external inbox. Backed by the Railway GraphQL mutation railwayDomainEmailForwardingRuleCreate.
INSERT INTO railway.networking.railway_domain_email_forwarding_rules (
alias,
destination,
domain,
workspace_id
)
SELECT
'{{ alias }}' /* required */,
'{{ destination }}' /* required */,
'{{ domain }}' /* required */,
'{{ workspace_id }}' /* required */
RETURNING
alias,
destination
;
# Description fields are for documentation purposes
- name: railway_domain_email_forwarding_rules
props:
- name: alias
value: "{{ alias }}"
- name: destination
value: "{{ destination }}"
- name: domain
value: "{{ domain }}"
- name: workspace_id
value: "{{ workspace_id }}"
UPDATE examples​
- update
Change where a forwarded address delivers. Backed by the Railway GraphQL mutation railwayDomainEmailForwardingRuleUpdate.
UPDATE railway.networking.railway_domain_email_forwarding_rules
SET
WHERE
alias = '{{ alias }}' --required
AND destination = '{{ destination }}' --required
AND domain = '{{ domain }}' --required
AND workspace_id = '{{ workspace_id }}' --required
RETURNING
alias,
destination;
DELETE examples​
- delete
Stop forwarding an address on this domain. Backed by the Railway GraphQL mutation railwayDomainEmailForwardingRuleDelete.
DELETE FROM railway.networking.railway_domain_email_forwarding_rules
WHERE
alias = '{{ alias }}' --required
AND domain = '{{ domain }}' --required
AND workspace_id = '{{ workspace_id }}' --required
;
Lifecycle Methods​
- remove_all
- send_test
Stop forwarding every address on this domain, and remove the mail records that delivered them. Backed by the Railway GraphQL mutation railwayDomainEmailForwardingRemoveAll.
EXEC railway.networking.railway_domain_email_forwarding_rules.remove_all
@domain='{{ domain }}', --required
@workspace_id='{{ workspace_id }}' --required
;
Send a message to a forwarded address so the customer can confirm it delivers. Backed by the Railway GraphQL mutation railwayDomainEmailForwardingRuleSendTest.
EXEC railway.networking.railway_domain_email_forwarding_rules.send_test
@alias='{{ alias }}', --required
@domain='{{ domain }}', --required
@workspace_id='{{ workspace_id }}' --required
;