workspace_policy_deploy_sources
Creates, updates, deletes, gets or lists a workspace_policy_deploy_sources resource.
Overview​
| Name | workspace_policy_deploy_sources |
| Type | Resource |
| Id | railway.workspaces.workspace_policy_deploy_sources |
Fields​
The following fields are returned by SELECT queries:
- list
One row per WorkspacePolicyDeploySourceAllowlist.
| Name | Datatype | Description |
|---|---|---|
id | string | |
source_id | string | |
source_name | string | |
added_by | object | User object |
created_at | string (date-time) | |
source_icon | string | |
source_type | string | (GITHUB_ORG) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | workspace_id | Lists WorkspacePolicyDeploySourceAllowlist objects of a WorkspacePolicy. Backed by the Railway GraphQL query workspacePolicy.deploySourceAllowlist. | |
add | insert | source_id, source_type, workspace_id | Add a deploy source to a workspace policy allowlist. Backed by the Railway GraphQL mutation workspacePolicyDeploySourceAllowlistAdd. | |
remove | delete | id | Remove a deploy source from a workspace policy allowlist. Backed by the Railway GraphQL mutation workspacePolicyDeploySourceAllowlistRemove. |
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 |
|---|---|---|
workspace_id | string | |
id | string | |
source_id | string | |
source_type | string | (GITHUB_ORG) |
SELECT examples​
- list
Lists WorkspacePolicyDeploySourceAllowlist objects of a WorkspacePolicy. Backed by the Railway GraphQL query workspacePolicy.deploySourceAllowlist.
SELECT
id,
source_id,
source_name,
added_by,
created_at,
source_icon,
source_type
FROM railway.workspaces.workspace_policy_deploy_sources
WHERE workspace_id = '{{ workspace_id }}' -- required
;
INSERT examples​
- add
- Manifest
Add a deploy source to a workspace policy allowlist. Backed by the Railway GraphQL mutation workspacePolicyDeploySourceAllowlistAdd.
INSERT INTO railway.workspaces.workspace_policy_deploy_sources (
source_id,
source_type,
workspace_id
)
SELECT
'{{ source_id }}' /* required */,
'{{ source_type }}' /* required */,
'{{ workspace_id }}' /* required */
RETURNING
id,
source_id,
source_name,
added_by,
created_at,
source_icon,
source_type
;
# Description fields are for documentation purposes
- name: workspace_policy_deploy_sources
props:
- name: source_id
value: "{{ source_id }}"
- name: source_type
value: "{{ source_type }}"
valid_values: ['GITHUB_ORG']
- name: workspace_id
value: "{{ workspace_id }}"
DELETE examples​
- remove
Remove a deploy source from a workspace policy allowlist. Backed by the Railway GraphQL mutation workspacePolicyDeploySourceAllowlistRemove.
DELETE FROM railway.workspaces.workspace_policy_deploy_sources
WHERE
id = '{{ id }}' --required
;