Skip to main content

railway_domains

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

Overview​

Namerailway_domains
TypeResource
Idrailway.networking.railway_domains

Fields​

The following fields are returned by SELECT queries:

One RailwayDomain row.

NameDatatypeDescription
idstring
workspace_idstring
workspace_namestring
auto_renew_enabledboolean
connected_service_instancesarrayList of ConnectedServiceInstance objects
created_atstring (date-time)
domainstring
nameserversobjectAuthoritative nameservers currently delegated for this domain at the registrar.
next_billing_datestring (date-time)
purchase_priceinteger
registration_yearsinteger
renewal_priceinteger
statusstring (ACTIVE, EXPIRED, PURCHASING, REFUNDED)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_nameselectdomain, workspace_idGet a Railway domain by its domain name within a workspace. Backed by the Railway GraphQL query railwayDomainByName.
getselectidGet a Railway domain by ID. Backed by the Railway GraphQL query railwayDomain.
listselectworkspace_idstatusGet Railway domains for a workspace. Backed by the Railway GraphQL query railwayDomains.
updateupdateidUpdate a Railway domain's settings. Backed by the Railway GraphQL mutation railwayDomainUpdate.
set_nameserversexecid, nameserversDelegate the domain's authoritative nameservers to an external DNS provider, or reset to Railway defaults by passing an empty list. Backed by the Railway GraphQL mutation railwayDomainNameserversSet.

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
domainstring
idstring
workspace_idstring
statusstring
nameserversarrayHostnames of the nameservers to delegate to (2-13). Pass an empty list to reset to Name.com's account-level defaults for this domain.

SELECT examples​

Get a Railway domain by its domain name within a workspace. Backed by the Railway GraphQL query railwayDomainByName.

SELECT
id,
workspace_id,
workspace_name,
auto_renew_enabled,
connected_service_instances,
created_at,
domain,
nameservers,
next_billing_date,
purchase_price,
registration_years,
renewal_price,
status
FROM railway.networking.railway_domains
WHERE domain = '{{ domain }}' -- required
AND workspace_id = '{{ workspace_id }}' -- required
;

UPDATE examples​

Update a Railway domain's settings. Backed by the Railway GraphQL mutation railwayDomainUpdate.

UPDATE railway.networking.railway_domains
SET
auto_renew_enabled = '{{ auto_renew_enabled }}'
WHERE
id = '{{ id }}' --required
RETURNING
id,
workspace_id,
workspace_name,
auto_renew_enabled,
connected_service_instances,
created_at,
domain,
nameservers,
next_billing_date,
purchase_price,
registration_years,
renewal_price,
status;

Lifecycle Methods​

Delegate the domain's authoritative nameservers to an external DNS provider, or reset to Railway defaults by passing an empty list. Backed by the Railway GraphQL mutation railwayDomainNameserversSet.

EXEC railway.networking.railway_domains.set_nameservers
@id='{{ id }}', --required
@nameservers='{{ nameservers }}' --required
;