Skip to main content

environment_change_sets

Creates, updates, deletes, gets or lists an environment_change_sets resource.

Overview​

Nameenvironment_change_sets
TypeResource
Idrailway.environments.environment_change_sets

Fields​

The following fields are returned by SELECT queries:

One ChangeSetApplyResult row.

NameDatatypeDescription
idstring
deployment_idstring
operation_idstring
staged_patch_idstring
changesarrayList of ChangeOperationResult objects
diagnosticsobject
statusstring

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectenvironment_id, idReturns the status or completed result of an asynchronous RailwayChangeSet apply. Backed by the Railway GraphQL query environmentChangeSetApply.
applyexecenvironment_id, inputbase_config_etag, commit_message, wait_for_completionExperimental: applies an intent-level RailwayChangeSet and returns operation results. Backed by the Railway GraphQL mutation environmentApplyChangeSet.
previewexecenvironment_id, inputExperimental: previews an intent-level RailwayChangeSet without side effects. Backed by the Railway GraphQL mutation environmentPreviewChangeSet.

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
environment_idstring
idstring
base_config_etagstringSnapshot token from Environment.configEtag the plan was computed against. When set, the apply is rejected if the environment has changed since.
commit_messagestring
inputobject
wait_for_completionstringDefaults to true for compatibility. Async-capable clients set false and poll environmentChangeSetApply. Boolean passed as a string, for example 'true'.

SELECT examples​

Returns the status or completed result of an asynchronous RailwayChangeSet apply. Backed by the Railway GraphQL query environmentChangeSetApply.

SELECT
id,
deployment_id,
operation_id,
staged_patch_id,
changes,
diagnostics,
status
FROM railway.environments.environment_change_sets
WHERE environment_id = '{{ environment_id }}' -- required
AND id = '{{ id }}' -- required
;

Lifecycle Methods​

Experimental: applies an intent-level RailwayChangeSet and returns operation results. Backed by the Railway GraphQL mutation environmentApplyChangeSet.

EXEC railway.environments.environment_change_sets.apply
@environment_id='{{ environment_id }}', --required
@input='{{ input }}', --required
@base_config_etag='{{ base_config_etag }}',
@commit_message='{{ commit_message }}',
@wait_for_completion='{{ wait_for_completion }}'
;