access_groups
Creates, updates, deletes, gets or lists an access_groups resource.
Overview​
| Name | access_groups |
| Type | Resource |
| Id | railway.workspaces.access_groups |
Fields​
The following fields are returned by SELECT queries:
- list
One row per AccessGroup.
| Name | Datatype | Description |
|---|---|---|
id | string | |
name | string | |
workspace_id | string | |
created_at | string (date-time) | |
role | string | (ADMIN, MEMBER, VIEWER) |
source | string | (MANUAL) |
updated_at | string (date-time) | |
workspace | object | Workspace object |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | workspace_id | Lists AccessGroup objects of a Workspace. Backed by the Railway GraphQL query workspace.accessGroups. | |
create | insert | name, role, workspace_id | Create an access group in a workspace. Backed by the Railway GraphQL mutation accessGroupCreate. | |
update | update | id | Update an access group's name or role. Backed by the Railway GraphQL mutation accessGroupUpdate. | |
delete | delete | id | Delete an access group. Backed by the Railway GraphQL mutation accessGroupDelete. |
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 | |
name | string | |
role | string | (ADMIN, MEMBER, VIEWER) |
SELECT examples​
- list
Lists AccessGroup objects of a Workspace. Backed by the Railway GraphQL query workspace.accessGroups.
SELECT
id,
name,
workspace_id,
created_at,
role,
source,
updated_at,
workspace
FROM railway.workspaces.access_groups
WHERE workspace_id = '{{ workspace_id }}' -- required
;
INSERT examples​
- create
- Manifest
Create an access group in a workspace. Backed by the Railway GraphQL mutation accessGroupCreate.
INSERT INTO railway.workspaces.access_groups (
name,
role,
workspace_id
)
SELECT
'{{ name }}' /* required */,
'{{ role }}' /* required */,
'{{ workspace_id }}' /* required */
RETURNING
id,
name,
workspace_id,
created_at,
role,
source,
updated_at,
workspace
;
# Description fields are for documentation purposes
- name: access_groups
props:
- name: name
value: "{{ name }}"
- name: role
value: "{{ role }}"
valid_values: ['ADMIN', 'MEMBER', 'VIEWER']
- name: workspace_id
value: "{{ workspace_id }}"
UPDATE examples​
- update
Update an access group's name or role. Backed by the Railway GraphQL mutation accessGroupUpdate.
UPDATE railway.workspaces.access_groups
SET
name = '{{ name }}',
role = '{{ role }}'
WHERE
id = '{{ id }}' --required
RETURNING
id,
name,
workspace_id,
created_at,
role,
source,
updated_at,
workspace;
DELETE examples​
- delete
Delete an access group. Backed by the Railway GraphQL mutation accessGroupDelete.
DELETE FROM railway.workspaces.access_groups
WHERE
id = '{{ id }}' --required
;