Change HA configuration for a Service
POST/projects/{project_id}/services/{service_id}/setHA
Changes the HA configuration for a specific service. This is an asynchronous operation.
Change HA configuration for a Service
curl http://localhost:8080/projects/$PROJECT_ID/services/$SERVICE_ID/setHA \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $TIGER_CLOUD_API_KEY" \
-d '{
"replica_count": 1,
"sync_replica_count": 1
}'{
"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": {}
}