environment_change_sets
Creates, updates, deletes, gets or lists an environment_change_sets resource.
Overview​
| Name | environment_change_sets |
| Type | Resource |
| Id | railway.environments.environment_change_sets |
Fields​
The following fields are returned by SELECT queries:
- get
One ChangeSetApplyResult row.
| Name | Datatype | Description |
|---|---|---|
id | string | |
deployment_id | string | |
operation_id | string | |
staged_patch_id | string | |
changes | array | List of ChangeOperationResult objects |
diagnostics | object | |
status | string |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | environment_id, id | Returns the status or completed result of an asynchronous RailwayChangeSet apply. Backed by the Railway GraphQL query environmentChangeSetApply. | |
apply | exec | environment_id, input | base_config_etag, commit_message, wait_for_completion | Experimental: applies an intent-level RailwayChangeSet and returns operation results. Backed by the Railway GraphQL mutation environmentApplyChangeSet. |
preview | exec | environment_id, input | Experimental: 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.
| Name | Datatype | Description |
|---|---|---|
environment_id | string | |
id | string | |
base_config_etag | string | Snapshot token from Environment.configEtag the plan was computed against. When set, the apply is rejected if the environment has changed since. |
commit_message | string | |
input | object | |
wait_for_completion | string | Defaults to true for compatibility. Async-capable clients set false and poll environmentChangeSetApply. Boolean passed as a string, for example 'true'. |
SELECT examples​
- get
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​
- apply
- preview
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 }}'
;
Experimental: previews an intent-level RailwayChangeSet without side effects. Backed by the Railway GraphQL mutation environmentPreviewChangeSet.
EXEC railway.environments.environment_change_sets.preview
@environment_id='{{ environment_id }}', --required
@input='{{ input }}' --required
;