trusted_domains
Creates, updates, deletes, gets or lists a trusted_domains resource.
Overview​
| Name | trusted_domains |
| Type | Resource |
| Id | railway.workspaces.trusted_domains |
Fields​
The following fields are returned by SELECT queries:
- list
One row per TrustedDomain.
| Name | Datatype | Description |
|---|---|---|
id | string | |
workspace_id | string | |
domain_name | string | |
role | string | |
status | string | (FAILED, PENDING, VERIFIED) |
verification_data | object | TrustedDomainVerificationData object |
verification_type | string |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | workspace_id | Get all trusted domains for a workspace. Backed by the Railway GraphQL query trustedDomains. | |
create | insert | domain_name, role, workspace_id | Create a new trusted domain for this workspace. Backed by the Railway GraphQL mutation trustedDomainCreate. | |
update | update | id, role | Update the role of a trusted domain. Backed by the Railway GraphQL mutation trustedDomainUpdate. | |
delete | delete | id | Delete a trusted domain. Backed by the Railway GraphQL mutation trustedDomainDelete. | |
retrigger_verification | exec | id | Retrigger verification for a failed trusted domain. Backed by the Railway GraphQL mutation trustedDomainRetriggerVerification. |
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 |
|---|---|---|
workspace_id | string | |
domain_name | string | |
id | string | |
role | string |
SELECT examples​
- list
Get all trusted domains for a workspace. Backed by the Railway GraphQL query trustedDomains.
SELECT
id,
workspace_id,
domain_name,
role,
status,
verification_data,
verification_type
FROM railway.workspaces.trusted_domains
WHERE workspace_id = '{{ workspace_id }}' -- required
;
INSERT examples​
- create
- Manifest
Create a new trusted domain for this workspace. Backed by the Railway GraphQL mutation trustedDomainCreate.
INSERT INTO railway.workspaces.trusted_domains (
domain_name,
role,
workspace_id
)
SELECT
'{{ domain_name }}' /* required */,
'{{ role }}' /* required */,
'{{ workspace_id }}' /* required */
RETURNING
id,
workspace_id,
domain_name,
role,
status,
verification_data,
verification_type
;
# Description fields are for documentation purposes
- name: trusted_domains
props:
- name: domain_name
value: "{{ domain_name }}"
- name: role
value: "{{ role }}"
- name: workspace_id
value: "{{ workspace_id }}"
UPDATE examples​
- update
Update the role of a trusted domain. Backed by the Railway GraphQL mutation trustedDomainUpdate.
UPDATE railway.workspaces.trusted_domains
SET
WHERE
id = '{{ id }}' --required
AND role = '{{ role }}' --required
RETURNING
id,
workspace_id,
domain_name,
role,
status,
verification_data,
verification_type;
DELETE examples​
- delete
Delete a trusted domain. Backed by the Railway GraphQL mutation trustedDomainDelete.
DELETE FROM railway.workspaces.trusted_domains
WHERE
id = '{{ id }}' --required
;
Lifecycle Methods​
- retrigger_verification
Retrigger verification for a failed trusted domain. Backed by the Railway GraphQL mutation trustedDomainRetriggerVerification.
EXEC railway.workspaces.trusted_domains.retrigger_verification
@id='{{ id }}' --required
;