egress_gateways
Creates, updates, deletes, gets or lists an egress_gateways resource.
Overview​
| Name | egress_gateways |
| Type | Resource |
| Id | railway.networking.egress_gateways |
Fields​
The following fields are returned by SELECT queries:
- list
One row per EgressGateway.
| Name | Datatype | Description |
|---|---|---|
ipv4 | string | |
region | string | |
zone | string |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | environment_id, service_id | All egress gateways assigned to a service instance. Backed by the Railway GraphQL query egressGateways. | |
create | insert | environment_id, service_id | Create a new egress gateway association for a service instance. Backed by the Railway GraphQL mutation egressGatewayAssociationCreate. | |
clear | delete | environment_id, service_id | all_environments | Clear all egress gateway associations for a service instance. Backed by the Railway GraphQL mutation egressGatewayAssociationsClear. |
preview_ha_migration | exec | environment_id, service_id | all_environments | Preview the HA static egress IPs that would be assigned, without applying them. Set allEnvironments to cover all of the service's environments. Backed by the Railway GraphQL mutation egressGatewayHAMigrationPreview. |
rollback_from_ha | exec | environment_id, service_id | all_environments | Switch a service from HA static egress IPs back to a standard static IP. Set allEnvironments to apply to all of the service's environments. Backed by the Railway GraphQL mutation egressGatewayRollbackFromHA. |
upgrade_to_ha | exec | environment_id, service_id | all_environments | Enable HA static egress IPs for a service. Set allEnvironments to apply to all of the service's environments. Backed by the Railway GraphQL mutation egressGatewayUpgradeToHA. |
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 | |
service_id | string | |
all_environments | boolean |
SELECT examples​
- list
All egress gateways assigned to a service instance. Backed by the Railway GraphQL query egressGateways.
SELECT
ipv4,
region,
zone
FROM railway.networking.egress_gateways
WHERE environment_id = '{{ environment_id }}' -- required
AND service_id = '{{ service_id }}' -- required
;
INSERT examples​
- create
- Manifest
Create a new egress gateway association for a service instance. Backed by the Railway GraphQL mutation egressGatewayAssociationCreate.
INSERT INTO railway.networking.egress_gateways (
environment_id,
region,
service_id
)
SELECT
'{{ environment_id }}' /* required */,
'{{ region }}',
'{{ service_id }}' /* required */
RETURNING
ipv4,
region,
zone
;
# Description fields are for documentation purposes
- name: egress_gateways
props:
- name: environment_id
value: "{{ environment_id }}"
- name: region
value: "{{ region }}"
- name: service_id
value: "{{ service_id }}"
DELETE examples​
- clear
Clear all egress gateway associations for a service instance. Backed by the Railway GraphQL mutation egressGatewayAssociationsClear.
DELETE FROM railway.networking.egress_gateways
WHERE
environment_id = '{{ environment_id }}' --required
AND service_id = '{{ service_id }}' --required
AND all_environments = '{{ all_environments }}'
;
Lifecycle Methods​
- preview_ha_migration
- rollback_from_ha
- upgrade_to_ha
Preview the HA static egress IPs that would be assigned, without applying them. Set allEnvironments to cover all of the service's environments. Backed by the Railway GraphQL mutation egressGatewayHAMigrationPreview.
EXEC railway.networking.egress_gateways.preview_ha_migration
@environment_id='{{ environment_id }}', --required
@service_id='{{ service_id }}', --required
@all_environments='{{ all_environments }}'
;
Switch a service from HA static egress IPs back to a standard static IP. Set allEnvironments to apply to all of the service's environments. Backed by the Railway GraphQL mutation egressGatewayRollbackFromHA.
EXEC railway.networking.egress_gateways.rollback_from_ha
@environment_id='{{ environment_id }}', --required
@service_id='{{ service_id }}', --required
@all_environments='{{ all_environments }}'
;
Enable HA static egress IPs for a service. Set allEnvironments to apply to all of the service's environments. Backed by the Railway GraphQL mutation egressGatewayUpgradeToHA.
EXEC railway.networking.egress_gateways.upgrade_to_ha
@environment_id='{{ environment_id }}', --required
@service_id='{{ service_id }}', --required
@all_environments='{{ all_environments }}'
;