Service actions

Service-scoped server actions: CRUD, deploy, scale, domains, volumes, backups, Nginx; RBAC via getActionAccess.

Written By Zoro

Last updated 3 days ago

Server Actions

These Server Actions implement most Service lifecycle work in the dashboard: provisioning, configuration, deploys, routing, scaling, and backups. Implementation is concentrated in packages/core/src/actions/service/index.ts with related pieces in deployment/, backups/, dbBackup/, and unifiedDeployment/ where noted.

RBAC: Permission keys for each actionName are defined in packages/core/src/lib/permissions/config.ts inside getActionAccess.

Create, update, delete

actionNamePermission keys (from getActionAccess)
createServiceActionservices.create, projects.read, services.read
createAppServiceActionservices.create, projects.read, services.read, environments.read
createDatabaseServiceActionservices.create, projects.read, services.read, environments.read
updateServiceActionservices.read, services.update
deleteServiceActionservices.delete, services.read

Deploy, stop, restart

actionNamePermission keys (from getActionAccess)
createDeploymentActionservices.read, services.update
restartServiceActionservices.read, services.update
stopServiceActionservices.read, services.update
createUnifiedDeploymentActionprojects.create, projects.read, services.create, services.read, servers.read, servers.update, services.update, projects.update

createUnifiedDeploymentAction coordinates multi-service / project-style deploy flows; see packages/core/src/actions/unifiedDeployment/index.ts.

Domains, TLS, routing

actionNamePermission keys (from getActionAccess)
updateServiceDomainActionservices.read, services.update
syncServiceDomainActionservices.read, services.update
regenerateSSLActionservices.read, services.update
markDefaultServiceDomainActionservices.update
getCustomDomainDNSRecordsActionservices.read
getServiceNginxConfigActionservices.read
setServiceNginxConfigSchemaservices.update

Customer tasks: Domains and SSL under Deployments and Operations in the sidebar and Proxy and routing under Deployments and Operations in the sidebar.

Scaling and resources

actionNamePermission keys (from getActionAccess)
scaleServiceActionservices.read
fetchServiceScaleStatusActionservices.read
getServiceScalingDetailsActionservices.read
setServiceResourceLimitActionservices.read
setServiceResourceReserveActionservices.read
fetchServiceResourceStatusActionservices.read
clearServiceResourceLimitActionservices.read
clearServiceResourceReserveActionservices.read
checkServerResourcesActionservices.read

Volumes and uploads

actionNamePermission keys (from getActionAccess)
updateVolumesActionservices.read, services.update
requestFileSourceUploadActionservices.read, services.update

Database-specific service operations

actionNamePermission keys (from getActionAccess)
exposeDatabasePortActionservices.read, services.update

Reads and aggregates

actionNamePermission keys (from getActionAccess)
getServiceDetailsservices.read
getServiceDeploymentsBackupsservices.read
getServiceBackupsbackups.read
getProjectServicesReplicasActionprojects.read
getDeploymentsActionservices.read

Internal backups (database Services)

actionNamePermission keys (from getActionAccess)
internalBackupActionbackups.create, services.read
internalRestoreActionbackups.read, services.read, backups.update
internalDbDeleteActionservices.read, backups.delete, backups.read
getAllBackupsActionbackups.read, backups.update

Customer guide: Backups under Deployments and Operations in the sidebar.

Learn more