Skip to main content

Resource Connections

Resource connections allow you to link different resources together within a project environment. For example:
  • Connect an application to a server (instance) - the application will be installed on the server
  • Connect a server to a database - security groups and networking will be configured to allow access

Create Resource Connection

  • POST /api/:projectSlug/:environmentSlug/resource-connections - Create a connection between two resources
Request Body:
Supported Resource Types:
  • instance - EC2 instances/servers
  • application - Application files
  • database - RDS databases
  • terminal - Terminal resources
  • firewall - Firewall/security group resources
  • storage_bucket - S3 storage buckets
  • bucket_explorer - Bucket explorer resources
  • static_website - Static website resources
Allowed Connections:
  • applicationinstance (Applications can only connect to instances)
  • terminalinstance (Terminals connect to instances via SSH)
  • bucket_explorerstorage_bucket or static_website (Bucket explorers connect to storage)
  • instancefirewall (Instances protected by firewalls)
Example:
Example Response:

List Resource Connections

  • GET /api/:projectSlug/:environmentSlug/resource-connections - List all connections in a project environment
Query Parameters:
  • sourceResourceType - Filter by source resource type
  • sourceResourceId - Filter by source resource ID
  • targetResourceType - Filter by target resource type
  • targetResourceId - Filter by target resource ID
  • status - Filter by connection status (pending, connecting, connected, failed, disconnected)
Example:

Get Connection Details

  • GET /api/:projectSlug/:environmentSlug/resource-connections/:connectionId - Get details of a specific connection
Example:

Update Connection

  • PATCH /api/:projectSlug/:environmentSlug/resource-connections/:connectionId - Update connection status or details
Request Body:
Connection Status Values:
  • pending - Connection created but not yet processed
  • connecting - Connection is being established
  • connected - Connection is active and configured
  • failed - Connection failed to establish
  • disconnected - Connection was disconnected
Example:

Delete Connection

  • DELETE /api/:projectSlug/:environmentSlug/resource-connections/:connectionId - Delete a resource connection (soft delete)
Example:

Get Resource Connections

  • GET /api/:projectSlug/:environmentSlug/resources/:resourceType/:resourceId/connections - Get all connections for a specific resource (both as source and target)
Example:
Example Response:

Error Responses

Error Response (Connection not allowed):