Skip to content

Services

Manage services, read replicas, and their associated actions.

List All Services
client.projects.services.list(stringprojectID, RequestOptionsoptions?): ServiceListResponse { connection_pooler, created, endpoint, 14 more }
GET/projects/{project_id}/services
Create a Service
client.projects.services.create(stringprojectID, ServiceCreateParams { name, addons, cpu_millis, 4 more } body, RequestOptionsoptions?): Service { connection_pooler, created, endpoint, 14 more }
POST/projects/{project_id}/services
Get a Service
client.projects.services.retrieve(stringserviceID, ServiceRetrieveParams { project_id } params, RequestOptionsoptions?): Service { connection_pooler, created, endpoint, 14 more }
GET/projects/{project_id}/services/{service_id}
Delete a Service
client.projects.services.delete(stringserviceID, ServiceDeleteParams { project_id } params, RequestOptionsoptions?): void
DELETE/projects/{project_id}/services/{service_id}
Start a Service
client.projects.services.start(stringserviceID, ServiceStartParams { project_id } params, RequestOptionsoptions?): Service { connection_pooler, created, endpoint, 14 more }
POST/projects/{project_id}/services/{service_id}/start
Stop a Service
client.projects.services.stop(stringserviceID, ServiceStopParams { project_id } params, RequestOptionsoptions?): Service { connection_pooler, created, endpoint, 14 more }
POST/projects/{project_id}/services/{service_id}/stop
Attach Service to VPC
client.projects.services.attachToVpc(stringserviceID, ServiceAttachToVpcParams { project_id, vpc_id } params, RequestOptionsoptions?): ServiceAttachToVpcResponse { message }
POST/projects/{project_id}/services/{service_id}/attachToVPC
Detach Service from VPC
client.projects.services.detachFromVpc(stringserviceID, ServiceDetachFromVpcParams { project_id, vpc_id } params, RequestOptionsoptions?): ServiceDetachFromVpcResponse { message }
POST/projects/{project_id}/services/{service_id}/detachFromVPC
Resize a Service
client.projects.services.resize(stringserviceID, ServiceResizeParams { project_id, cpu_millis, memory_gbs } params, RequestOptionsoptions?): Service { connection_pooler, created, endpoint, 14 more }
POST/projects/{project_id}/services/{service_id}/resize
Enable Connection Pooler for a Service
client.projects.services.enablePooler(stringserviceID, ServiceEnablePoolerParams { project_id } params, RequestOptionsoptions?): ServiceEnablePoolerResponse { message }
POST/projects/{project_id}/services/{service_id}/enablePooler
Disable Connection Pooler for a Service
client.projects.services.disablePooler(stringserviceID, ServiceDisablePoolerParams { project_id } params, RequestOptionsoptions?): ServiceDisablePoolerResponse { message }
POST/projects/{project_id}/services/{service_id}/disablePooler
Fork a Service
client.projects.services.forkService(stringserviceID, ServiceForkServiceParams { project_id, fork_strategy, cpu_millis, 4 more } params, RequestOptionsoptions?): Service { connection_pooler, created, endpoint, 14 more }
POST/projects/{project_id}/services/{service_id}/forkService
Update Service Password
client.projects.services.updatePassword(stringserviceID, ServiceUpdatePasswordParams { project_id, password } params, RequestOptionsoptions?): void
POST/projects/{project_id}/services/{service_id}/updatePassword
Set Environment for a Service
client.projects.services.setEnvironment(stringserviceID, ServiceSetEnvironmentParams { project_id, environment } params, RequestOptionsoptions?): ServiceSetEnvironmentResponse { message }
POST/projects/{project_id}/services/{service_id}/setEnvironment
Change HA configuration for a Service
client.projects.services.setHa(stringserviceID, ServiceSetHaParams { project_id, replica_count, sync_replica_count } params, RequestOptionsoptions?): Service { connection_pooler, created, endpoint, 14 more }
POST/projects/{project_id}/services/{service_id}/setHA
ModelsExpand Collapse
ConnectionPooler { endpoint }
endpoint?: Endpoint { host, port }
host?: string
port?: number
Endpoint { host, port }
host?: string
port?: number
EnvironmentTag = "DEV" | "PROD"

The environment tag for the service.

One of the following:
"DEV"
"PROD"
ResizeInput { cpu_millis, memory_gbs }
cpu_millis: string

The new CPU allocation in milli-cores.

memory_gbs: string

The new memory allocation in gigabytes.

Service { connection_pooler, created, endpoint, 14 more }
connection_pooler?: ConnectionPooler { endpoint }
endpoint?: Endpoint { host, port }
host?: string
port?: number
created?: string

Creation timestamp

formatdate-time
endpoint?: Endpoint { host, port }
host?: string
port?: number
forked_from?: ForkedFrom { is_standby, project_id, service_id }
is_standby?: boolean
project_id?: string
service_id?: string
ha_replicas?: HaReplicas { replica_count, sync_replica_count }
replica_count?: number

Number of high-availability replicas (all replicas are asynchronous by default).

sync_replica_count?: number

Number of synchronous high-availability replicas.

initial_password?: string

The initial password for the service.

formatpassword
metadata?: Metadata { environment }

Additional metadata for the service

environment?: string

Environment tag for the service

metrics?: Metrics | null

Resource usage metrics for the service

memory_mb?: number | null

Memory usage in megabytes

milli_cpu?: number | null

CPU usage in millicores

storage_mb?: number | null

Storage usage in megabytes

name?: string

The name of the service.

project_id?: string

The project this service belongs to.

read_replica_sets?: Array<ReadReplicaSet { id, connection_pooler, cpu_millis, 6 more } >
id?: string
connection_pooler?: ConnectionPooler { endpoint }
endpoint?: Endpoint { host, port }
host?: string
port?: number
cpu_millis?: number

CPU allocation in milli-cores.

endpoint?: Endpoint { host, port }
host?: string
port?: number
memory_gbs?: number

Memory allocation in gigabytes.

metadata?: Metadata { environment }

Additional metadata for the read replica set

environment?: string

Environment tag for the read replica set

name?: string
nodes?: number

Number of nodes in the replica set.

status?: "creating" | "active" | "resizing" | 2 more
One of the following:
"creating"
"active"
"resizing"
"deleting"
"error"
region_code?: string

The cloud region where the service is hosted.

resources?: Array<Resource>

List of resources allocated to the service

id?: string

Resource identifier

spec?: Spec { cpu_millis, memory_gbs, volume_type }

Resource specification

cpu_millis?: number

CPU allocation in millicores

memory_gbs?: number

Memory allocation in gigabytes

volume_type?: string

Type of storage volume

service_id?: string

The unique identifier for the service.

service_type?: "TIMESCALEDB" | "POSTGRES" | "VECTOR"

The type of the service.

One of the following:
"TIMESCALEDB"
"POSTGRES"
"VECTOR"
status?: "QUEUED" | "DELETING" | "CONFIGURING" | 8 more

Current status of the service

One of the following:
"QUEUED"
"DELETING"
"CONFIGURING"
"READY"
"DELETED"
"UNSTABLE"
"PAUSING"
"PAUSED"
"RESUMING"
"UPGRADING"
"OPTIMIZING"
vpcEndpoint?: unknown

VPC endpoint configuration if available

ServiceVpcInput { vpc_id }
vpc_id: string

The ID of the VPC to attach the service to.

SetEnvironmentInput { environment }
environment: "PROD" | "DEV"

The target environment for the service.

One of the following:
"PROD"
"DEV"
ServiceListResponse = Array<Service { connection_pooler, created, endpoint, 14 more } >
connection_pooler?: ConnectionPooler { endpoint }
endpoint?: Endpoint { host, port }
host?: string
port?: number
created?: string

Creation timestamp

formatdate-time
endpoint?: Endpoint { host, port }
host?: string
port?: number
forked_from?: ForkedFrom { is_standby, project_id, service_id }
is_standby?: boolean
project_id?: string
service_id?: string
ha_replicas?: HaReplicas { replica_count, sync_replica_count }
replica_count?: number

Number of high-availability replicas (all replicas are asynchronous by default).

sync_replica_count?: number

Number of synchronous high-availability replicas.

initial_password?: string

The initial password for the service.

formatpassword
metadata?: Metadata { environment }

Additional metadata for the service

environment?: string

Environment tag for the service

metrics?: Metrics | null

Resource usage metrics for the service

memory_mb?: number | null

Memory usage in megabytes

milli_cpu?: number | null

CPU usage in millicores

storage_mb?: number | null

Storage usage in megabytes

name?: string

The name of the service.

project_id?: string

The project this service belongs to.

read_replica_sets?: Array<ReadReplicaSet { id, connection_pooler, cpu_millis, 6 more } >
id?: string
connection_pooler?: ConnectionPooler { endpoint }
endpoint?: Endpoint { host, port }
host?: string
port?: number
cpu_millis?: number

CPU allocation in milli-cores.

endpoint?: Endpoint { host, port }
host?: string
port?: number
memory_gbs?: number

Memory allocation in gigabytes.

metadata?: Metadata { environment }

Additional metadata for the read replica set

environment?: string

Environment tag for the read replica set

name?: string
nodes?: number

Number of nodes in the replica set.

status?: "creating" | "active" | "resizing" | 2 more
One of the following:
"creating"
"active"
"resizing"
"deleting"
"error"
region_code?: string

The cloud region where the service is hosted.

resources?: Array<Resource>

List of resources allocated to the service

id?: string

Resource identifier

spec?: Spec { cpu_millis, memory_gbs, volume_type }

Resource specification

cpu_millis?: number

CPU allocation in millicores

memory_gbs?: number

Memory allocation in gigabytes

volume_type?: string

Type of storage volume

service_id?: string

The unique identifier for the service.

service_type?: "TIMESCALEDB" | "POSTGRES" | "VECTOR"

The type of the service.

One of the following:
"TIMESCALEDB"
"POSTGRES"
"VECTOR"
status?: "QUEUED" | "DELETING" | "CONFIGURING" | 8 more

Current status of the service

One of the following:
"QUEUED"
"DELETING"
"CONFIGURING"
"READY"
"DELETED"
"UNSTABLE"
"PAUSING"
"PAUSED"
"RESUMING"
"UPGRADING"
"OPTIMIZING"
vpcEndpoint?: unknown

VPC endpoint configuration if available

ServiceAttachToVpcResponse { message }
message?: string
ServiceDetachFromVpcResponse { message }
message?: string
ServiceEnablePoolerResponse { message }
message?: string
ServiceDisablePoolerResponse { message }
message?: string
ServiceSetEnvironmentResponse { message }
message?: string

ServicesReplica Sets

Get Read Replica Sets
client.projects.services.replicaSets.retrieveReplicaSets(stringserviceID, ReplicaSetRetrieveReplicaSetsParams { project_id } params, RequestOptionsoptions?): ReplicaSetRetrieveReplicaSetsResponse { id, connection_pooler, cpu_millis, 6 more }
GET/projects/{project_id}/services/{service_id}/replicaSets
Create a Read Replica Set
client.projects.services.replicaSets.replicaSets(stringserviceID, ReplicaSetReplicaSetsParams { project_id, cpu_millis, memory_gbs, 2 more } params, RequestOptionsoptions?): ReadReplicaSet { id, connection_pooler, cpu_millis, 6 more }
POST/projects/{project_id}/services/{service_id}/replicaSets
Delete a Read Replica Set
client.projects.services.replicaSets.delete(stringreplicaSetID, ReplicaSetDeleteParams { project_id, service_id } params, RequestOptionsoptions?): void
DELETE/projects/{project_id}/services/{service_id}/replicaSets/{replica_set_id}
Resize a Read Replica Set
client.projects.services.replicaSets.resize(stringreplicaSetID, ReplicaSetResizeParams { project_id, service_id, cpu_millis, memory_gbs } params, RequestOptionsoptions?): void
POST/projects/{project_id}/services/{service_id}/replicaSets/{replica_set_id}/resize
Enable Connection Pooler for a Read Replica
client.projects.services.replicaSets.enablePooler(stringreplicaSetID, ReplicaSetEnablePoolerParams { project_id, service_id } params, RequestOptionsoptions?): ReplicaSetEnablePoolerResponse { message }
POST/projects/{project_id}/services/{service_id}/replicaSets/{replica_set_id}/enablePooler
Disable Connection Pooler for a Read Replica
client.projects.services.replicaSets.disablePooler(stringreplicaSetID, ReplicaSetDisablePoolerParams { project_id, service_id } params, RequestOptionsoptions?): ReplicaSetDisablePoolerResponse { message }
POST/projects/{project_id}/services/{service_id}/replicaSets/{replica_set_id}/disablePooler
Set Environment for a Read Replica
client.projects.services.replicaSets.setEnvironment(stringreplicaSetID, ReplicaSetSetEnvironmentParams { project_id, service_id, environment } params, RequestOptionsoptions?): ReplicaSetSetEnvironmentResponse { message }
POST/projects/{project_id}/services/{service_id}/replicaSets/{replica_set_id}/setEnvironment
ModelsExpand Collapse
ReadReplicaSet { id, connection_pooler, cpu_millis, 6 more }
id?: string
connection_pooler?: ConnectionPooler { endpoint }
endpoint?: Endpoint { host, port }
host?: string
port?: number
cpu_millis?: number

CPU allocation in milli-cores.

endpoint?: Endpoint { host, port }
host?: string
port?: number
memory_gbs?: number

Memory allocation in gigabytes.

metadata?: Metadata { environment }

Additional metadata for the read replica set

environment?: string

Environment tag for the read replica set

name?: string
nodes?: number

Number of nodes in the replica set.

status?: "creating" | "active" | "resizing" | 2 more
One of the following:
"creating"
"active"
"resizing"
"deleting"
"error"
ReplicaSetRetrieveReplicaSetsResponse = Array<ReadReplicaSet { id, connection_pooler, cpu_millis, 6 more } >
id?: string
connection_pooler?: ConnectionPooler { endpoint }
endpoint?: Endpoint { host, port }
host?: string
port?: number
cpu_millis?: number

CPU allocation in milli-cores.

endpoint?: Endpoint { host, port }
host?: string
port?: number
memory_gbs?: number

Memory allocation in gigabytes.

metadata?: Metadata { environment }

Additional metadata for the read replica set

environment?: string

Environment tag for the read replica set

name?: string
nodes?: number

Number of nodes in the replica set.

status?: "creating" | "active" | "resizing" | 2 more
One of the following:
"creating"
"active"
"resizing"
"deleting"
"error"
ReplicaSetEnablePoolerResponse { message }
message?: string
ReplicaSetDisablePoolerResponse { message }
message?: string
ReplicaSetSetEnvironmentResponse { message }
message?: string