Fork a Service
POST/projects/{project_id}/services/{service_id}/forkService
Creates a new, independent service within a project by taking a snapshot of an existing one.
Body ParametersJSON
cpu_millis: optional string
The initial CPU allocation in milli-cores, or 'shared' for a shared-resource service. If not provided, will inherit from parent service.
memory_gbs: optional string
The initial memory allocation in gigabytes, or 'shared' for a shared-resource service. If not provided, will inherit from parent service.
Fork a Service
curl http://localhost:8080/projects/$PROJECT_ID/services/$SERVICE_ID/forkService \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
-d '{
"fork_strategy": "LAST_SNAPSHOT",
"cpu_millis": "1000",
"memory_gbs": "4",
"name": "my-production-db-fork",
"target_time": "2024-01-01T00:00:00Z"
}'{
"connection_pooler": {
"endpoint": {
"host": "my-service.com",
"port": 8080
}
},
"created": "2019-12-27T18:11:19.117Z",
"endpoint": {
"host": "my-service.com",
"port": 8080
},
"forked_from": {
"is_standby": false,
"project_id": "asda1b2c3",
"service_id": "bbss422fg"
},
"ha_replicas": {
"replica_count": 1,
"sync_replica_count": 1
},
"initial_password": "a-very-secure-initial-password",
"metadata": {
"environment": "environment"
},
"metrics": {
"memory_mb": 512,
"milli_cpu": 250,
"storage_mb": 1024
},
"name": "name",
"project_id": "project_id",
"read_replica_sets": [
{
"id": "alb8jicdpr",
"connection_pooler": {
"endpoint": {
"host": "my-service.com",
"port": 8080
}
},
"cpu_millis": 250,
"endpoint": {
"host": "my-service.com",
"port": 8080
},
"memory_gbs": 1,
"metadata": {
"environment": "environment"
},
"name": "reporting-replica-1",
"nodes": 2,
"status": "active"
}
],
"region_code": "us-east-1",
"resources": [
{
"id": "id",
"spec": {
"cpu_millis": 0,
"memory_gbs": 0,
"volume_type": "volume_type"
}
}
],
"service_id": "service_id",
"service_type": "TIMESCALEDB",
"status": "QUEUED",
"vpcEndpoint": {}
}Returns Examples
{
"connection_pooler": {
"endpoint": {
"host": "my-service.com",
"port": 8080
}
},
"created": "2019-12-27T18:11:19.117Z",
"endpoint": {
"host": "my-service.com",
"port": 8080
},
"forked_from": {
"is_standby": false,
"project_id": "asda1b2c3",
"service_id": "bbss422fg"
},
"ha_replicas": {
"replica_count": 1,
"sync_replica_count": 1
},
"initial_password": "a-very-secure-initial-password",
"metadata": {
"environment": "environment"
},
"metrics": {
"memory_mb": 512,
"milli_cpu": 250,
"storage_mb": 1024
},
"name": "name",
"project_id": "project_id",
"read_replica_sets": [
{
"id": "alb8jicdpr",
"connection_pooler": {
"endpoint": {
"host": "my-service.com",
"port": 8080
}
},
"cpu_millis": 250,
"endpoint": {
"host": "my-service.com",
"port": 8080
},
"memory_gbs": 1,
"metadata": {
"environment": "environment"
},
"name": "reporting-replica-1",
"nodes": 2,
"status": "active"
}
],
"region_code": "us-east-1",
"resources": [
{
"id": "id",
"spec": {
"cpu_millis": 0,
"memory_gbs": 0,
"volume_type": "volume_type"
}
}
],
"service_id": "service_id",
"service_type": "TIMESCALEDB",
"status": "QUEUED",
"vpcEndpoint": {}
}