Skip to main content

trusted_domains

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

Overview​

Nametrusted_domains
TypeResource
Idrailway.workspaces.trusted_domains

Fields​

The following fields are returned by SELECT queries:

One row per TrustedDomain.

NameDatatypeDescription
idstring
workspace_idstring
domain_namestring
rolestring
statusstring (FAILED, PENDING, VERIFIED)
verification_dataobjectTrustedDomainVerificationData object
verification_typestring

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectworkspace_idGet all trusted domains for a workspace. Backed by the Railway GraphQL query trustedDomains.
createinsertdomain_name, role, workspace_idCreate a new trusted domain for this workspace. Backed by the Railway GraphQL mutation trustedDomainCreate.
updateupdateid, roleUpdate the role of a trusted domain. Backed by the Railway GraphQL mutation trustedDomainUpdate.
deletedeleteidDelete a trusted domain. Backed by the Railway GraphQL mutation trustedDomainDelete.
retrigger_verificationexecidRetrigger 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.

NameDatatypeDescription
workspace_idstring
domain_namestring
idstring
rolestring

SELECT examples​

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 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
;

UPDATE examples​

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 a trusted domain. Backed by the Railway GraphQL mutation trustedDomainDelete.

DELETE FROM railway.workspaces.trusted_domains
WHERE
id = '{{ id }}' --required
;

Lifecycle Methods​

Retrigger verification for a failed trusted domain. Backed by the Railway GraphQL mutation trustedDomainRetriggerVerification.

EXEC railway.workspaces.trusted_domains.retrigger_verification
@id='{{ id }}' --required
;