From 74dcfebf2a859136743a353f8f01e3db7f25d7ac Mon Sep 17 00:00:00 2001 From: Jason Lynch Date: Sun, 8 Feb 2026 15:06:40 -0500 Subject: [PATCH 1/5] feat: add all instance fields to list-databases Reshapes the list-databases response for two main reasons: - Goa's views do not become separate types in the OpenAPI output, which causes problems for every other generated client. - To add more fields to the instances in the list to reduce the number of calls to get instance role and other information for all instances managed by the cluster. PLAT-426 --- api/apiv1/design/api.go | 4 +- api/apiv1/design/database.go | 436 +- api/apiv1/design/instance.go | 216 +- api/apiv1/gen/control_plane/endpoints.go | 14 +- api/apiv1/gen/control_plane/service.go | 1666 +- api/apiv1/gen/control_plane/views/view.go | 1967 -- api/apiv1/gen/http/cli/control_plane/cli.go | 2 +- .../gen/http/control_plane/client/cli.go | 2 +- .../control_plane/client/encode_decode.go | 1010 +- .../gen/http/control_plane/client/types.go | 759 +- .../control_plane/server/encode_decode.go | 865 +- .../gen/http/control_plane/server/types.go | 129 +- api/apiv1/gen/http/openapi.json | 3313 +-- api/apiv1/gen/http/openapi.yaml | 2723 +- api/apiv1/gen/http/openapi3.json | 21151 ++++++++++------ api/apiv1/gen/http/openapi3.yaml | 12443 ++++++--- changes/unreleased/Added-20260209-091526.yaml | 3 + .../unreleased/Changed-20260209-091536.yaml | 3 + server/internal/api/apiv1/convert.go | 58 +- .../internal/api/apiv1/post_init_handlers.go | 6 +- 20 files changed, 26498 insertions(+), 20272 deletions(-) delete mode 100644 api/apiv1/gen/control_plane/views/view.go create mode 100644 changes/unreleased/Added-20260209-091526.yaml create mode 100644 changes/unreleased/Changed-20260209-091536.yaml diff --git a/api/apiv1/design/api.go b/api/apiv1/design/api.go index 44922013..7cbb4c72 100644 --- a/api/apiv1/design/api.go +++ b/api/apiv1/design/api.go @@ -248,9 +248,7 @@ var _ = g.Service("control-plane", func() { g.Required("database_id") }) - g.Result(Database, func() { - g.View("default") - }) + g.Result(Database) g.Error("cluster_not_initialized") g.Error("invalid_input") g.Error("not_found") diff --git a/api/apiv1/design/database.go b/api/apiv1/design/database.go index 43d33794..0300cbd1 100644 --- a/api/apiv1/design/database.go +++ b/api/apiv1/design/database.go @@ -509,83 +509,98 @@ var DatabaseSpec = g.Type("DatabaseSpec", func() { g.Required("database_name", "nodes") }) -var Database = g.ResultType("Database", func() { - g.Attributes(func() { - g.Attribute("id", Identifier, func() { - g.Description("Unique identifier for the database.") - g.Example("production") - g.Example("my-app") - g.Example("02f1a7db-fca8-4521-b57a-2a375c1ced51") - }) - g.Attribute("tenant_id", Identifier, func() { - g.Description("Unique identifier for the databases's owner.") - g.Example("engineering") - g.Example("8210ec10-2dca-406c-ac4a-0661d2189954") - }) - g.Attribute("created_at", g.String, func() { - g.Format(g.FormatDateTime) - g.Description("The time that the database was created.") - g.Example("2025-01-01T01:30:00Z") - }) - g.Attribute("updated_at", g.String, func() { - g.Format(g.FormatDateTime) - g.Description("The time that the database was last updated.") - g.Example("2025-01-01T02:30:00Z") - }) - g.Attribute("state", g.String, func() { - g.Description("Current state of the database.") - g.Enum( - "creating", - "modifying", - "available", - "deleting", - "degraded", - "failed", - "backing_up", - "restoring", - "unknown", - ) - }) - g.Attribute("instances", g.CollectionOf(Instance), func() { - g.Description("All of the instances in the database.") - }) - g.Attribute("service_instances", g.CollectionOf(ServiceInstance), func() { - g.Description("Service instances running alongside this database.") - }) - g.Attribute("spec", DatabaseSpec, func() { - g.Description("The user-provided specification for the database.") - }) +var Database = g.Type("Database", func() { + g.Attribute("id", Identifier, func() { + g.Description("Unique identifier for the database.") + g.Example("production") + g.Example("my-app") + g.Example("02f1a7db-fca8-4521-b57a-2a375c1ced51") + }) + g.Attribute("tenant_id", Identifier, func() { + g.Description("Unique identifier for the database's owner.") + g.Example("engineering") + g.Example("8210ec10-2dca-406c-ac4a-0661d2189954") + }) + g.Attribute("created_at", g.String, func() { + g.Format(g.FormatDateTime) + g.Description("The time that the database was created.") + g.Example("2025-01-01T01:30:00Z") + }) + g.Attribute("updated_at", g.String, func() { + g.Format(g.FormatDateTime) + g.Description("The time that the database was last updated.") + g.Example("2025-01-01T02:30:00Z") + }) + g.Attribute("state", g.String, func() { + g.Description("Current state of the database.") + g.Enum( + "creating", + "modifying", + "available", + "deleting", + "degraded", + "failed", + "backing_up", + "restoring", + "unknown", + ) + }) + g.Attribute("instances", g.ArrayOf(Instance), func() { + g.Description("All of the instances in the database.") + }) + g.Attribute("service_instances", g.ArrayOf(ServiceInstance), func() { + g.Description("Service instances running alongside this database.") + }) + g.Attribute("spec", DatabaseSpec, func() { + g.Description("The user-provided specification for the database.") }) - g.View("default", func() { - g.Attribute("id") - g.Attribute("tenant_id") - g.Attribute("created_at") - g.Attribute("updated_at") - g.Attribute("state") - g.Attribute("instances", func() { - g.View("default") - }) - g.Attribute("service_instances", func() { - g.View("default") - }) - g.Attribute("spec") + g.Example(exampleDatabase) - g.Example(exampleDatabase) - }) + g.Required("id", "created_at", "updated_at", "state") +}) - g.View("abbreviated", func() { - g.Attribute("id") - g.Attribute("tenant_id") - g.Attribute("created_at") - g.Attribute("updated_at") - g.Attribute("state") - g.Attribute("instances", func() { - g.View("abbreviated") - }) +var DatabaseSummary = g.Type("DatabaseSummary", func() { + g.Attribute("id", Identifier, func() { + g.Description("Unique identifier for the database.") + g.Example("production") + g.Example("my-app") + g.Example("02f1a7db-fca8-4521-b57a-2a375c1ced51") }) - - g.Required("id", "created_at", "updated_at", "state", "instances", "service_instances") + g.Attribute("tenant_id", Identifier, func() { + g.Description("Unique identifier for the database's owner.") + g.Example("engineering") + g.Example("8210ec10-2dca-406c-ac4a-0661d2189954") + }) + g.Attribute("created_at", g.String, func() { + g.Format(g.FormatDateTime) + g.Description("The time that the database was created.") + g.Example("2025-01-01T01:30:00Z") + }) + g.Attribute("updated_at", g.String, func() { + g.Format(g.FormatDateTime) + g.Description("The time that the database was last updated.") + g.Example("2025-01-01T02:30:00Z") + }) + g.Attribute("state", g.String, func() { + g.Description("Current state of the database.") + g.Enum( + "creating", + "modifying", + "available", + "deleting", + "degraded", + "failed", + "backing_up", + "restoring", + "unknown", + ) + }) + g.Attribute("instances", g.ArrayOf(Instance), func() { + g.Description("All of the instances in the database.") + }) + + g.Required("id", "created_at", "updated_at", "state") }) var CreateDatabaseRequest = g.Type("CreateDatabaseRequest", func() { @@ -596,7 +611,7 @@ var CreateDatabaseRequest = g.Type("CreateDatabaseRequest", func() { g.Example("02f1a7db-fca8-4521-b57a-2a375c1ced51") }) g.Attribute("tenant_id", Identifier, func() { - g.Description("Unique identifier for the databases's owner.") + g.Description("Unique identifier for the database's owner.") g.Example("engineering") g.Example("8210ec10-2dca-406c-ac4a-0661d2189954") }) @@ -925,7 +940,7 @@ var CreateDatabaseResponse = g.Type("CreateDatabaseResponse", func() { var UpdateDatabaseRequest = g.Type("UpdateDatabaseRequest", func() { g.Attribute("tenant_id", Identifier, func() { - g.Description("Unique identifier for the databases's owner.") + g.Description("Unique identifier for the database's owner.") g.Example("engineering") g.Example("8210ec10-2dca-406c-ac4a-0661d2189954") }) @@ -1276,69 +1291,240 @@ var ExtraVolumesSpec = g.Type("ExtraVolumesSpec", func() { g.Required("host_path", "destination_path") }) -var ListDatabasesResponse = g.ResultType("ListDatabasesResponse", func() { - g.TypeName("ListDatabasesResponse") - g.Attributes(func() { - g.Attribute("databases", g.CollectionOf(Database), func() { - g.View("abbreviated") - }) +var ListDatabasesResponse = g.Type("ListDatabasesResponse", func() { + g.Attribute("databases", g.ArrayOf(DatabaseSummary), func() { + g.Description("The databases managed by this cluster.") + }) - g.Example(map[string]any{ - "databases": []map[string]any{ - { - "created_at": "2025-06-17T20:05:10Z", - "id": "inventory", - "instances": []map[string]any{ - { - "host_id": "us-east-1", - "id": "inventory-n1-689qacsi", - "node_name": "n1", - "state": "available", + g.Example(map[string]any{ + "databases": []map[string]any{ + { + "created_at": "2025-06-17T20:05:10Z", + "id": "inventory", + "instances": []map[string]any{ + { + "connection_info": map[string]any{ + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432, }, - { - "host_id": "ap-south-1", - "id": "inventory-n2-9ptayhma", - "node_name": "n2", - "state": "available", + "created_at": "2025-06-17T20:05:10Z", + "host_id": "us-east-1", + "id": "inventory-n1-689qacsi", + "node_name": "n1", + "postgres": map[string]any{ + "patroni_state": "running", + "role": "primary", + "version": "18.1", }, - { - "host_id": "eu-central-1", - "id": "inventory-n3-ant97dj4", - "node_name": "n3", - "state": "available", + "spock": map[string]any{ + "read_only": "off", + "subscriptions": []any{ + map[string]any{ + "name": "sub_n1n3", + "provider_node": "n3", + "status": "replicating", + }, + map[string]any{ + "name": "sub_n1n2", + "provider_node": "n2", + "status": "replicating", + }, + }, + "version": "4.0.10", }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-17T20:05:10Z", + }, + { + "connection_info": map[string]any{ + "hostname": "i-058731542fee493f.ec2.internal", + "ipv4_address": "10.24.35.2", + "port": 5432, + }, + "created_at": "2025-06-17T20:05:10Z", + "host_id": "ap-south-1", + "id": "inventory-n2-9ptayhma", + "node_name": "n2", + "postgres": map[string]any{ + "patroni_state": "running", + "role": "primary", + "version": "18.1", + }, + "spock": map[string]any{ + "read_only": "off", + "subscriptions": []any{ + map[string]any{ + "name": "sub_n2n1", + "provider_node": "n1", + "status": "replicating", + }, + map[string]any{ + "name": "sub_n2n3", + "provider_node": "n3", + "status": "replicating", + }, + }, + "version": "4.0.10", + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-17T20:05:10Z", + }, + { + "connection_info": map[string]any{ + "hostname": "i-494027b7b53f6a23.ec2.internal", + "ipv4_address": "10.24.36.2", + "port": 5432, + }, + "created_at": "2025-06-17T20:05:10Z", + "host_id": "eu-central-1", + "id": "inventory-n3-ant97dj4", + "node_name": "n3", + "postgres": map[string]any{ + "patroni_state": "running", + "role": "primary", + "version": "18.1", + }, + "spock": map[string]any{ + "read_only": "off", + "subscriptions": []any{ + map[string]any{ + "name": "sub_n3n1", + "provider_node": "n1", + "status": "replicating", + }, + map[string]any{ + "name": "sub_n3n2", + "provider_node": "n2", + "status": "replicating", + }, + }, + "version": "4.0.10", + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-17T20:05:10Z", }, - "state": "available", - "updated_at": "2025-06-17T20:05:10Z", }, - { - "created_at": "2025-06-17T20:05:10Z", - "id": "storefront", - "instances": []map[string]any{ - { - "host_id": "us-east-1", - "id": "storefront-n1-689qacsi", - "node_name": "n1", - "state": "available", + "state": "available", + "updated_at": "2025-06-17T20:05:10Z", + }, + { + "created_at": "2025-06-12T15:10:05Z", + "id": "storefront", + "instances": []map[string]any{ + { + "connection_info": map[string]any{ + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 6432, + }, + "created_at": "2025-06-12T15:10:05Z", + "host_id": "us-east-1", + "id": "storefront-n1-689qacsi", + "node_name": "n1", + "postgres": map[string]any{ + "patroni_state": "running", + "role": "primary", + "version": "18.1", + }, + "spock": map[string]any{ + "read_only": "off", + "subscriptions": []any{ + map[string]any{ + "name": "sub_n1n3", + "provider_node": "n3", + "status": "replicating", + }, + map[string]any{ + "name": "sub_n1n2", + "provider_node": "n2", + "status": "replicating", + }, + }, + "version": "4.0.10", + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-12T15:10:05Z", + }, + { + "connection_info": map[string]any{ + "hostname": "i-058731542fee493f.ec2.internal", + "ipv4_address": "10.24.35.2", + "port": 6432, + }, + "created_at": "2025-06-12T15:10:05Z", + "host_id": "ap-south-1", + "id": "storefront-n2-9ptayhma", + "node_name": "n2", + "postgres": map[string]any{ + "patroni_state": "running", + "role": "primary", + "version": "18.1", + }, + "spock": map[string]any{ + "read_only": "off", + "subscriptions": []any{ + map[string]any{ + "name": "sub_n2n1", + "provider_node": "n1", + "status": "replicating", + }, + map[string]any{ + "name": "sub_n2n3", + "provider_node": "n3", + "status": "replicating", + }, + }, + "version": "4.0.10", }, - { - "host_id": "ap-south-1", - "id": "storefront-n2-9ptayhma", - "node_name": "n2", - "state": "available", + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-12T15:10:05Z", + }, + { + "connection_info": map[string]any{ + "hostname": "i-494027b7b53f6a23.ec2.internal", + "ipv4_address": "10.24.36.2", + "port": 6432, }, - { - "host_id": "eu-central-1", - "id": "storefront-n3-ant97dj4", - "node_name": "n3", - "state": "available", + "created_at": "2025-06-12T15:10:05Z", + "host_id": "eu-central-1", + "id": "storefront-n3-ant97dj4", + "node_name": "n3", + "postgres": map[string]any{ + "patroni_state": "running", + "role": "primary", + "version": "18.1", }, + "spock": map[string]any{ + "read_only": "off", + "subscriptions": []any{ + map[string]any{ + "name": "sub_n3n1", + "provider_node": "n1", + "status": "replicating", + }, + map[string]any{ + "name": "sub_n3n2", + "provider_node": "n2", + "status": "replicating", + }, + }, + "version": "4.0.10", + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-12T15:10:05Z", }, - "state": "available", - "updated_at": "2025-06-12T15:10:05Z", }, + "state": "available", + "updated_at": "2025-06-12T15:10:05Z", }, - }) + }, }) }) diff --git a/api/apiv1/design/instance.go b/api/apiv1/design/instance.go index 6bed1699..e0a7cf6e 100644 --- a/api/apiv1/design/instance.go +++ b/api/apiv1/design/instance.go @@ -109,79 +109,56 @@ var InstanceSpockStatus = g.Type("InstanceSpockStatus", func() { }) }) -var Instance = g.ResultType("Instance", func() { +var Instance = g.Type("Instance", func() { g.Description("An instance of pgEdge Postgres running on a host.") - g.Attributes(func() { - g.Attribute("id", g.String, func() { - g.Description("Unique identifier for the instance.") - g.Example("a67cbb36-c3c3-49c9-8aac-f4a0438a883d") - }) - g.Attribute("host_id", g.String, func() { - g.Description("The ID of the host this instance is running on.") - g.Example("de3b1388-1f0c-42f1-a86c-59ab72f255ec") - }) - g.Attribute("node_name", g.String, func() { - g.Description("The Spock node name for this instance.") - g.Example("n1") - }) - g.Attribute("created_at", g.String, func() { - g.Format(g.FormatDateTime) - g.Description("The time that the instance was created.") - }) - g.Attribute("updated_at", g.String, func() { - g.Format(g.FormatDateTime) - g.Description("The time that the instance was last modified.") - }) - g.Attribute("status_updated_at", g.String, func() { - g.Format(g.FormatDateTime) - g.Description("The time that the instance status information was last updated.") - }) - g.Attribute("state", g.String, func() { - g.Enum( - "creating", - "modifying", - "backing_up", - "available", - "degraded", - "failed", - "stopped", - "unknown", - ) - }) - g.Attribute("connection_info", InstanceConnectionInfo, func() { - g.Description("Connection information for the instance.") - }) - g.Attribute("postgres", InstancePostgresStatus, func() { - g.Description("Postgres status information for the instance.") - }) - g.Attribute("spock", InstanceSpockStatus, func() { - g.Description("Spock status information for the instance.") - }) - g.Attribute("error", g.String, func() { - g.Description("An error message if the instance is in an error state.") - g.Example("failed to get patroni status: connection refused") - }) + g.Attribute("id", g.String, func() { + g.Description("Unique identifier for the instance.") + g.Example("a67cbb36-c3c3-49c9-8aac-f4a0438a883d") }) - - g.View("default", func() { - g.Attribute("id") - g.Attribute("host_id") - g.Attribute("node_name") - g.Attribute("created_at") - g.Attribute("updated_at") - g.Attribute("status_updated_at") - g.Attribute("state") - g.Attribute("connection_info") - g.Attribute("postgres") - g.Attribute("spock") - g.Attribute("error") + g.Attribute("host_id", g.String, func() { + g.Description("The ID of the host this instance is running on.") + g.Example("de3b1388-1f0c-42f1-a86c-59ab72f255ec") }) - - g.View("abbreviated", func() { - g.Attribute("id") - g.Attribute("host_id") - g.Attribute("node_name") - g.Attribute("state") + g.Attribute("node_name", g.String, func() { + g.Description("The Spock node name for this instance.") + g.Example("n1") + }) + g.Attribute("created_at", g.String, func() { + g.Format(g.FormatDateTime) + g.Description("The time that the instance was created.") + }) + g.Attribute("updated_at", g.String, func() { + g.Format(g.FormatDateTime) + g.Description("The time that the instance was last modified.") + }) + g.Attribute("status_updated_at", g.String, func() { + g.Format(g.FormatDateTime) + g.Description("The time that the instance status information was last updated.") + }) + g.Attribute("state", g.String, func() { + g.Enum( + "creating", + "modifying", + "backing_up", + "available", + "degraded", + "failed", + "stopped", + "unknown", + ) + }) + g.Attribute("connection_info", InstanceConnectionInfo, func() { + g.Description("Connection information for the instance.") + }) + g.Attribute("postgres", InstancePostgresStatus, func() { + g.Description("Postgres status information for the instance.") + }) + g.Attribute("spock", InstanceSpockStatus, func() { + g.Description("Spock status information for the instance.") + }) + g.Attribute("error", g.String, func() { + g.Description("An error message if the instance is in an error state.") + g.Example("failed to get patroni status: connection refused") }) g.Required("id", "host_id", "node_name", "created_at", "updated_at", "state") @@ -267,64 +244,51 @@ var ServiceInstanceStatus = g.Type("ServiceInstanceStatus", func() { }) }) -var ServiceInstance = g.ResultType("ServiceInstance", func() { +var ServiceInstance = g.Type("ServiceInstance", func() { g.Description("A service instance running on a host alongside the database.") - g.Attributes(func() { - g.Attribute("service_instance_id", g.String, func() { - g.Description("Unique identifier for the service instance.") - g.Example("mcp-server-host-1") - }) - g.Attribute("service_id", g.String, func() { - g.Description("The service ID from the DatabaseSpec.") - g.Example("mcp-server") - }) - g.Attribute("database_id", Identifier, func() { - g.Description("The ID of the database this service belongs to.") - g.Example("production") - }) - g.Attribute("host_id", g.String, func() { - g.Description("The ID of the host this service instance is running on.") - g.Example("host-1") - }) - g.Attribute("state", g.String, func() { - g.Description("Current state of the service instance.") - g.Enum( - "creating", - "running", - "failed", - "deleting", - ) - g.Example("running") - }) - g.Attribute("status", ServiceInstanceStatus, func() { - g.Description("Runtime status information for the service instance.") - }) - g.Attribute("created_at", g.String, func() { - g.Format(g.FormatDateTime) - g.Description("The time that the service instance was created.") - g.Example("2025-01-28T10:00:00Z") - }) - g.Attribute("updated_at", g.String, func() { - g.Format(g.FormatDateTime) - g.Description("The time that the service instance was last updated.") - g.Example("2025-01-28T10:05:00Z") - }) - g.Attribute("error", g.String, func() { - g.Description("An error message if the service instance is in an error state.") - g.Example("failed to start container: image not found") - }) - }) - g.View("default", func() { - g.Attribute("service_instance_id") - g.Attribute("service_id") - g.Attribute("database_id") - g.Attribute("host_id") - g.Attribute("state") - g.Attribute("status") - g.Attribute("created_at") - g.Attribute("updated_at") - g.Attribute("error") + g.Attribute("service_instance_id", g.String, func() { + g.Description("Unique identifier for the service instance.") + g.Example("mcp-server-host-1") + }) + g.Attribute("service_id", g.String, func() { + g.Description("The service ID from the DatabaseSpec.") + g.Example("mcp-server") + }) + g.Attribute("database_id", Identifier, func() { + g.Description("The ID of the database this service belongs to.") + g.Example("production") + }) + g.Attribute("host_id", g.String, func() { + g.Description("The ID of the host this service instance is running on.") + g.Example("host-1") + }) + g.Attribute("state", g.String, func() { + g.Description("Current state of the service instance.") + g.Enum( + "creating", + "running", + "failed", + "deleting", + ) + g.Example("running") + }) + g.Attribute("status", ServiceInstanceStatus, func() { + g.Description("Runtime status information for the service instance.") + }) + g.Attribute("created_at", g.String, func() { + g.Format(g.FormatDateTime) + g.Description("The time that the service instance was created.") + g.Example("2025-01-28T10:00:00Z") + }) + g.Attribute("updated_at", g.String, func() { + g.Format(g.FormatDateTime) + g.Description("The time that the service instance was last updated.") + g.Example("2025-01-28T10:05:00Z") + }) + g.Attribute("error", g.String, func() { + g.Description("An error message if the service instance is in an error state.") + g.Example("failed to start container: image not found") }) g.Required("service_instance_id", "service_id", "database_id", "host_id", "state", "created_at", "updated_at") diff --git a/api/apiv1/gen/control_plane/endpoints.go b/api/apiv1/gen/control_plane/endpoints.go index db650d1a..0153376b 100644 --- a/api/apiv1/gen/control_plane/endpoints.go +++ b/api/apiv1/gen/control_plane/endpoints.go @@ -188,12 +188,7 @@ func NewRemoveHostEndpoint(s Service) goa.Endpoint { // "list-databases" of service "control-plane". func NewListDatabasesEndpoint(s Service) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { - res, err := s.ListDatabases(ctx) - if err != nil { - return nil, err - } - vres := NewViewedListDatabasesResponse(res, "default") - return vres, nil + return s.ListDatabases(ctx) } } @@ -211,12 +206,7 @@ func NewCreateDatabaseEndpoint(s Service) goa.Endpoint { func NewGetDatabaseEndpoint(s Service) goa.Endpoint { return func(ctx context.Context, req any) (any, error) { p := req.(*GetDatabasePayload) - res, err := s.GetDatabase(ctx, p) - if err != nil { - return nil, err - } - vres := NewViewedDatabase(res, "default") - return vres, nil + return s.GetDatabase(ctx, p) } } diff --git a/api/apiv1/gen/control_plane/service.go b/api/apiv1/gen/control_plane/service.go index b05a3d50..1133f443 100644 --- a/api/apiv1/gen/control_plane/service.go +++ b/api/apiv1/gen/control_plane/service.go @@ -10,7 +10,6 @@ package controlplane import ( "context" - controlplaneviews "github.com/pgEdge/control-plane/api/apiv1/gen/control_plane/views" goa "goa.design/goa/v3/pkg" ) @@ -288,7 +287,7 @@ type ComponentStatus struct { type CreateDatabaseRequest struct { // Unique identifier for the database. ID *Identifier - // Unique identifier for the databases's owner. + // Unique identifier for the database's owner. TenantID *Identifier // The specification for the database. Spec *DatabaseSpec @@ -307,7 +306,7 @@ type CreateDatabaseResponse struct { type Database struct { // Unique identifier for the database. ID Identifier - // Unique identifier for the databases's owner. + // Unique identifier for the database's owner. TenantID *Identifier // The time that the database was created. CreatedAt string @@ -316,15 +315,13 @@ type Database struct { // Current state of the database. State string // All of the instances in the database. - Instances InstanceCollection + Instances []*Instance // Service instances running alongside this database. - ServiceInstances ServiceinstanceCollection + ServiceInstances []*ServiceInstance // The user-provided specification for the database. Spec *DatabaseSpec } -type DatabaseCollection []*Database - type DatabaseNodeSpec struct { // The name of the database node. Name string @@ -403,6 +400,21 @@ type DatabaseSpec struct { OrchestratorOpts *OrchestratorOpts } +type DatabaseSummary struct { + // Unique identifier for the database. + ID Identifier + // Unique identifier for the database's owner. + TenantID *Identifier + // The time that the database was created. + CreatedAt string + // The time that the database was last updated. + UpdatedAt string + // Current state of the database. + State string + // All of the instances in the database. + Instances []*Instance +} + type DatabaseUserSpec struct { // The username for this database user. Username string @@ -633,8 +645,6 @@ type Instance struct { Error *string } -type InstanceCollection []*Instance - // Connection information for a pgEdge instance. type InstanceConnectionInfo struct { // The hostname of the host that's running this instance. @@ -699,7 +709,8 @@ type ListDatabaseTasksResponse struct { // ListDatabasesResponse is the result type of the control-plane service // list-databases method. type ListDatabasesResponse struct { - Databases DatabaseCollection + // The databases managed by this cluster. + Databases []*DatabaseSummary } // ListHostTasksPayload is the payload type of the control-plane service @@ -894,6 +905,28 @@ type RestoreRepositorySpec struct { CustomOptions map[string]string } +// A service instance running on a host alongside the database. +type ServiceInstance struct { + // Unique identifier for the service instance. + ServiceInstanceID string + // The service ID from the DatabaseSpec. + ServiceID string + // The ID of the database this service belongs to. + DatabaseID Identifier + // The ID of the host this service instance is running on. + HostID string + // Current state of the service instance. + State string + // Runtime status information for the service instance. + Status *ServiceInstanceStatus + // The time that the service instance was created. + CreatedAt string + // The time that the service instance was last updated. + UpdatedAt string + // An error message if the service instance is in an error state. + Error *string +} + // Runtime status information for a service instance. type ServiceInstanceStatus struct { // The Docker container ID. @@ -941,30 +974,6 @@ type ServiceSpec struct { Memory *string } -// A service instance running on a host alongside the database. -type Serviceinstance struct { - // Unique identifier for the service instance. - ServiceInstanceID string - // The service ID from the DatabaseSpec. - ServiceID string - // The ID of the database this service belongs to. - DatabaseID Identifier - // The ID of the host this service instance is running on. - HostID string - // Current state of the service instance. - State string - // Runtime status information for the service instance. - Status *ServiceInstanceStatus - // The time that the service instance was created. - CreatedAt string - // The time that the service instance was last updated. - UpdatedAt string - // An error message if the service instance is in an error state. - Error *string -} - -type ServiceinstanceCollection []*Serviceinstance - // StartInstancePayload is the payload type of the control-plane service // start-instance method. type StartInstancePayload struct { @@ -1105,7 +1114,7 @@ type UpdateDatabasePayload struct { } type UpdateDatabaseRequest struct { - // Unique identifier for the databases's owner. + // Unique identifier for the database's owner. TenantID *Identifier // The specification for the database. Spec *DatabaseSpec @@ -1214,1590 +1223,3 @@ func MakeStartFailed(err error) *goa.ServiceError { func MakeCancelFailed(err error) *goa.ServiceError { return goa.NewServiceError(err, "cancel_failed", false, false, false) } - -// NewListDatabasesResponse initializes result type ListDatabasesResponse from -// viewed result type ListDatabasesResponse. -func NewListDatabasesResponse(vres *controlplaneviews.ListDatabasesResponse) *ListDatabasesResponse { - return newListDatabasesResponse(vres.Projected) -} - -// NewViewedListDatabasesResponse initializes viewed result type -// ListDatabasesResponse from result type ListDatabasesResponse using the given -// view. -func NewViewedListDatabasesResponse(res *ListDatabasesResponse, view string) *controlplaneviews.ListDatabasesResponse { - p := newListDatabasesResponseView(res) - return &controlplaneviews.ListDatabasesResponse{Projected: p, View: "default"} -} - -// NewDatabase initializes result type Database from viewed result type -// Database. -func NewDatabase(vres *controlplaneviews.Database) *Database { - var res *Database - switch vres.View { - case "default", "": - res = newDatabase(vres.Projected) - case "abbreviated": - res = newDatabaseAbbreviated(vres.Projected) - } - return res -} - -// NewViewedDatabase initializes viewed result type Database from result type -// Database using the given view. -func NewViewedDatabase(res *Database, view string) *controlplaneviews.Database { - var vres *controlplaneviews.Database - switch view { - case "default", "": - p := newDatabaseView(res) - vres = &controlplaneviews.Database{Projected: p, View: "default"} - case "abbreviated": - p := newDatabaseViewAbbreviated(res) - vres = &controlplaneviews.Database{Projected: p, View: "abbreviated"} - } - return vres -} - -// newListDatabasesResponse converts projected type ListDatabasesResponse to -// service type ListDatabasesResponse. -func newListDatabasesResponse(vres *controlplaneviews.ListDatabasesResponseView) *ListDatabasesResponse { - res := &ListDatabasesResponse{} - if vres.Databases != nil { - res.Databases = newDatabaseCollectionAbbreviated(vres.Databases) - } - return res -} - -// newListDatabasesResponseView projects result type ListDatabasesResponse to -// projected type ListDatabasesResponseView using the "default" view. -func newListDatabasesResponseView(res *ListDatabasesResponse) *controlplaneviews.ListDatabasesResponseView { - vres := &controlplaneviews.ListDatabasesResponseView{} - if res.Databases != nil { - vres.Databases = newDatabaseCollectionViewAbbreviated(res.Databases) - } - return vres -} - -// newDatabaseCollection converts projected type DatabaseCollection to service -// type DatabaseCollection. -func newDatabaseCollection(vres controlplaneviews.DatabaseCollectionView) DatabaseCollection { - res := make(DatabaseCollection, len(vres)) - for i, n := range vres { - res[i] = newDatabase(n) - } - return res -} - -// newDatabaseCollectionAbbreviated converts projected type DatabaseCollection -// to service type DatabaseCollection. -func newDatabaseCollectionAbbreviated(vres controlplaneviews.DatabaseCollectionView) DatabaseCollection { - res := make(DatabaseCollection, len(vres)) - for i, n := range vres { - res[i] = newDatabaseAbbreviated(n) - } - return res -} - -// newDatabaseCollectionView projects result type DatabaseCollection to -// projected type DatabaseCollectionView using the "default" view. -func newDatabaseCollectionView(res DatabaseCollection) controlplaneviews.DatabaseCollectionView { - vres := make(controlplaneviews.DatabaseCollectionView, len(res)) - for i, n := range res { - vres[i] = newDatabaseView(n) - } - return vres -} - -// newDatabaseCollectionViewAbbreviated projects result type DatabaseCollection -// to projected type DatabaseCollectionView using the "abbreviated" view. -func newDatabaseCollectionViewAbbreviated(res DatabaseCollection) controlplaneviews.DatabaseCollectionView { - vres := make(controlplaneviews.DatabaseCollectionView, len(res)) - for i, n := range res { - vres[i] = newDatabaseViewAbbreviated(n) - } - return vres -} - -// newDatabase converts projected type Database to service type Database. -func newDatabase(vres *controlplaneviews.DatabaseView) *Database { - res := &Database{} - if vres.ID != nil { - res.ID = Identifier(*vres.ID) - } - if vres.TenantID != nil { - tenantID := Identifier(*vres.TenantID) - res.TenantID = &tenantID - } - if vres.CreatedAt != nil { - res.CreatedAt = *vres.CreatedAt - } - if vres.UpdatedAt != nil { - res.UpdatedAt = *vres.UpdatedAt - } - if vres.State != nil { - res.State = *vres.State - } - if vres.ServiceInstances != nil { - res.ServiceInstances = make([]*Serviceinstance, len(vres.ServiceInstances)) - for i, val := range vres.ServiceInstances { - if val == nil { - res.ServiceInstances[i] = nil - continue - } - res.ServiceInstances[i] = transformControlplaneviewsServiceinstanceViewToServiceinstance(val) - } - } - if vres.Spec != nil { - res.Spec = transformControlplaneviewsDatabaseSpecViewToDatabaseSpec(vres.Spec) - } - if vres.Instances != nil { - res.Instances = newInstanceCollection(vres.Instances) - } - return res -} - -// newDatabaseAbbreviated converts projected type Database to service type -// Database. -func newDatabaseAbbreviated(vres *controlplaneviews.DatabaseView) *Database { - res := &Database{} - if vres.ID != nil { - res.ID = Identifier(*vres.ID) - } - if vres.TenantID != nil { - tenantID := Identifier(*vres.TenantID) - res.TenantID = &tenantID - } - if vres.CreatedAt != nil { - res.CreatedAt = *vres.CreatedAt - } - if vres.UpdatedAt != nil { - res.UpdatedAt = *vres.UpdatedAt - } - if vres.State != nil { - res.State = *vres.State - } - if vres.Instances != nil { - res.Instances = newInstanceCollectionAbbreviated(vres.Instances) - } - return res -} - -// newDatabaseView projects result type Database to projected type DatabaseView -// using the "default" view. -func newDatabaseView(res *Database) *controlplaneviews.DatabaseView { - vres := &controlplaneviews.DatabaseView{ - CreatedAt: &res.CreatedAt, - UpdatedAt: &res.UpdatedAt, - State: &res.State, - } - id := controlplaneviews.IdentifierView(res.ID) - vres.ID = &id - if res.TenantID != nil { - tenantID := controlplaneviews.IdentifierView(*res.TenantID) - vres.TenantID = &tenantID - } - if res.ServiceInstances != nil { - vres.ServiceInstances = make([]*controlplaneviews.ServiceinstanceView, len(res.ServiceInstances)) - for i, val := range res.ServiceInstances { - if val == nil { - vres.ServiceInstances[i] = nil - continue - } - vres.ServiceInstances[i] = transformServiceinstanceToControlplaneviewsServiceinstanceView(val) - } - } else { - vres.ServiceInstances = []*controlplaneviews.ServiceinstanceView{} - } - if res.Spec != nil { - vres.Spec = transformDatabaseSpecToControlplaneviewsDatabaseSpecView(res.Spec) - } - if res.Instances != nil { - vres.Instances = newInstanceCollectionView(res.Instances) - } - return vres -} - -// newDatabaseViewAbbreviated projects result type Database to projected type -// DatabaseView using the "abbreviated" view. -func newDatabaseViewAbbreviated(res *Database) *controlplaneviews.DatabaseView { - vres := &controlplaneviews.DatabaseView{ - CreatedAt: &res.CreatedAt, - UpdatedAt: &res.UpdatedAt, - State: &res.State, - } - id := controlplaneviews.IdentifierView(res.ID) - vres.ID = &id - if res.TenantID != nil { - tenantID := controlplaneviews.IdentifierView(*res.TenantID) - vres.TenantID = &tenantID - } - if res.Instances != nil { - vres.Instances = newInstanceCollectionViewAbbreviated(res.Instances) - } - return vres -} - -// newInstanceCollection converts projected type InstanceCollection to service -// type InstanceCollection. -func newInstanceCollection(vres controlplaneviews.InstanceCollectionView) InstanceCollection { - res := make(InstanceCollection, len(vres)) - for i, n := range vres { - res[i] = newInstance(n) - } - return res -} - -// newInstanceCollectionAbbreviated converts projected type InstanceCollection -// to service type InstanceCollection. -func newInstanceCollectionAbbreviated(vres controlplaneviews.InstanceCollectionView) InstanceCollection { - res := make(InstanceCollection, len(vres)) - for i, n := range vres { - res[i] = newInstanceAbbreviated(n) - } - return res -} - -// newInstanceCollectionView projects result type InstanceCollection to -// projected type InstanceCollectionView using the "default" view. -func newInstanceCollectionView(res InstanceCollection) controlplaneviews.InstanceCollectionView { - vres := make(controlplaneviews.InstanceCollectionView, len(res)) - for i, n := range res { - vres[i] = newInstanceView(n) - } - return vres -} - -// newInstanceCollectionViewAbbreviated projects result type InstanceCollection -// to projected type InstanceCollectionView using the "abbreviated" view. -func newInstanceCollectionViewAbbreviated(res InstanceCollection) controlplaneviews.InstanceCollectionView { - vres := make(controlplaneviews.InstanceCollectionView, len(res)) - for i, n := range res { - vres[i] = newInstanceViewAbbreviated(n) - } - return vres -} - -// newInstance converts projected type Instance to service type Instance. -func newInstance(vres *controlplaneviews.InstanceView) *Instance { - res := &Instance{ - StatusUpdatedAt: vres.StatusUpdatedAt, - Error: vres.Error, - } - if vres.ID != nil { - res.ID = *vres.ID - } - if vres.HostID != nil { - res.HostID = *vres.HostID - } - if vres.NodeName != nil { - res.NodeName = *vres.NodeName - } - if vres.CreatedAt != nil { - res.CreatedAt = *vres.CreatedAt - } - if vres.UpdatedAt != nil { - res.UpdatedAt = *vres.UpdatedAt - } - if vres.State != nil { - res.State = *vres.State - } - if vres.ConnectionInfo != nil { - res.ConnectionInfo = transformControlplaneviewsInstanceConnectionInfoViewToInstanceConnectionInfo(vres.ConnectionInfo) - } - if vres.Postgres != nil { - res.Postgres = transformControlplaneviewsInstancePostgresStatusViewToInstancePostgresStatus(vres.Postgres) - } - if vres.Spock != nil { - res.Spock = transformControlplaneviewsInstanceSpockStatusViewToInstanceSpockStatus(vres.Spock) - } - return res -} - -// newInstanceAbbreviated converts projected type Instance to service type -// Instance. -func newInstanceAbbreviated(vres *controlplaneviews.InstanceView) *Instance { - res := &Instance{} - if vres.ID != nil { - res.ID = *vres.ID - } - if vres.HostID != nil { - res.HostID = *vres.HostID - } - if vres.NodeName != nil { - res.NodeName = *vres.NodeName - } - if vres.State != nil { - res.State = *vres.State - } - return res -} - -// newInstanceView projects result type Instance to projected type InstanceView -// using the "default" view. -func newInstanceView(res *Instance) *controlplaneviews.InstanceView { - vres := &controlplaneviews.InstanceView{ - ID: &res.ID, - HostID: &res.HostID, - NodeName: &res.NodeName, - CreatedAt: &res.CreatedAt, - UpdatedAt: &res.UpdatedAt, - StatusUpdatedAt: res.StatusUpdatedAt, - State: &res.State, - Error: res.Error, - } - if res.ConnectionInfo != nil { - vres.ConnectionInfo = transformInstanceConnectionInfoToControlplaneviewsInstanceConnectionInfoView(res.ConnectionInfo) - } - if res.Postgres != nil { - vres.Postgres = transformInstancePostgresStatusToControlplaneviewsInstancePostgresStatusView(res.Postgres) - } - if res.Spock != nil { - vres.Spock = transformInstanceSpockStatusToControlplaneviewsInstanceSpockStatusView(res.Spock) - } - return vres -} - -// newInstanceViewAbbreviated projects result type Instance to projected type -// InstanceView using the "abbreviated" view. -func newInstanceViewAbbreviated(res *Instance) *controlplaneviews.InstanceView { - vres := &controlplaneviews.InstanceView{ - ID: &res.ID, - HostID: &res.HostID, - NodeName: &res.NodeName, - State: &res.State, - } - return vres -} - -// newServiceinstanceCollection converts projected type -// ServiceinstanceCollection to service type ServiceinstanceCollection. -func newServiceinstanceCollection(vres controlplaneviews.ServiceinstanceCollectionView) ServiceinstanceCollection { - res := make(ServiceinstanceCollection, len(vres)) - for i, n := range vres { - res[i] = newServiceinstance(n) - } - return res -} - -// newServiceinstanceCollectionView projects result type -// ServiceinstanceCollection to projected type ServiceinstanceCollectionView -// using the "default" view. -func newServiceinstanceCollectionView(res ServiceinstanceCollection) controlplaneviews.ServiceinstanceCollectionView { - vres := make(controlplaneviews.ServiceinstanceCollectionView, len(res)) - for i, n := range res { - vres[i] = newServiceinstanceView(n) - } - return vres -} - -// newServiceinstance converts projected type Serviceinstance to service type -// Serviceinstance. -func newServiceinstance(vres *controlplaneviews.ServiceinstanceView) *Serviceinstance { - res := &Serviceinstance{ - Error: vres.Error, - } - if vres.ServiceInstanceID != nil { - res.ServiceInstanceID = *vres.ServiceInstanceID - } - if vres.ServiceID != nil { - res.ServiceID = *vres.ServiceID - } - if vres.DatabaseID != nil { - res.DatabaseID = Identifier(*vres.DatabaseID) - } - if vres.HostID != nil { - res.HostID = *vres.HostID - } - if vres.State != nil { - res.State = *vres.State - } - if vres.CreatedAt != nil { - res.CreatedAt = *vres.CreatedAt - } - if vres.UpdatedAt != nil { - res.UpdatedAt = *vres.UpdatedAt - } - if vres.Status != nil { - res.Status = transformControlplaneviewsServiceInstanceStatusViewToServiceInstanceStatus(vres.Status) - } - return res -} - -// newServiceinstanceView projects result type Serviceinstance to projected -// type ServiceinstanceView using the "default" view. -func newServiceinstanceView(res *Serviceinstance) *controlplaneviews.ServiceinstanceView { - vres := &controlplaneviews.ServiceinstanceView{ - ServiceInstanceID: &res.ServiceInstanceID, - ServiceID: &res.ServiceID, - HostID: &res.HostID, - State: &res.State, - CreatedAt: &res.CreatedAt, - UpdatedAt: &res.UpdatedAt, - Error: res.Error, - } - databaseID := controlplaneviews.IdentifierView(res.DatabaseID) - vres.DatabaseID = &databaseID - if res.Status != nil { - vres.Status = transformServiceInstanceStatusToControlplaneviewsServiceInstanceStatusView(res.Status) - } - return vres -} - -// transformControlplaneviewsServiceinstanceViewToServiceinstance builds a -// value of type *Serviceinstance from a value of type -// *controlplaneviews.ServiceinstanceView. -func transformControlplaneviewsServiceinstanceViewToServiceinstance(v *controlplaneviews.ServiceinstanceView) *Serviceinstance { - if v == nil { - return nil - } - res := &Serviceinstance{ - ServiceInstanceID: *v.ServiceInstanceID, - ServiceID: *v.ServiceID, - DatabaseID: Identifier(*v.DatabaseID), - HostID: *v.HostID, - State: *v.State, - CreatedAt: *v.CreatedAt, - UpdatedAt: *v.UpdatedAt, - Error: v.Error, - } - if v.Status != nil { - res.Status = transformControlplaneviewsServiceInstanceStatusViewToServiceInstanceStatus(v.Status) - } - - return res -} - -// transformControlplaneviewsServiceInstanceStatusViewToServiceInstanceStatus -// builds a value of type *ServiceInstanceStatus from a value of type -// *controlplaneviews.ServiceInstanceStatusView. -func transformControlplaneviewsServiceInstanceStatusViewToServiceInstanceStatus(v *controlplaneviews.ServiceInstanceStatusView) *ServiceInstanceStatus { - if v == nil { - return nil - } - res := &ServiceInstanceStatus{ - ContainerID: v.ContainerID, - ImageVersion: v.ImageVersion, - Hostname: v.Hostname, - Ipv4Address: v.Ipv4Address, - LastHealthAt: v.LastHealthAt, - ServiceReady: v.ServiceReady, - } - if v.Ports != nil { - res.Ports = make([]*PortMapping, len(v.Ports)) - for i, val := range v.Ports { - if val == nil { - res.Ports[i] = nil - continue - } - res.Ports[i] = transformControlplaneviewsPortMappingViewToPortMapping(val) - } - } - if v.HealthCheck != nil { - res.HealthCheck = transformControlplaneviewsHealthCheckResultViewToHealthCheckResult(v.HealthCheck) - } - - return res -} - -// transformControlplaneviewsPortMappingViewToPortMapping builds a value of -// type *PortMapping from a value of type *controlplaneviews.PortMappingView. -func transformControlplaneviewsPortMappingViewToPortMapping(v *controlplaneviews.PortMappingView) *PortMapping { - if v == nil { - return nil - } - res := &PortMapping{ - Name: *v.Name, - ContainerPort: v.ContainerPort, - HostPort: v.HostPort, - } - - return res -} - -// transformControlplaneviewsHealthCheckResultViewToHealthCheckResult builds a -// value of type *HealthCheckResult from a value of type -// *controlplaneviews.HealthCheckResultView. -func transformControlplaneviewsHealthCheckResultViewToHealthCheckResult(v *controlplaneviews.HealthCheckResultView) *HealthCheckResult { - if v == nil { - return nil - } - res := &HealthCheckResult{ - Status: *v.Status, - Message: v.Message, - CheckedAt: *v.CheckedAt, - } - - return res -} - -// transformControlplaneviewsDatabaseSpecViewToDatabaseSpec builds a value of -// type *DatabaseSpec from a value of type *controlplaneviews.DatabaseSpecView. -func transformControlplaneviewsDatabaseSpecViewToDatabaseSpec(v *controlplaneviews.DatabaseSpecView) *DatabaseSpec { - if v == nil { - return nil - } - res := &DatabaseSpec{ - DatabaseName: *v.DatabaseName, - PostgresVersion: v.PostgresVersion, - SpockVersion: v.SpockVersion, - Port: v.Port, - Cpus: v.Cpus, - Memory: v.Memory, - } - if v.Nodes != nil { - res.Nodes = make([]*DatabaseNodeSpec, len(v.Nodes)) - for i, val := range v.Nodes { - if val == nil { - res.Nodes[i] = nil - continue - } - res.Nodes[i] = transformControlplaneviewsDatabaseNodeSpecViewToDatabaseNodeSpec(val) - } - } else { - res.Nodes = []*DatabaseNodeSpec{} - } - if v.DatabaseUsers != nil { - res.DatabaseUsers = make([]*DatabaseUserSpec, len(v.DatabaseUsers)) - for i, val := range v.DatabaseUsers { - if val == nil { - res.DatabaseUsers[i] = nil - continue - } - res.DatabaseUsers[i] = transformControlplaneviewsDatabaseUserSpecViewToDatabaseUserSpec(val) - } - } - if v.Services != nil { - res.Services = make([]*ServiceSpec, len(v.Services)) - for i, val := range v.Services { - if val == nil { - res.Services[i] = nil - continue - } - res.Services[i] = transformControlplaneviewsServiceSpecViewToServiceSpec(val) - } - } - if v.BackupConfig != nil { - res.BackupConfig = transformControlplaneviewsBackupConfigSpecViewToBackupConfigSpec(v.BackupConfig) - } - if v.RestoreConfig != nil { - res.RestoreConfig = transformControlplaneviewsRestoreConfigSpecViewToRestoreConfigSpec(v.RestoreConfig) - } - if v.PostgresqlConf != nil { - res.PostgresqlConf = make(map[string]any, len(v.PostgresqlConf)) - for key, val := range v.PostgresqlConf { - tk := key - tv := val - res.PostgresqlConf[tk] = tv - } - } - if v.OrchestratorOpts != nil { - res.OrchestratorOpts = transformControlplaneviewsOrchestratorOptsViewToOrchestratorOpts(v.OrchestratorOpts) - } - - return res -} - -// transformControlplaneviewsDatabaseNodeSpecViewToDatabaseNodeSpec builds a -// value of type *DatabaseNodeSpec from a value of type -// *controlplaneviews.DatabaseNodeSpecView. -func transformControlplaneviewsDatabaseNodeSpecViewToDatabaseNodeSpec(v *controlplaneviews.DatabaseNodeSpecView) *DatabaseNodeSpec { - res := &DatabaseNodeSpec{ - Name: *v.Name, - PostgresVersion: v.PostgresVersion, - Port: v.Port, - Cpus: v.Cpus, - Memory: v.Memory, - SourceNode: v.SourceNode, - } - if v.HostIds != nil { - res.HostIds = make([]Identifier, len(v.HostIds)) - for i, val := range v.HostIds { - res.HostIds[i] = Identifier(val) - } - } else { - res.HostIds = []Identifier{} - } - if v.PostgresqlConf != nil { - res.PostgresqlConf = make(map[string]any, len(v.PostgresqlConf)) - for key, val := range v.PostgresqlConf { - tk := key - tv := val - res.PostgresqlConf[tk] = tv - } - } - if v.BackupConfig != nil { - res.BackupConfig = transformControlplaneviewsBackupConfigSpecViewToBackupConfigSpec(v.BackupConfig) - } - if v.RestoreConfig != nil { - res.RestoreConfig = transformControlplaneviewsRestoreConfigSpecViewToRestoreConfigSpec(v.RestoreConfig) - } - if v.OrchestratorOpts != nil { - res.OrchestratorOpts = transformControlplaneviewsOrchestratorOptsViewToOrchestratorOpts(v.OrchestratorOpts) - } - - return res -} - -// transformControlplaneviewsBackupConfigSpecViewToBackupConfigSpec builds a -// value of type *BackupConfigSpec from a value of type -// *controlplaneviews.BackupConfigSpecView. -func transformControlplaneviewsBackupConfigSpecViewToBackupConfigSpec(v *controlplaneviews.BackupConfigSpecView) *BackupConfigSpec { - if v == nil { - return nil - } - res := &BackupConfigSpec{} - if v.Repositories != nil { - res.Repositories = make([]*BackupRepositorySpec, len(v.Repositories)) - for i, val := range v.Repositories { - if val == nil { - res.Repositories[i] = nil - continue - } - res.Repositories[i] = transformControlplaneviewsBackupRepositorySpecViewToBackupRepositorySpec(val) - } - } else { - res.Repositories = []*BackupRepositorySpec{} - } - if v.Schedules != nil { - res.Schedules = make([]*BackupScheduleSpec, len(v.Schedules)) - for i, val := range v.Schedules { - if val == nil { - res.Schedules[i] = nil - continue - } - res.Schedules[i] = transformControlplaneviewsBackupScheduleSpecViewToBackupScheduleSpec(val) - } - } - - return res -} - -// transformControlplaneviewsBackupRepositorySpecViewToBackupRepositorySpec -// builds a value of type *BackupRepositorySpec from a value of type -// *controlplaneviews.BackupRepositorySpecView. -func transformControlplaneviewsBackupRepositorySpecViewToBackupRepositorySpec(v *controlplaneviews.BackupRepositorySpecView) *BackupRepositorySpec { - res := &BackupRepositorySpec{ - Type: *v.Type, - S3Bucket: v.S3Bucket, - S3Region: v.S3Region, - S3Endpoint: v.S3Endpoint, - S3Key: v.S3Key, - S3KeySecret: v.S3KeySecret, - GcsBucket: v.GcsBucket, - GcsEndpoint: v.GcsEndpoint, - GcsKey: v.GcsKey, - AzureAccount: v.AzureAccount, - AzureContainer: v.AzureContainer, - AzureEndpoint: v.AzureEndpoint, - AzureKey: v.AzureKey, - RetentionFull: v.RetentionFull, - RetentionFullType: v.RetentionFullType, - BasePath: v.BasePath, - } - if v.ID != nil { - id := Identifier(*v.ID) - res.ID = &id - } - if v.CustomOptions != nil { - res.CustomOptions = make(map[string]string, len(v.CustomOptions)) - for key, val := range v.CustomOptions { - tk := key - tv := val - res.CustomOptions[tk] = tv - } - } - - return res -} - -// transformControlplaneviewsBackupScheduleSpecViewToBackupScheduleSpec builds -// a value of type *BackupScheduleSpec from a value of type -// *controlplaneviews.BackupScheduleSpecView. -func transformControlplaneviewsBackupScheduleSpecViewToBackupScheduleSpec(v *controlplaneviews.BackupScheduleSpecView) *BackupScheduleSpec { - if v == nil { - return nil - } - res := &BackupScheduleSpec{ - ID: *v.ID, - Type: *v.Type, - CronExpression: *v.CronExpression, - } - - return res -} - -// transformControlplaneviewsRestoreConfigSpecViewToRestoreConfigSpec builds a -// value of type *RestoreConfigSpec from a value of type -// *controlplaneviews.RestoreConfigSpecView. -func transformControlplaneviewsRestoreConfigSpecViewToRestoreConfigSpec(v *controlplaneviews.RestoreConfigSpecView) *RestoreConfigSpec { - if v == nil { - return nil - } - res := &RestoreConfigSpec{ - SourceDatabaseID: Identifier(*v.SourceDatabaseID), - SourceNodeName: *v.SourceNodeName, - SourceDatabaseName: *v.SourceDatabaseName, - } - if v.Repository != nil { - res.Repository = transformControlplaneviewsRestoreRepositorySpecViewToRestoreRepositorySpec(v.Repository) - } - if v.RestoreOptions != nil { - res.RestoreOptions = make(map[string]string, len(v.RestoreOptions)) - for key, val := range v.RestoreOptions { - tk := key - tv := val - res.RestoreOptions[tk] = tv - } - } - - return res -} - -// transformControlplaneviewsRestoreRepositorySpecViewToRestoreRepositorySpec -// builds a value of type *RestoreRepositorySpec from a value of type -// *controlplaneviews.RestoreRepositorySpecView. -func transformControlplaneviewsRestoreRepositorySpecViewToRestoreRepositorySpec(v *controlplaneviews.RestoreRepositorySpecView) *RestoreRepositorySpec { - res := &RestoreRepositorySpec{ - Type: *v.Type, - S3Bucket: v.S3Bucket, - S3Region: v.S3Region, - S3Endpoint: v.S3Endpoint, - S3Key: v.S3Key, - S3KeySecret: v.S3KeySecret, - GcsBucket: v.GcsBucket, - GcsEndpoint: v.GcsEndpoint, - GcsKey: v.GcsKey, - AzureAccount: v.AzureAccount, - AzureContainer: v.AzureContainer, - AzureEndpoint: v.AzureEndpoint, - AzureKey: v.AzureKey, - BasePath: v.BasePath, - } - if v.ID != nil { - id := Identifier(*v.ID) - res.ID = &id - } - if v.CustomOptions != nil { - res.CustomOptions = make(map[string]string, len(v.CustomOptions)) - for key, val := range v.CustomOptions { - tk := key - tv := val - res.CustomOptions[tk] = tv - } - } - - return res -} - -// transformControlplaneviewsOrchestratorOptsViewToOrchestratorOpts builds a -// value of type *OrchestratorOpts from a value of type -// *controlplaneviews.OrchestratorOptsView. -func transformControlplaneviewsOrchestratorOptsViewToOrchestratorOpts(v *controlplaneviews.OrchestratorOptsView) *OrchestratorOpts { - if v == nil { - return nil - } - res := &OrchestratorOpts{} - if v.Swarm != nil { - res.Swarm = transformControlplaneviewsSwarmOptsViewToSwarmOpts(v.Swarm) - } - - return res -} - -// transformControlplaneviewsSwarmOptsViewToSwarmOpts builds a value of type -// *SwarmOpts from a value of type *controlplaneviews.SwarmOptsView. -func transformControlplaneviewsSwarmOptsViewToSwarmOpts(v *controlplaneviews.SwarmOptsView) *SwarmOpts { - if v == nil { - return nil - } - res := &SwarmOpts{} - if v.ExtraVolumes != nil { - res.ExtraVolumes = make([]*ExtraVolumesSpec, len(v.ExtraVolumes)) - for i, val := range v.ExtraVolumes { - if val == nil { - res.ExtraVolumes[i] = nil - continue - } - res.ExtraVolumes[i] = transformControlplaneviewsExtraVolumesSpecViewToExtraVolumesSpec(val) - } - } - if v.ExtraNetworks != nil { - res.ExtraNetworks = make([]*ExtraNetworkSpec, len(v.ExtraNetworks)) - for i, val := range v.ExtraNetworks { - if val == nil { - res.ExtraNetworks[i] = nil - continue - } - res.ExtraNetworks[i] = transformControlplaneviewsExtraNetworkSpecViewToExtraNetworkSpec(val) - } - } - if v.ExtraLabels != nil { - res.ExtraLabels = make(map[string]string, len(v.ExtraLabels)) - for key, val := range v.ExtraLabels { - tk := key - tv := val - res.ExtraLabels[tk] = tv - } - } - - return res -} - -// transformControlplaneviewsExtraVolumesSpecViewToExtraVolumesSpec builds a -// value of type *ExtraVolumesSpec from a value of type -// *controlplaneviews.ExtraVolumesSpecView. -func transformControlplaneviewsExtraVolumesSpecViewToExtraVolumesSpec(v *controlplaneviews.ExtraVolumesSpecView) *ExtraVolumesSpec { - if v == nil { - return nil - } - res := &ExtraVolumesSpec{ - HostPath: *v.HostPath, - DestinationPath: *v.DestinationPath, - } - - return res -} - -// transformControlplaneviewsExtraNetworkSpecViewToExtraNetworkSpec builds a -// value of type *ExtraNetworkSpec from a value of type -// *controlplaneviews.ExtraNetworkSpecView. -func transformControlplaneviewsExtraNetworkSpecViewToExtraNetworkSpec(v *controlplaneviews.ExtraNetworkSpecView) *ExtraNetworkSpec { - if v == nil { - return nil - } - res := &ExtraNetworkSpec{ - ID: *v.ID, - } - if v.Aliases != nil { - res.Aliases = make([]string, len(v.Aliases)) - for i, val := range v.Aliases { - res.Aliases[i] = val - } - } - if v.DriverOpts != nil { - res.DriverOpts = make(map[string]string, len(v.DriverOpts)) - for key, val := range v.DriverOpts { - tk := key - tv := val - res.DriverOpts[tk] = tv - } - } - - return res -} - -// transformControlplaneviewsDatabaseUserSpecViewToDatabaseUserSpec builds a -// value of type *DatabaseUserSpec from a value of type -// *controlplaneviews.DatabaseUserSpecView. -func transformControlplaneviewsDatabaseUserSpecViewToDatabaseUserSpec(v *controlplaneviews.DatabaseUserSpecView) *DatabaseUserSpec { - if v == nil { - return nil - } - res := &DatabaseUserSpec{ - Username: *v.Username, - Password: v.Password, - DbOwner: v.DbOwner, - } - if v.Attributes != nil { - res.Attributes = make([]string, len(v.Attributes)) - for i, val := range v.Attributes { - res.Attributes[i] = val - } - } - if v.Roles != nil { - res.Roles = make([]string, len(v.Roles)) - for i, val := range v.Roles { - res.Roles[i] = val - } - } - - return res -} - -// transformControlplaneviewsServiceSpecViewToServiceSpec builds a value of -// type *ServiceSpec from a value of type *controlplaneviews.ServiceSpecView. -func transformControlplaneviewsServiceSpecViewToServiceSpec(v *controlplaneviews.ServiceSpecView) *ServiceSpec { - if v == nil { - return nil - } - res := &ServiceSpec{ - ServiceID: Identifier(*v.ServiceID), - ServiceType: *v.ServiceType, - Version: *v.Version, - Port: v.Port, - Cpus: v.Cpus, - Memory: v.Memory, - } - if v.HostIds != nil { - res.HostIds = make([]Identifier, len(v.HostIds)) - for i, val := range v.HostIds { - res.HostIds[i] = Identifier(val) - } - } else { - res.HostIds = []Identifier{} - } - if v.Config != nil { - res.Config = make(map[string]any, len(v.Config)) - for key, val := range v.Config { - tk := key - tv := val - res.Config[tk] = tv - } - } - - return res -} - -// transformServiceinstanceToControlplaneviewsServiceinstanceView builds a -// value of type *controlplaneviews.ServiceinstanceView from a value of type -// *Serviceinstance. -func transformServiceinstanceToControlplaneviewsServiceinstanceView(v *Serviceinstance) *controlplaneviews.ServiceinstanceView { - res := &controlplaneviews.ServiceinstanceView{ - ServiceInstanceID: &v.ServiceInstanceID, - ServiceID: &v.ServiceID, - HostID: &v.HostID, - State: &v.State, - CreatedAt: &v.CreatedAt, - UpdatedAt: &v.UpdatedAt, - Error: v.Error, - } - databaseID := controlplaneviews.IdentifierView(v.DatabaseID) - res.DatabaseID = &databaseID - if v.Status != nil { - res.Status = transformServiceInstanceStatusToControlplaneviewsServiceInstanceStatusView(v.Status) - } - - return res -} - -// transformServiceInstanceStatusToControlplaneviewsServiceInstanceStatusView -// builds a value of type *controlplaneviews.ServiceInstanceStatusView from a -// value of type *ServiceInstanceStatus. -func transformServiceInstanceStatusToControlplaneviewsServiceInstanceStatusView(v *ServiceInstanceStatus) *controlplaneviews.ServiceInstanceStatusView { - if v == nil { - return nil - } - res := &controlplaneviews.ServiceInstanceStatusView{ - ContainerID: v.ContainerID, - ImageVersion: v.ImageVersion, - Hostname: v.Hostname, - Ipv4Address: v.Ipv4Address, - LastHealthAt: v.LastHealthAt, - ServiceReady: v.ServiceReady, - } - if v.Ports != nil { - res.Ports = make([]*controlplaneviews.PortMappingView, len(v.Ports)) - for i, val := range v.Ports { - if val == nil { - res.Ports[i] = nil - continue - } - res.Ports[i] = transformPortMappingToControlplaneviewsPortMappingView(val) - } - } - if v.HealthCheck != nil { - res.HealthCheck = transformHealthCheckResultToControlplaneviewsHealthCheckResultView(v.HealthCheck) - } - - return res -} - -// transformPortMappingToControlplaneviewsPortMappingView builds a value of -// type *controlplaneviews.PortMappingView from a value of type *PortMapping. -func transformPortMappingToControlplaneviewsPortMappingView(v *PortMapping) *controlplaneviews.PortMappingView { - if v == nil { - return nil - } - res := &controlplaneviews.PortMappingView{ - Name: &v.Name, - ContainerPort: v.ContainerPort, - HostPort: v.HostPort, - } - - return res -} - -// transformHealthCheckResultToControlplaneviewsHealthCheckResultView builds a -// value of type *controlplaneviews.HealthCheckResultView from a value of type -// *HealthCheckResult. -func transformHealthCheckResultToControlplaneviewsHealthCheckResultView(v *HealthCheckResult) *controlplaneviews.HealthCheckResultView { - if v == nil { - return nil - } - res := &controlplaneviews.HealthCheckResultView{ - Status: &v.Status, - Message: v.Message, - CheckedAt: &v.CheckedAt, - } - - return res -} - -// transformDatabaseSpecToControlplaneviewsDatabaseSpecView builds a value of -// type *controlplaneviews.DatabaseSpecView from a value of type *DatabaseSpec. -func transformDatabaseSpecToControlplaneviewsDatabaseSpecView(v *DatabaseSpec) *controlplaneviews.DatabaseSpecView { - if v == nil { - return nil - } - res := &controlplaneviews.DatabaseSpecView{ - DatabaseName: &v.DatabaseName, - PostgresVersion: v.PostgresVersion, - SpockVersion: v.SpockVersion, - Port: v.Port, - Cpus: v.Cpus, - Memory: v.Memory, - } - if v.Nodes != nil { - res.Nodes = make([]*controlplaneviews.DatabaseNodeSpecView, len(v.Nodes)) - for i, val := range v.Nodes { - if val == nil { - res.Nodes[i] = nil - continue - } - res.Nodes[i] = transformDatabaseNodeSpecToControlplaneviewsDatabaseNodeSpecView(val) - } - } else { - res.Nodes = []*controlplaneviews.DatabaseNodeSpecView{} - } - if v.DatabaseUsers != nil { - res.DatabaseUsers = make([]*controlplaneviews.DatabaseUserSpecView, len(v.DatabaseUsers)) - for i, val := range v.DatabaseUsers { - if val == nil { - res.DatabaseUsers[i] = nil - continue - } - res.DatabaseUsers[i] = transformDatabaseUserSpecToControlplaneviewsDatabaseUserSpecView(val) - } - } - if v.Services != nil { - res.Services = make([]*controlplaneviews.ServiceSpecView, len(v.Services)) - for i, val := range v.Services { - if val == nil { - res.Services[i] = nil - continue - } - res.Services[i] = transformServiceSpecToControlplaneviewsServiceSpecView(val) - } - } - if v.BackupConfig != nil { - res.BackupConfig = transformBackupConfigSpecToControlplaneviewsBackupConfigSpecView(v.BackupConfig) - } - if v.RestoreConfig != nil { - res.RestoreConfig = transformRestoreConfigSpecToControlplaneviewsRestoreConfigSpecView(v.RestoreConfig) - } - if v.PostgresqlConf != nil { - res.PostgresqlConf = make(map[string]any, len(v.PostgresqlConf)) - for key, val := range v.PostgresqlConf { - tk := key - tv := val - res.PostgresqlConf[tk] = tv - } - } - if v.OrchestratorOpts != nil { - res.OrchestratorOpts = transformOrchestratorOptsToControlplaneviewsOrchestratorOptsView(v.OrchestratorOpts) - } - - return res -} - -// transformDatabaseNodeSpecToControlplaneviewsDatabaseNodeSpecView builds a -// value of type *controlplaneviews.DatabaseNodeSpecView from a value of type -// *DatabaseNodeSpec. -func transformDatabaseNodeSpecToControlplaneviewsDatabaseNodeSpecView(v *DatabaseNodeSpec) *controlplaneviews.DatabaseNodeSpecView { - res := &controlplaneviews.DatabaseNodeSpecView{ - Name: &v.Name, - PostgresVersion: v.PostgresVersion, - Port: v.Port, - Cpus: v.Cpus, - Memory: v.Memory, - SourceNode: v.SourceNode, - } - if v.HostIds != nil { - res.HostIds = make([]controlplaneviews.IdentifierView, len(v.HostIds)) - for i, val := range v.HostIds { - res.HostIds[i] = controlplaneviews.IdentifierView(val) - } - } else { - res.HostIds = []controlplaneviews.IdentifierView{} - } - if v.PostgresqlConf != nil { - res.PostgresqlConf = make(map[string]any, len(v.PostgresqlConf)) - for key, val := range v.PostgresqlConf { - tk := key - tv := val - res.PostgresqlConf[tk] = tv - } - } - if v.BackupConfig != nil { - res.BackupConfig = transformBackupConfigSpecToControlplaneviewsBackupConfigSpecView(v.BackupConfig) - } - if v.RestoreConfig != nil { - res.RestoreConfig = transformRestoreConfigSpecToControlplaneviewsRestoreConfigSpecView(v.RestoreConfig) - } - if v.OrchestratorOpts != nil { - res.OrchestratorOpts = transformOrchestratorOptsToControlplaneviewsOrchestratorOptsView(v.OrchestratorOpts) - } - - return res -} - -// transformBackupConfigSpecToControlplaneviewsBackupConfigSpecView builds a -// value of type *controlplaneviews.BackupConfigSpecView from a value of type -// *BackupConfigSpec. -func transformBackupConfigSpecToControlplaneviewsBackupConfigSpecView(v *BackupConfigSpec) *controlplaneviews.BackupConfigSpecView { - if v == nil { - return nil - } - res := &controlplaneviews.BackupConfigSpecView{} - if v.Repositories != nil { - res.Repositories = make([]*controlplaneviews.BackupRepositorySpecView, len(v.Repositories)) - for i, val := range v.Repositories { - if val == nil { - res.Repositories[i] = nil - continue - } - res.Repositories[i] = transformBackupRepositorySpecToControlplaneviewsBackupRepositorySpecView(val) - } - } else { - res.Repositories = []*controlplaneviews.BackupRepositorySpecView{} - } - if v.Schedules != nil { - res.Schedules = make([]*controlplaneviews.BackupScheduleSpecView, len(v.Schedules)) - for i, val := range v.Schedules { - if val == nil { - res.Schedules[i] = nil - continue - } - res.Schedules[i] = transformBackupScheduleSpecToControlplaneviewsBackupScheduleSpecView(val) - } - } - - return res -} - -// transformBackupRepositorySpecToControlplaneviewsBackupRepositorySpecView -// builds a value of type *controlplaneviews.BackupRepositorySpecView from a -// value of type *BackupRepositorySpec. -func transformBackupRepositorySpecToControlplaneviewsBackupRepositorySpecView(v *BackupRepositorySpec) *controlplaneviews.BackupRepositorySpecView { - res := &controlplaneviews.BackupRepositorySpecView{ - Type: &v.Type, - S3Bucket: v.S3Bucket, - S3Region: v.S3Region, - S3Endpoint: v.S3Endpoint, - S3Key: v.S3Key, - S3KeySecret: v.S3KeySecret, - GcsBucket: v.GcsBucket, - GcsEndpoint: v.GcsEndpoint, - GcsKey: v.GcsKey, - AzureAccount: v.AzureAccount, - AzureContainer: v.AzureContainer, - AzureEndpoint: v.AzureEndpoint, - AzureKey: v.AzureKey, - RetentionFull: v.RetentionFull, - RetentionFullType: v.RetentionFullType, - BasePath: v.BasePath, - } - if v.ID != nil { - id := controlplaneviews.IdentifierView(*v.ID) - res.ID = &id - } - if v.CustomOptions != nil { - res.CustomOptions = make(map[string]string, len(v.CustomOptions)) - for key, val := range v.CustomOptions { - tk := key - tv := val - res.CustomOptions[tk] = tv - } - } - - return res -} - -// transformBackupScheduleSpecToControlplaneviewsBackupScheduleSpecView builds -// a value of type *controlplaneviews.BackupScheduleSpecView from a value of -// type *BackupScheduleSpec. -func transformBackupScheduleSpecToControlplaneviewsBackupScheduleSpecView(v *BackupScheduleSpec) *controlplaneviews.BackupScheduleSpecView { - if v == nil { - return nil - } - res := &controlplaneviews.BackupScheduleSpecView{ - ID: &v.ID, - Type: &v.Type, - CronExpression: &v.CronExpression, - } - - return res -} - -// transformRestoreConfigSpecToControlplaneviewsRestoreConfigSpecView builds a -// value of type *controlplaneviews.RestoreConfigSpecView from a value of type -// *RestoreConfigSpec. -func transformRestoreConfigSpecToControlplaneviewsRestoreConfigSpecView(v *RestoreConfigSpec) *controlplaneviews.RestoreConfigSpecView { - if v == nil { - return nil - } - res := &controlplaneviews.RestoreConfigSpecView{ - SourceNodeName: &v.SourceNodeName, - SourceDatabaseName: &v.SourceDatabaseName, - } - sourceDatabaseID := controlplaneviews.IdentifierView(v.SourceDatabaseID) - res.SourceDatabaseID = &sourceDatabaseID - if v.Repository != nil { - res.Repository = transformRestoreRepositorySpecToControlplaneviewsRestoreRepositorySpecView(v.Repository) - } - if v.RestoreOptions != nil { - res.RestoreOptions = make(map[string]string, len(v.RestoreOptions)) - for key, val := range v.RestoreOptions { - tk := key - tv := val - res.RestoreOptions[tk] = tv - } - } - - return res -} - -// transformRestoreRepositorySpecToControlplaneviewsRestoreRepositorySpecView -// builds a value of type *controlplaneviews.RestoreRepositorySpecView from a -// value of type *RestoreRepositorySpec. -func transformRestoreRepositorySpecToControlplaneviewsRestoreRepositorySpecView(v *RestoreRepositorySpec) *controlplaneviews.RestoreRepositorySpecView { - res := &controlplaneviews.RestoreRepositorySpecView{ - Type: &v.Type, - S3Bucket: v.S3Bucket, - S3Region: v.S3Region, - S3Endpoint: v.S3Endpoint, - S3Key: v.S3Key, - S3KeySecret: v.S3KeySecret, - GcsBucket: v.GcsBucket, - GcsEndpoint: v.GcsEndpoint, - GcsKey: v.GcsKey, - AzureAccount: v.AzureAccount, - AzureContainer: v.AzureContainer, - AzureEndpoint: v.AzureEndpoint, - AzureKey: v.AzureKey, - BasePath: v.BasePath, - } - if v.ID != nil { - id := controlplaneviews.IdentifierView(*v.ID) - res.ID = &id - } - if v.CustomOptions != nil { - res.CustomOptions = make(map[string]string, len(v.CustomOptions)) - for key, val := range v.CustomOptions { - tk := key - tv := val - res.CustomOptions[tk] = tv - } - } - - return res -} - -// transformOrchestratorOptsToControlplaneviewsOrchestratorOptsView builds a -// value of type *controlplaneviews.OrchestratorOptsView from a value of type -// *OrchestratorOpts. -func transformOrchestratorOptsToControlplaneviewsOrchestratorOptsView(v *OrchestratorOpts) *controlplaneviews.OrchestratorOptsView { - if v == nil { - return nil - } - res := &controlplaneviews.OrchestratorOptsView{} - if v.Swarm != nil { - res.Swarm = transformSwarmOptsToControlplaneviewsSwarmOptsView(v.Swarm) - } - - return res -} - -// transformSwarmOptsToControlplaneviewsSwarmOptsView builds a value of type -// *controlplaneviews.SwarmOptsView from a value of type *SwarmOpts. -func transformSwarmOptsToControlplaneviewsSwarmOptsView(v *SwarmOpts) *controlplaneviews.SwarmOptsView { - if v == nil { - return nil - } - res := &controlplaneviews.SwarmOptsView{} - if v.ExtraVolumes != nil { - res.ExtraVolumes = make([]*controlplaneviews.ExtraVolumesSpecView, len(v.ExtraVolumes)) - for i, val := range v.ExtraVolumes { - if val == nil { - res.ExtraVolumes[i] = nil - continue - } - res.ExtraVolumes[i] = transformExtraVolumesSpecToControlplaneviewsExtraVolumesSpecView(val) - } - } - if v.ExtraNetworks != nil { - res.ExtraNetworks = make([]*controlplaneviews.ExtraNetworkSpecView, len(v.ExtraNetworks)) - for i, val := range v.ExtraNetworks { - if val == nil { - res.ExtraNetworks[i] = nil - continue - } - res.ExtraNetworks[i] = transformExtraNetworkSpecToControlplaneviewsExtraNetworkSpecView(val) - } - } - if v.ExtraLabels != nil { - res.ExtraLabels = make(map[string]string, len(v.ExtraLabels)) - for key, val := range v.ExtraLabels { - tk := key - tv := val - res.ExtraLabels[tk] = tv - } - } - - return res -} - -// transformExtraVolumesSpecToControlplaneviewsExtraVolumesSpecView builds a -// value of type *controlplaneviews.ExtraVolumesSpecView from a value of type -// *ExtraVolumesSpec. -func transformExtraVolumesSpecToControlplaneviewsExtraVolumesSpecView(v *ExtraVolumesSpec) *controlplaneviews.ExtraVolumesSpecView { - if v == nil { - return nil - } - res := &controlplaneviews.ExtraVolumesSpecView{ - HostPath: &v.HostPath, - DestinationPath: &v.DestinationPath, - } - - return res -} - -// transformExtraNetworkSpecToControlplaneviewsExtraNetworkSpecView builds a -// value of type *controlplaneviews.ExtraNetworkSpecView from a value of type -// *ExtraNetworkSpec. -func transformExtraNetworkSpecToControlplaneviewsExtraNetworkSpecView(v *ExtraNetworkSpec) *controlplaneviews.ExtraNetworkSpecView { - if v == nil { - return nil - } - res := &controlplaneviews.ExtraNetworkSpecView{ - ID: &v.ID, - } - if v.Aliases != nil { - res.Aliases = make([]string, len(v.Aliases)) - for i, val := range v.Aliases { - res.Aliases[i] = val - } - } - if v.DriverOpts != nil { - res.DriverOpts = make(map[string]string, len(v.DriverOpts)) - for key, val := range v.DriverOpts { - tk := key - tv := val - res.DriverOpts[tk] = tv - } - } - - return res -} - -// transformDatabaseUserSpecToControlplaneviewsDatabaseUserSpecView builds a -// value of type *controlplaneviews.DatabaseUserSpecView from a value of type -// *DatabaseUserSpec. -func transformDatabaseUserSpecToControlplaneviewsDatabaseUserSpecView(v *DatabaseUserSpec) *controlplaneviews.DatabaseUserSpecView { - if v == nil { - return nil - } - res := &controlplaneviews.DatabaseUserSpecView{ - Username: &v.Username, - Password: v.Password, - DbOwner: v.DbOwner, - } - if v.Attributes != nil { - res.Attributes = make([]string, len(v.Attributes)) - for i, val := range v.Attributes { - res.Attributes[i] = val - } - } - if v.Roles != nil { - res.Roles = make([]string, len(v.Roles)) - for i, val := range v.Roles { - res.Roles[i] = val - } - } - - return res -} - -// transformServiceSpecToControlplaneviewsServiceSpecView builds a value of -// type *controlplaneviews.ServiceSpecView from a value of type *ServiceSpec. -func transformServiceSpecToControlplaneviewsServiceSpecView(v *ServiceSpec) *controlplaneviews.ServiceSpecView { - if v == nil { - return nil - } - res := &controlplaneviews.ServiceSpecView{ - ServiceType: &v.ServiceType, - Version: &v.Version, - Port: v.Port, - Cpus: v.Cpus, - Memory: v.Memory, - } - serviceID := controlplaneviews.IdentifierView(v.ServiceID) - res.ServiceID = &serviceID - if v.HostIds != nil { - res.HostIds = make([]controlplaneviews.IdentifierView, len(v.HostIds)) - for i, val := range v.HostIds { - res.HostIds[i] = controlplaneviews.IdentifierView(val) - } - } else { - res.HostIds = []controlplaneviews.IdentifierView{} - } - if v.Config != nil { - res.Config = make(map[string]any, len(v.Config)) - for key, val := range v.Config { - tk := key - tv := val - res.Config[tk] = tv - } - } - - return res -} - -// transformControlplaneviewsInstanceConnectionInfoViewToInstanceConnectionInfo -// builds a value of type *InstanceConnectionInfo from a value of type -// *controlplaneviews.InstanceConnectionInfoView. -func transformControlplaneviewsInstanceConnectionInfoViewToInstanceConnectionInfo(v *controlplaneviews.InstanceConnectionInfoView) *InstanceConnectionInfo { - if v == nil { - return nil - } - res := &InstanceConnectionInfo{ - Hostname: v.Hostname, - Ipv4Address: v.Ipv4Address, - Port: v.Port, - } - - return res -} - -// transformControlplaneviewsInstancePostgresStatusViewToInstancePostgresStatus -// builds a value of type *InstancePostgresStatus from a value of type -// *controlplaneviews.InstancePostgresStatusView. -func transformControlplaneviewsInstancePostgresStatusViewToInstancePostgresStatus(v *controlplaneviews.InstancePostgresStatusView) *InstancePostgresStatus { - if v == nil { - return nil - } - res := &InstancePostgresStatus{ - Version: v.Version, - PatroniState: v.PatroniState, - Role: v.Role, - PendingRestart: v.PendingRestart, - PatroniPaused: v.PatroniPaused, - } - - return res -} - -// transformControlplaneviewsInstanceSpockStatusViewToInstanceSpockStatus -// builds a value of type *InstanceSpockStatus from a value of type -// *controlplaneviews.InstanceSpockStatusView. -func transformControlplaneviewsInstanceSpockStatusViewToInstanceSpockStatus(v *controlplaneviews.InstanceSpockStatusView) *InstanceSpockStatus { - if v == nil { - return nil - } - res := &InstanceSpockStatus{ - ReadOnly: v.ReadOnly, - Version: v.Version, - } - if v.Subscriptions != nil { - res.Subscriptions = make([]*InstanceSubscription, len(v.Subscriptions)) - for i, val := range v.Subscriptions { - if val == nil { - res.Subscriptions[i] = nil - continue - } - res.Subscriptions[i] = transformControlplaneviewsInstanceSubscriptionViewToInstanceSubscription(val) - } - } - - return res -} - -// transformControlplaneviewsInstanceSubscriptionViewToInstanceSubscription -// builds a value of type *InstanceSubscription from a value of type -// *controlplaneviews.InstanceSubscriptionView. -func transformControlplaneviewsInstanceSubscriptionViewToInstanceSubscription(v *controlplaneviews.InstanceSubscriptionView) *InstanceSubscription { - if v == nil { - return nil - } - res := &InstanceSubscription{ - ProviderNode: *v.ProviderNode, - Name: *v.Name, - Status: *v.Status, - } - - return res -} - -// transformInstanceConnectionInfoToControlplaneviewsInstanceConnectionInfoView -// builds a value of type *controlplaneviews.InstanceConnectionInfoView from a -// value of type *InstanceConnectionInfo. -func transformInstanceConnectionInfoToControlplaneviewsInstanceConnectionInfoView(v *InstanceConnectionInfo) *controlplaneviews.InstanceConnectionInfoView { - if v == nil { - return nil - } - res := &controlplaneviews.InstanceConnectionInfoView{ - Hostname: v.Hostname, - Ipv4Address: v.Ipv4Address, - Port: v.Port, - } - - return res -} - -// transformInstancePostgresStatusToControlplaneviewsInstancePostgresStatusView -// builds a value of type *controlplaneviews.InstancePostgresStatusView from a -// value of type *InstancePostgresStatus. -func transformInstancePostgresStatusToControlplaneviewsInstancePostgresStatusView(v *InstancePostgresStatus) *controlplaneviews.InstancePostgresStatusView { - if v == nil { - return nil - } - res := &controlplaneviews.InstancePostgresStatusView{ - Version: v.Version, - PatroniState: v.PatroniState, - Role: v.Role, - PendingRestart: v.PendingRestart, - PatroniPaused: v.PatroniPaused, - } - - return res -} - -// transformInstanceSpockStatusToControlplaneviewsInstanceSpockStatusView -// builds a value of type *controlplaneviews.InstanceSpockStatusView from a -// value of type *InstanceSpockStatus. -func transformInstanceSpockStatusToControlplaneviewsInstanceSpockStatusView(v *InstanceSpockStatus) *controlplaneviews.InstanceSpockStatusView { - if v == nil { - return nil - } - res := &controlplaneviews.InstanceSpockStatusView{ - ReadOnly: v.ReadOnly, - Version: v.Version, - } - if v.Subscriptions != nil { - res.Subscriptions = make([]*controlplaneviews.InstanceSubscriptionView, len(v.Subscriptions)) - for i, val := range v.Subscriptions { - if val == nil { - res.Subscriptions[i] = nil - continue - } - res.Subscriptions[i] = transformInstanceSubscriptionToControlplaneviewsInstanceSubscriptionView(val) - } - } - - return res -} - -// transformInstanceSubscriptionToControlplaneviewsInstanceSubscriptionView -// builds a value of type *controlplaneviews.InstanceSubscriptionView from a -// value of type *InstanceSubscription. -func transformInstanceSubscriptionToControlplaneviewsInstanceSubscriptionView(v *InstanceSubscription) *controlplaneviews.InstanceSubscriptionView { - if v == nil { - return nil - } - res := &controlplaneviews.InstanceSubscriptionView{ - ProviderNode: &v.ProviderNode, - Name: &v.Name, - Status: &v.Status, - } - - return res -} diff --git a/api/apiv1/gen/control_plane/views/view.go b/api/apiv1/gen/control_plane/views/view.go deleted file mode 100644 index 430a2a73..00000000 --- a/api/apiv1/gen/control_plane/views/view.go +++ /dev/null @@ -1,1967 +0,0 @@ -// Code generated by goa v3.23.4, DO NOT EDIT. -// -// control-plane views -// -// Command: -// $ goa gen github.com/pgEdge/control-plane/api/apiv1/design -o apiv1 - -package views - -import ( - "unicode/utf8" - - goa "goa.design/goa/v3/pkg" -) - -// ListDatabasesResponse is the viewed result type that is projected based on a -// view. -type ListDatabasesResponse struct { - // Type to project - Projected *ListDatabasesResponseView - // View to render - View string -} - -// Database is the viewed result type that is projected based on a view. -type Database struct { - // Type to project - Projected *DatabaseView - // View to render - View string -} - -// ListDatabasesResponseView is a type that runs validations on a projected -// type. -type ListDatabasesResponseView struct { - Databases DatabaseCollectionView -} - -// DatabaseCollectionView is a type that runs validations on a projected type. -type DatabaseCollectionView []*DatabaseView - -// DatabaseView is a type that runs validations on a projected type. -type DatabaseView struct { - // Unique identifier for the database. - ID *IdentifierView - // Unique identifier for the databases's owner. - TenantID *IdentifierView - // The time that the database was created. - CreatedAt *string - // The time that the database was last updated. - UpdatedAt *string - // Current state of the database. - State *string - // All of the instances in the database. - Instances InstanceCollectionView - // Service instances running alongside this database. - ServiceInstances ServiceinstanceCollectionView - // The user-provided specification for the database. - Spec *DatabaseSpecView -} - -// IdentifierView is a type that runs validations on a projected type. -type IdentifierView string - -// InstanceCollectionView is a type that runs validations on a projected type. -type InstanceCollectionView []*InstanceView - -// InstanceView is a type that runs validations on a projected type. -type InstanceView struct { - // Unique identifier for the instance. - ID *string - // The ID of the host this instance is running on. - HostID *string - // The Spock node name for this instance. - NodeName *string - // The time that the instance was created. - CreatedAt *string - // The time that the instance was last modified. - UpdatedAt *string - // The time that the instance status information was last updated. - StatusUpdatedAt *string - State *string - // Connection information for the instance. - ConnectionInfo *InstanceConnectionInfoView - // Postgres status information for the instance. - Postgres *InstancePostgresStatusView - // Spock status information for the instance. - Spock *InstanceSpockStatusView - // An error message if the instance is in an error state. - Error *string -} - -// InstanceConnectionInfoView is a type that runs validations on a projected -// type. -type InstanceConnectionInfoView struct { - // The hostname of the host that's running this instance. - Hostname *string - // The IPv4 address of the host that's running this instance. - Ipv4Address *string - // The host port that Postgres is listening on for this instance. - Port *int -} - -// InstancePostgresStatusView is a type that runs validations on a projected -// type. -type InstancePostgresStatusView struct { - // The version of Postgres for this instance. - Version *string - PatroniState *string - Role *string - // True if this instance has a pending restart from a configuration change. - PendingRestart *bool - // True if Patroni is paused for this instance. - PatroniPaused *bool -} - -// InstanceSpockStatusView is a type that runs validations on a projected type. -type InstanceSpockStatusView struct { - // The current spock.readonly setting. - ReadOnly *string - // The version of Spock for this instance. - Version *string - // Status information for this instance's Spock subscriptions. - Subscriptions []*InstanceSubscriptionView -} - -// InstanceSubscriptionView is a type that runs validations on a projected type. -type InstanceSubscriptionView struct { - // The Spock node name of the provider for this subscription. - ProviderNode *string - // The name of the subscription. - Name *string - // The current status of the subscription. - Status *string -} - -// ServiceinstanceCollectionView is a type that runs validations on a projected -// type. -type ServiceinstanceCollectionView []*ServiceinstanceView - -// ServiceinstanceView is a type that runs validations on a projected type. -type ServiceinstanceView struct { - // Unique identifier for the service instance. - ServiceInstanceID *string - // The service ID from the DatabaseSpec. - ServiceID *string - // The ID of the database this service belongs to. - DatabaseID *IdentifierView - // The ID of the host this service instance is running on. - HostID *string - // Current state of the service instance. - State *string - // Runtime status information for the service instance. - Status *ServiceInstanceStatusView - // The time that the service instance was created. - CreatedAt *string - // The time that the service instance was last updated. - UpdatedAt *string - // An error message if the service instance is in an error state. - Error *string -} - -// ServiceInstanceStatusView is a type that runs validations on a projected -// type. -type ServiceInstanceStatusView struct { - // The Docker container ID. - ContainerID *string - // The container image version currently running. - ImageVersion *string - // The hostname of the service instance. - Hostname *string - // The IPv4 address of the service instance. - Ipv4Address *string - // Port mappings for this service instance. - Ports []*PortMappingView - // Most recent health check result. - HealthCheck *HealthCheckResultView - // The time of the last health check attempt. - LastHealthAt *string - // Whether the service is ready to accept requests. - ServiceReady *bool -} - -// PortMappingView is a type that runs validations on a projected type. -type PortMappingView struct { - // The name of the port (e.g., 'http', 'web-client'). - Name *string - // The port number inside the container. - ContainerPort *int - // The port number on the host (if port-forwarded). - HostPort *int -} - -// HealthCheckResultView is a type that runs validations on a projected type. -type HealthCheckResultView struct { - // The health status. - Status *string - // Optional message about the health status. - Message *string - // The time this health check was performed. - CheckedAt *string -} - -// DatabaseSpecView is a type that runs validations on a projected type. -type DatabaseSpecView struct { - // The name of the Postgres database. - DatabaseName *string - // The Postgres version in 'major.minor' format. - PostgresVersion *string - // The major version of the Spock extension. - SpockVersion *string - // The port used by the Postgres database. If the port is 0, each instance will - // be assigned a random port. If the port is unspecified, the database will not - // be exposed on any port, dependent on orchestrator support for that feature. - Port *int - // The number of CPUs to allocate for the database and to use for tuning - // Postgres. Defaults to the number of available CPUs on the host. Can include - // an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced - // depends on the orchestrator. - Cpus *string - // The amount of memory in SI or IEC notation to allocate for the database and - // to use for tuning Postgres. Defaults to the total available memory on the - // host. Whether this limit is enforced depends on the orchestrator. - Memory *string - // The Spock nodes for this database. - Nodes []*DatabaseNodeSpecView - // The users to create for this database. - DatabaseUsers []*DatabaseUserSpecView - // Service instances to run alongside the database (e.g., MCP servers). - Services []*ServiceSpecView - // The backup configuration for this database. - BackupConfig *BackupConfigSpecView - // The restore configuration for this database. - RestoreConfig *RestoreConfigSpecView - // Additional postgresql.conf settings. Will be merged with the settings - // provided by control-plane. - PostgresqlConf map[string]any - // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsView -} - -// DatabaseNodeSpecView is a type that runs validations on a projected type. -type DatabaseNodeSpecView struct { - // The name of the database node. - Name *string - // The IDs of the hosts that should run this node. When multiple hosts are - // specified, one host will chosen as a primary, and the others will be read - // replicas. - HostIds []IdentifierView - // The Postgres version for this node in 'major.minor' format. Overrides the - // Postgres version set in the DatabaseSpec. - PostgresVersion *string - // The port used by the Postgres database for this node. Overrides the Postgres - // port set in the DatabaseSpec. - Port *int - // The number of CPUs to allocate for the database on this node and to use for - // tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 - // millicpus. Cannot allocate units smaller than 1m. Defaults to the number of - // available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs - // than are available on the host. Whether this limit is enforced depends on - // the orchestrator. - Cpus *string - // The amount of memory in SI or IEC notation to allocate for the database on - // this node and to use for tuning Postgres. Defaults to the total available - // memory on the host. Whether this limit is enforced depends on the - // orchestrator. - Memory *string - // Additional postgresql.conf settings for this particular node. Will be merged - // with the settings provided by control-plane. - PostgresqlConf map[string]any - // The backup configuration for this node. Overrides the backup configuration - // set in the DatabaseSpec. - BackupConfig *BackupConfigSpecView - // The restore configuration for this node. Overrides the restore configuration - // set in the DatabaseSpec. - RestoreConfig *RestoreConfigSpecView - // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsView - // The name of the source node to use for sync. This is typically the node - // (like 'n1') from which the data will be copied to initialize this new node. - SourceNode *string -} - -// BackupConfigSpecView is a type that runs validations on a projected type. -type BackupConfigSpecView struct { - // The repositories for this backup configuration. - Repositories []*BackupRepositorySpecView - // The schedules for this backup configuration. - Schedules []*BackupScheduleSpecView -} - -// BackupRepositorySpecView is a type that runs validations on a projected type. -type BackupRepositorySpecView struct { - // The unique identifier of this repository. - ID *IdentifierView - // The type of this repository. - Type *string - // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string - // The region of the S3 bucket for this repository. Only applies when type = - // 's3'. - S3Region *string - // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string - // An optional AWS access key ID to use for this repository. If not provided, - // pgbackrest will use the default credential provider chain. This field will - // be excluded from the response of all endpoints. It can also be omitted from - // update requests to keep the current value. - S3Key *string - // The corresponding secret for the AWS access key ID in s3_key. This field - // will be excluded from the response of all endpoints. It can also be omitted - // from update requests to keep the current value. - S3KeySecret *string - // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string - // The optional GCS endpoint for this repository. Only applies when type = - // 'gcs'. - GcsEndpoint *string - // Optional base64-encoded private key data. If omitted, pgbackrest will use - // the service account attached to the instance profile. This field will be - // excluded from the response of all endpoints. It can also be omitted from - // update requests to keep the current value. - GcsKey *string - // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string - // The Azure container name for this repository. Only applies when type = - // 'azure'. - AzureContainer *string - // The optional Azure endpoint for this repository. Only applies when type = - // 'azure'. - AzureEndpoint *string - // The Azure storage account access key to use for this repository. This field - // will be excluded from the response of all endpoints. It can also be omitted - // from update requests to keep the current value. - AzureKey *string - // The count of full backups to retain or the time to retain full backups. - RetentionFull *int - // The type of measure used for retention_full. - RetentionFullType *string - // The base path within the repository to store backups. Required for type = - // 'posix' and 'cifs'. - BasePath *string - // Additional options to apply to this repository. - CustomOptions map[string]string -} - -// BackupScheduleSpecView is a type that runs validations on a projected type. -type BackupScheduleSpecView struct { - // The unique identifier for this backup schedule. - ID *string - // The type of backup to take on this schedule. - Type *string - // The cron expression for this schedule. - CronExpression *string -} - -// RestoreConfigSpecView is a type that runs validations on a projected type. -type RestoreConfigSpecView struct { - // The ID of the database to restore this database from. - SourceDatabaseID *IdentifierView - // The name of the node to restore this database from. - SourceNodeName *string - // The name of the database in this repository. The database will be renamed to - // the database_name in the DatabaseSpec after it's restored. - SourceDatabaseName *string - // The repository to restore this database from. - Repository *RestoreRepositorySpecView - // Additional options to use when restoring this database. If omitted, the - // database will be restored to the latest point in the given repository. - RestoreOptions map[string]string -} - -// RestoreRepositorySpecView is a type that runs validations on a projected -// type. -type RestoreRepositorySpecView struct { - // The unique identifier of this repository. - ID *IdentifierView - // The type of this repository. - Type *string - // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string - // The region of the S3 bucket for this repository. Only applies when type = - // 's3'. - S3Region *string - // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string - // An optional AWS access key ID to use for this repository. If not provided, - // pgbackrest will use the default credential provider chain. - S3Key *string - // The corresponding secret for the AWS access key ID in s3_key. - S3KeySecret *string - // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string - // The optional GCS endpoint for this repository. Only applies when type = - // 'gcs'. - GcsEndpoint *string - // Optional base64-encoded private key data. If omitted, pgbackrest will use - // the service account attached to the instance profile. - GcsKey *string - // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string - // The Azure container name for this repository. Only applies when type = - // 'azure'. - AzureContainer *string - // The optional Azure endpoint for this repository. Only applies when type = - // 'azure'. - AzureEndpoint *string - // An optional Azure storage account access key to use for this repository. If - // not provided, pgbackrest will use the VM's managed identity. - AzureKey *string - // The base path within the repository to store backups. Required for type = - // 'posix' and 'cifs'. - BasePath *string - // Additional options to apply to this repository. - CustomOptions map[string]string -} - -// OrchestratorOptsView is a type that runs validations on a projected type. -type OrchestratorOptsView struct { - // Swarm-specific configuration. - Swarm *SwarmOptsView -} - -// SwarmOptsView is a type that runs validations on a projected type. -type SwarmOptsView struct { - // A list of extra volumes to mount. Each entry defines a host and container - // path. - ExtraVolumes []*ExtraVolumesSpecView - // A list of additional Docker Swarm networks to attach containers in this - // database to. - ExtraNetworks []*ExtraNetworkSpecView - // Arbitrary labels to apply to the Docker Swarm service - ExtraLabels map[string]string -} - -// ExtraVolumesSpecView is a type that runs validations on a projected type. -type ExtraVolumesSpecView struct { - // The host path for the volume. - HostPath *string - // The path inside the container where the volume will be mounted. - DestinationPath *string -} - -// ExtraNetworkSpecView is a type that runs validations on a projected type. -type ExtraNetworkSpecView struct { - // The name or ID of the network to connect to. - ID *string - // Optional network-scoped aliases for the container. - Aliases []string - // Optional driver options for the network connection. - DriverOpts map[string]string -} - -// DatabaseUserSpecView is a type that runs validations on a projected type. -type DatabaseUserSpecView struct { - // The username for this database user. - Username *string - // The password for this database user. This field will be excluded from the - // response of all endpoints. It can also be omitted from update requests to - // keep the current value. - Password *string - // If true, this user will be granted database ownership. - DbOwner *bool - // The attributes to assign to this database user. - Attributes []string - // The roles to assign to this database user. - Roles []string -} - -// ServiceSpecView is a type that runs validations on a projected type. -type ServiceSpecView struct { - // The unique identifier for this service. - ServiceID *IdentifierView - // The type of service to run. - ServiceType *string - // The version of the service in semver format (e.g., '1.0.0') or the literal - // 'latest'. - Version *string - // The IDs of the hosts that should run this service. One service instance will - // be created per host. - HostIds []IdentifierView - // The port to publish the service on the host. If 0, Docker assigns a random - // port. If unspecified, no port is published and the service is not accessible - // from outside the Docker network. - Port *int - // Service-specific configuration. For MCP services, this includes - // llm_provider, llm_model, and provider-specific API keys. - Config map[string]any - // The number of CPUs to allocate for this service. It can include the SI - // suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if - // unspecified. - Cpus *string - // The amount of memory in SI or IEC notation to allocate for this service. - // Defaults to container defaults if unspecified. - Memory *string -} - -// CreateDatabaseResponseView is a type that runs validations on a projected -// type. -type CreateDatabaseResponseView struct { - // The task that will create this database. - Task *TaskView - // The database being created. - Database *DatabaseView -} - -// TaskView is a type that runs validations on a projected type. -type TaskView struct { - // The parent task ID of the task. - ParentID *string - // The scope of the task (database or host). - Scope *string - // The entity ID (database_id or host_id) that this task belongs to. - EntityID *string - // The database ID of the task. - DatabaseID *string - // The name of the node that the task is operating on. - NodeName *string - // The ID of the instance that the task is operating on. - InstanceID *string - // The ID of the host that the task is running on. - HostID *string - // The unique ID of the task. - TaskID *string - // The time when the task was created. - CreatedAt *string - // The time when the task was completed. - CompletedAt *string - // The type of the task. - Type *string - // The status of the task. - Status *string - // The error message if the task failed. - Error *string -} - -// UpdateDatabaseResponseView is a type that runs validations on a projected -// type. -type UpdateDatabaseResponseView struct { - // The task that will update this database. - Task *TaskView - // The database being updated. - Database *DatabaseView -} - -// RestoreDatabaseResponseView is a type that runs validations on a projected -// type. -type RestoreDatabaseResponseView struct { - // The task that will restore this database. - Task *TaskView - // The tasks that will restore each database node. - NodeTasks []*TaskView - // The database being restored. - Database *DatabaseView -} - -var ( - // ListDatabasesResponseMap is a map indexing the attribute names of - // ListDatabasesResponse by view name. - ListDatabasesResponseMap = map[string][]string{ - "default": { - "databases", - }, - } - // DatabaseMap is a map indexing the attribute names of Database by view name. - DatabaseMap = map[string][]string{ - "default": { - "id", - "tenant_id", - "created_at", - "updated_at", - "state", - "instances", - "service_instances", - "spec", - }, - "abbreviated": { - "id", - "tenant_id", - "created_at", - "updated_at", - "state", - "instances", - }, - } - // DatabaseCollectionMap is a map indexing the attribute names of - // DatabaseCollection by view name. - DatabaseCollectionMap = map[string][]string{ - "default": { - "id", - "tenant_id", - "created_at", - "updated_at", - "state", - "instances", - "service_instances", - "spec", - }, - "abbreviated": { - "id", - "tenant_id", - "created_at", - "updated_at", - "state", - "instances", - }, - } - // InstanceCollectionMap is a map indexing the attribute names of - // InstanceCollection by view name. - InstanceCollectionMap = map[string][]string{ - "default": { - "id", - "host_id", - "node_name", - "created_at", - "updated_at", - "status_updated_at", - "state", - "connection_info", - "postgres", - "spock", - "error", - }, - "abbreviated": { - "id", - "host_id", - "node_name", - "state", - }, - } - // InstanceMap is a map indexing the attribute names of Instance by view name. - InstanceMap = map[string][]string{ - "default": { - "id", - "host_id", - "node_name", - "created_at", - "updated_at", - "status_updated_at", - "state", - "connection_info", - "postgres", - "spock", - "error", - }, - "abbreviated": { - "id", - "host_id", - "node_name", - "state", - }, - } - // ServiceinstanceCollectionMap is a map indexing the attribute names of - // ServiceinstanceCollection by view name. - ServiceinstanceCollectionMap = map[string][]string{ - "default": { - "service_instance_id", - "service_id", - "database_id", - "host_id", - "state", - "status", - "created_at", - "updated_at", - "error", - }, - } - // ServiceinstanceMap is a map indexing the attribute names of Serviceinstance - // by view name. - ServiceinstanceMap = map[string][]string{ - "default": { - "service_instance_id", - "service_id", - "database_id", - "host_id", - "state", - "status", - "created_at", - "updated_at", - "error", - }, - } -) - -// ValidateListDatabasesResponse runs the validations defined on the viewed -// result type ListDatabasesResponse. -func ValidateListDatabasesResponse(result *ListDatabasesResponse) (err error) { - switch result.View { - case "default", "": - err = ValidateListDatabasesResponseView(result.Projected) - default: - err = goa.InvalidEnumValueError("view", result.View, []any{"default"}) - } - return -} - -// ValidateDatabase runs the validations defined on the viewed result type -// Database. -func ValidateDatabase(result *Database) (err error) { - switch result.View { - case "default", "": - err = ValidateDatabaseView(result.Projected) - case "abbreviated": - err = ValidateDatabaseViewAbbreviated(result.Projected) - default: - err = goa.InvalidEnumValueError("view", result.View, []any{"default", "abbreviated"}) - } - return -} - -// ValidateListDatabasesResponseView runs the validations defined on -// ListDatabasesResponseView using the "default" view. -func ValidateListDatabasesResponseView(result *ListDatabasesResponseView) (err error) { - - if result.Databases != nil { - if err2 := ValidateDatabaseCollectionViewAbbreviated(result.Databases); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - return -} - -// ValidateDatabaseCollectionView runs the validations defined on -// DatabaseCollectionView using the "default" view. -func ValidateDatabaseCollectionView(result DatabaseCollectionView) (err error) { - for _, item := range result { - if err2 := ValidateDatabaseView(item); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - return -} - -// ValidateDatabaseCollectionViewAbbreviated runs the validations defined on -// DatabaseCollectionView using the "abbreviated" view. -func ValidateDatabaseCollectionViewAbbreviated(result DatabaseCollectionView) (err error) { - for _, item := range result { - if err2 := ValidateDatabaseViewAbbreviated(item); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - return -} - -// ValidateDatabaseView runs the validations defined on DatabaseView using the -// "default" view. -func ValidateDatabaseView(result *DatabaseView) (err error) { - if result.ID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("id", "result")) - } - if result.CreatedAt == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("created_at", "result")) - } - if result.UpdatedAt == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("updated_at", "result")) - } - if result.State == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("state", "result")) - } - if result.ID != nil { - if utf8.RuneCountInString(string(*result.ID)) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.id", string(*result.ID), utf8.RuneCountInString(string(*result.ID)), 1, true)) - } - } - if result.ID != nil { - if utf8.RuneCountInString(string(*result.ID)) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.id", string(*result.ID), utf8.RuneCountInString(string(*result.ID)), 63, false)) - } - } - if result.TenantID != nil { - if utf8.RuneCountInString(string(*result.TenantID)) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.tenant_id", string(*result.TenantID), utf8.RuneCountInString(string(*result.TenantID)), 1, true)) - } - } - if result.TenantID != nil { - if utf8.RuneCountInString(string(*result.TenantID)) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.tenant_id", string(*result.TenantID), utf8.RuneCountInString(string(*result.TenantID)), 63, false)) - } - } - if result.CreatedAt != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.created_at", *result.CreatedAt, goa.FormatDateTime)) - } - if result.UpdatedAt != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.updated_at", *result.UpdatedAt, goa.FormatDateTime)) - } - if result.State != nil { - if !(*result.State == "creating" || *result.State == "modifying" || *result.State == "available" || *result.State == "deleting" || *result.State == "degraded" || *result.State == "failed" || *result.State == "backing_up" || *result.State == "restoring" || *result.State == "unknown") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("result.state", *result.State, []any{"creating", "modifying", "available", "deleting", "degraded", "failed", "backing_up", "restoring", "unknown"})) - } - } - if result.Spec != nil { - if err2 := ValidateDatabaseSpecView(result.Spec); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - if result.Instances != nil { - if err2 := ValidateInstanceCollectionView(result.Instances); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - if result.ServiceInstances != nil { - if err2 := ValidateServiceinstanceCollectionView(result.ServiceInstances); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - return -} - -// ValidateDatabaseViewAbbreviated runs the validations defined on DatabaseView -// using the "abbreviated" view. -func ValidateDatabaseViewAbbreviated(result *DatabaseView) (err error) { - if result.ID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("id", "result")) - } - if result.CreatedAt == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("created_at", "result")) - } - if result.UpdatedAt == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("updated_at", "result")) - } - if result.State == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("state", "result")) - } - if result.ID != nil { - if utf8.RuneCountInString(string(*result.ID)) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.id", string(*result.ID), utf8.RuneCountInString(string(*result.ID)), 1, true)) - } - } - if result.ID != nil { - if utf8.RuneCountInString(string(*result.ID)) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.id", string(*result.ID), utf8.RuneCountInString(string(*result.ID)), 63, false)) - } - } - if result.TenantID != nil { - if utf8.RuneCountInString(string(*result.TenantID)) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.tenant_id", string(*result.TenantID), utf8.RuneCountInString(string(*result.TenantID)), 1, true)) - } - } - if result.TenantID != nil { - if utf8.RuneCountInString(string(*result.TenantID)) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.tenant_id", string(*result.TenantID), utf8.RuneCountInString(string(*result.TenantID)), 63, false)) - } - } - if result.CreatedAt != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.created_at", *result.CreatedAt, goa.FormatDateTime)) - } - if result.UpdatedAt != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.updated_at", *result.UpdatedAt, goa.FormatDateTime)) - } - if result.State != nil { - if !(*result.State == "creating" || *result.State == "modifying" || *result.State == "available" || *result.State == "deleting" || *result.State == "degraded" || *result.State == "failed" || *result.State == "backing_up" || *result.State == "restoring" || *result.State == "unknown") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("result.state", *result.State, []any{"creating", "modifying", "available", "deleting", "degraded", "failed", "backing_up", "restoring", "unknown"})) - } - } - if result.Instances != nil { - if err2 := ValidateInstanceCollectionViewAbbreviated(result.Instances); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - return -} - -// ValidateIdentifierView runs the validations defined on IdentifierView. -func ValidateIdentifierView(result IdentifierView) (err error) { - if utf8.RuneCountInString(string(result)) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result", string(result), utf8.RuneCountInString(string(result)), 1, true)) - } - if utf8.RuneCountInString(string(result)) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result", string(result), utf8.RuneCountInString(string(result)), 63, false)) - } - return -} - -// ValidateInstanceCollectionView runs the validations defined on -// InstanceCollectionView using the "default" view. -func ValidateInstanceCollectionView(result InstanceCollectionView) (err error) { - for _, item := range result { - if err2 := ValidateInstanceView(item); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - return -} - -// ValidateInstanceCollectionViewAbbreviated runs the validations defined on -// InstanceCollectionView using the "abbreviated" view. -func ValidateInstanceCollectionViewAbbreviated(result InstanceCollectionView) (err error) { - for _, item := range result { - if err2 := ValidateInstanceViewAbbreviated(item); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - return -} - -// ValidateInstanceView runs the validations defined on InstanceView using the -// "default" view. -func ValidateInstanceView(result *InstanceView) (err error) { - if result.ID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("id", "result")) - } - if result.HostID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("host_id", "result")) - } - if result.NodeName == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("node_name", "result")) - } - if result.CreatedAt == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("created_at", "result")) - } - if result.UpdatedAt == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("updated_at", "result")) - } - if result.State == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("state", "result")) - } - if result.CreatedAt != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.created_at", *result.CreatedAt, goa.FormatDateTime)) - } - if result.UpdatedAt != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.updated_at", *result.UpdatedAt, goa.FormatDateTime)) - } - if result.StatusUpdatedAt != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.status_updated_at", *result.StatusUpdatedAt, goa.FormatDateTime)) - } - if result.State != nil { - if !(*result.State == "creating" || *result.State == "modifying" || *result.State == "backing_up" || *result.State == "available" || *result.State == "degraded" || *result.State == "failed" || *result.State == "stopped" || *result.State == "unknown") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("result.state", *result.State, []any{"creating", "modifying", "backing_up", "available", "degraded", "failed", "stopped", "unknown"})) - } - } - if result.ConnectionInfo != nil { - if err2 := ValidateInstanceConnectionInfoView(result.ConnectionInfo); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - if result.Spock != nil { - if err2 := ValidateInstanceSpockStatusView(result.Spock); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - return -} - -// ValidateInstanceViewAbbreviated runs the validations defined on InstanceView -// using the "abbreviated" view. -func ValidateInstanceViewAbbreviated(result *InstanceView) (err error) { - if result.ID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("id", "result")) - } - if result.HostID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("host_id", "result")) - } - if result.NodeName == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("node_name", "result")) - } - if result.State == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("state", "result")) - } - if result.State != nil { - if !(*result.State == "creating" || *result.State == "modifying" || *result.State == "backing_up" || *result.State == "available" || *result.State == "degraded" || *result.State == "failed" || *result.State == "stopped" || *result.State == "unknown") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("result.state", *result.State, []any{"creating", "modifying", "backing_up", "available", "degraded", "failed", "stopped", "unknown"})) - } - } - return -} - -// ValidateInstanceConnectionInfoView runs the validations defined on -// InstanceConnectionInfoView. -func ValidateInstanceConnectionInfoView(result *InstanceConnectionInfoView) (err error) { - if result.Ipv4Address != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.ipv4_address", *result.Ipv4Address, goa.FormatIPv4)) - } - return -} - -// ValidateInstancePostgresStatusView runs the validations defined on -// InstancePostgresStatusView. -func ValidateInstancePostgresStatusView(result *InstancePostgresStatusView) (err error) { - - return -} - -// ValidateInstanceSpockStatusView runs the validations defined on -// InstanceSpockStatusView. -func ValidateInstanceSpockStatusView(result *InstanceSpockStatusView) (err error) { - for _, e := range result.Subscriptions { - if e != nil { - if err2 := ValidateInstanceSubscriptionView(e); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - } - return -} - -// ValidateInstanceSubscriptionView runs the validations defined on -// InstanceSubscriptionView. -func ValidateInstanceSubscriptionView(result *InstanceSubscriptionView) (err error) { - if result.ProviderNode == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("provider_node", "result")) - } - if result.Name == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("name", "result")) - } - if result.Status == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("status", "result")) - } - if result.ProviderNode != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("result.provider_node", *result.ProviderNode, "n[0-9]+")) - } - return -} - -// ValidateServiceinstanceCollectionView runs the validations defined on -// ServiceinstanceCollectionView using the "default" view. -func ValidateServiceinstanceCollectionView(result ServiceinstanceCollectionView) (err error) { - for _, item := range result { - if err2 := ValidateServiceinstanceView(item); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - return -} - -// ValidateServiceinstanceView runs the validations defined on -// ServiceinstanceView using the "default" view. -func ValidateServiceinstanceView(result *ServiceinstanceView) (err error) { - if result.ServiceInstanceID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("service_instance_id", "result")) - } - if result.ServiceID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("service_id", "result")) - } - if result.DatabaseID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("database_id", "result")) - } - if result.HostID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("host_id", "result")) - } - if result.State == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("state", "result")) - } - if result.CreatedAt == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("created_at", "result")) - } - if result.UpdatedAt == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("updated_at", "result")) - } - if result.DatabaseID != nil { - if utf8.RuneCountInString(string(*result.DatabaseID)) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.database_id", string(*result.DatabaseID), utf8.RuneCountInString(string(*result.DatabaseID)), 1, true)) - } - } - if result.DatabaseID != nil { - if utf8.RuneCountInString(string(*result.DatabaseID)) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.database_id", string(*result.DatabaseID), utf8.RuneCountInString(string(*result.DatabaseID)), 63, false)) - } - } - if result.State != nil { - if !(*result.State == "creating" || *result.State == "running" || *result.State == "failed" || *result.State == "deleting") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("result.state", *result.State, []any{"creating", "running", "failed", "deleting"})) - } - } - if result.Status != nil { - if err2 := ValidateServiceInstanceStatusView(result.Status); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - if result.CreatedAt != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.created_at", *result.CreatedAt, goa.FormatDateTime)) - } - if result.UpdatedAt != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.updated_at", *result.UpdatedAt, goa.FormatDateTime)) - } - return -} - -// ValidateServiceInstanceStatusView runs the validations defined on -// ServiceInstanceStatusView. -func ValidateServiceInstanceStatusView(result *ServiceInstanceStatusView) (err error) { - if result.Ipv4Address != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.ipv4_address", *result.Ipv4Address, goa.FormatIPv4)) - } - for _, e := range result.Ports { - if e != nil { - if err2 := ValidatePortMappingView(e); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - } - if result.HealthCheck != nil { - if err2 := ValidateHealthCheckResultView(result.HealthCheck); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - if result.LastHealthAt != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.last_health_at", *result.LastHealthAt, goa.FormatDateTime)) - } - return -} - -// ValidatePortMappingView runs the validations defined on PortMappingView. -func ValidatePortMappingView(result *PortMappingView) (err error) { - if result.Name == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("name", "result")) - } - if result.ContainerPort != nil { - if *result.ContainerPort < 1 { - err = goa.MergeErrors(err, goa.InvalidRangeError("result.container_port", *result.ContainerPort, 1, true)) - } - } - if result.ContainerPort != nil { - if *result.ContainerPort > 65535 { - err = goa.MergeErrors(err, goa.InvalidRangeError("result.container_port", *result.ContainerPort, 65535, false)) - } - } - if result.HostPort != nil { - if *result.HostPort < 1 { - err = goa.MergeErrors(err, goa.InvalidRangeError("result.host_port", *result.HostPort, 1, true)) - } - } - if result.HostPort != nil { - if *result.HostPort > 65535 { - err = goa.MergeErrors(err, goa.InvalidRangeError("result.host_port", *result.HostPort, 65535, false)) - } - } - return -} - -// ValidateHealthCheckResultView runs the validations defined on -// HealthCheckResultView. -func ValidateHealthCheckResultView(result *HealthCheckResultView) (err error) { - if result.Status == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("status", "result")) - } - if result.CheckedAt == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("checked_at", "result")) - } - if result.Status != nil { - if !(*result.Status == "healthy" || *result.Status == "unhealthy" || *result.Status == "unknown") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("result.status", *result.Status, []any{"healthy", "unhealthy", "unknown"})) - } - } - if result.CheckedAt != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.checked_at", *result.CheckedAt, goa.FormatDateTime)) - } - return -} - -// ValidateDatabaseSpecView runs the validations defined on DatabaseSpecView. -func ValidateDatabaseSpecView(result *DatabaseSpecView) (err error) { - if result.DatabaseName == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("database_name", "result")) - } - if result.Nodes == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("nodes", "result")) - } - if result.DatabaseName != nil { - if utf8.RuneCountInString(*result.DatabaseName) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.database_name", *result.DatabaseName, utf8.RuneCountInString(*result.DatabaseName), 1, true)) - } - } - if result.DatabaseName != nil { - if utf8.RuneCountInString(*result.DatabaseName) > 31 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.database_name", *result.DatabaseName, utf8.RuneCountInString(*result.DatabaseName), 31, false)) - } - } - if result.PostgresVersion != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("result.postgres_version", *result.PostgresVersion, "^\\d{2}\\.\\d{1,2}$")) - } - if result.SpockVersion != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("result.spock_version", *result.SpockVersion, "^\\d{1}$")) - } - if result.Port != nil { - if *result.Port < 0 { - err = goa.MergeErrors(err, goa.InvalidRangeError("result.port", *result.Port, 0, true)) - } - } - if result.Port != nil { - if *result.Port > 65535 { - err = goa.MergeErrors(err, goa.InvalidRangeError("result.port", *result.Port, 65535, false)) - } - } - if result.Cpus != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("result.cpus", *result.Cpus, "^[0-9]+(\\.[0-9]{1,3}|m)?$")) - } - if result.Memory != nil { - if utf8.RuneCountInString(*result.Memory) > 16 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.memory", *result.Memory, utf8.RuneCountInString(*result.Memory), 16, false)) - } - } - if len(result.Nodes) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.nodes", result.Nodes, len(result.Nodes), 1, true)) - } - if len(result.Nodes) > 9 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.nodes", result.Nodes, len(result.Nodes), 9, false)) - } - for _, e := range result.Nodes { - if e != nil { - if err2 := ValidateDatabaseNodeSpecView(e); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - } - if len(result.DatabaseUsers) > 16 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.database_users", result.DatabaseUsers, len(result.DatabaseUsers), 16, false)) - } - for _, e := range result.DatabaseUsers { - if e != nil { - if err2 := ValidateDatabaseUserSpecView(e); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - } - for _, e := range result.Services { - if e != nil { - if err2 := ValidateServiceSpecView(e); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - } - if result.BackupConfig != nil { - if err2 := ValidateBackupConfigSpecView(result.BackupConfig); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - if result.RestoreConfig != nil { - if err2 := ValidateRestoreConfigSpecView(result.RestoreConfig); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - if len(result.PostgresqlConf) > 64 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.postgresql_conf", result.PostgresqlConf, len(result.PostgresqlConf), 64, false)) - } - if result.OrchestratorOpts != nil { - if err2 := ValidateOrchestratorOptsView(result.OrchestratorOpts); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - return -} - -// ValidateDatabaseNodeSpecView runs the validations defined on -// DatabaseNodeSpecView. -func ValidateDatabaseNodeSpecView(result *DatabaseNodeSpecView) (err error) { - if result.Name == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("name", "result")) - } - if result.HostIds == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("host_ids", "result")) - } - if result.Name != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("result.name", *result.Name, "n[0-9]+")) - } - if len(result.HostIds) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.host_ids", result.HostIds, len(result.HostIds), 1, true)) - } - for _, e := range result.HostIds { - if utf8.RuneCountInString(string(e)) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.host_ids[*]", string(e), utf8.RuneCountInString(string(e)), 1, true)) - } - if utf8.RuneCountInString(string(e)) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.host_ids[*]", string(e), utf8.RuneCountInString(string(e)), 63, false)) - } - } - if result.PostgresVersion != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("result.postgres_version", *result.PostgresVersion, "^\\d{2}\\.\\d{1,2}$")) - } - if result.Port != nil { - if *result.Port < 0 { - err = goa.MergeErrors(err, goa.InvalidRangeError("result.port", *result.Port, 0, true)) - } - } - if result.Port != nil { - if *result.Port > 65535 { - err = goa.MergeErrors(err, goa.InvalidRangeError("result.port", *result.Port, 65535, false)) - } - } - if result.Cpus != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("result.cpus", *result.Cpus, "^[0-9]+(\\.[0-9]{1,3}|m)?$")) - } - if result.Memory != nil { - if utf8.RuneCountInString(*result.Memory) > 16 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.memory", *result.Memory, utf8.RuneCountInString(*result.Memory), 16, false)) - } - } - if result.BackupConfig != nil { - if err2 := ValidateBackupConfigSpecView(result.BackupConfig); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - if result.RestoreConfig != nil { - if err2 := ValidateRestoreConfigSpecView(result.RestoreConfig); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - if result.OrchestratorOpts != nil { - if err2 := ValidateOrchestratorOptsView(result.OrchestratorOpts); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - return -} - -// ValidateBackupConfigSpecView runs the validations defined on -// BackupConfigSpecView. -func ValidateBackupConfigSpecView(result *BackupConfigSpecView) (err error) { - if result.Repositories == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("repositories", "result")) - } - if len(result.Repositories) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.repositories", result.Repositories, len(result.Repositories), 1, true)) - } - for _, e := range result.Repositories { - if e != nil { - if err2 := ValidateBackupRepositorySpecView(e); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - } - if len(result.Schedules) > 32 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.schedules", result.Schedules, len(result.Schedules), 32, false)) - } - for _, e := range result.Schedules { - if e != nil { - if err2 := ValidateBackupScheduleSpecView(e); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - } - return -} - -// ValidateBackupRepositorySpecView runs the validations defined on -// BackupRepositorySpecView. -func ValidateBackupRepositorySpecView(result *BackupRepositorySpecView) (err error) { - if result.Type == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("type", "result")) - } - if result.ID != nil { - if utf8.RuneCountInString(string(*result.ID)) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.id", string(*result.ID), utf8.RuneCountInString(string(*result.ID)), 1, true)) - } - } - if result.ID != nil { - if utf8.RuneCountInString(string(*result.ID)) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.id", string(*result.ID), utf8.RuneCountInString(string(*result.ID)), 63, false)) - } - } - if result.Type != nil { - if !(*result.Type == "s3" || *result.Type == "gcs" || *result.Type == "azure" || *result.Type == "posix" || *result.Type == "cifs") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("result.type", *result.Type, []any{"s3", "gcs", "azure", "posix", "cifs"})) - } - } - if result.S3Bucket != nil { - if utf8.RuneCountInString(*result.S3Bucket) < 3 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_bucket", *result.S3Bucket, utf8.RuneCountInString(*result.S3Bucket), 3, true)) - } - } - if result.S3Bucket != nil { - if utf8.RuneCountInString(*result.S3Bucket) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_bucket", *result.S3Bucket, utf8.RuneCountInString(*result.S3Bucket), 63, false)) - } - } - if result.S3Region != nil { - if utf8.RuneCountInString(*result.S3Region) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_region", *result.S3Region, utf8.RuneCountInString(*result.S3Region), 1, true)) - } - } - if result.S3Region != nil { - if utf8.RuneCountInString(*result.S3Region) > 32 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_region", *result.S3Region, utf8.RuneCountInString(*result.S3Region), 32, false)) - } - } - if result.S3Endpoint != nil { - if utf8.RuneCountInString(*result.S3Endpoint) < 3 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_endpoint", *result.S3Endpoint, utf8.RuneCountInString(*result.S3Endpoint), 3, true)) - } - } - if result.S3Endpoint != nil { - if utf8.RuneCountInString(*result.S3Endpoint) > 128 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_endpoint", *result.S3Endpoint, utf8.RuneCountInString(*result.S3Endpoint), 128, false)) - } - } - if result.S3Key != nil { - if utf8.RuneCountInString(*result.S3Key) > 128 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_key", *result.S3Key, utf8.RuneCountInString(*result.S3Key), 128, false)) - } - } - if result.S3KeySecret != nil { - if utf8.RuneCountInString(*result.S3KeySecret) > 128 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_key_secret", *result.S3KeySecret, utf8.RuneCountInString(*result.S3KeySecret), 128, false)) - } - } - if result.GcsBucket != nil { - if utf8.RuneCountInString(*result.GcsBucket) < 3 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.gcs_bucket", *result.GcsBucket, utf8.RuneCountInString(*result.GcsBucket), 3, true)) - } - } - if result.GcsBucket != nil { - if utf8.RuneCountInString(*result.GcsBucket) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.gcs_bucket", *result.GcsBucket, utf8.RuneCountInString(*result.GcsBucket), 63, false)) - } - } - if result.GcsEndpoint != nil { - if utf8.RuneCountInString(*result.GcsEndpoint) < 3 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.gcs_endpoint", *result.GcsEndpoint, utf8.RuneCountInString(*result.GcsEndpoint), 3, true)) - } - } - if result.GcsEndpoint != nil { - if utf8.RuneCountInString(*result.GcsEndpoint) > 128 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.gcs_endpoint", *result.GcsEndpoint, utf8.RuneCountInString(*result.GcsEndpoint), 128, false)) - } - } - if result.GcsKey != nil { - if utf8.RuneCountInString(*result.GcsKey) > 1024 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.gcs_key", *result.GcsKey, utf8.RuneCountInString(*result.GcsKey), 1024, false)) - } - } - if result.AzureAccount != nil { - if utf8.RuneCountInString(*result.AzureAccount) < 3 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.azure_account", *result.AzureAccount, utf8.RuneCountInString(*result.AzureAccount), 3, true)) - } - } - if result.AzureAccount != nil { - if utf8.RuneCountInString(*result.AzureAccount) > 24 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.azure_account", *result.AzureAccount, utf8.RuneCountInString(*result.AzureAccount), 24, false)) - } - } - if result.AzureContainer != nil { - if utf8.RuneCountInString(*result.AzureContainer) < 3 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.azure_container", *result.AzureContainer, utf8.RuneCountInString(*result.AzureContainer), 3, true)) - } - } - if result.AzureContainer != nil { - if utf8.RuneCountInString(*result.AzureContainer) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.azure_container", *result.AzureContainer, utf8.RuneCountInString(*result.AzureContainer), 63, false)) - } - } - if result.AzureEndpoint != nil { - if utf8.RuneCountInString(*result.AzureEndpoint) < 3 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.azure_endpoint", *result.AzureEndpoint, utf8.RuneCountInString(*result.AzureEndpoint), 3, true)) - } - } - if result.AzureEndpoint != nil { - if utf8.RuneCountInString(*result.AzureEndpoint) > 128 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.azure_endpoint", *result.AzureEndpoint, utf8.RuneCountInString(*result.AzureEndpoint), 128, false)) - } - } - if result.AzureKey != nil { - if utf8.RuneCountInString(*result.AzureKey) > 128 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.azure_key", *result.AzureKey, utf8.RuneCountInString(*result.AzureKey), 128, false)) - } - } - if result.RetentionFull != nil { - if *result.RetentionFull < 1 { - err = goa.MergeErrors(err, goa.InvalidRangeError("result.retention_full", *result.RetentionFull, 1, true)) - } - } - if result.RetentionFull != nil { - if *result.RetentionFull > 9.999999e+06 { - err = goa.MergeErrors(err, goa.InvalidRangeError("result.retention_full", *result.RetentionFull, 9.999999e+06, false)) - } - } - if result.RetentionFullType != nil { - if !(*result.RetentionFullType == "time" || *result.RetentionFullType == "count") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("result.retention_full_type", *result.RetentionFullType, []any{"time", "count"})) - } - } - if result.BasePath != nil { - if utf8.RuneCountInString(*result.BasePath) > 256 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.base_path", *result.BasePath, utf8.RuneCountInString(*result.BasePath), 256, false)) - } - } - return -} - -// ValidateBackupScheduleSpecView runs the validations defined on -// BackupScheduleSpecView. -func ValidateBackupScheduleSpecView(result *BackupScheduleSpecView) (err error) { - if result.ID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("id", "result")) - } - if result.Type == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("type", "result")) - } - if result.CronExpression == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("cron_expression", "result")) - } - if result.ID != nil { - if utf8.RuneCountInString(*result.ID) > 64 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.id", *result.ID, utf8.RuneCountInString(*result.ID), 64, false)) - } - } - if result.Type != nil { - if !(*result.Type == "full" || *result.Type == "incr") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("result.type", *result.Type, []any{"full", "incr"})) - } - } - if result.CronExpression != nil { - if utf8.RuneCountInString(*result.CronExpression) > 32 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.cron_expression", *result.CronExpression, utf8.RuneCountInString(*result.CronExpression), 32, false)) - } - } - return -} - -// ValidateRestoreConfigSpecView runs the validations defined on -// RestoreConfigSpecView. -func ValidateRestoreConfigSpecView(result *RestoreConfigSpecView) (err error) { - if result.SourceDatabaseID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("source_database_id", "result")) - } - if result.SourceNodeName == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("source_node_name", "result")) - } - if result.SourceDatabaseName == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("source_database_name", "result")) - } - if result.Repository == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("repository", "result")) - } - if result.SourceDatabaseID != nil { - if utf8.RuneCountInString(string(*result.SourceDatabaseID)) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.source_database_id", string(*result.SourceDatabaseID), utf8.RuneCountInString(string(*result.SourceDatabaseID)), 1, true)) - } - } - if result.SourceDatabaseID != nil { - if utf8.RuneCountInString(string(*result.SourceDatabaseID)) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.source_database_id", string(*result.SourceDatabaseID), utf8.RuneCountInString(string(*result.SourceDatabaseID)), 63, false)) - } - } - if result.SourceNodeName != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("result.source_node_name", *result.SourceNodeName, "n[0-9]+")) - } - if result.SourceDatabaseName != nil { - if utf8.RuneCountInString(*result.SourceDatabaseName) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.source_database_name", *result.SourceDatabaseName, utf8.RuneCountInString(*result.SourceDatabaseName), 1, true)) - } - } - if result.SourceDatabaseName != nil { - if utf8.RuneCountInString(*result.SourceDatabaseName) > 31 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.source_database_name", *result.SourceDatabaseName, utf8.RuneCountInString(*result.SourceDatabaseName), 31, false)) - } - } - if result.Repository != nil { - if err2 := ValidateRestoreRepositorySpecView(result.Repository); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - if len(result.RestoreOptions) > 32 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.restore_options", result.RestoreOptions, len(result.RestoreOptions), 32, false)) - } - return -} - -// ValidateRestoreRepositorySpecView runs the validations defined on -// RestoreRepositorySpecView. -func ValidateRestoreRepositorySpecView(result *RestoreRepositorySpecView) (err error) { - if result.Type == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("type", "result")) - } - if result.ID != nil { - if utf8.RuneCountInString(string(*result.ID)) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.id", string(*result.ID), utf8.RuneCountInString(string(*result.ID)), 1, true)) - } - } - if result.ID != nil { - if utf8.RuneCountInString(string(*result.ID)) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.id", string(*result.ID), utf8.RuneCountInString(string(*result.ID)), 63, false)) - } - } - if result.Type != nil { - if !(*result.Type == "s3" || *result.Type == "gcs" || *result.Type == "azure" || *result.Type == "posix" || *result.Type == "cifs") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("result.type", *result.Type, []any{"s3", "gcs", "azure", "posix", "cifs"})) - } - } - if result.S3Bucket != nil { - if utf8.RuneCountInString(*result.S3Bucket) < 3 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_bucket", *result.S3Bucket, utf8.RuneCountInString(*result.S3Bucket), 3, true)) - } - } - if result.S3Bucket != nil { - if utf8.RuneCountInString(*result.S3Bucket) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_bucket", *result.S3Bucket, utf8.RuneCountInString(*result.S3Bucket), 63, false)) - } - } - if result.S3Region != nil { - if utf8.RuneCountInString(*result.S3Region) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_region", *result.S3Region, utf8.RuneCountInString(*result.S3Region), 1, true)) - } - } - if result.S3Region != nil { - if utf8.RuneCountInString(*result.S3Region) > 32 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_region", *result.S3Region, utf8.RuneCountInString(*result.S3Region), 32, false)) - } - } - if result.S3Endpoint != nil { - if utf8.RuneCountInString(*result.S3Endpoint) < 3 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_endpoint", *result.S3Endpoint, utf8.RuneCountInString(*result.S3Endpoint), 3, true)) - } - } - if result.S3Endpoint != nil { - if utf8.RuneCountInString(*result.S3Endpoint) > 128 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_endpoint", *result.S3Endpoint, utf8.RuneCountInString(*result.S3Endpoint), 128, false)) - } - } - if result.S3Key != nil { - if utf8.RuneCountInString(*result.S3Key) > 128 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_key", *result.S3Key, utf8.RuneCountInString(*result.S3Key), 128, false)) - } - } - if result.S3KeySecret != nil { - if utf8.RuneCountInString(*result.S3KeySecret) > 128 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.s3_key_secret", *result.S3KeySecret, utf8.RuneCountInString(*result.S3KeySecret), 128, false)) - } - } - if result.GcsBucket != nil { - if utf8.RuneCountInString(*result.GcsBucket) < 3 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.gcs_bucket", *result.GcsBucket, utf8.RuneCountInString(*result.GcsBucket), 3, true)) - } - } - if result.GcsBucket != nil { - if utf8.RuneCountInString(*result.GcsBucket) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.gcs_bucket", *result.GcsBucket, utf8.RuneCountInString(*result.GcsBucket), 63, false)) - } - } - if result.GcsEndpoint != nil { - if utf8.RuneCountInString(*result.GcsEndpoint) < 3 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.gcs_endpoint", *result.GcsEndpoint, utf8.RuneCountInString(*result.GcsEndpoint), 3, true)) - } - } - if result.GcsEndpoint != nil { - if utf8.RuneCountInString(*result.GcsEndpoint) > 128 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.gcs_endpoint", *result.GcsEndpoint, utf8.RuneCountInString(*result.GcsEndpoint), 128, false)) - } - } - if result.GcsKey != nil { - if utf8.RuneCountInString(*result.GcsKey) > 1024 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.gcs_key", *result.GcsKey, utf8.RuneCountInString(*result.GcsKey), 1024, false)) - } - } - if result.AzureAccount != nil { - if utf8.RuneCountInString(*result.AzureAccount) < 3 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.azure_account", *result.AzureAccount, utf8.RuneCountInString(*result.AzureAccount), 3, true)) - } - } - if result.AzureAccount != nil { - if utf8.RuneCountInString(*result.AzureAccount) > 24 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.azure_account", *result.AzureAccount, utf8.RuneCountInString(*result.AzureAccount), 24, false)) - } - } - if result.AzureContainer != nil { - if utf8.RuneCountInString(*result.AzureContainer) < 3 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.azure_container", *result.AzureContainer, utf8.RuneCountInString(*result.AzureContainer), 3, true)) - } - } - if result.AzureContainer != nil { - if utf8.RuneCountInString(*result.AzureContainer) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.azure_container", *result.AzureContainer, utf8.RuneCountInString(*result.AzureContainer), 63, false)) - } - } - if result.AzureEndpoint != nil { - if utf8.RuneCountInString(*result.AzureEndpoint) < 3 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.azure_endpoint", *result.AzureEndpoint, utf8.RuneCountInString(*result.AzureEndpoint), 3, true)) - } - } - if result.AzureEndpoint != nil { - if utf8.RuneCountInString(*result.AzureEndpoint) > 128 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.azure_endpoint", *result.AzureEndpoint, utf8.RuneCountInString(*result.AzureEndpoint), 128, false)) - } - } - if result.AzureKey != nil { - if utf8.RuneCountInString(*result.AzureKey) > 128 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.azure_key", *result.AzureKey, utf8.RuneCountInString(*result.AzureKey), 128, false)) - } - } - if result.BasePath != nil { - if utf8.RuneCountInString(*result.BasePath) > 256 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.base_path", *result.BasePath, utf8.RuneCountInString(*result.BasePath), 256, false)) - } - } - return -} - -// ValidateOrchestratorOptsView runs the validations defined on -// OrchestratorOptsView. -func ValidateOrchestratorOptsView(result *OrchestratorOptsView) (err error) { - if result.Swarm != nil { - if err2 := ValidateSwarmOptsView(result.Swarm); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - return -} - -// ValidateSwarmOptsView runs the validations defined on SwarmOptsView. -func ValidateSwarmOptsView(result *SwarmOptsView) (err error) { - if len(result.ExtraVolumes) > 16 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.extra_volumes", result.ExtraVolumes, len(result.ExtraVolumes), 16, false)) - } - for _, e := range result.ExtraVolumes { - if e != nil { - if err2 := ValidateExtraVolumesSpecView(e); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - } - if len(result.ExtraNetworks) > 8 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.extra_networks", result.ExtraNetworks, len(result.ExtraNetworks), 8, false)) - } - for _, e := range result.ExtraNetworks { - if e != nil { - if err2 := ValidateExtraNetworkSpecView(e); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - } - return -} - -// ValidateExtraVolumesSpecView runs the validations defined on -// ExtraVolumesSpecView. -func ValidateExtraVolumesSpecView(result *ExtraVolumesSpecView) (err error) { - if result.HostPath == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("host_path", "result")) - } - if result.DestinationPath == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("destination_path", "result")) - } - if result.HostPath != nil { - if utf8.RuneCountInString(*result.HostPath) > 256 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.host_path", *result.HostPath, utf8.RuneCountInString(*result.HostPath), 256, false)) - } - } - if result.DestinationPath != nil { - if utf8.RuneCountInString(*result.DestinationPath) > 256 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.destination_path", *result.DestinationPath, utf8.RuneCountInString(*result.DestinationPath), 256, false)) - } - } - return -} - -// ValidateExtraNetworkSpecView runs the validations defined on -// ExtraNetworkSpecView. -func ValidateExtraNetworkSpecView(result *ExtraNetworkSpecView) (err error) { - if result.ID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("id", "result")) - } - if len(result.Aliases) > 8 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.aliases", result.Aliases, len(result.Aliases), 8, false)) - } - return -} - -// ValidateDatabaseUserSpecView runs the validations defined on -// DatabaseUserSpecView. -func ValidateDatabaseUserSpecView(result *DatabaseUserSpecView) (err error) { - if result.Username == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("username", "result")) - } - if result.Username != nil { - if utf8.RuneCountInString(*result.Username) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.username", *result.Username, utf8.RuneCountInString(*result.Username), 1, true)) - } - } - if result.Password != nil { - if utf8.RuneCountInString(*result.Password) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.password", *result.Password, utf8.RuneCountInString(*result.Password), 1, true)) - } - } - if len(result.Attributes) > 16 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.attributes", result.Attributes, len(result.Attributes), 16, false)) - } - if len(result.Roles) > 16 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.roles", result.Roles, len(result.Roles), 16, false)) - } - return -} - -// ValidateServiceSpecView runs the validations defined on ServiceSpecView. -func ValidateServiceSpecView(result *ServiceSpecView) (err error) { - if result.ServiceID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("service_id", "result")) - } - if result.ServiceType == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("service_type", "result")) - } - if result.Version == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("version", "result")) - } - if result.HostIds == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("host_ids", "result")) - } - if result.Config == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("config", "result")) - } - if result.ServiceID != nil { - if utf8.RuneCountInString(string(*result.ServiceID)) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.service_id", string(*result.ServiceID), utf8.RuneCountInString(string(*result.ServiceID)), 1, true)) - } - } - if result.ServiceID != nil { - if utf8.RuneCountInString(string(*result.ServiceID)) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.service_id", string(*result.ServiceID), utf8.RuneCountInString(string(*result.ServiceID)), 63, false)) - } - } - if result.ServiceType != nil { - if !(*result.ServiceType == "mcp") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("result.service_type", *result.ServiceType, []any{"mcp"})) - } - } - if result.Version != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("result.version", *result.Version, "^(\\d+\\.\\d+\\.\\d+|latest)$")) - } - if len(result.HostIds) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.host_ids", result.HostIds, len(result.HostIds), 1, true)) - } - for _, e := range result.HostIds { - if utf8.RuneCountInString(string(e)) < 1 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.host_ids[*]", string(e), utf8.RuneCountInString(string(e)), 1, true)) - } - if utf8.RuneCountInString(string(e)) > 63 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.host_ids[*]", string(e), utf8.RuneCountInString(string(e)), 63, false)) - } - } - if result.Port != nil { - if *result.Port < 0 { - err = goa.MergeErrors(err, goa.InvalidRangeError("result.port", *result.Port, 0, true)) - } - } - if result.Port != nil { - if *result.Port > 65535 { - err = goa.MergeErrors(err, goa.InvalidRangeError("result.port", *result.Port, 65535, false)) - } - } - if result.Cpus != nil { - err = goa.MergeErrors(err, goa.ValidatePattern("result.cpus", *result.Cpus, "^[0-9]+(\\.[0-9]{1,3}|m)?$")) - } - if result.Memory != nil { - if utf8.RuneCountInString(*result.Memory) > 16 { - err = goa.MergeErrors(err, goa.InvalidLengthError("result.memory", *result.Memory, utf8.RuneCountInString(*result.Memory), 16, false)) - } - } - return -} - -// ValidateCreateDatabaseResponseView runs the validations defined on -// CreateDatabaseResponseView. -func ValidateCreateDatabaseResponseView(result *CreateDatabaseResponseView) (err error) { - if result.Task == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("task", "result")) - } - if result.Database == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("database", "result")) - } - if result.Task != nil { - if err2 := ValidateTaskView(result.Task); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - if result.Database != nil { - if err2 := ValidateDatabaseView(result.Database); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - return -} - -// ValidateTaskView runs the validations defined on TaskView. -func ValidateTaskView(result *TaskView) (err error) { - if result.Scope == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("scope", "result")) - } - if result.EntityID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("entity_id", "result")) - } - if result.TaskID == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("task_id", "result")) - } - if result.CreatedAt == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("created_at", "result")) - } - if result.Type == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("type", "result")) - } - if result.Status == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("status", "result")) - } - if result.ParentID != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.parent_id", *result.ParentID, goa.FormatUUID)) - } - if result.Scope != nil { - if !(*result.Scope == "database" || *result.Scope == "host") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("result.scope", *result.Scope, []any{"database", "host"})) - } - } - if result.TaskID != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.task_id", *result.TaskID, goa.FormatUUID)) - } - if result.CreatedAt != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.created_at", *result.CreatedAt, goa.FormatDateTime)) - } - if result.CompletedAt != nil { - err = goa.MergeErrors(err, goa.ValidateFormat("result.completed_at", *result.CompletedAt, goa.FormatDateTime)) - } - if result.Status != nil { - if !(*result.Status == "pending" || *result.Status == "running" || *result.Status == "completed" || *result.Status == "canceled" || *result.Status == "canceling" || *result.Status == "failed" || *result.Status == "unknown") { - err = goa.MergeErrors(err, goa.InvalidEnumValueError("result.status", *result.Status, []any{"pending", "running", "completed", "canceled", "canceling", "failed", "unknown"})) - } - } - return -} - -// ValidateUpdateDatabaseResponseView runs the validations defined on -// UpdateDatabaseResponseView. -func ValidateUpdateDatabaseResponseView(result *UpdateDatabaseResponseView) (err error) { - if result.Task == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("task", "result")) - } - if result.Database == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("database", "result")) - } - if result.Task != nil { - if err2 := ValidateTaskView(result.Task); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - if result.Database != nil { - if err2 := ValidateDatabaseView(result.Database); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - return -} - -// ValidateRestoreDatabaseResponseView runs the validations defined on -// RestoreDatabaseResponseView. -func ValidateRestoreDatabaseResponseView(result *RestoreDatabaseResponseView) (err error) { - if result.Task == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("task", "result")) - } - if result.NodeTasks == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("node_tasks", "result")) - } - if result.Database == nil { - err = goa.MergeErrors(err, goa.MissingFieldError("database", "result")) - } - if result.Task != nil { - if err2 := ValidateTaskView(result.Task); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - for _, e := range result.NodeTasks { - if e != nil { - if err2 := ValidateTaskView(e); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - } - if result.Database != nil { - if err2 := ValidateDatabaseView(result.Database); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - return -} diff --git a/api/apiv1/gen/http/cli/control_plane/cli.go b/api/apiv1/gen/http/cli/control_plane/cli.go index 71343ff9..1597f124 100644 --- a/api/apiv1/gen/http/cli/control_plane/cli.go +++ b/api/apiv1/gen/http/cli/control_plane/cli.go @@ -687,7 +687,7 @@ func controlPlaneUpdateDatabaseUsage() { fmt.Fprintln(os.Stderr) fmt.Fprintln(os.Stderr, "Example:") - fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "control-plane update-database --body '{\n \"spec\": {\n \"database_name\": \"storefront\",\n \"database_users\": [\n {\n \"attributes\": [\n \"LOGIN\",\n \"SUPERUSER\"\n ],\n \"db_owner\": true,\n \"username\": \"admin\"\n }\n ],\n \"nodes\": [\n {\n \"backup_config\": {\n \"repositories\": [\n {\n \"s3_bucket\": \"storefront-db-backups-us-east-1\",\n \"type\": \"s3\"\n }\n ]\n },\n \"host_ids\": [\n \"us-east-1\"\n ],\n \"name\": \"n1\"\n },\n {\n \"backup_config\": {\n \"repositories\": [\n {\n \"s3_bucket\": \"storefront-db-backups-ap-south-1\",\n \"type\": \"s3\"\n }\n ]\n },\n \"host_ids\": [\n \"ap-south-1\"\n ],\n \"name\": \"n2\"\n },\n {\n \"backup_config\": {\n \"repositories\": [\n {\n \"s3_bucket\": \"storefront-db-backups-eu-central-1\",\n \"type\": \"s3\"\n }\n ]\n },\n \"host_ids\": [\n \"eu-central-1\"\n ],\n \"name\": \"n3\",\n \"restore_config\": {\n \"repository\": {\n \"s3_bucket\": \"storefront-db-backups-us-east-1\",\n \"type\": \"s3\"\n },\n \"source_database_id\": \"storefront\",\n \"source_database_name\": \"storefront\",\n \"source_node_name\": \"n1\"\n }\n }\n ],\n \"port\": 5432\n }\n }' --database-id \"76f9b8c0-4958-11f0-a489-3bb29577c696\" --force-update true --remove-host '[\n \"Beatae provident est et.\",\n \"Sed illum ad culpa dolor.\"\n ]'") + fmt.Fprintf(os.Stderr, " %s %s\n", os.Args[0], "control-plane update-database --body '{\n \"spec\": {\n \"database_name\": \"storefront\",\n \"database_users\": [\n {\n \"attributes\": [\n \"LOGIN\",\n \"SUPERUSER\"\n ],\n \"db_owner\": true,\n \"username\": \"admin\"\n }\n ],\n \"nodes\": [\n {\n \"backup_config\": {\n \"repositories\": [\n {\n \"s3_bucket\": \"storefront-db-backups-us-east-1\",\n \"type\": \"s3\"\n }\n ]\n },\n \"host_ids\": [\n \"us-east-1\"\n ],\n \"name\": \"n1\"\n },\n {\n \"backup_config\": {\n \"repositories\": [\n {\n \"s3_bucket\": \"storefront-db-backups-ap-south-1\",\n \"type\": \"s3\"\n }\n ]\n },\n \"host_ids\": [\n \"ap-south-1\"\n ],\n \"name\": \"n2\"\n },\n {\n \"backup_config\": {\n \"repositories\": [\n {\n \"s3_bucket\": \"storefront-db-backups-eu-central-1\",\n \"type\": \"s3\"\n }\n ]\n },\n \"host_ids\": [\n \"eu-central-1\"\n ],\n \"name\": \"n3\",\n \"restore_config\": {\n \"repository\": {\n \"s3_bucket\": \"storefront-db-backups-us-east-1\",\n \"type\": \"s3\"\n },\n \"source_database_id\": \"storefront\",\n \"source_database_name\": \"storefront\",\n \"source_node_name\": \"n1\"\n }\n }\n ],\n \"port\": 5432\n }\n }' --database-id \"76f9b8c0-4958-11f0-a489-3bb29577c696\" --force-update true --remove-host '[\n \"Eveniet possimus dicta laudantium.\",\n \"Repellendus in doloremque.\",\n \"Officia rerum eum nemo autem iste illo.\",\n \"Non libero quibusdam et sapiente.\"\n ]'") } func controlPlaneDeleteDatabaseUsage() { diff --git a/api/apiv1/gen/http/control_plane/client/cli.go b/api/apiv1/gen/http/control_plane/client/cli.go index bd4ecc6b..8d1595d1 100644 --- a/api/apiv1/gen/http/control_plane/client/cli.go +++ b/api/apiv1/gen/http/control_plane/client/cli.go @@ -303,7 +303,7 @@ func BuildUpdateDatabasePayload(controlPlaneUpdateDatabaseBody string, controlPl if controlPlaneUpdateDatabaseRemoveHost != "" { err = json.Unmarshal([]byte(controlPlaneUpdateDatabaseRemoveHost), &removeHost) if err != nil { - return nil, fmt.Errorf("invalid JSON for removeHost, \nerror: %s, \nexample of valid JSON:\n%s", err, "'[\n \"Beatae provident est et.\",\n \"Sed illum ad culpa dolor.\"\n ]'") + return nil, fmt.Errorf("invalid JSON for removeHost, \nerror: %s, \nexample of valid JSON:\n%s", err, "'[\n \"Eveniet possimus dicta laudantium.\",\n \"Repellendus in doloremque.\",\n \"Officia rerum eum nemo autem iste illo.\",\n \"Non libero quibusdam et sapiente.\"\n ]'") } } } diff --git a/api/apiv1/gen/http/control_plane/client/encode_decode.go b/api/apiv1/gen/http/control_plane/client/encode_decode.go index db1bb6e2..0d70fd13 100644 --- a/api/apiv1/gen/http/control_plane/client/encode_decode.go +++ b/api/apiv1/gen/http/control_plane/client/encode_decode.go @@ -16,7 +16,6 @@ import ( "net/url" controlplane "github.com/pgEdge/control-plane/api/apiv1/gen/control_plane" - controlplaneviews "github.com/pgEdge/control-plane/api/apiv1/gen/control_plane/views" goahttp "goa.design/goa/v3/http" ) @@ -968,13 +967,11 @@ func DecodeListDatabasesResponse(decoder func(*http.Response) goahttp.Decoder, r if err != nil { return nil, goahttp.ErrDecodingError("control-plane", "list-databases", err) } - p := NewListDatabasesResponseViewOK(&body) - view := "default" - vres := &controlplaneviews.ListDatabasesResponse{Projected: p, View: view} - if err = controlplaneviews.ValidateListDatabasesResponse(vres); err != nil { + err = ValidateListDatabasesResponseBody(&body) + if err != nil { return nil, goahttp.ErrValidationError("control-plane", "list-databases", err) } - res := controlplane.NewListDatabasesResponse(vres) + res := NewListDatabasesResponseOK(&body) return res, nil case http.StatusConflict: var ( @@ -1224,13 +1221,11 @@ func DecodeGetDatabaseResponse(decoder func(*http.Response) goahttp.Decoder, res if err != nil { return nil, goahttp.ErrDecodingError("control-plane", "get-database", err) } - p := NewGetDatabaseDatabaseOK(&body) - view := "default" - vres := &controlplaneviews.Database{Projected: p, View: view} - if err = controlplaneviews.ValidateDatabase(vres); err != nil { + err = ValidateGetDatabaseResponseBody(&body) + if err != nil { return nil, goahttp.ErrValidationError("control-plane", "get-database", err) } - res := controlplane.NewDatabase(vres) + res := NewGetDatabaseDatabaseOK(&body) return res, nil case http.StatusConflict: var ( @@ -4177,82 +4172,74 @@ func unmarshalTaskResponseBodyToControlplaneTask(v *TaskResponseBody) *controlpl return res } -// unmarshalDatabaseResponseBodyToControlplaneviewsDatabaseView builds a value -// of type *controlplaneviews.DatabaseView from a value of type -// *DatabaseResponseBody. -func unmarshalDatabaseResponseBodyToControlplaneviewsDatabaseView(v *DatabaseResponseBody) *controlplaneviews.DatabaseView { +// unmarshalDatabaseSummaryResponseBodyToControlplaneDatabaseSummary builds a +// value of type *controlplane.DatabaseSummary from a value of type +// *DatabaseSummaryResponseBody. +func unmarshalDatabaseSummaryResponseBodyToControlplaneDatabaseSummary(v *DatabaseSummaryResponseBody) *controlplane.DatabaseSummary { if v == nil { return nil } - res := &controlplaneviews.DatabaseView{ - CreatedAt: v.CreatedAt, - UpdatedAt: v.UpdatedAt, - State: v.State, + res := &controlplane.DatabaseSummary{ + ID: controlplane.Identifier(*v.ID), + CreatedAt: *v.CreatedAt, + UpdatedAt: *v.UpdatedAt, + State: *v.State, } - id := controlplaneviews.IdentifierView(*v.ID) - res.ID = &id if v.TenantID != nil { - tenantID := controlplaneviews.IdentifierView(*v.TenantID) + tenantID := controlplane.Identifier(*v.TenantID) res.TenantID = &tenantID } - res.Instances = make([]*controlplaneviews.InstanceView, len(v.Instances)) - for i, val := range v.Instances { - if val == nil { - res.Instances[i] = nil - continue - } - res.Instances[i] = unmarshalInstanceResponseBodyToControlplaneviewsInstanceView(val) - } - res.ServiceInstances = make([]*controlplaneviews.ServiceinstanceView, len(v.ServiceInstances)) - for i, val := range v.ServiceInstances { - if val == nil { - res.ServiceInstances[i] = nil - continue + if v.Instances != nil { + res.Instances = make([]*controlplane.Instance, len(v.Instances)) + for i, val := range v.Instances { + if val == nil { + res.Instances[i] = nil + continue + } + res.Instances[i] = unmarshalInstanceResponseBodyToControlplaneInstance(val) } - res.ServiceInstances[i] = unmarshalServiceinstanceResponseBodyToControlplaneviewsServiceinstanceView(val) - } - if v.Spec != nil { - res.Spec = unmarshalDatabaseSpecResponseBodyToControlplaneviewsDatabaseSpecView(v.Spec) } return res } -// unmarshalInstanceResponseBodyToControlplaneviewsInstanceView builds a value -// of type *controlplaneviews.InstanceView from a value of type -// *InstanceResponseBody. -func unmarshalInstanceResponseBodyToControlplaneviewsInstanceView(v *InstanceResponseBody) *controlplaneviews.InstanceView { - res := &controlplaneviews.InstanceView{ - ID: v.ID, - HostID: v.HostID, - NodeName: v.NodeName, - CreatedAt: v.CreatedAt, - UpdatedAt: v.UpdatedAt, +// unmarshalInstanceResponseBodyToControlplaneInstance builds a value of type +// *controlplane.Instance from a value of type *InstanceResponseBody. +func unmarshalInstanceResponseBodyToControlplaneInstance(v *InstanceResponseBody) *controlplane.Instance { + if v == nil { + return nil + } + res := &controlplane.Instance{ + ID: *v.ID, + HostID: *v.HostID, + NodeName: *v.NodeName, + CreatedAt: *v.CreatedAt, + UpdatedAt: *v.UpdatedAt, StatusUpdatedAt: v.StatusUpdatedAt, - State: v.State, + State: *v.State, Error: v.Error, } if v.ConnectionInfo != nil { - res.ConnectionInfo = unmarshalInstanceConnectionInfoResponseBodyToControlplaneviewsInstanceConnectionInfoView(v.ConnectionInfo) + res.ConnectionInfo = unmarshalInstanceConnectionInfoResponseBodyToControlplaneInstanceConnectionInfo(v.ConnectionInfo) } if v.Postgres != nil { - res.Postgres = unmarshalInstancePostgresStatusResponseBodyToControlplaneviewsInstancePostgresStatusView(v.Postgres) + res.Postgres = unmarshalInstancePostgresStatusResponseBodyToControlplaneInstancePostgresStatus(v.Postgres) } if v.Spock != nil { - res.Spock = unmarshalInstanceSpockStatusResponseBodyToControlplaneviewsInstanceSpockStatusView(v.Spock) + res.Spock = unmarshalInstanceSpockStatusResponseBodyToControlplaneInstanceSpockStatus(v.Spock) } return res } -// unmarshalInstanceConnectionInfoResponseBodyToControlplaneviewsInstanceConnectionInfoView -// builds a value of type *controlplaneviews.InstanceConnectionInfoView from a -// value of type *InstanceConnectionInfoResponseBody. -func unmarshalInstanceConnectionInfoResponseBodyToControlplaneviewsInstanceConnectionInfoView(v *InstanceConnectionInfoResponseBody) *controlplaneviews.InstanceConnectionInfoView { +// unmarshalInstanceConnectionInfoResponseBodyToControlplaneInstanceConnectionInfo +// builds a value of type *controlplane.InstanceConnectionInfo from a value of +// type *InstanceConnectionInfoResponseBody. +func unmarshalInstanceConnectionInfoResponseBodyToControlplaneInstanceConnectionInfo(v *InstanceConnectionInfoResponseBody) *controlplane.InstanceConnectionInfo { if v == nil { return nil } - res := &controlplaneviews.InstanceConnectionInfoView{ + res := &controlplane.InstanceConnectionInfo{ Hostname: v.Hostname, Ipv4Address: v.Ipv4Address, Port: v.Port, @@ -4261,14 +4248,14 @@ func unmarshalInstanceConnectionInfoResponseBodyToControlplaneviewsInstanceConne return res } -// unmarshalInstancePostgresStatusResponseBodyToControlplaneviewsInstancePostgresStatusView -// builds a value of type *controlplaneviews.InstancePostgresStatusView from a -// value of type *InstancePostgresStatusResponseBody. -func unmarshalInstancePostgresStatusResponseBodyToControlplaneviewsInstancePostgresStatusView(v *InstancePostgresStatusResponseBody) *controlplaneviews.InstancePostgresStatusView { +// unmarshalInstancePostgresStatusResponseBodyToControlplaneInstancePostgresStatus +// builds a value of type *controlplane.InstancePostgresStatus from a value of +// type *InstancePostgresStatusResponseBody. +func unmarshalInstancePostgresStatusResponseBodyToControlplaneInstancePostgresStatus(v *InstancePostgresStatusResponseBody) *controlplane.InstancePostgresStatus { if v == nil { return nil } - res := &controlplaneviews.InstancePostgresStatusView{ + res := &controlplane.InstancePostgresStatus{ Version: v.Version, PatroniState: v.PatroniState, Role: v.Role, @@ -4279,141 +4266,52 @@ func unmarshalInstancePostgresStatusResponseBodyToControlplaneviewsInstancePostg return res } -// unmarshalInstanceSpockStatusResponseBodyToControlplaneviewsInstanceSpockStatusView -// builds a value of type *controlplaneviews.InstanceSpockStatusView from a -// value of type *InstanceSpockStatusResponseBody. -func unmarshalInstanceSpockStatusResponseBodyToControlplaneviewsInstanceSpockStatusView(v *InstanceSpockStatusResponseBody) *controlplaneviews.InstanceSpockStatusView { +// unmarshalInstanceSpockStatusResponseBodyToControlplaneInstanceSpockStatus +// builds a value of type *controlplane.InstanceSpockStatus from a value of +// type *InstanceSpockStatusResponseBody. +func unmarshalInstanceSpockStatusResponseBodyToControlplaneInstanceSpockStatus(v *InstanceSpockStatusResponseBody) *controlplane.InstanceSpockStatus { if v == nil { return nil } - res := &controlplaneviews.InstanceSpockStatusView{ + res := &controlplane.InstanceSpockStatus{ ReadOnly: v.ReadOnly, Version: v.Version, } if v.Subscriptions != nil { - res.Subscriptions = make([]*controlplaneviews.InstanceSubscriptionView, len(v.Subscriptions)) + res.Subscriptions = make([]*controlplane.InstanceSubscription, len(v.Subscriptions)) for i, val := range v.Subscriptions { if val == nil { res.Subscriptions[i] = nil continue } - res.Subscriptions[i] = unmarshalInstanceSubscriptionResponseBodyToControlplaneviewsInstanceSubscriptionView(val) - } - } - - return res -} - -// unmarshalInstanceSubscriptionResponseBodyToControlplaneviewsInstanceSubscriptionView -// builds a value of type *controlplaneviews.InstanceSubscriptionView from a -// value of type *InstanceSubscriptionResponseBody. -func unmarshalInstanceSubscriptionResponseBodyToControlplaneviewsInstanceSubscriptionView(v *InstanceSubscriptionResponseBody) *controlplaneviews.InstanceSubscriptionView { - if v == nil { - return nil - } - res := &controlplaneviews.InstanceSubscriptionView{ - ProviderNode: v.ProviderNode, - Name: v.Name, - Status: v.Status, - } - - return res -} - -// unmarshalServiceinstanceResponseBodyToControlplaneviewsServiceinstanceView -// builds a value of type *controlplaneviews.ServiceinstanceView from a value -// of type *ServiceinstanceResponseBody. -func unmarshalServiceinstanceResponseBodyToControlplaneviewsServiceinstanceView(v *ServiceinstanceResponseBody) *controlplaneviews.ServiceinstanceView { - res := &controlplaneviews.ServiceinstanceView{ - ServiceInstanceID: v.ServiceInstanceID, - ServiceID: v.ServiceID, - HostID: v.HostID, - State: v.State, - CreatedAt: v.CreatedAt, - UpdatedAt: v.UpdatedAt, - Error: v.Error, - } - databaseID := controlplaneviews.IdentifierView(*v.DatabaseID) - res.DatabaseID = &databaseID - if v.Status != nil { - res.Status = unmarshalServiceInstanceStatusResponseBodyToControlplaneviewsServiceInstanceStatusView(v.Status) - } - - return res -} - -// unmarshalServiceInstanceStatusResponseBodyToControlplaneviewsServiceInstanceStatusView -// builds a value of type *controlplaneviews.ServiceInstanceStatusView from a -// value of type *ServiceInstanceStatusResponseBody. -func unmarshalServiceInstanceStatusResponseBodyToControlplaneviewsServiceInstanceStatusView(v *ServiceInstanceStatusResponseBody) *controlplaneviews.ServiceInstanceStatusView { - if v == nil { - return nil - } - res := &controlplaneviews.ServiceInstanceStatusView{ - ContainerID: v.ContainerID, - ImageVersion: v.ImageVersion, - Hostname: v.Hostname, - Ipv4Address: v.Ipv4Address, - LastHealthAt: v.LastHealthAt, - ServiceReady: v.ServiceReady, - } - if v.Ports != nil { - res.Ports = make([]*controlplaneviews.PortMappingView, len(v.Ports)) - for i, val := range v.Ports { - if val == nil { - res.Ports[i] = nil - continue - } - res.Ports[i] = unmarshalPortMappingResponseBodyToControlplaneviewsPortMappingView(val) + res.Subscriptions[i] = unmarshalInstanceSubscriptionResponseBodyToControlplaneInstanceSubscription(val) } } - if v.HealthCheck != nil { - res.HealthCheck = unmarshalHealthCheckResultResponseBodyToControlplaneviewsHealthCheckResultView(v.HealthCheck) - } - - return res -} - -// unmarshalPortMappingResponseBodyToControlplaneviewsPortMappingView builds a -// value of type *controlplaneviews.PortMappingView from a value of type -// *PortMappingResponseBody. -func unmarshalPortMappingResponseBodyToControlplaneviewsPortMappingView(v *PortMappingResponseBody) *controlplaneviews.PortMappingView { - if v == nil { - return nil - } - res := &controlplaneviews.PortMappingView{ - Name: v.Name, - ContainerPort: v.ContainerPort, - HostPort: v.HostPort, - } return res } -// unmarshalHealthCheckResultResponseBodyToControlplaneviewsHealthCheckResultView -// builds a value of type *controlplaneviews.HealthCheckResultView from a value -// of type *HealthCheckResultResponseBody. -func unmarshalHealthCheckResultResponseBodyToControlplaneviewsHealthCheckResultView(v *HealthCheckResultResponseBody) *controlplaneviews.HealthCheckResultView { +// unmarshalInstanceSubscriptionResponseBodyToControlplaneInstanceSubscription +// builds a value of type *controlplane.InstanceSubscription from a value of +// type *InstanceSubscriptionResponseBody. +func unmarshalInstanceSubscriptionResponseBodyToControlplaneInstanceSubscription(v *InstanceSubscriptionResponseBody) *controlplane.InstanceSubscription { if v == nil { return nil } - res := &controlplaneviews.HealthCheckResultView{ - Status: v.Status, - Message: v.Message, - CheckedAt: v.CheckedAt, + res := &controlplane.InstanceSubscription{ + ProviderNode: *v.ProviderNode, + Name: *v.Name, + Status: *v.Status, } return res } -// unmarshalDatabaseSpecResponseBodyToControlplaneviewsDatabaseSpecView builds -// a value of type *controlplaneviews.DatabaseSpecView from a value of type -// *DatabaseSpecResponseBody. -func unmarshalDatabaseSpecResponseBodyToControlplaneviewsDatabaseSpecView(v *DatabaseSpecResponseBody) *controlplaneviews.DatabaseSpecView { - if v == nil { - return nil - } - res := &controlplaneviews.DatabaseSpecView{ +// marshalControlplaneDatabaseSpecToDatabaseSpecRequestBody builds a value of +// type *DatabaseSpecRequestBody from a value of type +// *controlplane.DatabaseSpec. +func marshalControlplaneDatabaseSpecToDatabaseSpecRequestBody(v *controlplane.DatabaseSpec) *DatabaseSpecRequestBody { + res := &DatabaseSpecRequestBody{ DatabaseName: v.DatabaseName, PostgresVersion: v.PostgresVersion, SpockVersion: v.SpockVersion, @@ -4421,39 +4319,43 @@ func unmarshalDatabaseSpecResponseBodyToControlplaneviewsDatabaseSpecView(v *Dat Cpus: v.Cpus, Memory: v.Memory, } - res.Nodes = make([]*controlplaneviews.DatabaseNodeSpecView, len(v.Nodes)) - for i, val := range v.Nodes { - if val == nil { - res.Nodes[i] = nil - continue + if v.Nodes != nil { + res.Nodes = make([]*DatabaseNodeSpecRequestBody, len(v.Nodes)) + for i, val := range v.Nodes { + if val == nil { + res.Nodes[i] = nil + continue + } + res.Nodes[i] = marshalControlplaneDatabaseNodeSpecToDatabaseNodeSpecRequestBody(val) } - res.Nodes[i] = unmarshalDatabaseNodeSpecResponseBodyToControlplaneviewsDatabaseNodeSpecView(val) + } else { + res.Nodes = []*DatabaseNodeSpecRequestBody{} } if v.DatabaseUsers != nil { - res.DatabaseUsers = make([]*controlplaneviews.DatabaseUserSpecView, len(v.DatabaseUsers)) + res.DatabaseUsers = make([]*DatabaseUserSpecRequestBody, len(v.DatabaseUsers)) for i, val := range v.DatabaseUsers { if val == nil { res.DatabaseUsers[i] = nil continue } - res.DatabaseUsers[i] = unmarshalDatabaseUserSpecResponseBodyToControlplaneviewsDatabaseUserSpecView(val) + res.DatabaseUsers[i] = marshalControlplaneDatabaseUserSpecToDatabaseUserSpecRequestBody(val) } } if v.Services != nil { - res.Services = make([]*controlplaneviews.ServiceSpecView, len(v.Services)) + res.Services = make([]*ServiceSpecRequestBody, len(v.Services)) for i, val := range v.Services { if val == nil { res.Services[i] = nil continue } - res.Services[i] = unmarshalServiceSpecResponseBodyToControlplaneviewsServiceSpecView(val) + res.Services[i] = marshalControlplaneServiceSpecToServiceSpecRequestBody(val) } } if v.BackupConfig != nil { - res.BackupConfig = unmarshalBackupConfigSpecResponseBodyToControlplaneviewsBackupConfigSpecView(v.BackupConfig) + res.BackupConfig = marshalControlplaneBackupConfigSpecToBackupConfigSpecRequestBody(v.BackupConfig) } if v.RestoreConfig != nil { - res.RestoreConfig = unmarshalRestoreConfigSpecResponseBodyToControlplaneviewsRestoreConfigSpecView(v.RestoreConfig) + res.RestoreConfig = marshalControlplaneRestoreConfigSpecToRestoreConfigSpecRequestBody(v.RestoreConfig) } if v.PostgresqlConf != nil { res.PostgresqlConf = make(map[string]any, len(v.PostgresqlConf)) @@ -4464,17 +4366,17 @@ func unmarshalDatabaseSpecResponseBodyToControlplaneviewsDatabaseSpecView(v *Dat } } if v.OrchestratorOpts != nil { - res.OrchestratorOpts = unmarshalOrchestratorOptsResponseBodyToControlplaneviewsOrchestratorOptsView(v.OrchestratorOpts) + res.OrchestratorOpts = marshalControlplaneOrchestratorOptsToOrchestratorOptsRequestBody(v.OrchestratorOpts) } return res } -// unmarshalDatabaseNodeSpecResponseBodyToControlplaneviewsDatabaseNodeSpecView -// builds a value of type *controlplaneviews.DatabaseNodeSpecView from a value -// of type *DatabaseNodeSpecResponseBody. -func unmarshalDatabaseNodeSpecResponseBodyToControlplaneviewsDatabaseNodeSpecView(v *DatabaseNodeSpecResponseBody) *controlplaneviews.DatabaseNodeSpecView { - res := &controlplaneviews.DatabaseNodeSpecView{ +// marshalControlplaneDatabaseNodeSpecToDatabaseNodeSpecRequestBody builds a +// value of type *DatabaseNodeSpecRequestBody from a value of type +// *controlplane.DatabaseNodeSpec. +func marshalControlplaneDatabaseNodeSpecToDatabaseNodeSpecRequestBody(v *controlplane.DatabaseNodeSpec) *DatabaseNodeSpecRequestBody { + res := &DatabaseNodeSpecRequestBody{ Name: v.Name, PostgresVersion: v.PostgresVersion, Port: v.Port, @@ -4482,9 +4384,13 @@ func unmarshalDatabaseNodeSpecResponseBodyToControlplaneviewsDatabaseNodeSpecVie Memory: v.Memory, SourceNode: v.SourceNode, } - res.HostIds = make([]controlplaneviews.IdentifierView, len(v.HostIds)) - for i, val := range v.HostIds { - res.HostIds[i] = controlplaneviews.IdentifierView(val) + if v.HostIds != nil { + res.HostIds = make([]string, len(v.HostIds)) + for i, val := range v.HostIds { + res.HostIds[i] = string(val) + } + } else { + res.HostIds = []string{} } if v.PostgresqlConf != nil { res.PostgresqlConf = make(map[string]any, len(v.PostgresqlConf)) @@ -4495,53 +4401,57 @@ func unmarshalDatabaseNodeSpecResponseBodyToControlplaneviewsDatabaseNodeSpecVie } } if v.BackupConfig != nil { - res.BackupConfig = unmarshalBackupConfigSpecResponseBodyToControlplaneviewsBackupConfigSpecView(v.BackupConfig) + res.BackupConfig = marshalControlplaneBackupConfigSpecToBackupConfigSpecRequestBody(v.BackupConfig) } if v.RestoreConfig != nil { - res.RestoreConfig = unmarshalRestoreConfigSpecResponseBodyToControlplaneviewsRestoreConfigSpecView(v.RestoreConfig) + res.RestoreConfig = marshalControlplaneRestoreConfigSpecToRestoreConfigSpecRequestBody(v.RestoreConfig) } if v.OrchestratorOpts != nil { - res.OrchestratorOpts = unmarshalOrchestratorOptsResponseBodyToControlplaneviewsOrchestratorOptsView(v.OrchestratorOpts) + res.OrchestratorOpts = marshalControlplaneOrchestratorOptsToOrchestratorOptsRequestBody(v.OrchestratorOpts) } return res } -// unmarshalBackupConfigSpecResponseBodyToControlplaneviewsBackupConfigSpecView -// builds a value of type *controlplaneviews.BackupConfigSpecView from a value -// of type *BackupConfigSpecResponseBody. -func unmarshalBackupConfigSpecResponseBodyToControlplaneviewsBackupConfigSpecView(v *BackupConfigSpecResponseBody) *controlplaneviews.BackupConfigSpecView { +// marshalControlplaneBackupConfigSpecToBackupConfigSpecRequestBody builds a +// value of type *BackupConfigSpecRequestBody from a value of type +// *controlplane.BackupConfigSpec. +func marshalControlplaneBackupConfigSpecToBackupConfigSpecRequestBody(v *controlplane.BackupConfigSpec) *BackupConfigSpecRequestBody { if v == nil { return nil } - res := &controlplaneviews.BackupConfigSpecView{} - res.Repositories = make([]*controlplaneviews.BackupRepositorySpecView, len(v.Repositories)) - for i, val := range v.Repositories { - if val == nil { - res.Repositories[i] = nil - continue + res := &BackupConfigSpecRequestBody{} + if v.Repositories != nil { + res.Repositories = make([]*BackupRepositorySpecRequestBody, len(v.Repositories)) + for i, val := range v.Repositories { + if val == nil { + res.Repositories[i] = nil + continue + } + res.Repositories[i] = marshalControlplaneBackupRepositorySpecToBackupRepositorySpecRequestBody(val) } - res.Repositories[i] = unmarshalBackupRepositorySpecResponseBodyToControlplaneviewsBackupRepositorySpecView(val) + } else { + res.Repositories = []*BackupRepositorySpecRequestBody{} } if v.Schedules != nil { - res.Schedules = make([]*controlplaneviews.BackupScheduleSpecView, len(v.Schedules)) + res.Schedules = make([]*BackupScheduleSpecRequestBody, len(v.Schedules)) for i, val := range v.Schedules { if val == nil { res.Schedules[i] = nil continue } - res.Schedules[i] = unmarshalBackupScheduleSpecResponseBodyToControlplaneviewsBackupScheduleSpecView(val) + res.Schedules[i] = marshalControlplaneBackupScheduleSpecToBackupScheduleSpecRequestBody(val) } } return res } -// unmarshalBackupRepositorySpecResponseBodyToControlplaneviewsBackupRepositorySpecView -// builds a value of type *controlplaneviews.BackupRepositorySpecView from a -// value of type *BackupRepositorySpecResponseBody. -func unmarshalBackupRepositorySpecResponseBodyToControlplaneviewsBackupRepositorySpecView(v *BackupRepositorySpecResponseBody) *controlplaneviews.BackupRepositorySpecView { - res := &controlplaneviews.BackupRepositorySpecView{ +// marshalControlplaneBackupRepositorySpecToBackupRepositorySpecRequestBody +// builds a value of type *BackupRepositorySpecRequestBody from a value of type +// *controlplane.BackupRepositorySpec. +func marshalControlplaneBackupRepositorySpecToBackupRepositorySpecRequestBody(v *controlplane.BackupRepositorySpec) *BackupRepositorySpecRequestBody { + res := &BackupRepositorySpecRequestBody{ Type: v.Type, S3Bucket: v.S3Bucket, S3Region: v.S3Region, @@ -4560,7 +4470,7 @@ func unmarshalBackupRepositorySpecResponseBodyToControlplaneviewsBackupRepositor BasePath: v.BasePath, } if v.ID != nil { - id := controlplaneviews.IdentifierView(*v.ID) + id := string(*v.ID) res.ID = &id } if v.CustomOptions != nil { @@ -4575,14 +4485,14 @@ func unmarshalBackupRepositorySpecResponseBodyToControlplaneviewsBackupRepositor return res } -// unmarshalBackupScheduleSpecResponseBodyToControlplaneviewsBackupScheduleSpecView -// builds a value of type *controlplaneviews.BackupScheduleSpecView from a -// value of type *BackupScheduleSpecResponseBody. -func unmarshalBackupScheduleSpecResponseBodyToControlplaneviewsBackupScheduleSpecView(v *BackupScheduleSpecResponseBody) *controlplaneviews.BackupScheduleSpecView { +// marshalControlplaneBackupScheduleSpecToBackupScheduleSpecRequestBody builds +// a value of type *BackupScheduleSpecRequestBody from a value of type +// *controlplane.BackupScheduleSpec. +func marshalControlplaneBackupScheduleSpecToBackupScheduleSpecRequestBody(v *controlplane.BackupScheduleSpec) *BackupScheduleSpecRequestBody { if v == nil { return nil } - res := &controlplaneviews.BackupScheduleSpecView{ + res := &BackupScheduleSpecRequestBody{ ID: v.ID, Type: v.Type, CronExpression: v.CronExpression, @@ -4591,20 +4501,21 @@ func unmarshalBackupScheduleSpecResponseBodyToControlplaneviewsBackupScheduleSpe return res } -// unmarshalRestoreConfigSpecResponseBodyToControlplaneviewsRestoreConfigSpecView -// builds a value of type *controlplaneviews.RestoreConfigSpecView from a value -// of type *RestoreConfigSpecResponseBody. -func unmarshalRestoreConfigSpecResponseBodyToControlplaneviewsRestoreConfigSpecView(v *RestoreConfigSpecResponseBody) *controlplaneviews.RestoreConfigSpecView { +// marshalControlplaneRestoreConfigSpecToRestoreConfigSpecRequestBody builds a +// value of type *RestoreConfigSpecRequestBody from a value of type +// *controlplane.RestoreConfigSpec. +func marshalControlplaneRestoreConfigSpecToRestoreConfigSpecRequestBody(v *controlplane.RestoreConfigSpec) *RestoreConfigSpecRequestBody { if v == nil { return nil } - res := &controlplaneviews.RestoreConfigSpecView{ + res := &RestoreConfigSpecRequestBody{ + SourceDatabaseID: string(v.SourceDatabaseID), SourceNodeName: v.SourceNodeName, SourceDatabaseName: v.SourceDatabaseName, } - sourceDatabaseID := controlplaneviews.IdentifierView(*v.SourceDatabaseID) - res.SourceDatabaseID = &sourceDatabaseID - res.Repository = unmarshalRestoreRepositorySpecResponseBodyToControlplaneviewsRestoreRepositorySpecView(v.Repository) + if v.Repository != nil { + res.Repository = marshalControlplaneRestoreRepositorySpecToRestoreRepositorySpecRequestBody(v.Repository) + } if v.RestoreOptions != nil { res.RestoreOptions = make(map[string]string, len(v.RestoreOptions)) for key, val := range v.RestoreOptions { @@ -4617,11 +4528,11 @@ func unmarshalRestoreConfigSpecResponseBodyToControlplaneviewsRestoreConfigSpecV return res } -// unmarshalRestoreRepositorySpecResponseBodyToControlplaneviewsRestoreRepositorySpecView -// builds a value of type *controlplaneviews.RestoreRepositorySpecView from a -// value of type *RestoreRepositorySpecResponseBody. -func unmarshalRestoreRepositorySpecResponseBodyToControlplaneviewsRestoreRepositorySpecView(v *RestoreRepositorySpecResponseBody) *controlplaneviews.RestoreRepositorySpecView { - res := &controlplaneviews.RestoreRepositorySpecView{ +// marshalControlplaneRestoreRepositorySpecToRestoreRepositorySpecRequestBody +// builds a value of type *RestoreRepositorySpecRequestBody from a value of +// type *controlplane.RestoreRepositorySpec. +func marshalControlplaneRestoreRepositorySpecToRestoreRepositorySpecRequestBody(v *controlplane.RestoreRepositorySpec) *RestoreRepositorySpecRequestBody { + res := &RestoreRepositorySpecRequestBody{ Type: v.Type, S3Bucket: v.S3Bucket, S3Region: v.S3Region, @@ -4638,7 +4549,7 @@ func unmarshalRestoreRepositorySpecResponseBodyToControlplaneviewsRestoreReposit BasePath: v.BasePath, } if v.ID != nil { - id := controlplaneviews.IdentifierView(*v.ID) + id := string(*v.ID) res.ID = &id } if v.CustomOptions != nil { @@ -4653,47 +4564,46 @@ func unmarshalRestoreRepositorySpecResponseBodyToControlplaneviewsRestoreReposit return res } -// unmarshalOrchestratorOptsResponseBodyToControlplaneviewsOrchestratorOptsView -// builds a value of type *controlplaneviews.OrchestratorOptsView from a value -// of type *OrchestratorOptsResponseBody. -func unmarshalOrchestratorOptsResponseBodyToControlplaneviewsOrchestratorOptsView(v *OrchestratorOptsResponseBody) *controlplaneviews.OrchestratorOptsView { +// marshalControlplaneOrchestratorOptsToOrchestratorOptsRequestBody builds a +// value of type *OrchestratorOptsRequestBody from a value of type +// *controlplane.OrchestratorOpts. +func marshalControlplaneOrchestratorOptsToOrchestratorOptsRequestBody(v *controlplane.OrchestratorOpts) *OrchestratorOptsRequestBody { if v == nil { return nil } - res := &controlplaneviews.OrchestratorOptsView{} + res := &OrchestratorOptsRequestBody{} if v.Swarm != nil { - res.Swarm = unmarshalSwarmOptsResponseBodyToControlplaneviewsSwarmOptsView(v.Swarm) + res.Swarm = marshalControlplaneSwarmOptsToSwarmOptsRequestBody(v.Swarm) } return res } -// unmarshalSwarmOptsResponseBodyToControlplaneviewsSwarmOptsView builds a -// value of type *controlplaneviews.SwarmOptsView from a value of type -// *SwarmOptsResponseBody. -func unmarshalSwarmOptsResponseBodyToControlplaneviewsSwarmOptsView(v *SwarmOptsResponseBody) *controlplaneviews.SwarmOptsView { +// marshalControlplaneSwarmOptsToSwarmOptsRequestBody builds a value of type +// *SwarmOptsRequestBody from a value of type *controlplane.SwarmOpts. +func marshalControlplaneSwarmOptsToSwarmOptsRequestBody(v *controlplane.SwarmOpts) *SwarmOptsRequestBody { if v == nil { return nil } - res := &controlplaneviews.SwarmOptsView{} + res := &SwarmOptsRequestBody{} if v.ExtraVolumes != nil { - res.ExtraVolumes = make([]*controlplaneviews.ExtraVolumesSpecView, len(v.ExtraVolumes)) + res.ExtraVolumes = make([]*ExtraVolumesSpecRequestBody, len(v.ExtraVolumes)) for i, val := range v.ExtraVolumes { if val == nil { res.ExtraVolumes[i] = nil continue } - res.ExtraVolumes[i] = unmarshalExtraVolumesSpecResponseBodyToControlplaneviewsExtraVolumesSpecView(val) + res.ExtraVolumes[i] = marshalControlplaneExtraVolumesSpecToExtraVolumesSpecRequestBody(val) } } if v.ExtraNetworks != nil { - res.ExtraNetworks = make([]*controlplaneviews.ExtraNetworkSpecView, len(v.ExtraNetworks)) + res.ExtraNetworks = make([]*ExtraNetworkSpecRequestBody, len(v.ExtraNetworks)) for i, val := range v.ExtraNetworks { if val == nil { res.ExtraNetworks[i] = nil continue } - res.ExtraNetworks[i] = unmarshalExtraNetworkSpecResponseBodyToControlplaneviewsExtraNetworkSpecView(val) + res.ExtraNetworks[i] = marshalControlplaneExtraNetworkSpecToExtraNetworkSpecRequestBody(val) } } if v.ExtraLabels != nil { @@ -4708,14 +4618,14 @@ func unmarshalSwarmOptsResponseBodyToControlplaneviewsSwarmOptsView(v *SwarmOpts return res } -// unmarshalExtraVolumesSpecResponseBodyToControlplaneviewsExtraVolumesSpecView -// builds a value of type *controlplaneviews.ExtraVolumesSpecView from a value -// of type *ExtraVolumesSpecResponseBody. -func unmarshalExtraVolumesSpecResponseBodyToControlplaneviewsExtraVolumesSpecView(v *ExtraVolumesSpecResponseBody) *controlplaneviews.ExtraVolumesSpecView { +// marshalControlplaneExtraVolumesSpecToExtraVolumesSpecRequestBody builds a +// value of type *ExtraVolumesSpecRequestBody from a value of type +// *controlplane.ExtraVolumesSpec. +func marshalControlplaneExtraVolumesSpecToExtraVolumesSpecRequestBody(v *controlplane.ExtraVolumesSpec) *ExtraVolumesSpecRequestBody { if v == nil { return nil } - res := &controlplaneviews.ExtraVolumesSpecView{ + res := &ExtraVolumesSpecRequestBody{ HostPath: v.HostPath, DestinationPath: v.DestinationPath, } @@ -4723,14 +4633,14 @@ func unmarshalExtraVolumesSpecResponseBodyToControlplaneviewsExtraVolumesSpecVie return res } -// unmarshalExtraNetworkSpecResponseBodyToControlplaneviewsExtraNetworkSpecView -// builds a value of type *controlplaneviews.ExtraNetworkSpecView from a value -// of type *ExtraNetworkSpecResponseBody. -func unmarshalExtraNetworkSpecResponseBodyToControlplaneviewsExtraNetworkSpecView(v *ExtraNetworkSpecResponseBody) *controlplaneviews.ExtraNetworkSpecView { +// marshalControlplaneExtraNetworkSpecToExtraNetworkSpecRequestBody builds a +// value of type *ExtraNetworkSpecRequestBody from a value of type +// *controlplane.ExtraNetworkSpec. +func marshalControlplaneExtraNetworkSpecToExtraNetworkSpecRequestBody(v *controlplane.ExtraNetworkSpec) *ExtraNetworkSpecRequestBody { if v == nil { return nil } - res := &controlplaneviews.ExtraNetworkSpecView{ + res := &ExtraNetworkSpecRequestBody{ ID: v.ID, } if v.Aliases != nil { @@ -4751,14 +4661,14 @@ func unmarshalExtraNetworkSpecResponseBodyToControlplaneviewsExtraNetworkSpecVie return res } -// unmarshalDatabaseUserSpecResponseBodyToControlplaneviewsDatabaseUserSpecView -// builds a value of type *controlplaneviews.DatabaseUserSpecView from a value -// of type *DatabaseUserSpecResponseBody. -func unmarshalDatabaseUserSpecResponseBodyToControlplaneviewsDatabaseUserSpecView(v *DatabaseUserSpecResponseBody) *controlplaneviews.DatabaseUserSpecView { +// marshalControlplaneDatabaseUserSpecToDatabaseUserSpecRequestBody builds a +// value of type *DatabaseUserSpecRequestBody from a value of type +// *controlplane.DatabaseUserSpec. +func marshalControlplaneDatabaseUserSpecToDatabaseUserSpecRequestBody(v *controlplane.DatabaseUserSpec) *DatabaseUserSpecRequestBody { if v == nil { return nil } - res := &controlplaneviews.DatabaseUserSpecView{ + res := &DatabaseUserSpecRequestBody{ Username: v.Username, Password: v.Password, DbOwner: v.DbOwner, @@ -4779,439 +4689,27 @@ func unmarshalDatabaseUserSpecResponseBodyToControlplaneviewsDatabaseUserSpecVie return res } -// unmarshalServiceSpecResponseBodyToControlplaneviewsServiceSpecView builds a -// value of type *controlplaneviews.ServiceSpecView from a value of type -// *ServiceSpecResponseBody. -func unmarshalServiceSpecResponseBodyToControlplaneviewsServiceSpecView(v *ServiceSpecResponseBody) *controlplaneviews.ServiceSpecView { +// marshalControlplaneServiceSpecToServiceSpecRequestBody builds a value of +// type *ServiceSpecRequestBody from a value of type *controlplane.ServiceSpec. +func marshalControlplaneServiceSpecToServiceSpecRequestBody(v *controlplane.ServiceSpec) *ServiceSpecRequestBody { if v == nil { return nil } - res := &controlplaneviews.ServiceSpecView{ + res := &ServiceSpecRequestBody{ + ServiceID: string(v.ServiceID), ServiceType: v.ServiceType, Version: v.Version, Port: v.Port, Cpus: v.Cpus, Memory: v.Memory, } - serviceID := controlplaneviews.IdentifierView(*v.ServiceID) - res.ServiceID = &serviceID - res.HostIds = make([]controlplaneviews.IdentifierView, len(v.HostIds)) - for i, val := range v.HostIds { - res.HostIds[i] = controlplaneviews.IdentifierView(val) - } - res.Config = make(map[string]any, len(v.Config)) - for key, val := range v.Config { - tk := key - tv := val - res.Config[tk] = tv - } - - return res -} - -// marshalControlplaneDatabaseSpecToDatabaseSpecRequestBody builds a value of -// type *DatabaseSpecRequestBody from a value of type -// *controlplane.DatabaseSpec. -func marshalControlplaneDatabaseSpecToDatabaseSpecRequestBody(v *controlplane.DatabaseSpec) *DatabaseSpecRequestBody { - res := &DatabaseSpecRequestBody{ - DatabaseName: v.DatabaseName, - PostgresVersion: v.PostgresVersion, - SpockVersion: v.SpockVersion, - Port: v.Port, - Cpus: v.Cpus, - Memory: v.Memory, - } - if v.Nodes != nil { - res.Nodes = make([]*DatabaseNodeSpecRequestBody, len(v.Nodes)) - for i, val := range v.Nodes { - if val == nil { - res.Nodes[i] = nil - continue - } - res.Nodes[i] = marshalControlplaneDatabaseNodeSpecToDatabaseNodeSpecRequestBody(val) - } - } else { - res.Nodes = []*DatabaseNodeSpecRequestBody{} - } - if v.DatabaseUsers != nil { - res.DatabaseUsers = make([]*DatabaseUserSpecRequestBody, len(v.DatabaseUsers)) - for i, val := range v.DatabaseUsers { - if val == nil { - res.DatabaseUsers[i] = nil - continue - } - res.DatabaseUsers[i] = marshalControlplaneDatabaseUserSpecToDatabaseUserSpecRequestBody(val) - } - } - if v.Services != nil { - res.Services = make([]*ServiceSpecRequestBody, len(v.Services)) - for i, val := range v.Services { - if val == nil { - res.Services[i] = nil - continue - } - res.Services[i] = marshalControlplaneServiceSpecToServiceSpecRequestBody(val) - } - } - if v.BackupConfig != nil { - res.BackupConfig = marshalControlplaneBackupConfigSpecToBackupConfigSpecRequestBody(v.BackupConfig) - } - if v.RestoreConfig != nil { - res.RestoreConfig = marshalControlplaneRestoreConfigSpecToRestoreConfigSpecRequestBody(v.RestoreConfig) - } - if v.PostgresqlConf != nil { - res.PostgresqlConf = make(map[string]any, len(v.PostgresqlConf)) - for key, val := range v.PostgresqlConf { - tk := key - tv := val - res.PostgresqlConf[tk] = tv - } - } - if v.OrchestratorOpts != nil { - res.OrchestratorOpts = marshalControlplaneOrchestratorOptsToOrchestratorOptsRequestBody(v.OrchestratorOpts) - } - - return res -} - -// marshalControlplaneDatabaseNodeSpecToDatabaseNodeSpecRequestBody builds a -// value of type *DatabaseNodeSpecRequestBody from a value of type -// *controlplane.DatabaseNodeSpec. -func marshalControlplaneDatabaseNodeSpecToDatabaseNodeSpecRequestBody(v *controlplane.DatabaseNodeSpec) *DatabaseNodeSpecRequestBody { - res := &DatabaseNodeSpecRequestBody{ - Name: v.Name, - PostgresVersion: v.PostgresVersion, - Port: v.Port, - Cpus: v.Cpus, - Memory: v.Memory, - SourceNode: v.SourceNode, - } - if v.HostIds != nil { - res.HostIds = make([]string, len(v.HostIds)) - for i, val := range v.HostIds { - res.HostIds[i] = string(val) - } - } else { - res.HostIds = []string{} - } - if v.PostgresqlConf != nil { - res.PostgresqlConf = make(map[string]any, len(v.PostgresqlConf)) - for key, val := range v.PostgresqlConf { - tk := key - tv := val - res.PostgresqlConf[tk] = tv - } - } - if v.BackupConfig != nil { - res.BackupConfig = marshalControlplaneBackupConfigSpecToBackupConfigSpecRequestBody(v.BackupConfig) - } - if v.RestoreConfig != nil { - res.RestoreConfig = marshalControlplaneRestoreConfigSpecToRestoreConfigSpecRequestBody(v.RestoreConfig) - } - if v.OrchestratorOpts != nil { - res.OrchestratorOpts = marshalControlplaneOrchestratorOptsToOrchestratorOptsRequestBody(v.OrchestratorOpts) - } - - return res -} - -// marshalControlplaneBackupConfigSpecToBackupConfigSpecRequestBody builds a -// value of type *BackupConfigSpecRequestBody from a value of type -// *controlplane.BackupConfigSpec. -func marshalControlplaneBackupConfigSpecToBackupConfigSpecRequestBody(v *controlplane.BackupConfigSpec) *BackupConfigSpecRequestBody { - if v == nil { - return nil - } - res := &BackupConfigSpecRequestBody{} - if v.Repositories != nil { - res.Repositories = make([]*BackupRepositorySpecRequestBody, len(v.Repositories)) - for i, val := range v.Repositories { - if val == nil { - res.Repositories[i] = nil - continue - } - res.Repositories[i] = marshalControlplaneBackupRepositorySpecToBackupRepositorySpecRequestBody(val) - } - } else { - res.Repositories = []*BackupRepositorySpecRequestBody{} - } - if v.Schedules != nil { - res.Schedules = make([]*BackupScheduleSpecRequestBody, len(v.Schedules)) - for i, val := range v.Schedules { - if val == nil { - res.Schedules[i] = nil - continue - } - res.Schedules[i] = marshalControlplaneBackupScheduleSpecToBackupScheduleSpecRequestBody(val) - } - } - - return res -} - -// marshalControlplaneBackupRepositorySpecToBackupRepositorySpecRequestBody -// builds a value of type *BackupRepositorySpecRequestBody from a value of type -// *controlplane.BackupRepositorySpec. -func marshalControlplaneBackupRepositorySpecToBackupRepositorySpecRequestBody(v *controlplane.BackupRepositorySpec) *BackupRepositorySpecRequestBody { - res := &BackupRepositorySpecRequestBody{ - Type: v.Type, - S3Bucket: v.S3Bucket, - S3Region: v.S3Region, - S3Endpoint: v.S3Endpoint, - S3Key: v.S3Key, - S3KeySecret: v.S3KeySecret, - GcsBucket: v.GcsBucket, - GcsEndpoint: v.GcsEndpoint, - GcsKey: v.GcsKey, - AzureAccount: v.AzureAccount, - AzureContainer: v.AzureContainer, - AzureEndpoint: v.AzureEndpoint, - AzureKey: v.AzureKey, - RetentionFull: v.RetentionFull, - RetentionFullType: v.RetentionFullType, - BasePath: v.BasePath, - } - if v.ID != nil { - id := string(*v.ID) - res.ID = &id - } - if v.CustomOptions != nil { - res.CustomOptions = make(map[string]string, len(v.CustomOptions)) - for key, val := range v.CustomOptions { - tk := key - tv := val - res.CustomOptions[tk] = tv - } - } - - return res -} - -// marshalControlplaneBackupScheduleSpecToBackupScheduleSpecRequestBody builds -// a value of type *BackupScheduleSpecRequestBody from a value of type -// *controlplane.BackupScheduleSpec. -func marshalControlplaneBackupScheduleSpecToBackupScheduleSpecRequestBody(v *controlplane.BackupScheduleSpec) *BackupScheduleSpecRequestBody { - if v == nil { - return nil - } - res := &BackupScheduleSpecRequestBody{ - ID: v.ID, - Type: v.Type, - CronExpression: v.CronExpression, - } - - return res -} - -// marshalControlplaneRestoreConfigSpecToRestoreConfigSpecRequestBody builds a -// value of type *RestoreConfigSpecRequestBody from a value of type -// *controlplane.RestoreConfigSpec. -func marshalControlplaneRestoreConfigSpecToRestoreConfigSpecRequestBody(v *controlplane.RestoreConfigSpec) *RestoreConfigSpecRequestBody { - if v == nil { - return nil - } - res := &RestoreConfigSpecRequestBody{ - SourceDatabaseID: string(v.SourceDatabaseID), - SourceNodeName: v.SourceNodeName, - SourceDatabaseName: v.SourceDatabaseName, - } - if v.Repository != nil { - res.Repository = marshalControlplaneRestoreRepositorySpecToRestoreRepositorySpecRequestBody(v.Repository) - } - if v.RestoreOptions != nil { - res.RestoreOptions = make(map[string]string, len(v.RestoreOptions)) - for key, val := range v.RestoreOptions { - tk := key - tv := val - res.RestoreOptions[tk] = tv - } - } - - return res -} - -// marshalControlplaneRestoreRepositorySpecToRestoreRepositorySpecRequestBody -// builds a value of type *RestoreRepositorySpecRequestBody from a value of -// type *controlplane.RestoreRepositorySpec. -func marshalControlplaneRestoreRepositorySpecToRestoreRepositorySpecRequestBody(v *controlplane.RestoreRepositorySpec) *RestoreRepositorySpecRequestBody { - res := &RestoreRepositorySpecRequestBody{ - Type: v.Type, - S3Bucket: v.S3Bucket, - S3Region: v.S3Region, - S3Endpoint: v.S3Endpoint, - S3Key: v.S3Key, - S3KeySecret: v.S3KeySecret, - GcsBucket: v.GcsBucket, - GcsEndpoint: v.GcsEndpoint, - GcsKey: v.GcsKey, - AzureAccount: v.AzureAccount, - AzureContainer: v.AzureContainer, - AzureEndpoint: v.AzureEndpoint, - AzureKey: v.AzureKey, - BasePath: v.BasePath, - } - if v.ID != nil { - id := string(*v.ID) - res.ID = &id - } - if v.CustomOptions != nil { - res.CustomOptions = make(map[string]string, len(v.CustomOptions)) - for key, val := range v.CustomOptions { - tk := key - tv := val - res.CustomOptions[tk] = tv - } - } - - return res -} - -// marshalControlplaneOrchestratorOptsToOrchestratorOptsRequestBody builds a -// value of type *OrchestratorOptsRequestBody from a value of type -// *controlplane.OrchestratorOpts. -func marshalControlplaneOrchestratorOptsToOrchestratorOptsRequestBody(v *controlplane.OrchestratorOpts) *OrchestratorOptsRequestBody { - if v == nil { - return nil - } - res := &OrchestratorOptsRequestBody{} - if v.Swarm != nil { - res.Swarm = marshalControlplaneSwarmOptsToSwarmOptsRequestBody(v.Swarm) - } - - return res -} - -// marshalControlplaneSwarmOptsToSwarmOptsRequestBody builds a value of type -// *SwarmOptsRequestBody from a value of type *controlplane.SwarmOpts. -func marshalControlplaneSwarmOptsToSwarmOptsRequestBody(v *controlplane.SwarmOpts) *SwarmOptsRequestBody { - if v == nil { - return nil - } - res := &SwarmOptsRequestBody{} - if v.ExtraVolumes != nil { - res.ExtraVolumes = make([]*ExtraVolumesSpecRequestBody, len(v.ExtraVolumes)) - for i, val := range v.ExtraVolumes { - if val == nil { - res.ExtraVolumes[i] = nil - continue - } - res.ExtraVolumes[i] = marshalControlplaneExtraVolumesSpecToExtraVolumesSpecRequestBody(val) - } - } - if v.ExtraNetworks != nil { - res.ExtraNetworks = make([]*ExtraNetworkSpecRequestBody, len(v.ExtraNetworks)) - for i, val := range v.ExtraNetworks { - if val == nil { - res.ExtraNetworks[i] = nil - continue - } - res.ExtraNetworks[i] = marshalControlplaneExtraNetworkSpecToExtraNetworkSpecRequestBody(val) - } - } - if v.ExtraLabels != nil { - res.ExtraLabels = make(map[string]string, len(v.ExtraLabels)) - for key, val := range v.ExtraLabels { - tk := key - tv := val - res.ExtraLabels[tk] = tv - } - } - - return res -} - -// marshalControlplaneExtraVolumesSpecToExtraVolumesSpecRequestBody builds a -// value of type *ExtraVolumesSpecRequestBody from a value of type -// *controlplane.ExtraVolumesSpec. -func marshalControlplaneExtraVolumesSpecToExtraVolumesSpecRequestBody(v *controlplane.ExtraVolumesSpec) *ExtraVolumesSpecRequestBody { - if v == nil { - return nil - } - res := &ExtraVolumesSpecRequestBody{ - HostPath: v.HostPath, - DestinationPath: v.DestinationPath, - } - - return res -} - -// marshalControlplaneExtraNetworkSpecToExtraNetworkSpecRequestBody builds a -// value of type *ExtraNetworkSpecRequestBody from a value of type -// *controlplane.ExtraNetworkSpec. -func marshalControlplaneExtraNetworkSpecToExtraNetworkSpecRequestBody(v *controlplane.ExtraNetworkSpec) *ExtraNetworkSpecRequestBody { - if v == nil { - return nil - } - res := &ExtraNetworkSpecRequestBody{ - ID: v.ID, - } - if v.Aliases != nil { - res.Aliases = make([]string, len(v.Aliases)) - for i, val := range v.Aliases { - res.Aliases[i] = val - } - } - if v.DriverOpts != nil { - res.DriverOpts = make(map[string]string, len(v.DriverOpts)) - for key, val := range v.DriverOpts { - tk := key - tv := val - res.DriverOpts[tk] = tv - } - } - - return res -} - -// marshalControlplaneDatabaseUserSpecToDatabaseUserSpecRequestBody builds a -// value of type *DatabaseUserSpecRequestBody from a value of type -// *controlplane.DatabaseUserSpec. -func marshalControlplaneDatabaseUserSpecToDatabaseUserSpecRequestBody(v *controlplane.DatabaseUserSpec) *DatabaseUserSpecRequestBody { - if v == nil { - return nil - } - res := &DatabaseUserSpecRequestBody{ - Username: v.Username, - Password: v.Password, - DbOwner: v.DbOwner, - } - if v.Attributes != nil { - res.Attributes = make([]string, len(v.Attributes)) - for i, val := range v.Attributes { - res.Attributes[i] = val - } - } - if v.Roles != nil { - res.Roles = make([]string, len(v.Roles)) - for i, val := range v.Roles { - res.Roles[i] = val - } - } - - return res -} - -// marshalControlplaneServiceSpecToServiceSpecRequestBody builds a value of -// type *ServiceSpecRequestBody from a value of type *controlplane.ServiceSpec. -func marshalControlplaneServiceSpecToServiceSpecRequestBody(v *controlplane.ServiceSpec) *ServiceSpecRequestBody { - if v == nil { - return nil - } - res := &ServiceSpecRequestBody{ - ServiceID: string(v.ServiceID), - ServiceType: v.ServiceType, - Version: v.Version, - Port: v.Port, - Cpus: v.Cpus, - Memory: v.Memory, - } - if v.HostIds != nil { - res.HostIds = make([]string, len(v.HostIds)) - for i, val := range v.HostIds { - res.HostIds[i] = string(val) - } - } else { - res.HostIds = []string{} + if v.HostIds != nil { + res.HostIds = make([]string, len(v.HostIds)) + for i, val := range v.HostIds { + res.HostIds[i] = string(val) + } + } else { + res.HostIds = []string{} } if v.Config != nil { res.Config = make(map[string]any, len(v.Config)) @@ -5654,135 +5152,41 @@ func unmarshalDatabaseResponseBodyToControlplaneDatabase(v *DatabaseResponseBody tenantID := controlplane.Identifier(*v.TenantID) res.TenantID = &tenantID } - res.Instances = make([]*controlplane.Instance, len(v.Instances)) - for i, val := range v.Instances { - if val == nil { - res.Instances[i] = nil - continue - } - res.Instances[i] = unmarshalInstanceResponseBodyToControlplaneInstance(val) - } - res.ServiceInstances = make([]*controlplane.Serviceinstance, len(v.ServiceInstances)) - for i, val := range v.ServiceInstances { - if val == nil { - res.ServiceInstances[i] = nil - continue + if v.Instances != nil { + res.Instances = make([]*controlplane.Instance, len(v.Instances)) + for i, val := range v.Instances { + if val == nil { + res.Instances[i] = nil + continue + } + res.Instances[i] = unmarshalInstanceResponseBodyToControlplaneInstance(val) } - res.ServiceInstances[i] = unmarshalServiceinstanceResponseBodyToControlplaneServiceinstance(val) - } - if v.Spec != nil { - res.Spec = unmarshalDatabaseSpecResponseBodyToControlplaneDatabaseSpec(v.Spec) - } - - return res -} - -// unmarshalInstanceResponseBodyToControlplaneInstance builds a value of type -// *controlplane.Instance from a value of type *InstanceResponseBody. -func unmarshalInstanceResponseBodyToControlplaneInstance(v *InstanceResponseBody) *controlplane.Instance { - res := &controlplane.Instance{ - ID: *v.ID, - HostID: *v.HostID, - NodeName: *v.NodeName, - CreatedAt: *v.CreatedAt, - UpdatedAt: *v.UpdatedAt, - StatusUpdatedAt: v.StatusUpdatedAt, - State: *v.State, - Error: v.Error, } - if v.ConnectionInfo != nil { - res.ConnectionInfo = unmarshalInstanceConnectionInfoResponseBodyToControlplaneInstanceConnectionInfo(v.ConnectionInfo) - } - if v.Postgres != nil { - res.Postgres = unmarshalInstancePostgresStatusResponseBodyToControlplaneInstancePostgresStatus(v.Postgres) - } - if v.Spock != nil { - res.Spock = unmarshalInstanceSpockStatusResponseBodyToControlplaneInstanceSpockStatus(v.Spock) - } - - return res -} - -// unmarshalInstanceConnectionInfoResponseBodyToControlplaneInstanceConnectionInfo -// builds a value of type *controlplane.InstanceConnectionInfo from a value of -// type *InstanceConnectionInfoResponseBody. -func unmarshalInstanceConnectionInfoResponseBodyToControlplaneInstanceConnectionInfo(v *InstanceConnectionInfoResponseBody) *controlplane.InstanceConnectionInfo { - if v == nil { - return nil - } - res := &controlplane.InstanceConnectionInfo{ - Hostname: v.Hostname, - Ipv4Address: v.Ipv4Address, - Port: v.Port, - } - - return res -} - -// unmarshalInstancePostgresStatusResponseBodyToControlplaneInstancePostgresStatus -// builds a value of type *controlplane.InstancePostgresStatus from a value of -// type *InstancePostgresStatusResponseBody. -func unmarshalInstancePostgresStatusResponseBodyToControlplaneInstancePostgresStatus(v *InstancePostgresStatusResponseBody) *controlplane.InstancePostgresStatus { - if v == nil { - return nil - } - res := &controlplane.InstancePostgresStatus{ - Version: v.Version, - PatroniState: v.PatroniState, - Role: v.Role, - PendingRestart: v.PendingRestart, - PatroniPaused: v.PatroniPaused, - } - - return res -} - -// unmarshalInstanceSpockStatusResponseBodyToControlplaneInstanceSpockStatus -// builds a value of type *controlplane.InstanceSpockStatus from a value of -// type *InstanceSpockStatusResponseBody. -func unmarshalInstanceSpockStatusResponseBodyToControlplaneInstanceSpockStatus(v *InstanceSpockStatusResponseBody) *controlplane.InstanceSpockStatus { - if v == nil { - return nil - } - res := &controlplane.InstanceSpockStatus{ - ReadOnly: v.ReadOnly, - Version: v.Version, - } - if v.Subscriptions != nil { - res.Subscriptions = make([]*controlplane.InstanceSubscription, len(v.Subscriptions)) - for i, val := range v.Subscriptions { + if v.ServiceInstances != nil { + res.ServiceInstances = make([]*controlplane.ServiceInstance, len(v.ServiceInstances)) + for i, val := range v.ServiceInstances { if val == nil { - res.Subscriptions[i] = nil + res.ServiceInstances[i] = nil continue } - res.Subscriptions[i] = unmarshalInstanceSubscriptionResponseBodyToControlplaneInstanceSubscription(val) + res.ServiceInstances[i] = unmarshalServiceInstanceResponseBodyToControlplaneServiceInstance(val) } } + if v.Spec != nil { + res.Spec = unmarshalDatabaseSpecResponseBodyToControlplaneDatabaseSpec(v.Spec) + } return res } -// unmarshalInstanceSubscriptionResponseBodyToControlplaneInstanceSubscription -// builds a value of type *controlplane.InstanceSubscription from a value of -// type *InstanceSubscriptionResponseBody. -func unmarshalInstanceSubscriptionResponseBodyToControlplaneInstanceSubscription(v *InstanceSubscriptionResponseBody) *controlplane.InstanceSubscription { +// unmarshalServiceInstanceResponseBodyToControlplaneServiceInstance builds a +// value of type *controlplane.ServiceInstance from a value of type +// *ServiceInstanceResponseBody. +func unmarshalServiceInstanceResponseBodyToControlplaneServiceInstance(v *ServiceInstanceResponseBody) *controlplane.ServiceInstance { if v == nil { return nil } - res := &controlplane.InstanceSubscription{ - ProviderNode: *v.ProviderNode, - Name: *v.Name, - Status: *v.Status, - } - - return res -} - -// unmarshalServiceinstanceResponseBodyToControlplaneServiceinstance builds a -// value of type *controlplane.Serviceinstance from a value of type -// *ServiceinstanceResponseBody. -func unmarshalServiceinstanceResponseBodyToControlplaneServiceinstance(v *ServiceinstanceResponseBody) *controlplane.Serviceinstance { - res := &controlplane.Serviceinstance{ + res := &controlplane.ServiceInstance{ ServiceInstanceID: *v.ServiceInstanceID, ServiceID: *v.ServiceID, DatabaseID: controlplane.Identifier(*v.DatabaseID), diff --git a/api/apiv1/gen/http/control_plane/client/types.go b/api/apiv1/gen/http/control_plane/client/types.go index 9982ace5..83d31c9e 100644 --- a/api/apiv1/gen/http/control_plane/client/types.go +++ b/api/apiv1/gen/http/control_plane/client/types.go @@ -11,7 +11,6 @@ import ( "unicode/utf8" controlplane "github.com/pgEdge/control-plane/api/apiv1/gen/control_plane" - controlplaneviews "github.com/pgEdge/control-plane/api/apiv1/gen/control_plane/views" goa "goa.design/goa/v3/pkg" ) @@ -44,7 +43,7 @@ type GetJoinOptionsRequestBody struct { type CreateDatabaseRequestBody struct { // Unique identifier for the database. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` - // Unique identifier for the databases's owner. + // Unique identifier for the database's owner. TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` // The specification for the database. Spec *DatabaseSpecRequestBody `form:"spec" json:"spec" xml:"spec"` @@ -53,7 +52,7 @@ type CreateDatabaseRequestBody struct { // UpdateDatabaseRequestBody is the type of the "control-plane" service // "update-database" endpoint HTTP request body. type UpdateDatabaseRequestBody struct { - // Unique identifier for the databases's owner. + // Unique identifier for the database's owner. TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` // The specification for the database. Spec *DatabaseSpecRequestBodyRequestBody `form:"spec" json:"spec" xml:"spec"` @@ -186,7 +185,8 @@ type RemoveHostResponseBody struct { // ListDatabasesResponseBody is the type of the "control-plane" service // "list-databases" endpoint HTTP response body. type ListDatabasesResponseBody struct { - Databases DatabaseCollectionResponseBody `form:"databases,omitempty" json:"databases,omitempty" xml:"databases,omitempty"` + // The databases managed by this cluster. + Databases []*DatabaseSummaryResponseBody `form:"databases,omitempty" json:"databases,omitempty" xml:"databases,omitempty"` } // CreateDatabaseResponseBody is the type of the "control-plane" service @@ -203,7 +203,7 @@ type CreateDatabaseResponseBody struct { type GetDatabaseResponseBody struct { // Unique identifier for the database. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` - // Unique identifier for the database. + // Unique identifier for the database's owner. TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` // The time that the database was created. CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` @@ -212,9 +212,9 @@ type GetDatabaseResponseBody struct { // Current state of the database. State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` // All of the instances in the database. - Instances InstanceResponseBodyCollection `form:"instances,omitempty" json:"instances,omitempty" xml:"instances,omitempty"` + Instances []*InstanceResponseBody `form:"instances,omitempty" json:"instances,omitempty" xml:"instances,omitempty"` // Service instances running alongside this database. - ServiceInstances ServiceinstanceResponseBodyCollection `form:"service_instances,omitempty" json:"service_instances,omitempty" xml:"service_instances,omitempty"` + ServiceInstances []*ServiceInstanceResponseBody `form:"service_instances,omitempty" json:"service_instances,omitempty" xml:"service_instances,omitempty"` // The user-provided specification for the database. Spec *DatabaseSpecResponseBody `form:"spec,omitempty" json:"spec,omitempty" xml:"spec,omitempty"` } @@ -1716,15 +1716,11 @@ type TaskResponseBody struct { Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` } -// DatabaseCollectionResponseBody is used to define fields on response body -// types. -type DatabaseCollectionResponseBody []*DatabaseResponseBody - -// DatabaseResponseBody is used to define fields on response body types. -type DatabaseResponseBody struct { +// DatabaseSummaryResponseBody is used to define fields on response body types. +type DatabaseSummaryResponseBody struct { // Unique identifier for the database. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` - // Unique identifier for the databases's owner. + // Unique identifier for the database's owner. TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` // The time that the database was created. CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` @@ -1733,17 +1729,9 @@ type DatabaseResponseBody struct { // Current state of the database. State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` // All of the instances in the database. - Instances InstanceCollectionResponseBody `form:"instances,omitempty" json:"instances,omitempty" xml:"instances,omitempty"` - // Service instances running alongside this database. - ServiceInstances ServiceinstanceCollectionResponseBody `form:"service_instances,omitempty" json:"service_instances,omitempty" xml:"service_instances,omitempty"` - // The user-provided specification for the database. - Spec *DatabaseSpecResponseBody `form:"spec,omitempty" json:"spec,omitempty" xml:"spec,omitempty"` + Instances []*InstanceResponseBody `form:"instances,omitempty" json:"instances,omitempty" xml:"instances,omitempty"` } -// InstanceCollectionResponseBody is used to define fields on response body -// types. -type InstanceCollectionResponseBody []*InstanceResponseBody - // InstanceResponseBody is used to define fields on response body types. type InstanceResponseBody struct { // Unique identifier for the instance. @@ -1815,78 +1803,10 @@ type InstanceSubscriptionResponseBody struct { Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` } -// ServiceinstanceCollectionResponseBody is used to define fields on response -// body types. -type ServiceinstanceCollectionResponseBody []*ServiceinstanceResponseBody - -// ServiceinstanceResponseBody is used to define fields on response body types. -type ServiceinstanceResponseBody struct { - // Unique identifier for the service instance. - ServiceInstanceID *string `form:"service_instance_id,omitempty" json:"service_instance_id,omitempty" xml:"service_instance_id,omitempty"` - // The service ID from the DatabaseSpec. - ServiceID *string `form:"service_id,omitempty" json:"service_id,omitempty" xml:"service_id,omitempty"` - // The ID of the database this service belongs to. - DatabaseID *string `form:"database_id,omitempty" json:"database_id,omitempty" xml:"database_id,omitempty"` - // The ID of the host this service instance is running on. - HostID *string `form:"host_id,omitempty" json:"host_id,omitempty" xml:"host_id,omitempty"` - // Current state of the service instance. - State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` - // Runtime status information for the service instance. - Status *ServiceInstanceStatusResponseBody `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` - // The time that the service instance was created. - CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` - // The time that the service instance was last updated. - UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` - // An error message if the service instance is in an error state. - Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` -} - -// ServiceInstanceStatusResponseBody is used to define fields on response body -// types. -type ServiceInstanceStatusResponseBody struct { - // The Docker container ID. - ContainerID *string `form:"container_id,omitempty" json:"container_id,omitempty" xml:"container_id,omitempty"` - // The container image version currently running. - ImageVersion *string `form:"image_version,omitempty" json:"image_version,omitempty" xml:"image_version,omitempty"` - // The hostname of the service instance. - Hostname *string `form:"hostname,omitempty" json:"hostname,omitempty" xml:"hostname,omitempty"` - // The IPv4 address of the service instance. - Ipv4Address *string `form:"ipv4_address,omitempty" json:"ipv4_address,omitempty" xml:"ipv4_address,omitempty"` - // Port mappings for this service instance. - Ports []*PortMappingResponseBody `form:"ports,omitempty" json:"ports,omitempty" xml:"ports,omitempty"` - // Most recent health check result. - HealthCheck *HealthCheckResultResponseBody `form:"health_check,omitempty" json:"health_check,omitempty" xml:"health_check,omitempty"` - // The time of the last health check attempt. - LastHealthAt *string `form:"last_health_at,omitempty" json:"last_health_at,omitempty" xml:"last_health_at,omitempty"` - // Whether the service is ready to accept requests. - ServiceReady *bool `form:"service_ready,omitempty" json:"service_ready,omitempty" xml:"service_ready,omitempty"` -} - -// PortMappingResponseBody is used to define fields on response body types. -type PortMappingResponseBody struct { - // The name of the port (e.g., 'http', 'web-client'). - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` - // The port number inside the container. - ContainerPort *int `form:"container_port,omitempty" json:"container_port,omitempty" xml:"container_port,omitempty"` - // The port number on the host (if port-forwarded). - HostPort *int `form:"host_port,omitempty" json:"host_port,omitempty" xml:"host_port,omitempty"` -} - -// HealthCheckResultResponseBody is used to define fields on response body -// types. -type HealthCheckResultResponseBody struct { - // The health status. - Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` - // Optional message about the health status. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` - // The time this health check was performed. - CheckedAt *string `form:"checked_at,omitempty" json:"checked_at,omitempty" xml:"checked_at,omitempty"` -} - -// DatabaseSpecResponseBody is used to define fields on response body types. -type DatabaseSpecResponseBody struct { +// DatabaseSpecRequestBody is used to define fields on request body types. +type DatabaseSpecRequestBody struct { // The name of the Postgres database. - DatabaseName *string `form:"database_name,omitempty" json:"database_name,omitempty" xml:"database_name,omitempty"` + DatabaseName string `form:"database_name" json:"database_name" xml:"database_name"` // The Postgres version in 'major.minor' format. PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` // The major version of the Spock extension. @@ -1905,30 +1825,30 @@ type DatabaseSpecResponseBody struct { // host. Whether this limit is enforced depends on the orchestrator. Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` // The Spock nodes for this database. - Nodes []*DatabaseNodeSpecResponseBody `form:"nodes,omitempty" json:"nodes,omitempty" xml:"nodes,omitempty"` + Nodes []*DatabaseNodeSpecRequestBody `form:"nodes" json:"nodes" xml:"nodes"` // The users to create for this database. - DatabaseUsers []*DatabaseUserSpecResponseBody `form:"database_users,omitempty" json:"database_users,omitempty" xml:"database_users,omitempty"` + DatabaseUsers []*DatabaseUserSpecRequestBody `form:"database_users,omitempty" json:"database_users,omitempty" xml:"database_users,omitempty"` // Service instances to run alongside the database (e.g., MCP servers). - Services []*ServiceSpecResponseBody `form:"services,omitempty" json:"services,omitempty" xml:"services,omitempty"` + Services []*ServiceSpecRequestBody `form:"services,omitempty" json:"services,omitempty" xml:"services,omitempty"` // The backup configuration for this database. - BackupConfig *BackupConfigSpecResponseBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecRequestBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` // The restore configuration for this database. - RestoreConfig *RestoreConfigSpecResponseBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecRequestBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` // Additional postgresql.conf settings. Will be merged with the settings // provided by control-plane. PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsResponseBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsRequestBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` } -// DatabaseNodeSpecResponseBody is used to define fields on response body types. -type DatabaseNodeSpecResponseBody struct { +// DatabaseNodeSpecRequestBody is used to define fields on request body types. +type DatabaseNodeSpecRequestBody struct { // The name of the database node. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name string `form:"name" json:"name" xml:"name"` // The IDs of the hosts that should run this node. When multiple hosts are // specified, one host will chosen as a primary, and the others will be read // replicas. - HostIds []string `form:"host_ids,omitempty" json:"host_ids,omitempty" xml:"host_ids,omitempty"` + HostIds []string `form:"host_ids" json:"host_ids" xml:"host_ids"` // The Postgres version for this node in 'major.minor' format. Overrides the // Postgres version set in the DatabaseSpec. PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` @@ -1952,32 +1872,32 @@ type DatabaseNodeSpecResponseBody struct { PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` // The backup configuration for this node. Overrides the backup configuration // set in the DatabaseSpec. - BackupConfig *BackupConfigSpecResponseBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecRequestBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` // The restore configuration for this node. Overrides the restore configuration // set in the DatabaseSpec. - RestoreConfig *RestoreConfigSpecResponseBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecRequestBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsResponseBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsRequestBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` // The name of the source node to use for sync. This is typically the node // (like 'n1') from which the data will be copied to initialize this new node. SourceNode *string `form:"source_node,omitempty" json:"source_node,omitempty" xml:"source_node,omitempty"` } -// BackupConfigSpecResponseBody is used to define fields on response body types. -type BackupConfigSpecResponseBody struct { +// BackupConfigSpecRequestBody is used to define fields on request body types. +type BackupConfigSpecRequestBody struct { // The repositories for this backup configuration. - Repositories []*BackupRepositorySpecResponseBody `form:"repositories,omitempty" json:"repositories,omitempty" xml:"repositories,omitempty"` + Repositories []*BackupRepositorySpecRequestBody `form:"repositories" json:"repositories" xml:"repositories"` // The schedules for this backup configuration. - Schedules []*BackupScheduleSpecResponseBody `form:"schedules,omitempty" json:"schedules,omitempty" xml:"schedules,omitempty"` + Schedules []*BackupScheduleSpecRequestBody `form:"schedules,omitempty" json:"schedules,omitempty" xml:"schedules,omitempty"` } -// BackupRepositorySpecResponseBody is used to define fields on response body +// BackupRepositorySpecRequestBody is used to define fields on request body // types. -type BackupRepositorySpecResponseBody struct { +type BackupRepositorySpecRequestBody struct { // The unique identifier of this repository. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // The type of this repository. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type string `form:"type" json:"type" xml:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = @@ -2027,41 +1947,39 @@ type BackupRepositorySpecResponseBody struct { CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` } -// BackupScheduleSpecResponseBody is used to define fields on response body -// types. -type BackupScheduleSpecResponseBody struct { +// BackupScheduleSpecRequestBody is used to define fields on request body types. +type BackupScheduleSpecRequestBody struct { // The unique identifier for this backup schedule. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID string `form:"id" json:"id" xml:"id"` // The type of backup to take on this schedule. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type string `form:"type" json:"type" xml:"type"` // The cron expression for this schedule. - CronExpression *string `form:"cron_expression,omitempty" json:"cron_expression,omitempty" xml:"cron_expression,omitempty"` + CronExpression string `form:"cron_expression" json:"cron_expression" xml:"cron_expression"` } -// RestoreConfigSpecResponseBody is used to define fields on response body -// types. -type RestoreConfigSpecResponseBody struct { +// RestoreConfigSpecRequestBody is used to define fields on request body types. +type RestoreConfigSpecRequestBody struct { // The ID of the database to restore this database from. - SourceDatabaseID *string `form:"source_database_id,omitempty" json:"source_database_id,omitempty" xml:"source_database_id,omitempty"` + SourceDatabaseID string `form:"source_database_id" json:"source_database_id" xml:"source_database_id"` // The name of the node to restore this database from. - SourceNodeName *string `form:"source_node_name,omitempty" json:"source_node_name,omitempty" xml:"source_node_name,omitempty"` + SourceNodeName string `form:"source_node_name" json:"source_node_name" xml:"source_node_name"` // The name of the database in this repository. The database will be renamed to // the database_name in the DatabaseSpec after it's restored. - SourceDatabaseName *string `form:"source_database_name,omitempty" json:"source_database_name,omitempty" xml:"source_database_name,omitempty"` + SourceDatabaseName string `form:"source_database_name" json:"source_database_name" xml:"source_database_name"` // The repository to restore this database from. - Repository *RestoreRepositorySpecResponseBody `form:"repository,omitempty" json:"repository,omitempty" xml:"repository,omitempty"` + Repository *RestoreRepositorySpecRequestBody `form:"repository" json:"repository" xml:"repository"` // Additional options to use when restoring this database. If omitted, the // database will be restored to the latest point in the given repository. RestoreOptions map[string]string `form:"restore_options,omitempty" json:"restore_options,omitempty" xml:"restore_options,omitempty"` } -// RestoreRepositorySpecResponseBody is used to define fields on response body +// RestoreRepositorySpecRequestBody is used to define fields on request body // types. -type RestoreRepositorySpecResponseBody struct { +type RestoreRepositorySpecRequestBody struct { // The unique identifier of this repository. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // The type of this repository. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type string `form:"type" json:"type" xml:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = @@ -2100,46 +2018,46 @@ type RestoreRepositorySpecResponseBody struct { CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` } -// OrchestratorOptsResponseBody is used to define fields on response body types. -type OrchestratorOptsResponseBody struct { +// OrchestratorOptsRequestBody is used to define fields on request body types. +type OrchestratorOptsRequestBody struct { // Swarm-specific configuration. - Swarm *SwarmOptsResponseBody `form:"swarm,omitempty" json:"swarm,omitempty" xml:"swarm,omitempty"` + Swarm *SwarmOptsRequestBody `form:"swarm,omitempty" json:"swarm,omitempty" xml:"swarm,omitempty"` } -// SwarmOptsResponseBody is used to define fields on response body types. -type SwarmOptsResponseBody struct { +// SwarmOptsRequestBody is used to define fields on request body types. +type SwarmOptsRequestBody struct { // A list of extra volumes to mount. Each entry defines a host and container // path. - ExtraVolumes []*ExtraVolumesSpecResponseBody `form:"extra_volumes,omitempty" json:"extra_volumes,omitempty" xml:"extra_volumes,omitempty"` + ExtraVolumes []*ExtraVolumesSpecRequestBody `form:"extra_volumes,omitempty" json:"extra_volumes,omitempty" xml:"extra_volumes,omitempty"` // A list of additional Docker Swarm networks to attach containers in this // database to. - ExtraNetworks []*ExtraNetworkSpecResponseBody `form:"extra_networks,omitempty" json:"extra_networks,omitempty" xml:"extra_networks,omitempty"` + ExtraNetworks []*ExtraNetworkSpecRequestBody `form:"extra_networks,omitempty" json:"extra_networks,omitempty" xml:"extra_networks,omitempty"` // Arbitrary labels to apply to the Docker Swarm service ExtraLabels map[string]string `form:"extra_labels,omitempty" json:"extra_labels,omitempty" xml:"extra_labels,omitempty"` } -// ExtraVolumesSpecResponseBody is used to define fields on response body types. -type ExtraVolumesSpecResponseBody struct { +// ExtraVolumesSpecRequestBody is used to define fields on request body types. +type ExtraVolumesSpecRequestBody struct { // The host path for the volume. - HostPath *string `form:"host_path,omitempty" json:"host_path,omitempty" xml:"host_path,omitempty"` + HostPath string `form:"host_path" json:"host_path" xml:"host_path"` // The path inside the container where the volume will be mounted. - DestinationPath *string `form:"destination_path,omitempty" json:"destination_path,omitempty" xml:"destination_path,omitempty"` + DestinationPath string `form:"destination_path" json:"destination_path" xml:"destination_path"` } -// ExtraNetworkSpecResponseBody is used to define fields on response body types. -type ExtraNetworkSpecResponseBody struct { +// ExtraNetworkSpecRequestBody is used to define fields on request body types. +type ExtraNetworkSpecRequestBody struct { // The name or ID of the network to connect to. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID string `form:"id" json:"id" xml:"id"` // Optional network-scoped aliases for the container. Aliases []string `form:"aliases,omitempty" json:"aliases,omitempty" xml:"aliases,omitempty"` // Optional driver options for the network connection. DriverOpts map[string]string `form:"driver_opts,omitempty" json:"driver_opts,omitempty" xml:"driver_opts,omitempty"` } -// DatabaseUserSpecResponseBody is used to define fields on response body types. -type DatabaseUserSpecResponseBody struct { +// DatabaseUserSpecRequestBody is used to define fields on request body types. +type DatabaseUserSpecRequestBody struct { // The username for this database user. - Username *string `form:"username,omitempty" json:"username,omitempty" xml:"username,omitempty"` + Username string `form:"username" json:"username" xml:"username"` // The password for this database user. This field will be excluded from the // response of all endpoints. It can also be omitted from update requests to // keep the current value. @@ -2152,25 +2070,25 @@ type DatabaseUserSpecResponseBody struct { Roles []string `form:"roles,omitempty" json:"roles,omitempty" xml:"roles,omitempty"` } -// ServiceSpecResponseBody is used to define fields on response body types. -type ServiceSpecResponseBody struct { +// ServiceSpecRequestBody is used to define fields on request body types. +type ServiceSpecRequestBody struct { // The unique identifier for this service. - ServiceID *string `form:"service_id,omitempty" json:"service_id,omitempty" xml:"service_id,omitempty"` + ServiceID string `form:"service_id" json:"service_id" xml:"service_id"` // The type of service to run. - ServiceType *string `form:"service_type,omitempty" json:"service_type,omitempty" xml:"service_type,omitempty"` + ServiceType string `form:"service_type" json:"service_type" xml:"service_type"` // The version of the service in semver format (e.g., '1.0.0') or the literal // 'latest'. - Version *string `form:"version,omitempty" json:"version,omitempty" xml:"version,omitempty"` + Version string `form:"version" json:"version" xml:"version"` // The IDs of the hosts that should run this service. One service instance will // be created per host. - HostIds []string `form:"host_ids,omitempty" json:"host_ids,omitempty" xml:"host_ids,omitempty"` + HostIds []string `form:"host_ids" json:"host_ids" xml:"host_ids"` // The port to publish the service on the host. If 0, Docker assigns a random // port. If unspecified, no port is published and the service is not accessible // from outside the Docker network. Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` // Service-specific configuration. For MCP services, this includes // llm_provider, llm_model, and provider-specific API keys. - Config map[string]any `form:"config,omitempty" json:"config,omitempty" xml:"config,omitempty"` + Config map[string]any `form:"config" json:"config" xml:"config"` // The number of CPUs to allocate for this service. It can include the SI // suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if // unspecified. @@ -2180,10 +2098,94 @@ type ServiceSpecResponseBody struct { Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` } -// DatabaseSpecRequestBody is used to define fields on request body types. -type DatabaseSpecRequestBody struct { +// DatabaseResponseBody is used to define fields on response body types. +type DatabaseResponseBody struct { + // Unique identifier for the database. + ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + // Unique identifier for the database's owner. + TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` + // The time that the database was created. + CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` + // The time that the database was last updated. + UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` + // Current state of the database. + State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` + // All of the instances in the database. + Instances []*InstanceResponseBody `form:"instances,omitempty" json:"instances,omitempty" xml:"instances,omitempty"` + // Service instances running alongside this database. + ServiceInstances []*ServiceInstanceResponseBody `form:"service_instances,omitempty" json:"service_instances,omitempty" xml:"service_instances,omitempty"` + // The user-provided specification for the database. + Spec *DatabaseSpecResponseBody `form:"spec,omitempty" json:"spec,omitempty" xml:"spec,omitempty"` +} + +// ServiceInstanceResponseBody is used to define fields on response body types. +type ServiceInstanceResponseBody struct { + // Unique identifier for the service instance. + ServiceInstanceID *string `form:"service_instance_id,omitempty" json:"service_instance_id,omitempty" xml:"service_instance_id,omitempty"` + // The service ID from the DatabaseSpec. + ServiceID *string `form:"service_id,omitempty" json:"service_id,omitempty" xml:"service_id,omitempty"` + // The ID of the database this service belongs to. + DatabaseID *string `form:"database_id,omitempty" json:"database_id,omitempty" xml:"database_id,omitempty"` + // The ID of the host this service instance is running on. + HostID *string `form:"host_id,omitempty" json:"host_id,omitempty" xml:"host_id,omitempty"` + // Current state of the service instance. + State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` + // Runtime status information for the service instance. + Status *ServiceInstanceStatusResponseBody `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` + // The time that the service instance was created. + CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` + // The time that the service instance was last updated. + UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` + // An error message if the service instance is in an error state. + Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` +} + +// ServiceInstanceStatusResponseBody is used to define fields on response body +// types. +type ServiceInstanceStatusResponseBody struct { + // The Docker container ID. + ContainerID *string `form:"container_id,omitempty" json:"container_id,omitempty" xml:"container_id,omitempty"` + // The container image version currently running. + ImageVersion *string `form:"image_version,omitempty" json:"image_version,omitempty" xml:"image_version,omitempty"` + // The hostname of the service instance. + Hostname *string `form:"hostname,omitempty" json:"hostname,omitempty" xml:"hostname,omitempty"` + // The IPv4 address of the service instance. + Ipv4Address *string `form:"ipv4_address,omitempty" json:"ipv4_address,omitempty" xml:"ipv4_address,omitempty"` + // Port mappings for this service instance. + Ports []*PortMappingResponseBody `form:"ports,omitempty" json:"ports,omitempty" xml:"ports,omitempty"` + // Most recent health check result. + HealthCheck *HealthCheckResultResponseBody `form:"health_check,omitempty" json:"health_check,omitempty" xml:"health_check,omitempty"` + // The time of the last health check attempt. + LastHealthAt *string `form:"last_health_at,omitempty" json:"last_health_at,omitempty" xml:"last_health_at,omitempty"` + // Whether the service is ready to accept requests. + ServiceReady *bool `form:"service_ready,omitempty" json:"service_ready,omitempty" xml:"service_ready,omitempty"` +} + +// PortMappingResponseBody is used to define fields on response body types. +type PortMappingResponseBody struct { + // The name of the port (e.g., 'http', 'web-client'). + Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + // The port number inside the container. + ContainerPort *int `form:"container_port,omitempty" json:"container_port,omitempty" xml:"container_port,omitempty"` + // The port number on the host (if port-forwarded). + HostPort *int `form:"host_port,omitempty" json:"host_port,omitempty" xml:"host_port,omitempty"` +} + +// HealthCheckResultResponseBody is used to define fields on response body +// types. +type HealthCheckResultResponseBody struct { + // The health status. + Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` + // Optional message about the health status. + Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + // The time this health check was performed. + CheckedAt *string `form:"checked_at,omitempty" json:"checked_at,omitempty" xml:"checked_at,omitempty"` +} + +// DatabaseSpecResponseBody is used to define fields on response body types. +type DatabaseSpecResponseBody struct { // The name of the Postgres database. - DatabaseName string `form:"database_name" json:"database_name" xml:"database_name"` + DatabaseName *string `form:"database_name,omitempty" json:"database_name,omitempty" xml:"database_name,omitempty"` // The Postgres version in 'major.minor' format. PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` // The major version of the Spock extension. @@ -2202,30 +2204,30 @@ type DatabaseSpecRequestBody struct { // host. Whether this limit is enforced depends on the orchestrator. Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` // The Spock nodes for this database. - Nodes []*DatabaseNodeSpecRequestBody `form:"nodes" json:"nodes" xml:"nodes"` + Nodes []*DatabaseNodeSpecResponseBody `form:"nodes,omitempty" json:"nodes,omitempty" xml:"nodes,omitempty"` // The users to create for this database. - DatabaseUsers []*DatabaseUserSpecRequestBody `form:"database_users,omitempty" json:"database_users,omitempty" xml:"database_users,omitempty"` + DatabaseUsers []*DatabaseUserSpecResponseBody `form:"database_users,omitempty" json:"database_users,omitempty" xml:"database_users,omitempty"` // Service instances to run alongside the database (e.g., MCP servers). - Services []*ServiceSpecRequestBody `form:"services,omitempty" json:"services,omitempty" xml:"services,omitempty"` + Services []*ServiceSpecResponseBody `form:"services,omitempty" json:"services,omitempty" xml:"services,omitempty"` // The backup configuration for this database. - BackupConfig *BackupConfigSpecRequestBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecResponseBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` // The restore configuration for this database. - RestoreConfig *RestoreConfigSpecRequestBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecResponseBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` // Additional postgresql.conf settings. Will be merged with the settings // provided by control-plane. PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsRequestBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsResponseBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` } -// DatabaseNodeSpecRequestBody is used to define fields on request body types. -type DatabaseNodeSpecRequestBody struct { +// DatabaseNodeSpecResponseBody is used to define fields on response body types. +type DatabaseNodeSpecResponseBody struct { // The name of the database node. - Name string `form:"name" json:"name" xml:"name"` + Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // The IDs of the hosts that should run this node. When multiple hosts are // specified, one host will chosen as a primary, and the others will be read // replicas. - HostIds []string `form:"host_ids" json:"host_ids" xml:"host_ids"` + HostIds []string `form:"host_ids,omitempty" json:"host_ids,omitempty" xml:"host_ids,omitempty"` // The Postgres version for this node in 'major.minor' format. Overrides the // Postgres version set in the DatabaseSpec. PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` @@ -2249,32 +2251,32 @@ type DatabaseNodeSpecRequestBody struct { PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` // The backup configuration for this node. Overrides the backup configuration // set in the DatabaseSpec. - BackupConfig *BackupConfigSpecRequestBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecResponseBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` // The restore configuration for this node. Overrides the restore configuration // set in the DatabaseSpec. - RestoreConfig *RestoreConfigSpecRequestBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecResponseBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsRequestBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsResponseBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` // The name of the source node to use for sync. This is typically the node // (like 'n1') from which the data will be copied to initialize this new node. SourceNode *string `form:"source_node,omitempty" json:"source_node,omitempty" xml:"source_node,omitempty"` } -// BackupConfigSpecRequestBody is used to define fields on request body types. -type BackupConfigSpecRequestBody struct { +// BackupConfigSpecResponseBody is used to define fields on response body types. +type BackupConfigSpecResponseBody struct { // The repositories for this backup configuration. - Repositories []*BackupRepositorySpecRequestBody `form:"repositories" json:"repositories" xml:"repositories"` + Repositories []*BackupRepositorySpecResponseBody `form:"repositories,omitempty" json:"repositories,omitempty" xml:"repositories,omitempty"` // The schedules for this backup configuration. - Schedules []*BackupScheduleSpecRequestBody `form:"schedules,omitempty" json:"schedules,omitempty" xml:"schedules,omitempty"` + Schedules []*BackupScheduleSpecResponseBody `form:"schedules,omitempty" json:"schedules,omitempty" xml:"schedules,omitempty"` } -// BackupRepositorySpecRequestBody is used to define fields on request body +// BackupRepositorySpecResponseBody is used to define fields on response body // types. -type BackupRepositorySpecRequestBody struct { +type BackupRepositorySpecResponseBody struct { // The unique identifier of this repository. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // The type of this repository. - Type string `form:"type" json:"type" xml:"type"` + Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` // The S3 bucket name for this repository. Only applies when type = 's3'. S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = @@ -2324,39 +2326,41 @@ type BackupRepositorySpecRequestBody struct { CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` } -// BackupScheduleSpecRequestBody is used to define fields on request body types. -type BackupScheduleSpecRequestBody struct { +// BackupScheduleSpecResponseBody is used to define fields on response body +// types. +type BackupScheduleSpecResponseBody struct { // The unique identifier for this backup schedule. - ID string `form:"id" json:"id" xml:"id"` + ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // The type of backup to take on this schedule. - Type string `form:"type" json:"type" xml:"type"` + Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` // The cron expression for this schedule. - CronExpression string `form:"cron_expression" json:"cron_expression" xml:"cron_expression"` + CronExpression *string `form:"cron_expression,omitempty" json:"cron_expression,omitempty" xml:"cron_expression,omitempty"` } -// RestoreConfigSpecRequestBody is used to define fields on request body types. -type RestoreConfigSpecRequestBody struct { +// RestoreConfigSpecResponseBody is used to define fields on response body +// types. +type RestoreConfigSpecResponseBody struct { // The ID of the database to restore this database from. - SourceDatabaseID string `form:"source_database_id" json:"source_database_id" xml:"source_database_id"` + SourceDatabaseID *string `form:"source_database_id,omitempty" json:"source_database_id,omitempty" xml:"source_database_id,omitempty"` // The name of the node to restore this database from. - SourceNodeName string `form:"source_node_name" json:"source_node_name" xml:"source_node_name"` + SourceNodeName *string `form:"source_node_name,omitempty" json:"source_node_name,omitempty" xml:"source_node_name,omitempty"` // The name of the database in this repository. The database will be renamed to // the database_name in the DatabaseSpec after it's restored. - SourceDatabaseName string `form:"source_database_name" json:"source_database_name" xml:"source_database_name"` + SourceDatabaseName *string `form:"source_database_name,omitempty" json:"source_database_name,omitempty" xml:"source_database_name,omitempty"` // The repository to restore this database from. - Repository *RestoreRepositorySpecRequestBody `form:"repository" json:"repository" xml:"repository"` + Repository *RestoreRepositorySpecResponseBody `form:"repository,omitempty" json:"repository,omitempty" xml:"repository,omitempty"` // Additional options to use when restoring this database. If omitted, the // database will be restored to the latest point in the given repository. RestoreOptions map[string]string `form:"restore_options,omitempty" json:"restore_options,omitempty" xml:"restore_options,omitempty"` } -// RestoreRepositorySpecRequestBody is used to define fields on request body +// RestoreRepositorySpecResponseBody is used to define fields on response body // types. -type RestoreRepositorySpecRequestBody struct { +type RestoreRepositorySpecResponseBody struct { // The unique identifier of this repository. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // The type of this repository. - Type string `form:"type" json:"type" xml:"type"` + Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` // The S3 bucket name for this repository. Only applies when type = 's3'. S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = @@ -2395,46 +2399,46 @@ type RestoreRepositorySpecRequestBody struct { CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` } -// OrchestratorOptsRequestBody is used to define fields on request body types. -type OrchestratorOptsRequestBody struct { +// OrchestratorOptsResponseBody is used to define fields on response body types. +type OrchestratorOptsResponseBody struct { // Swarm-specific configuration. - Swarm *SwarmOptsRequestBody `form:"swarm,omitempty" json:"swarm,omitempty" xml:"swarm,omitempty"` + Swarm *SwarmOptsResponseBody `form:"swarm,omitempty" json:"swarm,omitempty" xml:"swarm,omitempty"` } -// SwarmOptsRequestBody is used to define fields on request body types. -type SwarmOptsRequestBody struct { +// SwarmOptsResponseBody is used to define fields on response body types. +type SwarmOptsResponseBody struct { // A list of extra volumes to mount. Each entry defines a host and container // path. - ExtraVolumes []*ExtraVolumesSpecRequestBody `form:"extra_volumes,omitempty" json:"extra_volumes,omitempty" xml:"extra_volumes,omitempty"` + ExtraVolumes []*ExtraVolumesSpecResponseBody `form:"extra_volumes,omitempty" json:"extra_volumes,omitempty" xml:"extra_volumes,omitempty"` // A list of additional Docker Swarm networks to attach containers in this // database to. - ExtraNetworks []*ExtraNetworkSpecRequestBody `form:"extra_networks,omitempty" json:"extra_networks,omitempty" xml:"extra_networks,omitempty"` + ExtraNetworks []*ExtraNetworkSpecResponseBody `form:"extra_networks,omitempty" json:"extra_networks,omitempty" xml:"extra_networks,omitempty"` // Arbitrary labels to apply to the Docker Swarm service ExtraLabels map[string]string `form:"extra_labels,omitempty" json:"extra_labels,omitempty" xml:"extra_labels,omitempty"` } -// ExtraVolumesSpecRequestBody is used to define fields on request body types. -type ExtraVolumesSpecRequestBody struct { +// ExtraVolumesSpecResponseBody is used to define fields on response body types. +type ExtraVolumesSpecResponseBody struct { // The host path for the volume. - HostPath string `form:"host_path" json:"host_path" xml:"host_path"` + HostPath *string `form:"host_path,omitempty" json:"host_path,omitempty" xml:"host_path,omitempty"` // The path inside the container where the volume will be mounted. - DestinationPath string `form:"destination_path" json:"destination_path" xml:"destination_path"` + DestinationPath *string `form:"destination_path,omitempty" json:"destination_path,omitempty" xml:"destination_path,omitempty"` } -// ExtraNetworkSpecRequestBody is used to define fields on request body types. -type ExtraNetworkSpecRequestBody struct { +// ExtraNetworkSpecResponseBody is used to define fields on response body types. +type ExtraNetworkSpecResponseBody struct { // The name or ID of the network to connect to. - ID string `form:"id" json:"id" xml:"id"` + ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` // Optional network-scoped aliases for the container. Aliases []string `form:"aliases,omitempty" json:"aliases,omitempty" xml:"aliases,omitempty"` // Optional driver options for the network connection. DriverOpts map[string]string `form:"driver_opts,omitempty" json:"driver_opts,omitempty" xml:"driver_opts,omitempty"` } -// DatabaseUserSpecRequestBody is used to define fields on request body types. -type DatabaseUserSpecRequestBody struct { +// DatabaseUserSpecResponseBody is used to define fields on response body types. +type DatabaseUserSpecResponseBody struct { // The username for this database user. - Username string `form:"username" json:"username" xml:"username"` + Username *string `form:"username,omitempty" json:"username,omitempty" xml:"username,omitempty"` // The password for this database user. This field will be excluded from the // response of all endpoints. It can also be omitted from update requests to // keep the current value. @@ -2447,25 +2451,25 @@ type DatabaseUserSpecRequestBody struct { Roles []string `form:"roles,omitempty" json:"roles,omitempty" xml:"roles,omitempty"` } -// ServiceSpecRequestBody is used to define fields on request body types. -type ServiceSpecRequestBody struct { +// ServiceSpecResponseBody is used to define fields on response body types. +type ServiceSpecResponseBody struct { // The unique identifier for this service. - ServiceID string `form:"service_id" json:"service_id" xml:"service_id"` + ServiceID *string `form:"service_id,omitempty" json:"service_id,omitempty" xml:"service_id,omitempty"` // The type of service to run. - ServiceType string `form:"service_type" json:"service_type" xml:"service_type"` + ServiceType *string `form:"service_type,omitempty" json:"service_type,omitempty" xml:"service_type,omitempty"` // The version of the service in semver format (e.g., '1.0.0') or the literal // 'latest'. - Version string `form:"version" json:"version" xml:"version"` + Version *string `form:"version,omitempty" json:"version,omitempty" xml:"version,omitempty"` // The IDs of the hosts that should run this service. One service instance will // be created per host. - HostIds []string `form:"host_ids" json:"host_ids" xml:"host_ids"` + HostIds []string `form:"host_ids,omitempty" json:"host_ids,omitempty" xml:"host_ids,omitempty"` // The port to publish the service on the host. If 0, Docker assigns a random // port. If unspecified, no port is published and the service is not accessible // from outside the Docker network. Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` // Service-specific configuration. For MCP services, this includes // llm_provider, llm_model, and provider-specific API keys. - Config map[string]any `form:"config" json:"config" xml:"config"` + Config map[string]any `form:"config,omitempty" json:"config,omitempty" xml:"config,omitempty"` // The number of CPUs to allocate for this service. It can include the SI // suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if // unspecified. @@ -2475,14 +2479,6 @@ type ServiceSpecRequestBody struct { Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` } -// InstanceResponseBodyCollection is used to define fields on response body -// types. -type InstanceResponseBodyCollection []*InstanceResponseBody - -// ServiceinstanceResponseBodyCollection is used to define fields on response -// body types. -type ServiceinstanceResponseBodyCollection []*ServiceinstanceResponseBody - // DatabaseSpecRequestBodyRequestBody is used to define fields on request body // types. type DatabaseSpecRequestBodyRequestBody struct { @@ -3317,18 +3313,18 @@ func NewRemoveHostServerError(body *RemoveHostServerErrorResponseBody) *controlp return v } -// NewListDatabasesResponseViewOK builds a "control-plane" service -// "list-databases" endpoint result from a HTTP "OK" response. -func NewListDatabasesResponseViewOK(body *ListDatabasesResponseBody) *controlplaneviews.ListDatabasesResponseView { - v := &controlplaneviews.ListDatabasesResponseView{} +// NewListDatabasesResponseOK builds a "control-plane" service "list-databases" +// endpoint result from a HTTP "OK" response. +func NewListDatabasesResponseOK(body *ListDatabasesResponseBody) *controlplane.ListDatabasesResponse { + v := &controlplane.ListDatabasesResponse{} if body.Databases != nil { - v.Databases = make([]*controlplaneviews.DatabaseView, len(body.Databases)) + v.Databases = make([]*controlplane.DatabaseSummary, len(body.Databases)) for i, val := range body.Databases { if val == nil { v.Databases[i] = nil continue } - v.Databases[i] = unmarshalDatabaseResponseBodyToControlplaneviewsDatabaseView(val) + v.Databases[i] = unmarshalDatabaseSummaryResponseBodyToControlplaneDatabaseSummary(val) } } @@ -3424,36 +3420,39 @@ func NewCreateDatabaseServerError(body *CreateDatabaseServerErrorResponseBody) * // NewGetDatabaseDatabaseOK builds a "control-plane" service "get-database" // endpoint result from a HTTP "OK" response. -func NewGetDatabaseDatabaseOK(body *GetDatabaseResponseBody) *controlplaneviews.DatabaseView { - v := &controlplaneviews.DatabaseView{ - CreatedAt: body.CreatedAt, - UpdatedAt: body.UpdatedAt, - State: body.State, - } - id := controlplaneviews.IdentifierView(*body.ID) - v.ID = &id +func NewGetDatabaseDatabaseOK(body *GetDatabaseResponseBody) *controlplane.Database { + v := &controlplane.Database{ + ID: controlplane.Identifier(*body.ID), + CreatedAt: *body.CreatedAt, + UpdatedAt: *body.UpdatedAt, + State: *body.State, + } if body.TenantID != nil { - tenantID := controlplaneviews.IdentifierView(*body.TenantID) + tenantID := controlplane.Identifier(*body.TenantID) v.TenantID = &tenantID } - v.Instances = make([]*controlplaneviews.InstanceView, len(body.Instances)) - for i, val := range body.Instances { - if val == nil { - v.Instances[i] = nil - continue + if body.Instances != nil { + v.Instances = make([]*controlplane.Instance, len(body.Instances)) + for i, val := range body.Instances { + if val == nil { + v.Instances[i] = nil + continue + } + v.Instances[i] = unmarshalInstanceResponseBodyToControlplaneInstance(val) } - v.Instances[i] = unmarshalInstanceResponseBodyToControlplaneviewsInstanceView(val) } - v.ServiceInstances = make([]*controlplaneviews.ServiceinstanceView, len(body.ServiceInstances)) - for i, val := range body.ServiceInstances { - if val == nil { - v.ServiceInstances[i] = nil - continue + if body.ServiceInstances != nil { + v.ServiceInstances = make([]*controlplane.ServiceInstance, len(body.ServiceInstances)) + for i, val := range body.ServiceInstances { + if val == nil { + v.ServiceInstances[i] = nil + continue + } + v.ServiceInstances[i] = unmarshalServiceInstanceResponseBodyToControlplaneServiceInstance(val) } - v.ServiceInstances[i] = unmarshalServiceinstanceResponseBodyToControlplaneviewsServiceinstanceView(val) } if body.Spec != nil { - v.Spec = unmarshalDatabaseSpecResponseBodyToControlplaneviewsDatabaseSpecView(body.Spec) + v.Spec = unmarshalDatabaseSpecResponseBodyToControlplaneDatabaseSpec(body.Spec) } return v @@ -4684,12 +4683,24 @@ func ValidateRemoveHostResponseBody(body *RemoveHostResponseBody) (err error) { return } +// ValidateListDatabasesResponseBody runs a no-op validation on +// List-DatabasesResponseBody +func ValidateListDatabasesResponseBody(body *ListDatabasesResponseBody) (err error) { + return +} + // ValidateCreateDatabaseResponseBody runs a no-op validation on // Create-DatabaseResponseBody func ValidateCreateDatabaseResponseBody(body *CreateDatabaseResponseBody) (err error) { return } +// ValidateGetDatabaseResponseBody runs a no-op validation on +// Get-DatabaseResponseBody +func ValidateGetDatabaseResponseBody(body *GetDatabaseResponseBody) (err error) { + return +} + // ValidateUpdateDatabaseResponseBody runs a no-op validation on // Update-DatabaseResponseBody func ValidateUpdateDatabaseResponseBody(body *UpdateDatabaseResponseBody) (err error) { @@ -5543,20 +5554,9 @@ func ValidateTaskResponseBody(body *TaskResponseBody) (err error) { return } -// ValidateDatabaseCollectionResponseBody runs a no-op validation on -// DatabaseCollectionResponseBody -func ValidateDatabaseCollectionResponseBody(body DatabaseCollectionResponseBody) (err error) { - return -} - -// ValidateDatabaseResponseBody runs a no-op validation on DatabaseResponseBody -func ValidateDatabaseResponseBody(body *DatabaseResponseBody) (err error) { - return -} - -// ValidateInstanceCollectionResponseBody runs a no-op validation on -// InstanceCollectionResponseBody -func ValidateInstanceCollectionResponseBody(body InstanceCollectionResponseBody) (err error) { +// ValidateDatabaseSummaryResponseBody runs a no-op validation on +// DatabaseSummaryResponseBody +func ValidateDatabaseSummaryResponseBody(body *DatabaseSummaryResponseBody) (err error) { return } @@ -5583,114 +5583,6 @@ func ValidateInstanceSubscriptionResponseBody(body *InstanceSubscriptionResponse return } -// ValidateServiceinstanceCollectionResponseBody runs a no-op validation on -// ServiceinstanceCollectionResponseBody -func ValidateServiceinstanceCollectionResponseBody(body ServiceinstanceCollectionResponseBody) (err error) { - return -} - -// ValidateServiceinstanceResponseBody runs a no-op validation on -// ServiceinstanceResponseBody -func ValidateServiceinstanceResponseBody(body *ServiceinstanceResponseBody) (err error) { - return -} - -// ValidateServiceInstanceStatusResponseBody runs a no-op validation on -// ServiceInstanceStatusResponseBody -func ValidateServiceInstanceStatusResponseBody(body *ServiceInstanceStatusResponseBody) (err error) { - return -} - -// ValidatePortMappingResponseBody runs a no-op validation on -// PortMappingResponseBody -func ValidatePortMappingResponseBody(body *PortMappingResponseBody) (err error) { - return -} - -// ValidateHealthCheckResultResponseBody runs a no-op validation on -// HealthCheckResultResponseBody -func ValidateHealthCheckResultResponseBody(body *HealthCheckResultResponseBody) (err error) { - return -} - -// ValidateDatabaseSpecResponseBody runs a no-op validation on -// DatabaseSpecResponseBody -func ValidateDatabaseSpecResponseBody(body *DatabaseSpecResponseBody) (err error) { - return -} - -// ValidateDatabaseNodeSpecResponseBody runs a no-op validation on -// DatabaseNodeSpecResponseBody -func ValidateDatabaseNodeSpecResponseBody(body *DatabaseNodeSpecResponseBody) (err error) { - return -} - -// ValidateBackupConfigSpecResponseBody runs a no-op validation on -// BackupConfigSpecResponseBody -func ValidateBackupConfigSpecResponseBody(body *BackupConfigSpecResponseBody) (err error) { - return -} - -// ValidateBackupRepositorySpecResponseBody runs a no-op validation on -// BackupRepositorySpecResponseBody -func ValidateBackupRepositorySpecResponseBody(body *BackupRepositorySpecResponseBody) (err error) { - return -} - -// ValidateBackupScheduleSpecResponseBody runs a no-op validation on -// BackupScheduleSpecResponseBody -func ValidateBackupScheduleSpecResponseBody(body *BackupScheduleSpecResponseBody) (err error) { - return -} - -// ValidateRestoreConfigSpecResponseBody runs a no-op validation on -// RestoreConfigSpecResponseBody -func ValidateRestoreConfigSpecResponseBody(body *RestoreConfigSpecResponseBody) (err error) { - return -} - -// ValidateRestoreRepositorySpecResponseBody runs a no-op validation on -// RestoreRepositorySpecResponseBody -func ValidateRestoreRepositorySpecResponseBody(body *RestoreRepositorySpecResponseBody) (err error) { - return -} - -// ValidateOrchestratorOptsResponseBody runs a no-op validation on -// OrchestratorOptsResponseBody -func ValidateOrchestratorOptsResponseBody(body *OrchestratorOptsResponseBody) (err error) { - return -} - -// ValidateSwarmOptsResponseBody runs a no-op validation on -// SwarmOptsResponseBody -func ValidateSwarmOptsResponseBody(body *SwarmOptsResponseBody) (err error) { - return -} - -// ValidateExtraVolumesSpecResponseBody runs a no-op validation on -// ExtraVolumesSpecResponseBody -func ValidateExtraVolumesSpecResponseBody(body *ExtraVolumesSpecResponseBody) (err error) { - return -} - -// ValidateExtraNetworkSpecResponseBody runs a no-op validation on -// ExtraNetworkSpecResponseBody -func ValidateExtraNetworkSpecResponseBody(body *ExtraNetworkSpecResponseBody) (err error) { - return -} - -// ValidateDatabaseUserSpecResponseBody runs a no-op validation on -// DatabaseUserSpecResponseBody -func ValidateDatabaseUserSpecResponseBody(body *DatabaseUserSpecResponseBody) (err error) { - return -} - -// ValidateServiceSpecResponseBody runs a no-op validation on -// ServiceSpecResponseBody -func ValidateServiceSpecResponseBody(body *ServiceSpecResponseBody) (err error) { - return -} - // ValidateDatabaseSpecRequestBody runs the validations defined on // DatabaseSpecRequestBody func ValidateDatabaseSpecRequestBody(body *DatabaseSpecRequestBody) (err error) { @@ -6301,29 +6193,110 @@ func ValidateServiceSpecRequestBody(body *ServiceSpecRequestBody) (err error) { return } -// ValidateInstanceResponseBodyCollection runs the validations defined on -// InstanceResponseBodyCollection -func ValidateInstanceResponseBodyCollection(body InstanceResponseBodyCollection) (err error) { - for _, e := range body { - if e != nil { - if err2 := ValidateInstanceResponseBody(e); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - } +// ValidateDatabaseResponseBody runs a no-op validation on DatabaseResponseBody +func ValidateDatabaseResponseBody(body *DatabaseResponseBody) (err error) { return } -// ValidateServiceinstanceResponseBodyCollection runs the validations defined -// on ServiceinstanceResponseBodyCollection -func ValidateServiceinstanceResponseBodyCollection(body ServiceinstanceResponseBodyCollection) (err error) { - for _, e := range body { - if e != nil { - if err2 := ValidateServiceinstanceResponseBody(e); err2 != nil { - err = goa.MergeErrors(err, err2) - } - } - } +// ValidateServiceInstanceResponseBody runs a no-op validation on +// ServiceInstanceResponseBody +func ValidateServiceInstanceResponseBody(body *ServiceInstanceResponseBody) (err error) { + return +} + +// ValidateServiceInstanceStatusResponseBody runs a no-op validation on +// ServiceInstanceStatusResponseBody +func ValidateServiceInstanceStatusResponseBody(body *ServiceInstanceStatusResponseBody) (err error) { + return +} + +// ValidatePortMappingResponseBody runs a no-op validation on +// PortMappingResponseBody +func ValidatePortMappingResponseBody(body *PortMappingResponseBody) (err error) { + return +} + +// ValidateHealthCheckResultResponseBody runs a no-op validation on +// HealthCheckResultResponseBody +func ValidateHealthCheckResultResponseBody(body *HealthCheckResultResponseBody) (err error) { + return +} + +// ValidateDatabaseSpecResponseBody runs a no-op validation on +// DatabaseSpecResponseBody +func ValidateDatabaseSpecResponseBody(body *DatabaseSpecResponseBody) (err error) { + return +} + +// ValidateDatabaseNodeSpecResponseBody runs a no-op validation on +// DatabaseNodeSpecResponseBody +func ValidateDatabaseNodeSpecResponseBody(body *DatabaseNodeSpecResponseBody) (err error) { + return +} + +// ValidateBackupConfigSpecResponseBody runs a no-op validation on +// BackupConfigSpecResponseBody +func ValidateBackupConfigSpecResponseBody(body *BackupConfigSpecResponseBody) (err error) { + return +} + +// ValidateBackupRepositorySpecResponseBody runs a no-op validation on +// BackupRepositorySpecResponseBody +func ValidateBackupRepositorySpecResponseBody(body *BackupRepositorySpecResponseBody) (err error) { + return +} + +// ValidateBackupScheduleSpecResponseBody runs a no-op validation on +// BackupScheduleSpecResponseBody +func ValidateBackupScheduleSpecResponseBody(body *BackupScheduleSpecResponseBody) (err error) { + return +} + +// ValidateRestoreConfigSpecResponseBody runs a no-op validation on +// RestoreConfigSpecResponseBody +func ValidateRestoreConfigSpecResponseBody(body *RestoreConfigSpecResponseBody) (err error) { + return +} + +// ValidateRestoreRepositorySpecResponseBody runs a no-op validation on +// RestoreRepositorySpecResponseBody +func ValidateRestoreRepositorySpecResponseBody(body *RestoreRepositorySpecResponseBody) (err error) { + return +} + +// ValidateOrchestratorOptsResponseBody runs a no-op validation on +// OrchestratorOptsResponseBody +func ValidateOrchestratorOptsResponseBody(body *OrchestratorOptsResponseBody) (err error) { + return +} + +// ValidateSwarmOptsResponseBody runs a no-op validation on +// SwarmOptsResponseBody +func ValidateSwarmOptsResponseBody(body *SwarmOptsResponseBody) (err error) { + return +} + +// ValidateExtraVolumesSpecResponseBody runs a no-op validation on +// ExtraVolumesSpecResponseBody +func ValidateExtraVolumesSpecResponseBody(body *ExtraVolumesSpecResponseBody) (err error) { + return +} + +// ValidateExtraNetworkSpecResponseBody runs a no-op validation on +// ExtraNetworkSpecResponseBody +func ValidateExtraNetworkSpecResponseBody(body *ExtraNetworkSpecResponseBody) (err error) { + return +} + +// ValidateDatabaseUserSpecResponseBody runs a no-op validation on +// DatabaseUserSpecResponseBody +func ValidateDatabaseUserSpecResponseBody(body *DatabaseUserSpecResponseBody) (err error) { + return +} + +// ValidateServiceSpecResponseBody runs a no-op validation on +// ServiceSpecResponseBody +func ValidateServiceSpecResponseBody(body *ServiceSpecResponseBody) (err error) { return } diff --git a/api/apiv1/gen/http/control_plane/server/encode_decode.go b/api/apiv1/gen/http/control_plane/server/encode_decode.go index c21adff2..37a1525d 100644 --- a/api/apiv1/gen/http/control_plane/server/encode_decode.go +++ b/api/apiv1/gen/http/control_plane/server/encode_decode.go @@ -16,7 +16,6 @@ import ( "unicode/utf8" controlplane "github.com/pgEdge/control-plane/api/apiv1/gen/control_plane" - controlplaneviews "github.com/pgEdge/control-plane/api/apiv1/gen/control_plane/views" goahttp "goa.design/goa/v3/http" goa "goa.design/goa/v3/pkg" ) @@ -723,9 +722,9 @@ func EncodeRemoveHostError(encoder func(context.Context, http.ResponseWriter) go // control-plane list-databases endpoint. func EncodeListDatabasesResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error { return func(ctx context.Context, w http.ResponseWriter, v any) error { - res := v.(*controlplaneviews.ListDatabasesResponse) + res, _ := v.(*controlplane.ListDatabasesResponse) enc := encoder(ctx, w) - body := NewListDatabasesResponseBody(res.Projected) + body := NewListDatabasesResponseBody(res) w.WriteHeader(http.StatusOK) return enc.Encode(body) } @@ -899,9 +898,9 @@ func EncodeCreateDatabaseError(encoder func(context.Context, http.ResponseWriter // control-plane get-database endpoint. func EncodeGetDatabaseResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error { return func(ctx context.Context, w http.ResponseWriter, v any) error { - res := v.(*controlplaneviews.Database) + res, _ := v.(*controlplane.Database) enc := encoder(ctx, w) - body := NewGetDatabaseResponseBody(res.Projected) + body := NewGetDatabaseResponseBody(res) w.WriteHeader(http.StatusOK) return enc.Encode(body) } @@ -3546,48 +3545,136 @@ func marshalControlplaneTaskToTaskResponseBody(v *controlplane.Task) *TaskRespon return res } -// marshalControlplaneviewsDatabaseViewToDatabaseResponseBodyAbbreviated builds -// a value of type *DatabaseResponseBodyAbbreviated from a value of type -// *controlplaneviews.DatabaseView. -func marshalControlplaneviewsDatabaseViewToDatabaseResponseBodyAbbreviated(v *controlplaneviews.DatabaseView) *DatabaseResponseBodyAbbreviated { +// marshalControlplaneDatabaseSummaryToDatabaseSummaryResponseBody builds a +// value of type *DatabaseSummaryResponseBody from a value of type +// *controlplane.DatabaseSummary. +func marshalControlplaneDatabaseSummaryToDatabaseSummaryResponseBody(v *controlplane.DatabaseSummary) *DatabaseSummaryResponseBody { if v == nil { return nil } - res := &DatabaseResponseBodyAbbreviated{ - ID: string(*v.ID), - CreatedAt: *v.CreatedAt, - UpdatedAt: *v.UpdatedAt, - State: *v.State, + res := &DatabaseSummaryResponseBody{ + ID: string(v.ID), + CreatedAt: v.CreatedAt, + UpdatedAt: v.UpdatedAt, + State: v.State, } if v.TenantID != nil { tenantID := string(*v.TenantID) res.TenantID = &tenantID } if v.Instances != nil { - res.Instances = make([]*InstanceResponseBodyAbbreviated, len(v.Instances)) + res.Instances = make([]*InstanceResponseBody, len(v.Instances)) for i, val := range v.Instances { if val == nil { res.Instances[i] = nil continue } - res.Instances[i] = marshalControlplaneviewsInstanceViewToInstanceResponseBodyAbbreviated(val) + res.Instances[i] = marshalControlplaneInstanceToInstanceResponseBody(val) + } + } + + return res +} + +// marshalControlplaneInstanceToInstanceResponseBody builds a value of type +// *InstanceResponseBody from a value of type *controlplane.Instance. +func marshalControlplaneInstanceToInstanceResponseBody(v *controlplane.Instance) *InstanceResponseBody { + if v == nil { + return nil + } + res := &InstanceResponseBody{ + ID: v.ID, + HostID: v.HostID, + NodeName: v.NodeName, + CreatedAt: v.CreatedAt, + UpdatedAt: v.UpdatedAt, + StatusUpdatedAt: v.StatusUpdatedAt, + State: v.State, + Error: v.Error, + } + if v.ConnectionInfo != nil { + res.ConnectionInfo = marshalControlplaneInstanceConnectionInfoToInstanceConnectionInfoResponseBody(v.ConnectionInfo) + } + if v.Postgres != nil { + res.Postgres = marshalControlplaneInstancePostgresStatusToInstancePostgresStatusResponseBody(v.Postgres) + } + if v.Spock != nil { + res.Spock = marshalControlplaneInstanceSpockStatusToInstanceSpockStatusResponseBody(v.Spock) + } + + return res +} + +// marshalControlplaneInstanceConnectionInfoToInstanceConnectionInfoResponseBody +// builds a value of type *InstanceConnectionInfoResponseBody from a value of +// type *controlplane.InstanceConnectionInfo. +func marshalControlplaneInstanceConnectionInfoToInstanceConnectionInfoResponseBody(v *controlplane.InstanceConnectionInfo) *InstanceConnectionInfoResponseBody { + if v == nil { + return nil + } + res := &InstanceConnectionInfoResponseBody{ + Hostname: v.Hostname, + Ipv4Address: v.Ipv4Address, + Port: v.Port, + } + + return res +} + +// marshalControlplaneInstancePostgresStatusToInstancePostgresStatusResponseBody +// builds a value of type *InstancePostgresStatusResponseBody from a value of +// type *controlplane.InstancePostgresStatus. +func marshalControlplaneInstancePostgresStatusToInstancePostgresStatusResponseBody(v *controlplane.InstancePostgresStatus) *InstancePostgresStatusResponseBody { + if v == nil { + return nil + } + res := &InstancePostgresStatusResponseBody{ + Version: v.Version, + PatroniState: v.PatroniState, + Role: v.Role, + PendingRestart: v.PendingRestart, + PatroniPaused: v.PatroniPaused, + } + + return res +} + +// marshalControlplaneInstanceSpockStatusToInstanceSpockStatusResponseBody +// builds a value of type *InstanceSpockStatusResponseBody from a value of type +// *controlplane.InstanceSpockStatus. +func marshalControlplaneInstanceSpockStatusToInstanceSpockStatusResponseBody(v *controlplane.InstanceSpockStatus) *InstanceSpockStatusResponseBody { + if v == nil { + return nil + } + res := &InstanceSpockStatusResponseBody{ + ReadOnly: v.ReadOnly, + Version: v.Version, + } + if v.Subscriptions != nil { + res.Subscriptions = make([]*InstanceSubscriptionResponseBody, len(v.Subscriptions)) + for i, val := range v.Subscriptions { + if val == nil { + res.Subscriptions[i] = nil + continue + } + res.Subscriptions[i] = marshalControlplaneInstanceSubscriptionToInstanceSubscriptionResponseBody(val) } - } else { - res.Instances = []*InstanceResponseBodyAbbreviated{} } return res } -// marshalControlplaneviewsInstanceViewToInstanceResponseBodyAbbreviated builds -// a value of type *InstanceResponseBodyAbbreviated from a value of type -// *controlplaneviews.InstanceView. -func marshalControlplaneviewsInstanceViewToInstanceResponseBodyAbbreviated(v *controlplaneviews.InstanceView) *InstanceResponseBodyAbbreviated { - res := &InstanceResponseBodyAbbreviated{ - ID: *v.ID, - HostID: *v.HostID, - NodeName: *v.NodeName, - State: *v.State, +// marshalControlplaneInstanceSubscriptionToInstanceSubscriptionResponseBody +// builds a value of type *InstanceSubscriptionResponseBody from a value of +// type *controlplane.InstanceSubscription. +func marshalControlplaneInstanceSubscriptionToInstanceSubscriptionResponseBody(v *controlplane.InstanceSubscription) *InstanceSubscriptionResponseBody { + if v == nil { + return nil + } + res := &InstanceSubscriptionResponseBody{ + ProviderNode: v.ProviderNode, + Name: v.Name, + Status: v.Status, } return res @@ -4011,20 +4098,16 @@ func marshalControlplaneDatabaseToDatabaseResponseBody(v *controlplane.Database) } res.Instances[i] = marshalControlplaneInstanceToInstanceResponseBody(val) } - } else { - res.Instances = []*InstanceResponseBody{} } if v.ServiceInstances != nil { - res.ServiceInstances = make([]*ServiceinstanceResponseBody, len(v.ServiceInstances)) + res.ServiceInstances = make([]*ServiceInstanceResponseBody, len(v.ServiceInstances)) for i, val := range v.ServiceInstances { if val == nil { res.ServiceInstances[i] = nil continue } - res.ServiceInstances[i] = marshalControlplaneServiceinstanceToServiceinstanceResponseBody(val) + res.ServiceInstances[i] = marshalControlplaneServiceInstanceToServiceInstanceResponseBody(val) } - } else { - res.ServiceInstances = []*ServiceinstanceResponseBody{} } if v.Spec != nil { res.Spec = marshalControlplaneDatabaseSpecToDatabaseSpecResponseBody(v.Spec) @@ -4033,112 +4116,14 @@ func marshalControlplaneDatabaseToDatabaseResponseBody(v *controlplane.Database) return res } -// marshalControlplaneInstanceToInstanceResponseBody builds a value of type -// *InstanceResponseBody from a value of type *controlplane.Instance. -func marshalControlplaneInstanceToInstanceResponseBody(v *controlplane.Instance) *InstanceResponseBody { - res := &InstanceResponseBody{ - ID: v.ID, - HostID: v.HostID, - NodeName: v.NodeName, - CreatedAt: v.CreatedAt, - UpdatedAt: v.UpdatedAt, - StatusUpdatedAt: v.StatusUpdatedAt, - State: v.State, - Error: v.Error, - } - if v.ConnectionInfo != nil { - res.ConnectionInfo = marshalControlplaneInstanceConnectionInfoToInstanceConnectionInfoResponseBody(v.ConnectionInfo) - } - if v.Postgres != nil { - res.Postgres = marshalControlplaneInstancePostgresStatusToInstancePostgresStatusResponseBody(v.Postgres) - } - if v.Spock != nil { - res.Spock = marshalControlplaneInstanceSpockStatusToInstanceSpockStatusResponseBody(v.Spock) - } - - return res -} - -// marshalControlplaneInstanceConnectionInfoToInstanceConnectionInfoResponseBody -// builds a value of type *InstanceConnectionInfoResponseBody from a value of -// type *controlplane.InstanceConnectionInfo. -func marshalControlplaneInstanceConnectionInfoToInstanceConnectionInfoResponseBody(v *controlplane.InstanceConnectionInfo) *InstanceConnectionInfoResponseBody { - if v == nil { - return nil - } - res := &InstanceConnectionInfoResponseBody{ - Hostname: v.Hostname, - Ipv4Address: v.Ipv4Address, - Port: v.Port, - } - - return res -} - -// marshalControlplaneInstancePostgresStatusToInstancePostgresStatusResponseBody -// builds a value of type *InstancePostgresStatusResponseBody from a value of -// type *controlplane.InstancePostgresStatus. -func marshalControlplaneInstancePostgresStatusToInstancePostgresStatusResponseBody(v *controlplane.InstancePostgresStatus) *InstancePostgresStatusResponseBody { - if v == nil { - return nil - } - res := &InstancePostgresStatusResponseBody{ - Version: v.Version, - PatroniState: v.PatroniState, - Role: v.Role, - PendingRestart: v.PendingRestart, - PatroniPaused: v.PatroniPaused, - } - - return res -} - -// marshalControlplaneInstanceSpockStatusToInstanceSpockStatusResponseBody -// builds a value of type *InstanceSpockStatusResponseBody from a value of type -// *controlplane.InstanceSpockStatus. -func marshalControlplaneInstanceSpockStatusToInstanceSpockStatusResponseBody(v *controlplane.InstanceSpockStatus) *InstanceSpockStatusResponseBody { - if v == nil { - return nil - } - res := &InstanceSpockStatusResponseBody{ - ReadOnly: v.ReadOnly, - Version: v.Version, - } - if v.Subscriptions != nil { - res.Subscriptions = make([]*InstanceSubscriptionResponseBody, len(v.Subscriptions)) - for i, val := range v.Subscriptions { - if val == nil { - res.Subscriptions[i] = nil - continue - } - res.Subscriptions[i] = marshalControlplaneInstanceSubscriptionToInstanceSubscriptionResponseBody(val) - } - } - - return res -} - -// marshalControlplaneInstanceSubscriptionToInstanceSubscriptionResponseBody -// builds a value of type *InstanceSubscriptionResponseBody from a value of -// type *controlplane.InstanceSubscription. -func marshalControlplaneInstanceSubscriptionToInstanceSubscriptionResponseBody(v *controlplane.InstanceSubscription) *InstanceSubscriptionResponseBody { +// marshalControlplaneServiceInstanceToServiceInstanceResponseBody builds a +// value of type *ServiceInstanceResponseBody from a value of type +// *controlplane.ServiceInstance. +func marshalControlplaneServiceInstanceToServiceInstanceResponseBody(v *controlplane.ServiceInstance) *ServiceInstanceResponseBody { if v == nil { return nil } - res := &InstanceSubscriptionResponseBody{ - ProviderNode: v.ProviderNode, - Name: v.Name, - Status: v.Status, - } - - return res -} - -// marshalControlplaneServiceinstanceToServiceinstanceResponseBody builds a -// value of type *ServiceinstanceResponseBody from a value of type -// *controlplane.Serviceinstance. -func marshalControlplaneServiceinstanceToServiceinstanceResponseBody(v *controlplane.Serviceinstance) *ServiceinstanceResponseBody { - res := &ServiceinstanceResponseBody{ + res := &ServiceInstanceResponseBody{ ServiceInstanceID: v.ServiceInstanceID, ServiceID: v.ServiceID, DatabaseID: string(v.DatabaseID), @@ -4637,614 +4622,6 @@ func marshalControlplaneServiceSpecToServiceSpecResponseBody(v *controlplane.Ser return res } -// marshalControlplaneviewsInstanceViewToInstanceResponseBody builds a value of -// type *InstanceResponseBody from a value of type -// *controlplaneviews.InstanceView. -func marshalControlplaneviewsInstanceViewToInstanceResponseBody(v *controlplaneviews.InstanceView) *InstanceResponseBody { - res := &InstanceResponseBody{ - ID: *v.ID, - HostID: *v.HostID, - NodeName: *v.NodeName, - CreatedAt: *v.CreatedAt, - UpdatedAt: *v.UpdatedAt, - StatusUpdatedAt: v.StatusUpdatedAt, - State: *v.State, - Error: v.Error, - } - if v.ConnectionInfo != nil { - res.ConnectionInfo = marshalControlplaneviewsInstanceConnectionInfoViewToInstanceConnectionInfoResponseBody(v.ConnectionInfo) - } - if v.Postgres != nil { - res.Postgres = marshalControlplaneviewsInstancePostgresStatusViewToInstancePostgresStatusResponseBody(v.Postgres) - } - if v.Spock != nil { - res.Spock = marshalControlplaneviewsInstanceSpockStatusViewToInstanceSpockStatusResponseBody(v.Spock) - } - - return res -} - -// marshalControlplaneviewsInstanceConnectionInfoViewToInstanceConnectionInfoResponseBody -// builds a value of type *InstanceConnectionInfoResponseBody from a value of -// type *controlplaneviews.InstanceConnectionInfoView. -func marshalControlplaneviewsInstanceConnectionInfoViewToInstanceConnectionInfoResponseBody(v *controlplaneviews.InstanceConnectionInfoView) *InstanceConnectionInfoResponseBody { - if v == nil { - return nil - } - res := &InstanceConnectionInfoResponseBody{ - Hostname: v.Hostname, - Ipv4Address: v.Ipv4Address, - Port: v.Port, - } - - return res -} - -// marshalControlplaneviewsInstancePostgresStatusViewToInstancePostgresStatusResponseBody -// builds a value of type *InstancePostgresStatusResponseBody from a value of -// type *controlplaneviews.InstancePostgresStatusView. -func marshalControlplaneviewsInstancePostgresStatusViewToInstancePostgresStatusResponseBody(v *controlplaneviews.InstancePostgresStatusView) *InstancePostgresStatusResponseBody { - if v == nil { - return nil - } - res := &InstancePostgresStatusResponseBody{ - Version: v.Version, - PatroniState: v.PatroniState, - Role: v.Role, - PendingRestart: v.PendingRestart, - PatroniPaused: v.PatroniPaused, - } - - return res -} - -// marshalControlplaneviewsInstanceSpockStatusViewToInstanceSpockStatusResponseBody -// builds a value of type *InstanceSpockStatusResponseBody from a value of type -// *controlplaneviews.InstanceSpockStatusView. -func marshalControlplaneviewsInstanceSpockStatusViewToInstanceSpockStatusResponseBody(v *controlplaneviews.InstanceSpockStatusView) *InstanceSpockStatusResponseBody { - if v == nil { - return nil - } - res := &InstanceSpockStatusResponseBody{ - ReadOnly: v.ReadOnly, - Version: v.Version, - } - if v.Subscriptions != nil { - res.Subscriptions = make([]*InstanceSubscriptionResponseBody, len(v.Subscriptions)) - for i, val := range v.Subscriptions { - if val == nil { - res.Subscriptions[i] = nil - continue - } - res.Subscriptions[i] = marshalControlplaneviewsInstanceSubscriptionViewToInstanceSubscriptionResponseBody(val) - } - } - - return res -} - -// marshalControlplaneviewsInstanceSubscriptionViewToInstanceSubscriptionResponseBody -// builds a value of type *InstanceSubscriptionResponseBody from a value of -// type *controlplaneviews.InstanceSubscriptionView. -func marshalControlplaneviewsInstanceSubscriptionViewToInstanceSubscriptionResponseBody(v *controlplaneviews.InstanceSubscriptionView) *InstanceSubscriptionResponseBody { - if v == nil { - return nil - } - res := &InstanceSubscriptionResponseBody{ - ProviderNode: *v.ProviderNode, - Name: *v.Name, - Status: *v.Status, - } - - return res -} - -// marshalControlplaneviewsServiceinstanceViewToServiceinstanceResponseBody -// builds a value of type *ServiceinstanceResponseBody from a value of type -// *controlplaneviews.ServiceinstanceView. -func marshalControlplaneviewsServiceinstanceViewToServiceinstanceResponseBody(v *controlplaneviews.ServiceinstanceView) *ServiceinstanceResponseBody { - res := &ServiceinstanceResponseBody{ - ServiceInstanceID: *v.ServiceInstanceID, - ServiceID: *v.ServiceID, - DatabaseID: string(*v.DatabaseID), - HostID: *v.HostID, - State: *v.State, - CreatedAt: *v.CreatedAt, - UpdatedAt: *v.UpdatedAt, - Error: v.Error, - } - if v.Status != nil { - res.Status = marshalControlplaneviewsServiceInstanceStatusViewToServiceInstanceStatusResponseBody(v.Status) - } - - return res -} - -// marshalControlplaneviewsServiceInstanceStatusViewToServiceInstanceStatusResponseBody -// builds a value of type *ServiceInstanceStatusResponseBody from a value of -// type *controlplaneviews.ServiceInstanceStatusView. -func marshalControlplaneviewsServiceInstanceStatusViewToServiceInstanceStatusResponseBody(v *controlplaneviews.ServiceInstanceStatusView) *ServiceInstanceStatusResponseBody { - if v == nil { - return nil - } - res := &ServiceInstanceStatusResponseBody{ - ContainerID: v.ContainerID, - ImageVersion: v.ImageVersion, - Hostname: v.Hostname, - Ipv4Address: v.Ipv4Address, - LastHealthAt: v.LastHealthAt, - ServiceReady: v.ServiceReady, - } - if v.Ports != nil { - res.Ports = make([]*PortMappingResponseBody, len(v.Ports)) - for i, val := range v.Ports { - if val == nil { - res.Ports[i] = nil - continue - } - res.Ports[i] = marshalControlplaneviewsPortMappingViewToPortMappingResponseBody(val) - } - } - if v.HealthCheck != nil { - res.HealthCheck = marshalControlplaneviewsHealthCheckResultViewToHealthCheckResultResponseBody(v.HealthCheck) - } - - return res -} - -// marshalControlplaneviewsPortMappingViewToPortMappingResponseBody builds a -// value of type *PortMappingResponseBody from a value of type -// *controlplaneviews.PortMappingView. -func marshalControlplaneviewsPortMappingViewToPortMappingResponseBody(v *controlplaneviews.PortMappingView) *PortMappingResponseBody { - if v == nil { - return nil - } - res := &PortMappingResponseBody{ - Name: *v.Name, - ContainerPort: v.ContainerPort, - HostPort: v.HostPort, - } - - return res -} - -// marshalControlplaneviewsHealthCheckResultViewToHealthCheckResultResponseBody -// builds a value of type *HealthCheckResultResponseBody from a value of type -// *controlplaneviews.HealthCheckResultView. -func marshalControlplaneviewsHealthCheckResultViewToHealthCheckResultResponseBody(v *controlplaneviews.HealthCheckResultView) *HealthCheckResultResponseBody { - if v == nil { - return nil - } - res := &HealthCheckResultResponseBody{ - Status: *v.Status, - Message: v.Message, - CheckedAt: *v.CheckedAt, - } - - return res -} - -// marshalControlplaneviewsDatabaseSpecViewToDatabaseSpecResponseBody builds a -// value of type *DatabaseSpecResponseBody from a value of type -// *controlplaneviews.DatabaseSpecView. -func marshalControlplaneviewsDatabaseSpecViewToDatabaseSpecResponseBody(v *controlplaneviews.DatabaseSpecView) *DatabaseSpecResponseBody { - if v == nil { - return nil - } - res := &DatabaseSpecResponseBody{ - DatabaseName: *v.DatabaseName, - PostgresVersion: v.PostgresVersion, - SpockVersion: v.SpockVersion, - Port: v.Port, - Cpus: v.Cpus, - Memory: v.Memory, - } - if v.Nodes != nil { - res.Nodes = make([]*DatabaseNodeSpecResponseBody, len(v.Nodes)) - for i, val := range v.Nodes { - if val == nil { - res.Nodes[i] = nil - continue - } - res.Nodes[i] = marshalControlplaneviewsDatabaseNodeSpecViewToDatabaseNodeSpecResponseBody(val) - } - } else { - res.Nodes = []*DatabaseNodeSpecResponseBody{} - } - if v.DatabaseUsers != nil { - res.DatabaseUsers = make([]*DatabaseUserSpecResponseBody, len(v.DatabaseUsers)) - for i, val := range v.DatabaseUsers { - if val == nil { - res.DatabaseUsers[i] = nil - continue - } - res.DatabaseUsers[i] = marshalControlplaneviewsDatabaseUserSpecViewToDatabaseUserSpecResponseBody(val) - } - } - if v.Services != nil { - res.Services = make([]*ServiceSpecResponseBody, len(v.Services)) - for i, val := range v.Services { - if val == nil { - res.Services[i] = nil - continue - } - res.Services[i] = marshalControlplaneviewsServiceSpecViewToServiceSpecResponseBody(val) - } - } - if v.BackupConfig != nil { - res.BackupConfig = marshalControlplaneviewsBackupConfigSpecViewToBackupConfigSpecResponseBody(v.BackupConfig) - } - if v.RestoreConfig != nil { - res.RestoreConfig = marshalControlplaneviewsRestoreConfigSpecViewToRestoreConfigSpecResponseBody(v.RestoreConfig) - } - if v.PostgresqlConf != nil { - res.PostgresqlConf = make(map[string]any, len(v.PostgresqlConf)) - for key, val := range v.PostgresqlConf { - tk := key - tv := val - res.PostgresqlConf[tk] = tv - } - } - if v.OrchestratorOpts != nil { - res.OrchestratorOpts = marshalControlplaneviewsOrchestratorOptsViewToOrchestratorOptsResponseBody(v.OrchestratorOpts) - } - - return res -} - -// marshalControlplaneviewsDatabaseNodeSpecViewToDatabaseNodeSpecResponseBody -// builds a value of type *DatabaseNodeSpecResponseBody from a value of type -// *controlplaneviews.DatabaseNodeSpecView. -func marshalControlplaneviewsDatabaseNodeSpecViewToDatabaseNodeSpecResponseBody(v *controlplaneviews.DatabaseNodeSpecView) *DatabaseNodeSpecResponseBody { - res := &DatabaseNodeSpecResponseBody{ - Name: *v.Name, - PostgresVersion: v.PostgresVersion, - Port: v.Port, - Cpus: v.Cpus, - Memory: v.Memory, - SourceNode: v.SourceNode, - } - if v.HostIds != nil { - res.HostIds = make([]string, len(v.HostIds)) - for i, val := range v.HostIds { - res.HostIds[i] = string(val) - } - } else { - res.HostIds = []string{} - } - if v.PostgresqlConf != nil { - res.PostgresqlConf = make(map[string]any, len(v.PostgresqlConf)) - for key, val := range v.PostgresqlConf { - tk := key - tv := val - res.PostgresqlConf[tk] = tv - } - } - if v.BackupConfig != nil { - res.BackupConfig = marshalControlplaneviewsBackupConfigSpecViewToBackupConfigSpecResponseBody(v.BackupConfig) - } - if v.RestoreConfig != nil { - res.RestoreConfig = marshalControlplaneviewsRestoreConfigSpecViewToRestoreConfigSpecResponseBody(v.RestoreConfig) - } - if v.OrchestratorOpts != nil { - res.OrchestratorOpts = marshalControlplaneviewsOrchestratorOptsViewToOrchestratorOptsResponseBody(v.OrchestratorOpts) - } - - return res -} - -// marshalControlplaneviewsBackupConfigSpecViewToBackupConfigSpecResponseBody -// builds a value of type *BackupConfigSpecResponseBody from a value of type -// *controlplaneviews.BackupConfigSpecView. -func marshalControlplaneviewsBackupConfigSpecViewToBackupConfigSpecResponseBody(v *controlplaneviews.BackupConfigSpecView) *BackupConfigSpecResponseBody { - if v == nil { - return nil - } - res := &BackupConfigSpecResponseBody{} - if v.Repositories != nil { - res.Repositories = make([]*BackupRepositorySpecResponseBody, len(v.Repositories)) - for i, val := range v.Repositories { - if val == nil { - res.Repositories[i] = nil - continue - } - res.Repositories[i] = marshalControlplaneviewsBackupRepositorySpecViewToBackupRepositorySpecResponseBody(val) - } - } else { - res.Repositories = []*BackupRepositorySpecResponseBody{} - } - if v.Schedules != nil { - res.Schedules = make([]*BackupScheduleSpecResponseBody, len(v.Schedules)) - for i, val := range v.Schedules { - if val == nil { - res.Schedules[i] = nil - continue - } - res.Schedules[i] = marshalControlplaneviewsBackupScheduleSpecViewToBackupScheduleSpecResponseBody(val) - } - } - - return res -} - -// marshalControlplaneviewsBackupRepositorySpecViewToBackupRepositorySpecResponseBody -// builds a value of type *BackupRepositorySpecResponseBody from a value of -// type *controlplaneviews.BackupRepositorySpecView. -func marshalControlplaneviewsBackupRepositorySpecViewToBackupRepositorySpecResponseBody(v *controlplaneviews.BackupRepositorySpecView) *BackupRepositorySpecResponseBody { - res := &BackupRepositorySpecResponseBody{ - Type: *v.Type, - S3Bucket: v.S3Bucket, - S3Region: v.S3Region, - S3Endpoint: v.S3Endpoint, - S3Key: v.S3Key, - S3KeySecret: v.S3KeySecret, - GcsBucket: v.GcsBucket, - GcsEndpoint: v.GcsEndpoint, - GcsKey: v.GcsKey, - AzureAccount: v.AzureAccount, - AzureContainer: v.AzureContainer, - AzureEndpoint: v.AzureEndpoint, - AzureKey: v.AzureKey, - RetentionFull: v.RetentionFull, - RetentionFullType: v.RetentionFullType, - BasePath: v.BasePath, - } - if v.ID != nil { - id := string(*v.ID) - res.ID = &id - } - if v.CustomOptions != nil { - res.CustomOptions = make(map[string]string, len(v.CustomOptions)) - for key, val := range v.CustomOptions { - tk := key - tv := val - res.CustomOptions[tk] = tv - } - } - - return res -} - -// marshalControlplaneviewsBackupScheduleSpecViewToBackupScheduleSpecResponseBody -// builds a value of type *BackupScheduleSpecResponseBody from a value of type -// *controlplaneviews.BackupScheduleSpecView. -func marshalControlplaneviewsBackupScheduleSpecViewToBackupScheduleSpecResponseBody(v *controlplaneviews.BackupScheduleSpecView) *BackupScheduleSpecResponseBody { - if v == nil { - return nil - } - res := &BackupScheduleSpecResponseBody{ - ID: *v.ID, - Type: *v.Type, - CronExpression: *v.CronExpression, - } - - return res -} - -// marshalControlplaneviewsRestoreConfigSpecViewToRestoreConfigSpecResponseBody -// builds a value of type *RestoreConfigSpecResponseBody from a value of type -// *controlplaneviews.RestoreConfigSpecView. -func marshalControlplaneviewsRestoreConfigSpecViewToRestoreConfigSpecResponseBody(v *controlplaneviews.RestoreConfigSpecView) *RestoreConfigSpecResponseBody { - if v == nil { - return nil - } - res := &RestoreConfigSpecResponseBody{ - SourceDatabaseID: string(*v.SourceDatabaseID), - SourceNodeName: *v.SourceNodeName, - SourceDatabaseName: *v.SourceDatabaseName, - } - if v.Repository != nil { - res.Repository = marshalControlplaneviewsRestoreRepositorySpecViewToRestoreRepositorySpecResponseBody(v.Repository) - } - if v.RestoreOptions != nil { - res.RestoreOptions = make(map[string]string, len(v.RestoreOptions)) - for key, val := range v.RestoreOptions { - tk := key - tv := val - res.RestoreOptions[tk] = tv - } - } - - return res -} - -// marshalControlplaneviewsRestoreRepositorySpecViewToRestoreRepositorySpecResponseBody -// builds a value of type *RestoreRepositorySpecResponseBody from a value of -// type *controlplaneviews.RestoreRepositorySpecView. -func marshalControlplaneviewsRestoreRepositorySpecViewToRestoreRepositorySpecResponseBody(v *controlplaneviews.RestoreRepositorySpecView) *RestoreRepositorySpecResponseBody { - res := &RestoreRepositorySpecResponseBody{ - Type: *v.Type, - S3Bucket: v.S3Bucket, - S3Region: v.S3Region, - S3Endpoint: v.S3Endpoint, - S3Key: v.S3Key, - S3KeySecret: v.S3KeySecret, - GcsBucket: v.GcsBucket, - GcsEndpoint: v.GcsEndpoint, - GcsKey: v.GcsKey, - AzureAccount: v.AzureAccount, - AzureContainer: v.AzureContainer, - AzureEndpoint: v.AzureEndpoint, - AzureKey: v.AzureKey, - BasePath: v.BasePath, - } - if v.ID != nil { - id := string(*v.ID) - res.ID = &id - } - if v.CustomOptions != nil { - res.CustomOptions = make(map[string]string, len(v.CustomOptions)) - for key, val := range v.CustomOptions { - tk := key - tv := val - res.CustomOptions[tk] = tv - } - } - - return res -} - -// marshalControlplaneviewsOrchestratorOptsViewToOrchestratorOptsResponseBody -// builds a value of type *OrchestratorOptsResponseBody from a value of type -// *controlplaneviews.OrchestratorOptsView. -func marshalControlplaneviewsOrchestratorOptsViewToOrchestratorOptsResponseBody(v *controlplaneviews.OrchestratorOptsView) *OrchestratorOptsResponseBody { - if v == nil { - return nil - } - res := &OrchestratorOptsResponseBody{} - if v.Swarm != nil { - res.Swarm = marshalControlplaneviewsSwarmOptsViewToSwarmOptsResponseBody(v.Swarm) - } - - return res -} - -// marshalControlplaneviewsSwarmOptsViewToSwarmOptsResponseBody builds a value -// of type *SwarmOptsResponseBody from a value of type -// *controlplaneviews.SwarmOptsView. -func marshalControlplaneviewsSwarmOptsViewToSwarmOptsResponseBody(v *controlplaneviews.SwarmOptsView) *SwarmOptsResponseBody { - if v == nil { - return nil - } - res := &SwarmOptsResponseBody{} - if v.ExtraVolumes != nil { - res.ExtraVolumes = make([]*ExtraVolumesSpecResponseBody, len(v.ExtraVolumes)) - for i, val := range v.ExtraVolumes { - if val == nil { - res.ExtraVolumes[i] = nil - continue - } - res.ExtraVolumes[i] = marshalControlplaneviewsExtraVolumesSpecViewToExtraVolumesSpecResponseBody(val) - } - } - if v.ExtraNetworks != nil { - res.ExtraNetworks = make([]*ExtraNetworkSpecResponseBody, len(v.ExtraNetworks)) - for i, val := range v.ExtraNetworks { - if val == nil { - res.ExtraNetworks[i] = nil - continue - } - res.ExtraNetworks[i] = marshalControlplaneviewsExtraNetworkSpecViewToExtraNetworkSpecResponseBody(val) - } - } - if v.ExtraLabels != nil { - res.ExtraLabels = make(map[string]string, len(v.ExtraLabels)) - for key, val := range v.ExtraLabels { - tk := key - tv := val - res.ExtraLabels[tk] = tv - } - } - - return res -} - -// marshalControlplaneviewsExtraVolumesSpecViewToExtraVolumesSpecResponseBody -// builds a value of type *ExtraVolumesSpecResponseBody from a value of type -// *controlplaneviews.ExtraVolumesSpecView. -func marshalControlplaneviewsExtraVolumesSpecViewToExtraVolumesSpecResponseBody(v *controlplaneviews.ExtraVolumesSpecView) *ExtraVolumesSpecResponseBody { - if v == nil { - return nil - } - res := &ExtraVolumesSpecResponseBody{ - HostPath: *v.HostPath, - DestinationPath: *v.DestinationPath, - } - - return res -} - -// marshalControlplaneviewsExtraNetworkSpecViewToExtraNetworkSpecResponseBody -// builds a value of type *ExtraNetworkSpecResponseBody from a value of type -// *controlplaneviews.ExtraNetworkSpecView. -func marshalControlplaneviewsExtraNetworkSpecViewToExtraNetworkSpecResponseBody(v *controlplaneviews.ExtraNetworkSpecView) *ExtraNetworkSpecResponseBody { - if v == nil { - return nil - } - res := &ExtraNetworkSpecResponseBody{ - ID: *v.ID, - } - if v.Aliases != nil { - res.Aliases = make([]string, len(v.Aliases)) - for i, val := range v.Aliases { - res.Aliases[i] = val - } - } - if v.DriverOpts != nil { - res.DriverOpts = make(map[string]string, len(v.DriverOpts)) - for key, val := range v.DriverOpts { - tk := key - tv := val - res.DriverOpts[tk] = tv - } - } - - return res -} - -// marshalControlplaneviewsDatabaseUserSpecViewToDatabaseUserSpecResponseBody -// builds a value of type *DatabaseUserSpecResponseBody from a value of type -// *controlplaneviews.DatabaseUserSpecView. -func marshalControlplaneviewsDatabaseUserSpecViewToDatabaseUserSpecResponseBody(v *controlplaneviews.DatabaseUserSpecView) *DatabaseUserSpecResponseBody { - if v == nil { - return nil - } - res := &DatabaseUserSpecResponseBody{ - Username: *v.Username, - Password: v.Password, - DbOwner: v.DbOwner, - } - if v.Attributes != nil { - res.Attributes = make([]string, len(v.Attributes)) - for i, val := range v.Attributes { - res.Attributes[i] = val - } - } - if v.Roles != nil { - res.Roles = make([]string, len(v.Roles)) - for i, val := range v.Roles { - res.Roles[i] = val - } - } - - return res -} - -// marshalControlplaneviewsServiceSpecViewToServiceSpecResponseBody builds a -// value of type *ServiceSpecResponseBody from a value of type -// *controlplaneviews.ServiceSpecView. -func marshalControlplaneviewsServiceSpecViewToServiceSpecResponseBody(v *controlplaneviews.ServiceSpecView) *ServiceSpecResponseBody { - if v == nil { - return nil - } - res := &ServiceSpecResponseBody{ - ServiceID: string(*v.ServiceID), - ServiceType: *v.ServiceType, - Version: *v.Version, - Port: v.Port, - Cpus: v.Cpus, - Memory: v.Memory, - } - if v.HostIds != nil { - res.HostIds = make([]string, len(v.HostIds)) - for i, val := range v.HostIds { - res.HostIds[i] = string(val) - } - } else { - res.HostIds = []string{} - } - if v.Config != nil { - res.Config = make(map[string]any, len(v.Config)) - for key, val := range v.Config { - tk := key - tv := val - res.Config[tk] = tv - } - } - - return res -} - // unmarshalDatabaseSpecRequestBodyRequestBodyToControlplaneDatabaseSpec builds // a value of type *controlplane.DatabaseSpec from a value of type // *DatabaseSpecRequestBodyRequestBody. diff --git a/api/apiv1/gen/http/control_plane/server/types.go b/api/apiv1/gen/http/control_plane/server/types.go index fe33e589..821e98fa 100644 --- a/api/apiv1/gen/http/control_plane/server/types.go +++ b/api/apiv1/gen/http/control_plane/server/types.go @@ -11,7 +11,6 @@ import ( "unicode/utf8" controlplane "github.com/pgEdge/control-plane/api/apiv1/gen/control_plane" - controlplaneviews "github.com/pgEdge/control-plane/api/apiv1/gen/control_plane/views" goa "goa.design/goa/v3/pkg" ) @@ -44,7 +43,7 @@ type GetJoinOptionsRequestBody struct { type CreateDatabaseRequestBody struct { // Unique identifier for the database. ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` - // Unique identifier for the databases's owner. + // Unique identifier for the database's owner. TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` // The specification for the database. Spec *DatabaseSpecRequestBody `form:"spec,omitempty" json:"spec,omitempty" xml:"spec,omitempty"` @@ -53,7 +52,7 @@ type CreateDatabaseRequestBody struct { // UpdateDatabaseRequestBody is the type of the "control-plane" service // "update-database" endpoint HTTP request body. type UpdateDatabaseRequestBody struct { - // Unique identifier for the databases's owner. + // Unique identifier for the database's owner. TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` // The specification for the database. Spec *DatabaseSpecRequestBodyRequestBody `form:"spec,omitempty" json:"spec,omitempty" xml:"spec,omitempty"` @@ -186,7 +185,8 @@ type RemoveHostResponseBody struct { // ListDatabasesResponseBody is the type of the "control-plane" service // "list-databases" endpoint HTTP response body. type ListDatabasesResponseBody struct { - Databases DatabaseResponseBodyAbbreviatedCollection `form:"databases,omitempty" json:"databases,omitempty" xml:"databases,omitempty"` + // The databases managed by this cluster. + Databases []*DatabaseSummaryResponseBody `form:"databases,omitempty" json:"databases,omitempty" xml:"databases,omitempty"` } // CreateDatabaseResponseBody is the type of the "control-plane" service @@ -203,7 +203,7 @@ type CreateDatabaseResponseBody struct { type GetDatabaseResponseBody struct { // Unique identifier for the database. ID string `form:"id" json:"id" xml:"id"` - // Unique identifier for the database. + // Unique identifier for the database's owner. TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` // The time that the database was created. CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` @@ -212,9 +212,9 @@ type GetDatabaseResponseBody struct { // Current state of the database. State string `form:"state" json:"state" xml:"state"` // All of the instances in the database. - Instances InstanceResponseBodyCollection `form:"instances" json:"instances" xml:"instances"` + Instances []*InstanceResponseBody `form:"instances,omitempty" json:"instances,omitempty" xml:"instances,omitempty"` // Service instances running alongside this database. - ServiceInstances ServiceinstanceResponseBodyCollection `form:"service_instances" json:"service_instances" xml:"service_instances"` + ServiceInstances []*ServiceInstanceResponseBody `form:"service_instances,omitempty" json:"service_instances,omitempty" xml:"service_instances,omitempty"` // The user-provided specification for the database. Spec *DatabaseSpecResponseBody `form:"spec,omitempty" json:"spec,omitempty" xml:"spec,omitempty"` } @@ -1716,16 +1716,11 @@ type TaskResponseBody struct { Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` } -// DatabaseResponseBodyAbbreviatedCollection is used to define fields on -// response body types. -type DatabaseResponseBodyAbbreviatedCollection []*DatabaseResponseBodyAbbreviated - -// DatabaseResponseBodyAbbreviated is used to define fields on response body -// types. -type DatabaseResponseBodyAbbreviated struct { +// DatabaseSummaryResponseBody is used to define fields on response body types. +type DatabaseSummaryResponseBody struct { // Unique identifier for the database. ID string `form:"id" json:"id" xml:"id"` - // Unique identifier for the databases's owner. + // Unique identifier for the database's owner. TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` // The time that the database was created. CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` @@ -1734,49 +1729,9 @@ type DatabaseResponseBodyAbbreviated struct { // Current state of the database. State string `form:"state" json:"state" xml:"state"` // All of the instances in the database. - Instances InstanceResponseBodyAbbreviatedCollection `form:"instances" json:"instances" xml:"instances"` -} - -// InstanceResponseBodyAbbreviatedCollection is used to define fields on -// response body types. -type InstanceResponseBodyAbbreviatedCollection []*InstanceResponseBodyAbbreviated - -// InstanceResponseBodyAbbreviated is used to define fields on response body -// types. -type InstanceResponseBodyAbbreviated struct { - // Unique identifier for the instance. - ID string `form:"id" json:"id" xml:"id"` - // The ID of the host this instance is running on. - HostID string `form:"host_id" json:"host_id" xml:"host_id"` - // The Spock node name for this instance. - NodeName string `form:"node_name" json:"node_name" xml:"node_name"` - State string `form:"state" json:"state" xml:"state"` + Instances []*InstanceResponseBody `form:"instances,omitempty" json:"instances,omitempty" xml:"instances,omitempty"` } -// DatabaseResponseBody is used to define fields on response body types. -type DatabaseResponseBody struct { - // Unique identifier for the database. - ID string `form:"id" json:"id" xml:"id"` - // Unique identifier for the databases's owner. - TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` - // The time that the database was created. - CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` - // The time that the database was last updated. - UpdatedAt string `form:"updated_at" json:"updated_at" xml:"updated_at"` - // Current state of the database. - State string `form:"state" json:"state" xml:"state"` - // All of the instances in the database. - Instances InstanceCollectionResponseBody `form:"instances" json:"instances" xml:"instances"` - // Service instances running alongside this database. - ServiceInstances ServiceinstanceCollectionResponseBody `form:"service_instances" json:"service_instances" xml:"service_instances"` - // The user-provided specification for the database. - Spec *DatabaseSpecResponseBody `form:"spec,omitempty" json:"spec,omitempty" xml:"spec,omitempty"` -} - -// InstanceCollectionResponseBody is used to define fields on response body -// types. -type InstanceCollectionResponseBody []*InstanceResponseBody - // InstanceResponseBody is used to define fields on response body types. type InstanceResponseBody struct { // Unique identifier for the instance. @@ -1848,12 +1803,28 @@ type InstanceSubscriptionResponseBody struct { Status string `form:"status" json:"status" xml:"status"` } -// ServiceinstanceCollectionResponseBody is used to define fields on response -// body types. -type ServiceinstanceCollectionResponseBody []*ServiceinstanceResponseBody +// DatabaseResponseBody is used to define fields on response body types. +type DatabaseResponseBody struct { + // Unique identifier for the database. + ID string `form:"id" json:"id" xml:"id"` + // Unique identifier for the database's owner. + TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` + // The time that the database was created. + CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` + // The time that the database was last updated. + UpdatedAt string `form:"updated_at" json:"updated_at" xml:"updated_at"` + // Current state of the database. + State string `form:"state" json:"state" xml:"state"` + // All of the instances in the database. + Instances []*InstanceResponseBody `form:"instances,omitempty" json:"instances,omitempty" xml:"instances,omitempty"` + // Service instances running alongside this database. + ServiceInstances []*ServiceInstanceResponseBody `form:"service_instances,omitempty" json:"service_instances,omitempty" xml:"service_instances,omitempty"` + // The user-provided specification for the database. + Spec *DatabaseSpecResponseBody `form:"spec,omitempty" json:"spec,omitempty" xml:"spec,omitempty"` +} -// ServiceinstanceResponseBody is used to define fields on response body types. -type ServiceinstanceResponseBody struct { +// ServiceInstanceResponseBody is used to define fields on response body types. +type ServiceInstanceResponseBody struct { // Unique identifier for the service instance. ServiceInstanceID string `form:"service_instance_id" json:"service_instance_id" xml:"service_instance_id"` // The service ID from the DatabaseSpec. @@ -2213,14 +2184,6 @@ type ServiceSpecResponseBody struct { Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` } -// InstanceResponseBodyCollection is used to define fields on response body -// types. -type InstanceResponseBodyCollection []*InstanceResponseBody - -// ServiceinstanceResponseBodyCollection is used to define fields on response -// body types. -type ServiceinstanceResponseBodyCollection []*ServiceinstanceResponseBody - // TaskLogEntryResponseBody is used to define fields on response body types. type TaskLogEntryResponseBody struct { // The timestamp of the log entry. @@ -2967,16 +2930,16 @@ func NewRemoveHostResponseBody(res *controlplane.RemoveHostResponse) *RemoveHost // NewListDatabasesResponseBody builds the HTTP response body from the result // of the "list-databases" endpoint of the "control-plane" service. -func NewListDatabasesResponseBody(res *controlplaneviews.ListDatabasesResponseView) *ListDatabasesResponseBody { +func NewListDatabasesResponseBody(res *controlplane.ListDatabasesResponse) *ListDatabasesResponseBody { body := &ListDatabasesResponseBody{} if res.Databases != nil { - body.Databases = make([]*DatabaseResponseBodyAbbreviated, len(res.Databases)) + body.Databases = make([]*DatabaseSummaryResponseBody, len(res.Databases)) for i, val := range res.Databases { if val == nil { body.Databases[i] = nil continue } - body.Databases[i] = marshalControlplaneviewsDatabaseViewToDatabaseResponseBodyAbbreviated(val) + body.Databases[i] = marshalControlplaneDatabaseSummaryToDatabaseSummaryResponseBody(val) } } return body @@ -2997,12 +2960,12 @@ func NewCreateDatabaseResponseBody(res *controlplane.CreateDatabaseResponse) *Cr // NewGetDatabaseResponseBody builds the HTTP response body from the result of // the "get-database" endpoint of the "control-plane" service. -func NewGetDatabaseResponseBody(res *controlplaneviews.DatabaseView) *GetDatabaseResponseBody { +func NewGetDatabaseResponseBody(res *controlplane.Database) *GetDatabaseResponseBody { body := &GetDatabaseResponseBody{ - ID: string(*res.ID), - CreatedAt: *res.CreatedAt, - UpdatedAt: *res.UpdatedAt, - State: *res.State, + ID: string(res.ID), + CreatedAt: res.CreatedAt, + UpdatedAt: res.UpdatedAt, + State: res.State, } if res.TenantID != nil { tenantID := string(*res.TenantID) @@ -3015,25 +2978,21 @@ func NewGetDatabaseResponseBody(res *controlplaneviews.DatabaseView) *GetDatabas body.Instances[i] = nil continue } - body.Instances[i] = marshalControlplaneviewsInstanceViewToInstanceResponseBody(val) + body.Instances[i] = marshalControlplaneInstanceToInstanceResponseBody(val) } - } else { - body.Instances = []*InstanceResponseBody{} } if res.ServiceInstances != nil { - body.ServiceInstances = make([]*ServiceinstanceResponseBody, len(res.ServiceInstances)) + body.ServiceInstances = make([]*ServiceInstanceResponseBody, len(res.ServiceInstances)) for i, val := range res.ServiceInstances { if val == nil { body.ServiceInstances[i] = nil continue } - body.ServiceInstances[i] = marshalControlplaneviewsServiceinstanceViewToServiceinstanceResponseBody(val) + body.ServiceInstances[i] = marshalControlplaneServiceInstanceToServiceInstanceResponseBody(val) } - } else { - body.ServiceInstances = []*ServiceinstanceResponseBody{} } if res.Spec != nil { - body.Spec = marshalControlplaneviewsDatabaseSpecViewToDatabaseSpecResponseBody(res.Spec) + body.Spec = marshalControlplaneDatabaseSpecToDatabaseSpecResponseBody(res.Spec) } return body } diff --git a/api/apiv1/gen/http/openapi.json b/api/apiv1/gen/http/openapi.json index e32b4323..e68cf352 100644 --- a/api/apiv1/gen/http/openapi.json +++ b/api/apiv1/gen/http/openapi.json @@ -256,7 +256,7 @@ "200": { "description": "OK response.", "schema": { - "$ref": "#/definitions/Listdatabasesresponse" + "$ref": "#/definitions/ListDatabasesResponse" } }, "409": { @@ -372,7 +372,13 @@ "200": { "description": "OK response.", "schema": { - "$ref": "#/definitions/ControlPlaneGetDatabaseResponseBody" + "$ref": "#/definitions/Database", + "required": [ + "id", + "created_at", + "updated_at", + "state" + ] } }, "400": { @@ -2361,52 +2367,6 @@ }, "example": { "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, { "azure_account": "pgedge-backups", "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", @@ -2486,7 +2446,7 @@ }, "additionalProperties": { "type": "string", - "example": "Repellat quas nostrum eos." + "example": "Minima esse ut quaerat quae." } }, "backup_options": { @@ -2497,7 +2457,7 @@ }, "additionalProperties": { "type": "string", - "example": "Harum sapiente qui ullam qui quam." + "example": "Dignissimos qui hic voluptates voluptatem." } }, "type": { @@ -2570,7 +2530,7 @@ }, "additionalProperties": { "type": "string", - "example": "Placeat illo dolore totam accusamus alias ipsa." + "example": "Repudiandae pariatur eligendi." } }, "gcs_bucket": { @@ -2990,7 +2950,7 @@ ], "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", "status": { - "state": "error" + "state": "available" } }, "required": [ @@ -3031,7 +2991,7 @@ "state": { "type": "string", "description": "The current state of the cluster.", - "example": "error", + "example": "available", "enum": [ "available", "error" @@ -3083,16 +3043,31 @@ "healthy" ] }, - "ControlPlaneGetDatabaseResponseBody": { - "title": "Mediatype identifier: database; view=default", + "ControlPlaneSwitchoverDatabaseNodeRequestBody": { + "title": "ControlPlaneSwitchoverDatabaseNodeRequestBody", "type": "object", "properties": { - "created_at": { + "candidate_instance_id": { "type": "string", - "description": "The time that the database was created.", - "example": "2025-01-01T01:30:00Z", - "format": "date-time" + "description": "Optional instance_id for the replica candidate.", + "example": "68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi" }, + "scheduled_at": { + "type": "string", + "description": "Optional scheduled time (ISO8601) for the switchover. If absent switchover happens immediately.", + "example": "2025-09-20T22:00:00+05:30", + "format": "date-time" + } + }, + "example": { + "candidate_instance_id": "68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi", + "scheduled_at": "2025-09-20T22:00:00+05:30" + } + }, + "CreateDatabaseRequest": { + "title": "CreateDatabaseRequest", + "type": "object", + "properties": { "id": { "type": "string", "description": "Unique identifier for the database.", @@ -3100,165 +3075,29 @@ "minLength": 1, "maxLength": 63 }, - "instances": { - "$ref": "#/definitions/InstanceResponseBodyCollection" - }, - "service_instances": { - "$ref": "#/definitions/ServiceinstanceResponseBodyCollection" - }, "spec": { "$ref": "#/definitions/DatabaseSpec" }, - "state": { - "type": "string", - "description": "Current state of the database.", - "example": "deleting", - "enum": [ - "creating", - "modifying", - "available", - "deleting", - "degraded", - "failed", - "backing_up", - "restoring", - "unknown" - ] - }, "tenant_id": { "type": "string", - "description": "Unique identifier for the database.", + "description": "Unique identifier for the database's owner.", "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", "minLength": 1, "maxLength": 63 - }, - "updated_at": { - "type": "string", - "description": "The time that the database was last updated.", - "example": "2025-01-01T02:30:00Z", - "format": "date-time" } }, - "description": "Get-DatabaseResponseBody result type (default view)", "example": { - "created_at": "2025-06-18T16:52:05Z", "id": "storefront", - "instances": [ - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "2025-06-18T16:52:22Z", - "host_id": "us-east-1", - "id": "storefront-n1-689qacsi", - "node_name": "n1", - "postgres": { - "patroni_state": "running", - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n3", - "provider_node": "n3", - "status": "replicating" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "replicating" - } - ], - "version": "4.0.10" - }, - "state": "available", - "status_updated_at": "2025-06-18T17:58:56Z", - "updated_at": "2025-06-18T17:54:36Z" - }, - { - "connection_info": { - "hostname": "i-058731542fee493f.ec2.internal", - "ipv4_address": "10.24.35.2", - "port": 5432 - }, - "created_at": "2025-06-18T16:52:22Z", - "host_id": "ap-south-1", - "id": "storefront-n2-9ptayhma", - "node_name": "n2", - "postgres": { - "patroni_state": "running", - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n2n1", - "provider_node": "n1", - "status": "replicating" - }, - { - "name": "sub_n2n3", - "provider_node": "n3", - "status": "replicating" - } - ], - "version": "4.0.10" - }, - "state": "available", - "status_updated_at": "2025-06-18T17:58:56Z", - "updated_at": "2025-06-18T17:54:01Z" - }, - { - "connection_info": { - "hostname": "i-494027b7b53f6a23.ec2.internal", - "ipv4_address": "10.24.36.2", - "port": 5432 - }, - "created_at": "2025-06-18T16:52:22Z", - "host_id": "eu-central-1", - "id": "storefront-n3-ant97dj4", - "node_name": "n3", - "postgres": { - "patroni_state": "running", - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n3n1", - "provider_node": "n1", - "status": "replicating" - }, - { - "name": "sub_n3n2", - "provider_node": "n2", - "status": "replicating" - } - ], - "version": "4.0.10" - }, - "state": "available", - "status_updated_at": "2025-06-18T17:58:56Z", - "updated_at": "2025-06-18T17:54:01Z" - } - ], "spec": { "database_name": "storefront", "database_users": [ { "attributes": [ - "SUPERUSER", - "LOGIN" + "LOGIN", + "SUPERUSER" ], "db_owner": true, + "password": "password", "username": "admin" } ], @@ -3283,118 +3122,24 @@ } ], "port": 5432, - "postgres_version": "17.6", - "spock_version": "5" - }, - "state": "restoring", - "updated_at": "2025-06-18T17:58:59Z" + "postgresql_conf": { + "max_connections": 5000 + } + } }, "required": [ - "id", - "created_at", - "updated_at", - "state", - "instances", - "service_instances" + "spec" ] }, - "ControlPlaneSwitchoverDatabaseNodeRequestBody": { - "title": "ControlPlaneSwitchoverDatabaseNodeRequestBody", + "CreateDatabaseResponse": { + "title": "CreateDatabaseResponse", "type": "object", "properties": { - "candidate_instance_id": { - "type": "string", - "description": "Optional instance_id for the replica candidate.", - "example": "68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi" + "database": { + "$ref": "#/definitions/Database" }, - "scheduled_at": { - "type": "string", - "description": "Optional scheduled time (ISO8601) for the switchover. If absent switchover happens immediately.", - "example": "2025-09-20T22:00:00+05:30", - "format": "date-time" - } - }, - "example": { - "candidate_instance_id": "68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi", - "scheduled_at": "2025-09-20T22:00:00+05:30" - } - }, - "CreateDatabaseRequest": { - "title": "CreateDatabaseRequest", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier for the database.", - "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "minLength": 1, - "maxLength": 63 - }, - "spec": { - "$ref": "#/definitions/DatabaseSpec" - }, - "tenant_id": { - "type": "string", - "description": "Unique identifier for the databases's owner.", - "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "minLength": 1, - "maxLength": 63 - } - }, - "example": { - "id": "storefront", - "spec": { - "database_name": "storefront", - "database_users": [ - { - "attributes": [ - "LOGIN", - "SUPERUSER" - ], - "db_owner": true, - "password": "password", - "username": "admin" - } - ], - "nodes": [ - { - "host_ids": [ - "us-east-1" - ], - "name": "n1" - }, - { - "host_ids": [ - "ap-south-1" - ], - "name": "n2" - }, - { - "host_ids": [ - "eu-central-1" - ], - "name": "n3" - } - ], - "port": 5432, - "postgresql_conf": { - "max_connections": 5000 - } - } - }, - "required": [ - "spec" - ] - }, - "CreateDatabaseResponse": { - "title": "CreateDatabaseResponse", - "type": "object", - "properties": { - "database": { - "$ref": "#/definitions/Database" - }, - "task": { - "$ref": "#/definitions/Task" + "task": { + "$ref": "#/definitions/Task" } }, "example": { @@ -3454,7 +3199,7 @@ ] }, "Database": { - "title": "Mediatype identifier: database; view=default", + "title": "Database", "type": "object", "properties": { "created_at": { @@ -3471,10 +3216,241 @@ "maxLength": 63 }, "instances": { - "$ref": "#/definitions/InstanceResponseBodyCollection" + "type": "array", + "items": { + "$ref": "#/definitions/Instance" + }, + "description": "All of the instances in the database.", + "example": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + }, + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + }, + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + } + ] }, "service_instances": { - "$ref": "#/definitions/ServiceinstanceResponseBodyCollection" + "type": "array", + "items": { + "$ref": "#/definitions/ServiceInstance" + }, + "description": "Service instances running alongside this database.", + "example": [ + { + "created_at": "2025-01-28T10:00:00Z", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "error": "failed to start container: image not found", + "host_id": "host-1", + "service_id": "mcp-server", + "service_instance_id": "mcp-server-host-1", + "state": "running", + "status": { + "container_id": "a1b2c3d4e5f6", + "health_check": { + "checked_at": "2025-01-28T10:00:00Z", + "message": "Connection refused", + "status": "healthy" + }, + "hostname": "mcp-server-host-1.internal", + "image_version": "1.0.0", + "ipv4_address": "10.0.1.5", + "last_health_at": "2025-01-28T10:00:00Z", + "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + } + ], + "service_ready": true + }, + "updated_at": "2025-01-28T10:05:00Z" + }, + { + "created_at": "2025-01-28T10:00:00Z", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "error": "failed to start container: image not found", + "host_id": "host-1", + "service_id": "mcp-server", + "service_instance_id": "mcp-server-host-1", + "state": "running", + "status": { + "container_id": "a1b2c3d4e5f6", + "health_check": { + "checked_at": "2025-01-28T10:00:00Z", + "message": "Connection refused", + "status": "healthy" + }, + "hostname": "mcp-server-host-1.internal", + "image_version": "1.0.0", + "ipv4_address": "10.0.1.5", + "last_health_at": "2025-01-28T10:00:00Z", + "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + } + ], + "service_ready": true + }, + "updated_at": "2025-01-28T10:05:00Z" + } + ] }, "spec": { "$ref": "#/definitions/DatabaseSpec" @@ -3482,7 +3458,7 @@ "state": { "type": "string", "description": "Current state of the database.", - "example": "restoring", + "example": "available", "enum": [ "creating", "modifying", @@ -3497,7 +3473,7 @@ }, "tenant_id": { "type": "string", - "description": "Unique identifier for the databases's owner.", + "description": "Unique identifier for the database's owner.", "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", "minLength": 1, "maxLength": 63 @@ -3509,7 +3485,6 @@ "format": "date-time" } }, - "description": "DatabaseResponseBody result type (default view)", "example": { "created_at": "2025-06-18T16:52:05Z", "id": "storefront", @@ -3663,9 +3638,7 @@ "id", "created_at", "updated_at", - "state", - "instances", - "service_instances" + "state" ] }, "DatabaseNodeSpec": { @@ -3691,8 +3664,6 @@ }, "description": "The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.", "example": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696" ], "minItems": 1 @@ -3769,6 +3740,29 @@ "s3_region": "us-east-1", "type": "s3" }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, { "azure_account": "pgedge-backups", "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", @@ -3813,6 +3807,7 @@ }, "cpus": "500m", "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696" ], "memory": "500M", @@ -3913,259 +3908,25 @@ "host_ids" ] }, - "DatabaseResponseBodyAbbreviated": { - "title": "Mediatype identifier: database; view=default", + "DatabaseSpec": { + "title": "DatabaseSpec", "type": "object", "properties": { - "created_at": { + "backup_config": { + "$ref": "#/definitions/BackupConfigSpec" + }, + "cpus": { "type": "string", - "description": "The time that the database was created.", - "example": "2025-01-01T01:30:00Z", - "format": "date-time" + "description": "The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.", + "example": "500m", + "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" }, - "id": { + "database_name": { "type": "string", - "description": "Unique identifier for the database.", - "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "description": "The name of the Postgres database.", + "example": "northwind", "minLength": 1, - "maxLength": 63 - }, - "instances": { - "$ref": "#/definitions/InstanceResponseBodyAbbreviatedCollection" - }, - "state": { - "type": "string", - "description": "Current state of the database.", - "example": "available", - "enum": [ - "creating", - "modifying", - "available", - "deleting", - "degraded", - "failed", - "backing_up", - "restoring", - "unknown" - ] - }, - "tenant_id": { - "type": "string", - "description": "Unique identifier for the databases's owner.", - "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "minLength": 1, - "maxLength": 63 - }, - "updated_at": { - "type": "string", - "description": "The time that the database was last updated.", - "example": "2025-01-01T02:30:00Z", - "format": "date-time" - } - }, - "description": "DatabaseResponseBody result type (abbreviated view) (default view)", - "example": { - "created_at": "2025-01-01T01:30:00Z", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "instances": [ - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - }, - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - }, - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - }, - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - } - ], - "state": "backing_up", - "tenant_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "updated_at": "2025-01-01T02:30:00Z" - }, - "required": [ - "id", - "created_at", - "updated_at", - "state", - "instances" - ] - }, - "DatabaseResponseBodyAbbreviatedCollection": { - "title": "Mediatype identifier: database; type=collection; view=default", - "type": "array", - "items": { - "$ref": "#/definitions/DatabaseResponseBodyAbbreviated" - }, - "description": "DatabaseResponseBodyAbbreviatedCollection is the result type for an array of DatabaseResponseBodyAbbreviated (default view)", - "example": [ - { - "created_at": "2025-01-01T01:30:00Z", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "instances": [ - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - }, - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - }, - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - }, - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - } - ], - "state": "degraded", - "tenant_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "updated_at": "2025-01-01T02:30:00Z" - }, - { - "created_at": "2025-01-01T01:30:00Z", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "instances": [ - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - }, - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - }, - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - }, - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - } - ], - "state": "degraded", - "tenant_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "updated_at": "2025-01-01T02:30:00Z" - }, - { - "created_at": "2025-01-01T01:30:00Z", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "instances": [ - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - }, - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - }, - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - }, - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - } - ], - "state": "degraded", - "tenant_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "updated_at": "2025-01-01T02:30:00Z" - }, - { - "created_at": "2025-01-01T01:30:00Z", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "instances": [ - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - }, - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - }, - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - }, - { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "stopped" - } - ], - "state": "degraded", - "tenant_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "updated_at": "2025-01-01T02:30:00Z" - } - ] - }, - "DatabaseSpec": { - "title": "DatabaseSpec", - "type": "object", - "properties": { - "backup_config": { - "$ref": "#/definitions/BackupConfigSpec" - }, - "cpus": { - "type": "string", - "description": "The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.", - "example": "500m", - "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" - }, - "database_name": { - "type": "string", - "description": "The name of the Postgres database.", - "example": "northwind", - "minLength": 1, - "maxLength": 31 + "maxLength": 31 }, "database_users": { "type": "array", @@ -4255,6 +4016,29 @@ "s3_region": "us-east-1", "type": "s3" }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, { "azure_account": "pgedge-backups", "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", @@ -4421,6 +4205,29 @@ "s3_region": "us-east-1", "type": "s3" }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, { "azure_account": "pgedge-backups", "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", @@ -4587,6 +4394,29 @@ "s3_region": "us-east-1", "type": "s3" }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, { "azure_account": "pgedge-backups", "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", @@ -4775,7 +4605,6 @@ }, "cpus": "500m", "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696" ], @@ -4793,7 +4622,6 @@ }, "cpus": "500m", "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696" ], @@ -4811,25 +4639,6 @@ }, "cpus": "500m", "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696" ], @@ -4874,6 +4683,29 @@ "s3_region": "us-east-1", "type": "s3" }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, { "azure_account": "pgedge-backups", "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", @@ -4964,6 +4796,218 @@ { "backup_config": { "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, { "azure_account": "pgedge-backups", "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", @@ -5226,7 +5270,6 @@ }, "cpus": "500m", "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696" ], @@ -5244,7 +5287,6 @@ }, "cpus": "500m", "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696" ], @@ -5262,6 +5304,293 @@ "nodes" ] }, + "DatabaseSummary": { + "title": "DatabaseSummary", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "description": "The time that the database was created.", + "example": "2025-01-01T01:30:00Z", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "Unique identifier for the database.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "instances": { + "type": "array", + "items": { + "$ref": "#/definitions/Instance" + }, + "description": "All of the instances in the database.", + "example": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + }, + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + }, + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + } + ] + }, + "state": { + "type": "string", + "description": "Current state of the database.", + "example": "deleting", + "enum": [ + "creating", + "modifying", + "available", + "deleting", + "degraded", + "failed", + "backing_up", + "restoring", + "unknown" + ] + }, + "tenant_id": { + "type": "string", + "description": "Unique identifier for the database's owner.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "updated_at": { + "type": "string", + "description": "The time that the database was last updated.", + "example": "2025-01-01T02:30:00Z", + "format": "date-time" + } + }, + "example": { + "created_at": "2025-01-01T01:30:00Z", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + }, + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + } + ], + "state": "restoring", + "tenant_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "updated_at": "2025-01-01T02:30:00Z" + }, + "required": [ + "id", + "created_at", + "updated_at", + "state" + ] + }, "DatabaseUserSpec": { "title": "DatabaseUserSpec", "type": "object", @@ -5270,7 +5599,7 @@ "type": "array", "items": { "type": "string", - "example": "Non atque." + "example": "Voluptatem autem quis praesentium ab fugit." }, "description": "The attributes to assign to this database user.", "example": [ @@ -5295,7 +5624,7 @@ "type": "array", "items": { "type": "string", - "example": "Non modi explicabo illum alias qui." + "example": "Dolores rerum soluta aliquam neque." }, "description": "The roles to assign to this database user.", "example": [ @@ -5356,7 +5685,7 @@ "type": "array", "items": { "type": "string", - "example": "Aliquid cupiditate sapiente eos aut dignissimos cum." + "example": "Nobis velit fugiat rerum dicta optio." }, "description": "Optional network-scoped aliases for the container.", "example": [ @@ -5373,7 +5702,7 @@ }, "additionalProperties": { "type": "string", - "example": "Modi consequatur non at." + "example": "Voluptas enim maiores sint voluptatibus earum." } }, "id": { @@ -5437,7 +5766,7 @@ "type": "boolean", "description": "If true, skip the health validations that prevent running failover on a healthy cluster.", "default": false, - "example": false + "example": true } }, "example": { @@ -5606,25 +5935,7 @@ "orchestrator": "swarm", "status": { "components": { - "Eveniet possimus dicta laudantium.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Repellendus in doloremque.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Rerum exercitationem laborum dignissimos incidunt in quas.": { + "Id dolorem rerum labore commodi.": { "details": { "alarms": [ "3: NOSPACE" @@ -5696,7 +6007,7 @@ "type": "object", "description": "The status of each component of the host.", "example": { - "Quis excepturi blanditiis.": { + "Id vero suscipit fugiat dignissimos modi accusamus.": { "details": { "alarms": [ "3: NOSPACE" @@ -5705,7 +6016,7 @@ "error": "failed to connect to etcd", "healthy": false }, - "Ut at aut neque tenetur.": { + "Itaque cum ut pariatur tenetur est.": { "details": { "alarms": [ "3: NOSPACE" @@ -5738,7 +6049,7 @@ }, "example": { "components": { - "Deleniti est voluptatibus minima accusamus impedit.": { + "Ex molestiae corporis rem consequuntur.": { "details": { "alarms": [ "3: NOSPACE" @@ -5757,84 +6068,18 @@ "components" ] }, - "InstanceConnectionInfo": { - "title": "InstanceConnectionInfo", + "Instance": { + "title": "Instance", "type": "object", "properties": { - "hostname": { - "type": "string", - "description": "The hostname of the host that's running this instance.", - "example": "i-0123456789abcdef.ec2.internal" + "connection_info": { + "$ref": "#/definitions/InstanceConnectionInfo" }, - "ipv4_address": { + "created_at": { "type": "string", - "description": "The IPv4 address of the host that's running this instance.", - "example": "10.24.34.2", - "format": "ipv4" - }, - "port": { - "type": "integer", - "description": "The host port that Postgres is listening on for this instance.", - "example": 5432, - "format": "int64" - } - }, - "description": "Connection information for a pgEdge instance.", - "example": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - } - }, - "InstancePostgresStatus": { - "title": "InstancePostgresStatus", - "type": "object", - "properties": { - "patroni_paused": { - "type": "boolean", - "description": "True if Patroni is paused for this instance.", - "example": false - }, - "patroni_state": { - "type": "string", - "example": "unknown" - }, - "pending_restart": { - "type": "boolean", - "description": "True if this instance has a pending restart from a configuration change.", - "example": false - }, - "role": { - "type": "string", - "example": "primary" - }, - "version": { - "type": "string", - "description": "The version of Postgres for this instance.", - "example": "18.1" - } - }, - "description": "Postgres status information for a pgEdge instance.", - "example": { - "patroni_paused": false, - "patroni_state": "unknown", - "pending_restart": true, - "role": "primary", - "version": "18.1" - } - }, - "InstanceResponseBody": { - "title": "Mediatype identifier: instance; view=default", - "type": "object", - "properties": { - "connection_info": { - "$ref": "#/definitions/InstanceConnectionInfo" - }, - "created_at": { - "type": "string", - "description": "The time that the instance was created.", - "example": "1989-11-23T15:19:47Z", - "format": "date-time" + "description": "The time that the instance was created.", + "example": "1976-12-13T20:14:34Z", + "format": "date-time" }, "error": { "type": "string", @@ -5879,30 +6124,30 @@ "status_updated_at": { "type": "string", "description": "The time that the instance status information was last updated.", - "example": "1980-12-18T10:07:58Z", + "example": "1987-04-19T13:01:14Z", "format": "date-time" }, "updated_at": { "type": "string", "description": "The time that the instance was last modified.", - "example": "1985-09-02T23:18:20Z", + "example": "1973-03-16T16:27:18Z", "format": "date-time" } }, - "description": "An instance of pgEdge Postgres running on a host. (default view)", + "description": "An instance of pgEdge Postgres running on a host.", "example": { "connection_info": { "hostname": "i-0123456789abcdef.ec2.internal", "ipv4_address": "10.24.34.2", "port": 5432 }, - "created_at": "2013-05-17T03:08:23Z", + "created_at": "2008-03-04T09:05:33Z", "error": "failed to get patroni status: connection refused", "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", "node_name": "n1", "postgres": { - "patroni_paused": true, + "patroni_paused": false, "patroni_state": "unknown", "pending_restart": true, "role": "primary", @@ -5929,9 +6174,9 @@ ], "version": "4.10.0" }, - "state": "stopped", - "status_updated_at": "1999-08-04T13:18:37Z", - "updated_at": "2001-08-17T01:21:22Z" + "state": "creating", + "status_updated_at": "2015-10-23T15:00:04Z", + "updated_at": "1988-08-03T13:14:18Z" }, "required": [ "id", @@ -5942,331 +6187,71 @@ "state" ] }, - "InstanceResponseBodyAbbreviated": { - "title": "Mediatype identifier: instance; view=default", + "InstanceConnectionInfo": { + "title": "InstanceConnectionInfo", "type": "object", "properties": { - "host_id": { - "type": "string", - "description": "The ID of the host this instance is running on.", - "example": "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - }, - "id": { + "hostname": { "type": "string", - "description": "Unique identifier for the instance.", - "example": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d" + "description": "The hostname of the host that's running this instance.", + "example": "i-0123456789abcdef.ec2.internal" }, - "node_name": { + "ipv4_address": { "type": "string", - "description": "The Spock node name for this instance.", - "example": "n1" + "description": "The IPv4 address of the host that's running this instance.", + "example": "10.24.34.2", + "format": "ipv4" }, - "state": { - "type": "string", - "example": "available", - "enum": [ - "creating", - "modifying", - "backing_up", - "available", - "degraded", - "failed", - "stopped", - "unknown" - ] + "port": { + "type": "integer", + "description": "The host port that Postgres is listening on for this instance.", + "example": 5432, + "format": "int64" } }, - "description": "An instance of pgEdge Postgres running on a host. (abbreviated view) (default view)", + "description": "Connection information for a pgEdge instance.", "example": { - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "state": "backing_up" - }, - "required": [ - "id", - "host_id", - "node_name", - "state" - ] + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + } }, - "InstanceResponseBodyAbbreviatedCollection": { - "title": "Mediatype identifier: instance; type=collection; view=default", - "type": "array", - "items": { - "$ref": "#/definitions/InstanceResponseBodyAbbreviated" - }, - "description": "InstanceResponseBodyAbbreviatedCollection is the result type for an array of InstanceResponseBodyAbbreviated (default view)", - "example": [ - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1978-12-28T17:33:35Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": true, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "modifying", - "status_updated_at": "2001-10-17T14:50:56Z", - "updated_at": "2013-05-14T14:25:56Z" + "InstancePostgresStatus": { + "title": "InstancePostgresStatus", + "type": "object", + "properties": { + "patroni_paused": { + "type": "boolean", + "description": "True if Patroni is paused for this instance.", + "example": false }, - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1978-12-28T17:33:35Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": true, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "modifying", - "status_updated_at": "2001-10-17T14:50:56Z", - "updated_at": "2013-05-14T14:25:56Z" + "patroni_state": { + "type": "string", + "example": "unknown" }, - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1978-12-28T17:33:35Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": true, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "modifying", - "status_updated_at": "2001-10-17T14:50:56Z", - "updated_at": "2013-05-14T14:25:56Z" + "pending_restart": { + "type": "boolean", + "description": "True if this instance has a pending restart from a configuration change.", + "example": true }, - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1978-12-28T17:33:35Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": true, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "modifying", - "status_updated_at": "2001-10-17T14:50:56Z", - "updated_at": "2013-05-14T14:25:56Z" - } - ] - }, - "InstanceResponseBodyCollection": { - "title": "Mediatype identifier: instance; type=collection; view=default", - "type": "array", - "items": { - "$ref": "#/definitions/InstanceResponseBody" - }, - "description": "InstanceCollectionResponseBody is the result type for an array of InstanceResponseBody (default view)", - "example": [ - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1978-12-28T17:33:35Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": true, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "modifying", - "status_updated_at": "2001-10-17T14:50:56Z", - "updated_at": "2013-05-14T14:25:56Z" + "role": { + "type": "string", + "example": "primary" }, - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1978-12-28T17:33:35Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": true, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "modifying", - "status_updated_at": "2001-10-17T14:50:56Z", - "updated_at": "2013-05-14T14:25:56Z" + "version": { + "type": "string", + "description": "The version of Postgres for this instance.", + "example": "18.1" } - ] + }, + "description": "Postgres status information for a pgEdge instance.", + "example": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + } }, "InstanceSpockStatus": { "title": "InstanceSpockStatus", @@ -6316,6 +6301,16 @@ "example": { "read_only": "off", "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, { "name": "sub_n1n2", "provider_node": "n2", @@ -6373,26 +6368,6 @@ "$ref": "#/definitions/Task" }, "example": [ - { - "completed_at": "2025-06-18T16:52:35Z", - "created_at": "2025-06-18T16:52:05Z", - "database_id": "storefront", - "entity_id": "storefront", - "scope": "database", - "status": "completed", - "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", - "type": "create" - }, - { - "completed_at": "2025-06-18T16:52:35Z", - "created_at": "2025-06-18T16:52:05Z", - "database_id": "storefront", - "entity_id": "storefront", - "scope": "database", - "status": "completed", - "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", - "type": "create" - }, { "completed_at": "2025-06-18T16:52:35Z", "created_at": "2025-06-18T16:52:05Z", @@ -6462,6 +6437,631 @@ ] } }, + "ListDatabasesResponse": { + "title": "ListDatabasesResponse", + "type": "object", + "properties": { + "databases": { + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseSummary" + }, + "description": "The databases managed by this cluster.", + "example": [ + { + "created_at": "2025-01-01T01:30:00Z", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + }, + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + } + ], + "state": "restoring", + "tenant_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "updated_at": "2025-01-01T02:30:00Z" + }, + { + "created_at": "2025-01-01T01:30:00Z", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + }, + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + } + ], + "state": "restoring", + "tenant_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "updated_at": "2025-01-01T02:30:00Z" + }, + { + "created_at": "2025-01-01T01:30:00Z", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + }, + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + } + ], + "state": "restoring", + "tenant_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "updated_at": "2025-01-01T02:30:00Z" + }, + { + "created_at": "2025-01-01T01:30:00Z", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + }, + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + } + ], + "state": "restoring", + "tenant_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "updated_at": "2025-01-01T02:30:00Z" + } + ] + } + }, + "example": { + "databases": [ + { + "created_at": "2025-06-17T20:05:10Z", + "id": "inventory", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2025-06-17T20:05:10Z", + "host_id": "us-east-1", + "id": "inventory-n1-689qacsi", + "node_name": "n1", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n3", + "provider_node": "n3", + "status": "replicating" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-17T20:05:10Z" + }, + { + "connection_info": { + "hostname": "i-058731542fee493f.ec2.internal", + "ipv4_address": "10.24.35.2", + "port": 5432 + }, + "created_at": "2025-06-17T20:05:10Z", + "host_id": "ap-south-1", + "id": "inventory-n2-9ptayhma", + "node_name": "n2", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n2n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n2n3", + "provider_node": "n3", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-17T20:05:10Z" + }, + { + "connection_info": { + "hostname": "i-494027b7b53f6a23.ec2.internal", + "ipv4_address": "10.24.36.2", + "port": 5432 + }, + "created_at": "2025-06-17T20:05:10Z", + "host_id": "eu-central-1", + "id": "inventory-n3-ant97dj4", + "node_name": "n3", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n3n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n3n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-17T20:05:10Z" + } + ], + "state": "available", + "updated_at": "2025-06-17T20:05:10Z" + }, + { + "created_at": "2025-06-12T15:10:05Z", + "id": "storefront", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 6432 + }, + "created_at": "2025-06-12T15:10:05Z", + "host_id": "us-east-1", + "id": "storefront-n1-689qacsi", + "node_name": "n1", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n3", + "provider_node": "n3", + "status": "replicating" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-12T15:10:05Z" + }, + { + "connection_info": { + "hostname": "i-058731542fee493f.ec2.internal", + "ipv4_address": "10.24.35.2", + "port": 6432 + }, + "created_at": "2025-06-12T15:10:05Z", + "host_id": "ap-south-1", + "id": "storefront-n2-9ptayhma", + "node_name": "n2", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n2n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n2n3", + "provider_node": "n3", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-12T15:10:05Z" + }, + { + "connection_info": { + "hostname": "i-494027b7b53f6a23.ec2.internal", + "ipv4_address": "10.24.36.2", + "port": 6432 + }, + "created_at": "2025-06-12T15:10:05Z", + "host_id": "eu-central-1", + "id": "storefront-n3-ant97dj4", + "node_name": "n3", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n3n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n3n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-12T15:10:05Z" + } + ], + "state": "available", + "updated_at": "2025-06-12T15:10:05Z" + } + ] + } + }, "ListHostTasksResponse": { "title": "ListHostTasksResponse", "type": "object", @@ -6541,25 +7141,7 @@ "orchestrator": "swarm", "status": { "components": { - "Eveniet possimus dicta laudantium.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Repellendus in doloremque.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Rerum exercitationem laborum dignissimos incidunt in quas.": { + "Id dolorem rerum labore commodi.": { "details": { "alarms": [ "3: NOSPACE" @@ -6573,6 +7155,14 @@ "updated_at": "2021-07-01T12:34:56Z" }, "supported_pgedge_versions": [ + { + "postgres_version": "17.6", + "spock_version": "5" + }, + { + "postgres_version": "17.6", + "spock_version": "5" + }, { "postgres_version": "17.6", "spock_version": "5" @@ -6603,25 +7193,7 @@ "orchestrator": "swarm", "status": { "components": { - "Eveniet possimus dicta laudantium.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Repellendus in doloremque.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Rerum exercitationem laborum dignissimos incidunt in quas.": { + "Id dolorem rerum labore commodi.": { "details": { "alarms": [ "3: NOSPACE" @@ -6635,6 +7207,14 @@ "updated_at": "2021-07-01T12:34:56Z" }, "supported_pgedge_versions": [ + { + "postgres_version": "17.6", + "spock_version": "5" + }, + { + "postgres_version": "17.6", + "spock_version": "5" + }, { "postgres_version": "17.6", "spock_version": "5" @@ -6665,25 +7245,7 @@ "orchestrator": "swarm", "status": { "components": { - "Eveniet possimus dicta laudantium.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Repellendus in doloremque.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Rerum exercitationem laborum dignissimos incidunt in quas.": { + "Id dolorem rerum labore commodi.": { "details": { "alarms": [ "3: NOSPACE" @@ -6697,6 +7259,14 @@ "updated_at": "2021-07-01T12:34:56Z" }, "supported_pgedge_versions": [ + { + "postgres_version": "17.6", + "spock_version": "5" + }, + { + "postgres_version": "17.6", + "spock_version": "5" + }, { "postgres_version": "17.6", "spock_version": "5" @@ -6727,25 +7297,7 @@ "orchestrator": "swarm", "status": { "components": { - "Eveniet possimus dicta laudantium.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Repellendus in doloremque.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Rerum exercitationem laborum dignissimos incidunt in quas.": { + "Id dolorem rerum labore commodi.": { "details": { "alarms": [ "3: NOSPACE" @@ -6759,6 +7311,14 @@ "updated_at": "2021-07-01T12:34:56Z" }, "supported_pgedge_versions": [ + { + "postgres_version": "17.6", + "spock_version": "5" + }, + { + "postgres_version": "17.6", + "spock_version": "5" + }, { "postgres_version": "17.6", "spock_version": "5" @@ -6917,6 +7477,16 @@ "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", "type": "create" }, + { + "completed_at": "2025-06-18T16:52:35Z", + "created_at": "2025-06-18T16:52:05Z", + "database_id": "storefront", + "entity_id": "storefront", + "scope": "database", + "status": "completed", + "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", + "type": "create" + }, { "completed_at": "2025-06-18T16:52:35Z", "created_at": "2025-06-18T16:52:05Z", @@ -6956,72 +7526,6 @@ ] } }, - "Listdatabasesresponse": { - "title": "Mediatype identifier: listdatabasesresponse; view=default", - "type": "object", - "properties": { - "databases": { - "$ref": "#/definitions/DatabaseResponseBodyAbbreviatedCollection" - } - }, - "description": "List-DatabasesResponseBody result type (default view)", - "example": { - "databases": [ - { - "created_at": "2025-06-17T20:05:10Z", - "id": "inventory", - "instances": [ - { - "host_id": "us-east-1", - "id": "inventory-n1-689qacsi", - "node_name": "n1", - "state": "available" - }, - { - "host_id": "ap-south-1", - "id": "inventory-n2-9ptayhma", - "node_name": "n2", - "state": "available" - }, - { - "host_id": "eu-central-1", - "id": "inventory-n3-ant97dj4", - "node_name": "n3", - "state": "available" - } - ], - "state": "available", - "updated_at": "2025-06-17T20:05:10Z" - }, - { - "created_at": "2025-06-17T20:05:10Z", - "id": "storefront", - "instances": [ - { - "host_id": "us-east-1", - "id": "storefront-n1-689qacsi", - "node_name": "n1", - "state": "available" - }, - { - "host_id": "ap-south-1", - "id": "storefront-n2-9ptayhma", - "node_name": "n2", - "state": "available" - }, - { - "host_id": "eu-central-1", - "id": "storefront-n3-ant97dj4", - "node_name": "n3", - "state": "available" - } - ], - "state": "available", - "updated_at": "2025-06-12T15:10:05Z" - } - ] - } - }, "OrchestratorOpts": { "title": "OrchestratorOpts", "type": "object", @@ -7215,6 +7719,16 @@ "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", "type": "create" }, + { + "completed_at": "2025-06-18T16:52:35Z", + "created_at": "2025-06-18T16:52:05Z", + "database_id": "storefront", + "entity_id": "storefront", + "scope": "database", + "status": "completed", + "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", + "type": "create" + }, { "completed_at": "2025-06-18T16:52:35Z", "created_at": "2025-06-18T16:52:05Z", @@ -7273,7 +7787,7 @@ "maxLength": 32, "additionalProperties": { "type": "string", - "example": "Minus dolore eos et sunt culpa animi." + "example": "Dolor rem." } }, "source_database_id": { @@ -7345,7 +7859,7 @@ "type": "array", "items": { "type": "string", - "example": "Nihil qui non quae sint ea." + "example": "Ratione asperiores iusto nostrum commodi quidem occaecati." }, "description": "The nodes to restore. Defaults to all nodes if empty or unspecified.", "example": [ @@ -7396,6 +7910,16 @@ "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", "type": "create" }, + { + "completed_at": "2025-06-18T16:52:35Z", + "created_at": "2025-06-18T16:52:05Z", + "database_id": "storefront", + "entity_id": "storefront", + "scope": "database", + "status": "completed", + "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", + "type": "create" + }, { "completed_at": "2025-06-18T16:52:35Z", "created_at": "2025-06-18T16:52:05Z", @@ -7650,7 +8174,7 @@ }, "additionalProperties": { "type": "string", - "example": "Doloribus rem culpa." + "example": "Quos dolorem tempore ut qui ratione repellat." } }, "gcs_bucket": { @@ -7715,39 +8239,153 @@ }, "type": { "type": "string", - "description": "The type of this repository.", - "example": "s3", + "description": "The type of this repository.", + "example": "s3", + "enum": [ + "s3", + "gcs", + "azure", + "posix", + "cifs" + ] + } + }, + "example": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "required": [ + "type" + ] + }, + "ServiceInstance": { + "title": "ServiceInstance", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "description": "The time that the service instance was created.", + "example": "2025-01-28T10:00:00Z", + "format": "date-time" + }, + "database_id": { + "type": "string", + "description": "The ID of the database this service belongs to.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "error": { + "type": "string", + "description": "An error message if the service instance is in an error state.", + "example": "failed to start container: image not found" + }, + "host_id": { + "type": "string", + "description": "The ID of the host this service instance is running on.", + "example": "host-1" + }, + "service_id": { + "type": "string", + "description": "The service ID from the DatabaseSpec.", + "example": "mcp-server" + }, + "service_instance_id": { + "type": "string", + "description": "Unique identifier for the service instance.", + "example": "mcp-server-host-1" + }, + "state": { + "type": "string", + "description": "Current state of the service instance.", + "example": "running", "enum": [ - "s3", - "gcs", - "azure", - "posix", - "cifs" + "creating", + "running", + "failed", + "deleting" ] + }, + "status": { + "$ref": "#/definitions/ServiceInstanceStatus" + }, + "updated_at": { + "type": "string", + "description": "The time that the service instance was last updated.", + "example": "2025-01-28T10:05:00Z", + "format": "date-time" } }, + "description": "A service instance running on a host alongside the database.", "example": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + "created_at": "2025-01-28T10:00:00Z", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "error": "failed to start container: image not found", + "host_id": "host-1", + "service_id": "mcp-server", + "service_instance_id": "mcp-server-host-1", + "state": "running", + "status": { + "container_id": "a1b2c3d4e5f6", + "health_check": { + "checked_at": "2025-01-28T10:00:00Z", + "message": "Connection refused", + "status": "healthy" + }, + "hostname": "mcp-server-host-1.internal", + "image_version": "1.0.0", + "ipv4_address": "10.0.1.5", + "last_health_at": "2025-01-28T10:00:00Z", + "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + } + ], + "service_ready": true }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" + "updated_at": "2025-01-28T10:05:00Z" }, "required": [ - "type" + "service_instance_id", + "service_id", + "database_id", + "host_id", + "state", + "created_at", + "updated_at" ] }, "ServiceInstanceStatus": { @@ -7796,6 +8434,11 @@ "host_port": 8080, "name": "web-client" }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, { "container_port": 8080, "host_port": 8080, @@ -7822,16 +8465,6 @@ "ipv4_address": "10.0.1.5", "last_health_at": "2025-01-28T10:00:00Z", "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, { "container_port": 8080, "host_port": 8080, @@ -7876,7 +8509,6 @@ }, "description": "The IDs of the hosts that should run this service. One service instance will be created per host.", "example": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696" ], @@ -7943,265 +8575,6 @@ "config" ] }, - "ServiceinstanceResponseBody": { - "title": "Mediatype identifier: serviceinstance; view=default", - "type": "object", - "properties": { - "created_at": { - "type": "string", - "description": "The time that the service instance was created.", - "example": "2025-01-28T10:00:00Z", - "format": "date-time" - }, - "database_id": { - "type": "string", - "description": "The ID of the database this service belongs to.", - "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "minLength": 1, - "maxLength": 63 - }, - "error": { - "type": "string", - "description": "An error message if the service instance is in an error state.", - "example": "failed to start container: image not found" - }, - "host_id": { - "type": "string", - "description": "The ID of the host this service instance is running on.", - "example": "host-1" - }, - "service_id": { - "type": "string", - "description": "The service ID from the DatabaseSpec.", - "example": "mcp-server" - }, - "service_instance_id": { - "type": "string", - "description": "Unique identifier for the service instance.", - "example": "mcp-server-host-1" - }, - "state": { - "type": "string", - "description": "Current state of the service instance.", - "example": "running", - "enum": [ - "creating", - "running", - "failed", - "deleting" - ] - }, - "status": { - "$ref": "#/definitions/ServiceInstanceStatus" - }, - "updated_at": { - "type": "string", - "description": "The time that the service instance was last updated.", - "example": "2025-01-28T10:05:00Z", - "format": "date-time" - } - }, - "description": "A service instance running on a host alongside the database. (default view)", - "example": { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", - "service_instance_id": "mcp-server-host-1", - "state": "running", - "status": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" - }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ], - "service_ready": true - }, - "updated_at": "2025-01-28T10:05:00Z" - }, - "required": [ - "service_instance_id", - "service_id", - "database_id", - "host_id", - "state", - "created_at", - "updated_at" - ] - }, - "ServiceinstanceResponseBodyCollection": { - "title": "Mediatype identifier: serviceinstance; type=collection; view=default", - "type": "array", - "items": { - "$ref": "#/definitions/ServiceinstanceResponseBody" - }, - "description": "ServiceinstanceCollectionResponseBody is the result type for an array of ServiceinstanceResponseBody (default view)", - "example": [ - { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", - "service_instance_id": "mcp-server-host-1", - "state": "running", - "status": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" - }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ], - "service_ready": true - }, - "updated_at": "2025-01-28T10:05:00Z" - }, - { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", - "service_instance_id": "mcp-server-host-1", - "state": "running", - "status": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" - }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ], - "service_ready": true - }, - "updated_at": "2025-01-28T10:05:00Z" - }, - { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", - "service_instance_id": "mcp-server-host-1", - "state": "running", - "status": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" - }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ], - "service_ready": true - }, - "updated_at": "2025-01-28T10:05:00Z" - } - ] - }, "StartInstanceResponse": { "title": "StartInstanceResponse", "type": "object", @@ -8261,7 +8634,7 @@ }, "additionalProperties": { "type": "string", - "example": "Possimus error eligendi recusandae." + "example": "Reprehenderit error." } }, "extra_networks": { @@ -8537,14 +8910,6 @@ "message": "task started", "timestamp": "2025-05-29T15:43:13Z" }, - { - "fields": { - "option.enabled": true, - "status": "creating" - }, - "message": "task started", - "timestamp": "2025-05-29T15:43:13Z" - }, { "fields": { "option.enabled": true, @@ -8704,7 +9069,7 @@ }, "tenant_id": { "type": "string", - "description": "Unique identifier for the databases's owner.", + "description": "Unique identifier for the database's owner.", "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", "minLength": 1, "maxLength": 63 diff --git a/api/apiv1/gen/http/openapi.yaml b/api/apiv1/gen/http/openapi.yaml index 903eec87..0883b2c2 100644 --- a/api/apiv1/gen/http/openapi.yaml +++ b/api/apiv1/gen/http/openapi.yaml @@ -180,7 +180,7 @@ paths: "200": description: OK response. schema: - $ref: '#/definitions/Listdatabasesresponse' + $ref: '#/definitions/ListDatabasesResponse' "409": description: Conflict response. schema: @@ -259,7 +259,12 @@ paths: "200": description: OK response. schema: - $ref: '#/definitions/ControlPlaneGetDatabaseResponseBody' + $ref: '#/definitions/Database' + required: + - id + - created_at + - updated_at + - state "400": description: Bad Request response. schema: @@ -1680,46 +1685,6 @@ definitions: s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY s3_region: us-east-1 type: s3 - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 schedules: - cron_expression: 0 6 * * ? id: daily-full-backup @@ -1758,7 +1723,7 @@ definitions: key: value additionalProperties: type: string - example: Repellat quas nostrum eos. + example: Minima esse ut quaerat quae. backup_options: type: object description: Options for the backup. @@ -1766,7 +1731,7 @@ definitions: archive-check: "n" additionalProperties: type: string - example: Harum sapiente qui ullam qui quam. + example: Dignissimos qui hic voluptates voluptatem. type: type: string description: The type of backup. @@ -1823,7 +1788,7 @@ definitions: storage-upload-chunk-size: 5MiB additionalProperties: type: string - example: Placeat illo dolore totam accusamus alias ipsa. + example: Repudiandae pariatur eligendi. gcs_bucket: type: string description: The GCS bucket name for this repository. Only applies when type = 'gcs'. @@ -2135,7 +2100,7 @@ definitions: spock_version: "5" id: 76f9b8c0-4958-11f0-a489-3bb29577c696 status: - state: error + state: available required: - id - status @@ -2166,7 +2131,7 @@ definitions: state: type: string description: The current state of the cluster. - example: error + example: available enum: - available - error @@ -2201,8 +2166,112 @@ definitions: healthy: false required: - healthy - ControlPlaneGetDatabaseResponseBody: - title: 'Mediatype identifier: database; view=default' + ControlPlaneSwitchoverDatabaseNodeRequestBody: + title: ControlPlaneSwitchoverDatabaseNodeRequestBody + type: object + properties: + candidate_instance_id: + type: string + description: Optional instance_id for the replica candidate. + example: 68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi + scheduled_at: + type: string + description: Optional scheduled time (ISO8601) for the switchover. If absent switchover happens immediately. + example: "2025-09-20T22:00:00+05:30" + format: date-time + example: + candidate_instance_id: 68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi + scheduled_at: "2025-09-20T22:00:00+05:30" + CreateDatabaseRequest: + title: CreateDatabaseRequest + type: object + properties: + id: + type: string + description: Unique identifier for the database. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + spec: + $ref: '#/definitions/DatabaseSpec' + tenant_id: + type: string + description: Unique identifier for the database's owner. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + example: + id: storefront + spec: + database_name: storefront + database_users: + - attributes: + - LOGIN + - SUPERUSER + db_owner: true + password: password + username: admin + nodes: + - host_ids: + - us-east-1 + name: n1 + - host_ids: + - ap-south-1 + name: n2 + - host_ids: + - eu-central-1 + name: n3 + port: 5432 + postgresql_conf: + max_connections: 5000 + required: + - spec + CreateDatabaseResponse: + title: CreateDatabaseResponse + type: object + properties: + database: + $ref: '#/definitions/Database' + task: + $ref: '#/definitions/Task' + example: + database: + created_at: "2025-06-18T16:52:05Z" + id: storefront + spec: + database_name: storefront + database_users: + - attributes: + - SUPERUSER + - LOGIN + db_owner: true + username: admin + nodes: + - host_ids: + - us-east-1 + name: n1 + - host_ids: + - ap-south-1 + name: n2 + - host_ids: + - eu-central-1 + name: n3 + port: 5432 + postgres_version: "17.6" + spock_version: "5" + state: creating + updated_at: "2025-06-18T16:52:05Z" + task: + created_at: "2025-06-18T16:52:05Z" + database_id: storefront + status: pending + task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 + type: create + required: + - task + - database + Database: + title: Database type: object properties: created_at: @@ -2217,15 +2286,180 @@ definitions: minLength: 1 maxLength: 63 instances: - $ref: '#/definitions/InstanceResponseBodyCollection' + type: array + items: + $ref: '#/definitions/Instance' + description: All of the instances in the database. + example: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" service_instances: - $ref: '#/definitions/ServiceinstanceResponseBodyCollection' + type: array + items: + $ref: '#/definitions/ServiceInstance' + description: Service instances running alongside this database. + example: + - created_at: "2025-01-28T10:00:00Z" + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + error: 'failed to start container: image not found' + host_id: host-1 + service_id: mcp-server + service_instance_id: mcp-server-host-1 + state: running + status: + container_id: a1b2c3d4e5f6 + health_check: + checked_at: "2025-01-28T10:00:00Z" + message: Connection refused + status: healthy + hostname: mcp-server-host-1.internal + image_version: 1.0.0 + ipv4_address: 10.0.1.5 + last_health_at: "2025-01-28T10:00:00Z" + ports: + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + service_ready: true + updated_at: "2025-01-28T10:05:00Z" + - created_at: "2025-01-28T10:00:00Z" + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + error: 'failed to start container: image not found' + host_id: host-1 + service_id: mcp-server + service_instance_id: mcp-server-host-1 + state: running + status: + container_id: a1b2c3d4e5f6 + health_check: + checked_at: "2025-01-28T10:00:00Z" + message: Connection refused + status: healthy + hostname: mcp-server-host-1.internal + image_version: 1.0.0 + ipv4_address: 10.0.1.5 + last_health_at: "2025-01-28T10:00:00Z" + ports: + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + service_ready: true + updated_at: "2025-01-28T10:05:00Z" spec: $ref: '#/definitions/DatabaseSpec' state: type: string description: Current state of the database. - example: deleting + example: available enum: - creating - modifying @@ -2238,7 +2472,7 @@ definitions: - unknown tenant_id: type: string - description: Unique identifier for the database. + description: Unique identifier for the database's owner. example: 76f9b8c0-4958-11f0-a489-3bb29577c696 minLength: 1 maxLength: 63 @@ -2247,7 +2481,6 @@ definitions: description: The time that the database was last updated. example: "2025-01-01T02:30:00Z" format: date-time - description: Get-DatabaseResponseBody result type (default view) example: created_at: "2025-06-18T16:52:05Z" id: storefront @@ -2355,293 +2588,29 @@ definitions: - created_at - updated_at - state - - instances - - service_instances - ControlPlaneSwitchoverDatabaseNodeRequestBody: - title: ControlPlaneSwitchoverDatabaseNodeRequestBody + DatabaseNodeSpec: + title: DatabaseNodeSpec type: object properties: - candidate_instance_id: - type: string - description: Optional instance_id for the replica candidate. - example: 68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi - scheduled_at: + backup_config: + $ref: '#/definitions/BackupConfigSpec' + cpus: type: string - description: Optional scheduled time (ISO8601) for the switchover. If absent switchover happens immediately. - example: "2025-09-20T22:00:00+05:30" - format: date-time - example: - candidate_instance_id: 68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi - scheduled_at: "2025-09-20T22:00:00+05:30" - CreateDatabaseRequest: - title: CreateDatabaseRequest - type: object - properties: - id: - type: string - description: Unique identifier for the database. - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - spec: - $ref: '#/definitions/DatabaseSpec' - tenant_id: - type: string - description: Unique identifier for the databases's owner. - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - example: - id: storefront - spec: - database_name: storefront - database_users: - - attributes: - - LOGIN - - SUPERUSER - db_owner: true - password: password - username: admin - nodes: - - host_ids: - - us-east-1 - name: n1 - - host_ids: - - ap-south-1 - name: n2 - - host_ids: - - eu-central-1 - name: n3 - port: 5432 - postgresql_conf: - max_connections: 5000 - required: - - spec - CreateDatabaseResponse: - title: CreateDatabaseResponse - type: object - properties: - database: - $ref: '#/definitions/Database' - task: - $ref: '#/definitions/Task' - example: - database: - created_at: "2025-06-18T16:52:05Z" - id: storefront - spec: - database_name: storefront - database_users: - - attributes: - - SUPERUSER - - LOGIN - db_owner: true - username: admin - nodes: - - host_ids: - - us-east-1 - name: n1 - - host_ids: - - ap-south-1 - name: n2 - - host_ids: - - eu-central-1 - name: n3 - port: 5432 - postgres_version: "17.6" - spock_version: "5" - state: creating - updated_at: "2025-06-18T16:52:05Z" - task: - created_at: "2025-06-18T16:52:05Z" - database_id: storefront - status: pending - task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 - type: create - required: - - task - - database - Database: - title: 'Mediatype identifier: database; view=default' - type: object - properties: - created_at: - type: string - description: The time that the database was created. - example: "2025-01-01T01:30:00Z" - format: date-time - id: - type: string - description: Unique identifier for the database. - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - instances: - $ref: '#/definitions/InstanceResponseBodyCollection' - service_instances: - $ref: '#/definitions/ServiceinstanceResponseBodyCollection' - spec: - $ref: '#/definitions/DatabaseSpec' - state: - type: string - description: Current state of the database. - example: restoring - enum: - - creating - - modifying - - available - - deleting - - degraded - - failed - - backing_up - - restoring - - unknown - tenant_id: - type: string - description: Unique identifier for the databases's owner. - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - updated_at: - type: string - description: The time that the database was last updated. - example: "2025-01-01T02:30:00Z" - format: date-time - description: DatabaseResponseBody result type (default view) - example: - created_at: "2025-06-18T16:52:05Z" - id: storefront - instances: - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "2025-06-18T16:52:22Z" - host_id: us-east-1 - id: storefront-n1-689qacsi - node_name: n1 - postgres: - patroni_state: running - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n3 - provider_node: n3 - status: replicating - - name: sub_n1n2 - provider_node: n2 - status: replicating - version: 4.0.10 - state: available - status_updated_at: "2025-06-18T17:58:56Z" - updated_at: "2025-06-18T17:54:36Z" - - connection_info: - hostname: i-058731542fee493f.ec2.internal - ipv4_address: 10.24.35.2 - port: 5432 - created_at: "2025-06-18T16:52:22Z" - host_id: ap-south-1 - id: storefront-n2-9ptayhma - node_name: n2 - postgres: - patroni_state: running - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n2n1 - provider_node: n1 - status: replicating - - name: sub_n2n3 - provider_node: n3 - status: replicating - version: 4.0.10 - state: available - status_updated_at: "2025-06-18T17:58:56Z" - updated_at: "2025-06-18T17:54:01Z" - - connection_info: - hostname: i-494027b7b53f6a23.ec2.internal - ipv4_address: 10.24.36.2 - port: 5432 - created_at: "2025-06-18T16:52:22Z" - host_id: eu-central-1 - id: storefront-n3-ant97dj4 - node_name: n3 - postgres: - patroni_state: running - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n3n1 - provider_node: n1 - status: replicating - - name: sub_n3n2 - provider_node: n2 - status: replicating - version: 4.0.10 - state: available - status_updated_at: "2025-06-18T17:58:56Z" - updated_at: "2025-06-18T17:54:01Z" - spec: - database_name: storefront - database_users: - - attributes: - - SUPERUSER - - LOGIN - db_owner: true - username: admin - nodes: - - host_ids: - - us-east-1 - name: n1 - - host_ids: - - ap-south-1 - name: n2 - - host_ids: - - eu-central-1 - name: n3 - port: 5432 - postgres_version: "17.6" - spock_version: "5" - state: restoring - updated_at: "2025-06-18T17:58:59Z" - required: - - id - - created_at - - updated_at - - state - - instances - - service_instances - DatabaseNodeSpec: - title: DatabaseNodeSpec - type: object - properties: - backup_config: - $ref: '#/definitions/BackupConfigSpec' - cpus: - type: string - description: The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator. - example: 500m - pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ - host_ids: - type: array - items: - type: string - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - description: The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas. - example: - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - minItems: 1 - memory: + description: The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator. + example: 500m + pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ + host_ids: + type: array + items: + type: string + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + description: The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas. + example: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + minItems: 1 + memory: type: string description: The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator. example: 500M @@ -2720,6 +2689,26 @@ definitions: s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY s3_region: us-east-1 type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 schedules: - cron_expression: 0 6 * * ? id: daily-full-backup @@ -2733,6 +2722,7 @@ definitions: cpus: 500m host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 500M name: n1 orchestrator_opts: @@ -2779,194 +2769,27 @@ definitions: base_path: /backups custom_options: s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - source_database_name: northwind - source_node_name: n1 - source_node: n1 - required: - - name - - host_ids - DatabaseResponseBodyAbbreviated: - title: 'Mediatype identifier: database; view=default' - type: object - properties: - created_at: - type: string - description: The time that the database was created. - example: "2025-01-01T01:30:00Z" - format: date-time - id: - type: string - description: Unique identifier for the database. - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - instances: - $ref: '#/definitions/InstanceResponseBodyAbbreviatedCollection' - state: - type: string - description: Current state of the database. - example: available - enum: - - creating - - modifying - - available - - deleting - - degraded - - failed - - backing_up - - restoring - - unknown - tenant_id: - type: string - description: Unique identifier for the databases's owner. - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - updated_at: - type: string - description: The time that the database was last updated. - example: "2025-01-01T02:30:00Z" - format: date-time - description: DatabaseResponseBody result type (abbreviated view) (default view) - example: - created_at: "2025-01-01T01:30:00Z" - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - instances: - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - state: backing_up - tenant_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - updated_at: "2025-01-01T02:30:00Z" - required: - - id - - created_at - - updated_at - - state - - instances - DatabaseResponseBodyAbbreviatedCollection: - title: 'Mediatype identifier: database; type=collection; view=default' - type: array - items: - $ref: '#/definitions/DatabaseResponseBodyAbbreviated' - description: DatabaseResponseBodyAbbreviatedCollection is the result type for an array of DatabaseResponseBodyAbbreviated (default view) - example: - - created_at: "2025-01-01T01:30:00Z" - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - instances: - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - state: degraded - tenant_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - updated_at: "2025-01-01T02:30:00Z" - - created_at: "2025-01-01T01:30:00Z" - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - instances: - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - state: degraded - tenant_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - updated_at: "2025-01-01T02:30:00Z" - - created_at: "2025-01-01T01:30:00Z" - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - instances: - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - state: degraded - tenant_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - updated_at: "2025-01-01T02:30:00Z" - - created_at: "2025-01-01T01:30:00Z" - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - instances: - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: stopped - state: degraded - tenant_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - updated_at: "2025-01-01T02:30:00Z" + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + required: + - name + - host_ids DatabaseSpec: title: DatabaseSpec type: object @@ -3071,6 +2894,26 @@ definitions: s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY s3_region: us-east-1 type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 schedules: - cron_expression: 0 6 * * ? id: daily-full-backup @@ -3191,6 +3034,26 @@ definitions: s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY s3_region: us-east-1 type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 schedules: - cron_expression: 0 6 * * ? id: daily-full-backup @@ -3311,6 +3174,26 @@ definitions: s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY s3_region: us-east-1 type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 schedules: - cron_expression: 0 6 * * ? id: daily-full-backup @@ -3428,21 +3311,6 @@ definitions: host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - memory: 512M - port: 0 - service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - service_type: mcp - version: latest - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -3456,7 +3324,6 @@ definitions: host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -3470,7 +3337,6 @@ definitions: host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -3524,6 +3390,26 @@ definitions: s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY s3_region: us-east-1 type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 schedules: - cron_expression: 0 6 * * ? id: daily-full-backup @@ -3608,6 +3494,166 @@ definitions: s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY s3_region: us-east-1 type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 schedules: - cron_expression: 0 6 * * ? id: daily-full-backup @@ -3756,7 +3802,6 @@ definitions: host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -3770,7 +3815,6 @@ definitions: host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -3780,6 +3824,219 @@ definitions: required: - database_name - nodes + DatabaseSummary: + title: DatabaseSummary + type: object + properties: + created_at: + type: string + description: The time that the database was created. + example: "2025-01-01T01:30:00Z" + format: date-time + id: + type: string + description: Unique identifier for the database. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + instances: + type: array + items: + $ref: '#/definitions/Instance' + description: All of the instances in the database. + example: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + state: + type: string + description: Current state of the database. + example: deleting + enum: + - creating + - modifying + - available + - deleting + - degraded + - failed + - backing_up + - restoring + - unknown + tenant_id: + type: string + description: Unique identifier for the database's owner. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + updated_at: + type: string + description: The time that the database was last updated. + example: "2025-01-01T02:30:00Z" + format: date-time + example: + created_at: "2025-01-01T01:30:00Z" + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + state: restoring + tenant_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + updated_at: "2025-01-01T02:30:00Z" + required: + - id + - created_at + - updated_at + - state DatabaseUserSpec: title: DatabaseUserSpec type: object @@ -3788,7 +4045,7 @@ definitions: type: array items: type: string - example: Non atque. + example: Voluptatem autem quis praesentium ab fugit. description: The attributes to assign to this database user. example: - LOGIN @@ -3808,7 +4065,7 @@ definitions: type: array items: type: string - example: Non modi explicabo illum alias qui. + example: Dolores rerum soluta aliquam neque. description: The roles to assign to this database user. example: - pgedge_superuser @@ -3853,7 +4110,7 @@ definitions: type: array items: type: string - example: Aliquid cupiditate sapiente eos aut dignissimos cum. + example: Nobis velit fugiat rerum dicta optio. description: Optional network-scoped aliases for the container. example: - pg-db @@ -3866,7 +4123,7 @@ definitions: com.docker.network.endpoint.expose: "true" additionalProperties: type: string - example: Modi consequatur non at. + example: Voluptas enim maiores sint voluptatibus earum. id: type: string description: The name or ID of the network to connect to. @@ -3914,7 +4171,7 @@ definitions: type: boolean description: If true, skip the health validations that prevent running failover on a healthy cluster. default: false - example: false + example: true example: candidate_instance_id: 68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi skip_validation: true @@ -4041,19 +4298,7 @@ definitions: orchestrator: swarm status: components: - Eveniet possimus dicta laudantium.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Repellendus in doloremque.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Rerum exercitationem laborum dignissimos incidunt in quas.: + Id dolorem rerum labore commodi.: details: alarms: - '3: NOSPACE' @@ -4105,101 +4350,49 @@ definitions: type: object description: The status of each component of the host. example: - Quis excepturi blanditiis.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Ut at aut neque tenetur.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - additionalProperties: - $ref: '#/definitions/ComponentStatus' - state: - type: string - example: available - enum: - - healthy - - unreachable - - degraded - - unknown - updated_at: - type: string - description: The last time the host status was updated. - example: "2021-07-01T12:34:56Z" - format: date-time - example: - components: - Deleniti est voluptatibus minima accusamus impedit.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - state: available - updated_at: "2021-07-01T12:34:56Z" - required: - - state - - updated_at - - components - InstanceConnectionInfo: - title: InstanceConnectionInfo - type: object - properties: - hostname: - type: string - description: The hostname of the host that's running this instance. - example: i-0123456789abcdef.ec2.internal - ipv4_address: - type: string - description: The IPv4 address of the host that's running this instance. - example: 10.24.34.2 - format: ipv4 - port: - type: integer - description: The host port that Postgres is listening on for this instance. - example: 5432 - format: int64 - description: Connection information for a pgEdge instance. - example: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - InstancePostgresStatus: - title: InstancePostgresStatus - type: object - properties: - patroni_paused: - type: boolean - description: True if Patroni is paused for this instance. - example: false - patroni_state: - type: string - example: unknown - pending_restart: - type: boolean - description: True if this instance has a pending restart from a configuration change. - example: false - role: + Id vero suscipit fugiat dignissimos modi accusamus.: + details: + alarms: + - '3: NOSPACE' + error: failed to connect to etcd + healthy: false + Itaque cum ut pariatur tenetur est.: + details: + alarms: + - '3: NOSPACE' + error: failed to connect to etcd + healthy: false + additionalProperties: + $ref: '#/definitions/ComponentStatus' + state: type: string - example: primary - version: + example: available + enum: + - healthy + - unreachable + - degraded + - unknown + updated_at: type: string - description: The version of Postgres for this instance. - example: "18.1" - description: Postgres status information for a pgEdge instance. + description: The last time the host status was updated. + example: "2021-07-01T12:34:56Z" + format: date-time example: - patroni_paused: false - patroni_state: unknown - pending_restart: true - role: primary - version: "18.1" - InstanceResponseBody: - title: 'Mediatype identifier: instance; view=default' + components: + Ex molestiae corporis rem consequuntur.: + details: + alarms: + - '3: NOSPACE' + error: failed to connect to etcd + healthy: false + state: available + updated_at: "2021-07-01T12:34:56Z" + required: + - state + - updated_at + - components + Instance: + title: Instance type: object properties: connection_info: @@ -4207,7 +4400,7 @@ definitions: created_at: type: string description: The time that the instance was created. - example: "1989-11-23T15:19:47Z" + example: "1976-12-13T20:14:34Z" format: date-time error: type: string @@ -4244,26 +4437,26 @@ definitions: status_updated_at: type: string description: The time that the instance status information was last updated. - example: "1980-12-18T10:07:58Z" + example: "1987-04-19T13:01:14Z" format: date-time updated_at: type: string description: The time that the instance was last modified. - example: "1985-09-02T23:18:20Z" + example: "1973-03-16T16:27:18Z" format: date-time - description: An instance of pgEdge Postgres running on a host. (default view) + description: An instance of pgEdge Postgres running on a host. example: connection_info: hostname: i-0123456789abcdef.ec2.internal ipv4_address: 10.24.34.2 port: 5432 - created_at: "2013-05-17T03:08:23Z" + created_at: "2008-03-04T09:05:33Z" error: 'failed to get patroni status: connection refused' host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d node_name: n1 postgres: - patroni_paused: true + patroni_paused: false patroni_state: unknown pending_restart: true role: primary @@ -4281,9 +4474,9 @@ definitions: provider_node: n2 status: down version: 4.10.0 - state: stopped - status_updated_at: "1999-08-04T13:18:37Z" - updated_at: "2001-08-17T01:21:22Z" + state: creating + status_updated_at: "2015-10-23T15:00:04Z" + updated_at: "1988-08-03T13:14:18Z" required: - id - host_id @@ -4291,245 +4484,58 @@ definitions: - created_at - updated_at - state - InstanceResponseBodyAbbreviated: - title: 'Mediatype identifier: instance; view=default' + InstanceConnectionInfo: + title: InstanceConnectionInfo type: object properties: - host_id: + hostname: type: string - description: The ID of the host this instance is running on. - example: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: + description: The hostname of the host that's running this instance. + example: i-0123456789abcdef.ec2.internal + ipv4_address: type: string - description: Unique identifier for the instance. - example: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: + description: The IPv4 address of the host that's running this instance. + example: 10.24.34.2 + format: ipv4 + port: + type: integer + description: The host port that Postgres is listening on for this instance. + example: 5432 + format: int64 + description: Connection information for a pgEdge instance. + example: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + InstancePostgresStatus: + title: InstancePostgresStatus + type: object + properties: + patroni_paused: + type: boolean + description: True if Patroni is paused for this instance. + example: false + patroni_state: type: string - description: The Spock node name for this instance. - example: n1 - state: + example: unknown + pending_restart: + type: boolean + description: True if this instance has a pending restart from a configuration change. + example: true + role: type: string - example: available - enum: - - creating - - modifying - - backing_up - - available - - degraded - - failed - - stopped - - unknown - description: An instance of pgEdge Postgres running on a host. (abbreviated view) (default view) - example: - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - state: backing_up - required: - - id - - host_id - - node_name - - state - InstanceResponseBodyAbbreviatedCollection: - title: 'Mediatype identifier: instance; type=collection; view=default' - type: array - items: - $ref: '#/definitions/InstanceResponseBodyAbbreviated' - description: InstanceResponseBodyAbbreviatedCollection is the result type for an array of InstanceResponseBodyAbbreviated (default view) - example: - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1978-12-28T17:33:35Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: true - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: modifying - status_updated_at: "2001-10-17T14:50:56Z" - updated_at: "2013-05-14T14:25:56Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1978-12-28T17:33:35Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: true - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: modifying - status_updated_at: "2001-10-17T14:50:56Z" - updated_at: "2013-05-14T14:25:56Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1978-12-28T17:33:35Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: true - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: modifying - status_updated_at: "2001-10-17T14:50:56Z" - updated_at: "2013-05-14T14:25:56Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1978-12-28T17:33:35Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: true - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: modifying - status_updated_at: "2001-10-17T14:50:56Z" - updated_at: "2013-05-14T14:25:56Z" - InstanceResponseBodyCollection: - title: 'Mediatype identifier: instance; type=collection; view=default' - type: array - items: - $ref: '#/definitions/InstanceResponseBody' - description: InstanceCollectionResponseBody is the result type for an array of InstanceResponseBody (default view) + example: primary + version: + type: string + description: The version of Postgres for this instance. + example: "18.1" + description: Postgres status information for a pgEdge instance. example: - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1978-12-28T17:33:35Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: true - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: modifying - status_updated_at: "2001-10-17T14:50:56Z" - updated_at: "2013-05-14T14:25:56Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1978-12-28T17:33:35Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: true - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: modifying - status_updated_at: "2001-10-17T14:50:56Z" - updated_at: "2013-05-14T14:25:56Z" + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" InstanceSpockStatus: title: InstanceSpockStatus type: object @@ -4570,6 +4576,12 @@ definitions: - name: sub_n1n2 provider_node: n2 status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down version: 4.10.0 InstanceSubscription: title: InstanceSubscription @@ -4622,22 +4634,6 @@ definitions: status: completed task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 type: create - - completed_at: "2025-06-18T16:52:35Z" - created_at: "2025-06-18T16:52:05Z" - database_id: storefront - entity_id: storefront - scope: database - status: completed - task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 - type: create - - completed_at: "2025-06-18T16:52:35Z" - created_at: "2025-06-18T16:52:05Z" - database_id: storefront - entity_id: storefront - scope: database - status: completed - task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 - type: create example: tasks: - completed_at: "2025-06-18T17:54:36Z" @@ -4673,6 +4669,450 @@ definitions: status: completed task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 type: create + ListDatabasesResponse: + title: ListDatabasesResponse + type: object + properties: + databases: + type: array + items: + $ref: '#/definitions/DatabaseSummary' + description: The databases managed by this cluster. + example: + - created_at: "2025-01-01T01:30:00Z" + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + state: restoring + tenant_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + updated_at: "2025-01-01T02:30:00Z" + - created_at: "2025-01-01T01:30:00Z" + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + state: restoring + tenant_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + updated_at: "2025-01-01T02:30:00Z" + - created_at: "2025-01-01T01:30:00Z" + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + state: restoring + tenant_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + updated_at: "2025-01-01T02:30:00Z" + - created_at: "2025-01-01T01:30:00Z" + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + state: restoring + tenant_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + updated_at: "2025-01-01T02:30:00Z" + example: + databases: + - created_at: "2025-06-17T20:05:10Z" + id: inventory + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2025-06-17T20:05:10Z" + host_id: us-east-1 + id: inventory-n1-689qacsi + node_name: n1 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n3 + provider_node: n3 + status: replicating + - name: sub_n1n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-17T20:05:10Z" + - connection_info: + hostname: i-058731542fee493f.ec2.internal + ipv4_address: 10.24.35.2 + port: 5432 + created_at: "2025-06-17T20:05:10Z" + host_id: ap-south-1 + id: inventory-n2-9ptayhma + node_name: n2 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n2n1 + provider_node: n1 + status: replicating + - name: sub_n2n3 + provider_node: n3 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-17T20:05:10Z" + - connection_info: + hostname: i-494027b7b53f6a23.ec2.internal + ipv4_address: 10.24.36.2 + port: 5432 + created_at: "2025-06-17T20:05:10Z" + host_id: eu-central-1 + id: inventory-n3-ant97dj4 + node_name: n3 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n3n1 + provider_node: n1 + status: replicating + - name: sub_n3n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-17T20:05:10Z" + state: available + updated_at: "2025-06-17T20:05:10Z" + - created_at: "2025-06-12T15:10:05Z" + id: storefront + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 6432 + created_at: "2025-06-12T15:10:05Z" + host_id: us-east-1 + id: storefront-n1-689qacsi + node_name: n1 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n3 + provider_node: n3 + status: replicating + - name: sub_n1n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-12T15:10:05Z" + - connection_info: + hostname: i-058731542fee493f.ec2.internal + ipv4_address: 10.24.35.2 + port: 6432 + created_at: "2025-06-12T15:10:05Z" + host_id: ap-south-1 + id: storefront-n2-9ptayhma + node_name: n2 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n2n1 + provider_node: n1 + status: replicating + - name: sub_n2n3 + provider_node: n3 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-12T15:10:05Z" + - connection_info: + hostname: i-494027b7b53f6a23.ec2.internal + ipv4_address: 10.24.36.2 + port: 6432 + created_at: "2025-06-12T15:10:05Z" + host_id: eu-central-1 + id: storefront-n3-ant97dj4 + node_name: n3 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n3n1 + provider_node: n1 + status: replicating + - name: sub_n3n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-12T15:10:05Z" + state: available + updated_at: "2025-06-12T15:10:05Z" ListHostTasksResponse: title: ListHostTasksResponse type: object @@ -4735,19 +5175,7 @@ definitions: orchestrator: swarm status: components: - Eveniet possimus dicta laudantium.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Repellendus in doloremque.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Rerum exercitationem laborum dignissimos incidunt in quas.: + Id dolorem rerum labore commodi.: details: alarms: - '3: NOSPACE' @@ -4760,6 +5188,10 @@ definitions: spock_version: "5" - postgres_version: "17.6" spock_version: "5" + - postgres_version: "17.6" + spock_version: "5" + - postgres_version: "17.6" + spock_version: "5" - cohort: control_available: true member_id: lah4bsznw6kc0hp7biylmmmll @@ -4777,19 +5209,7 @@ definitions: orchestrator: swarm status: components: - Eveniet possimus dicta laudantium.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Repellendus in doloremque.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Rerum exercitationem laborum dignissimos incidunt in quas.: + Id dolorem rerum labore commodi.: details: alarms: - '3: NOSPACE' @@ -4802,6 +5222,10 @@ definitions: spock_version: "5" - postgres_version: "17.6" spock_version: "5" + - postgres_version: "17.6" + spock_version: "5" + - postgres_version: "17.6" + spock_version: "5" - cohort: control_available: true member_id: lah4bsznw6kc0hp7biylmmmll @@ -4819,19 +5243,7 @@ definitions: orchestrator: swarm status: components: - Eveniet possimus dicta laudantium.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Repellendus in doloremque.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Rerum exercitationem laborum dignissimos incidunt in quas.: + Id dolorem rerum labore commodi.: details: alarms: - '3: NOSPACE' @@ -4844,6 +5256,10 @@ definitions: spock_version: "5" - postgres_version: "17.6" spock_version: "5" + - postgres_version: "17.6" + spock_version: "5" + - postgres_version: "17.6" + spock_version: "5" - cohort: control_available: true member_id: lah4bsznw6kc0hp7biylmmmll @@ -4854,26 +5270,14 @@ definitions: postgres_version: "17.6" spock_version: "5" etcd_mode: server - hostname: i-0123456789abcdef.ec2.internal - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - ipv4_address: 10.24.34.2 - memory: 16GiB - orchestrator: swarm - status: - components: - Eveniet possimus dicta laudantium.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Repellendus in doloremque.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Rerum exercitationem laborum dignissimos incidunt in quas.: + hostname: i-0123456789abcdef.ec2.internal + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + ipv4_address: 10.24.34.2 + memory: 16GiB + orchestrator: swarm + status: + components: + Id dolorem rerum labore commodi.: details: alarms: - '3: NOSPACE' @@ -4886,6 +5290,10 @@ definitions: spock_version: "5" - postgres_version: "17.6" spock_version: "5" + - postgres_version: "17.6" + spock_version: "5" + - postgres_version: "17.6" + spock_version: "5" example: hosts: - cohort: @@ -4996,6 +5404,14 @@ definitions: status: completed task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 type: create + - completed_at: "2025-06-18T16:52:35Z" + created_at: "2025-06-18T16:52:05Z" + database_id: storefront + entity_id: storefront + scope: database + status: completed + task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 + type: create example: tasks: - completed_at: "2025-06-18T17:54:36Z" @@ -5015,49 +5431,6 @@ definitions: status: completed task_id: 0197842d-9082-7496-b787-77bd2e11809f type: remove_host - Listdatabasesresponse: - title: 'Mediatype identifier: listdatabasesresponse; view=default' - type: object - properties: - databases: - $ref: '#/definitions/DatabaseResponseBodyAbbreviatedCollection' - description: List-DatabasesResponseBody result type (default view) - example: - databases: - - created_at: "2025-06-17T20:05:10Z" - id: inventory - instances: - - host_id: us-east-1 - id: inventory-n1-689qacsi - node_name: n1 - state: available - - host_id: ap-south-1 - id: inventory-n2-9ptayhma - node_name: n2 - state: available - - host_id: eu-central-1 - id: inventory-n3-ant97dj4 - node_name: n3 - state: available - state: available - updated_at: "2025-06-17T20:05:10Z" - - created_at: "2025-06-17T20:05:10Z" - id: storefront - instances: - - host_id: us-east-1 - id: storefront-n1-689qacsi - node_name: n1 - state: available - - host_id: ap-south-1 - id: storefront-n2-9ptayhma - node_name: n2 - state: available - - host_id: eu-central-1 - id: storefront-n3-ant97dj4 - node_name: n3 - state: available - state: available - updated_at: "2025-06-12T15:10:05Z" OrchestratorOpts: title: OrchestratorOpts type: object @@ -5206,6 +5579,14 @@ definitions: status: completed task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 type: create + - completed_at: "2025-06-18T16:52:35Z" + created_at: "2025-06-18T16:52:05Z" + database_id: storefront + entity_id: storefront + scope: database + status: completed + task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 + type: create required: - task - update_database_tasks @@ -5242,7 +5623,7 @@ definitions: maxLength: 32 additionalProperties: type: string - example: Minus dolore eos et sunt culpa animi. + example: Dolor rem. source_database_id: type: string description: The ID of the database to restore this database from. @@ -5301,7 +5682,7 @@ definitions: type: array items: type: string - example: Nihil qui non quae sint ea. + example: Ratione asperiores iusto nostrum commodi quidem occaecati. description: The nodes to restore. Defaults to all nodes if empty or unspecified. example: - n1 @@ -5346,6 +5727,14 @@ definitions: status: completed task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 type: create + - completed_at: "2025-06-18T16:52:35Z" + created_at: "2025-06-18T16:52:05Z" + database_id: storefront + entity_id: storefront + scope: database + status: completed + task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 + type: create task: $ref: '#/definitions/Task' example: @@ -5522,7 +5911,7 @@ definitions: s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab additionalProperties: type: string - example: Doloribus rem culpa. + example: Quos dolorem tempore ut qui ratione repellat. gcs_bucket: type: string description: The GCS bucket name for this repository. Only applies when type = 'gcs'. @@ -5604,6 +5993,95 @@ definitions: type: s3 required: - type + ServiceInstance: + title: ServiceInstance + type: object + properties: + created_at: + type: string + description: The time that the service instance was created. + example: "2025-01-28T10:00:00Z" + format: date-time + database_id: + type: string + description: The ID of the database this service belongs to. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + error: + type: string + description: An error message if the service instance is in an error state. + example: 'failed to start container: image not found' + host_id: + type: string + description: The ID of the host this service instance is running on. + example: host-1 + service_id: + type: string + description: The service ID from the DatabaseSpec. + example: mcp-server + service_instance_id: + type: string + description: Unique identifier for the service instance. + example: mcp-server-host-1 + state: + type: string + description: Current state of the service instance. + example: running + enum: + - creating + - running + - failed + - deleting + status: + $ref: '#/definitions/ServiceInstanceStatus' + updated_at: + type: string + description: The time that the service instance was last updated. + example: "2025-01-28T10:05:00Z" + format: date-time + description: A service instance running on a host alongside the database. + example: + created_at: "2025-01-28T10:00:00Z" + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + error: 'failed to start container: image not found' + host_id: host-1 + service_id: mcp-server + service_instance_id: mcp-server-host-1 + state: running + status: + container_id: a1b2c3d4e5f6 + health_check: + checked_at: "2025-01-28T10:00:00Z" + message: Connection refused + status: healthy + hostname: mcp-server-host-1.internal + image_version: 1.0.0 + ipv4_address: 10.0.1.5 + last_health_at: "2025-01-28T10:00:00Z" + ports: + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + service_ready: true + updated_at: "2025-01-28T10:05:00Z" + required: + - service_instance_id + - service_id + - database_id + - host_id + - state + - created_at + - updated_at ServiceInstanceStatus: title: ServiceInstanceStatus type: object @@ -5644,6 +6122,9 @@ definitions: - container_port: 8080 host_port: 8080 name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client service_ready: type: boolean description: Whether the service is ready to accept requests. @@ -5666,12 +6147,6 @@ definitions: - container_port: 8080 host_port: 8080 name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client service_ready: true ServiceSpec: title: ServiceSpec @@ -5701,7 +6176,6 @@ definitions: example: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 minItems: 1 memory: type: string @@ -5752,198 +6226,6 @@ definitions: - version - host_ids - config - ServiceinstanceResponseBody: - title: 'Mediatype identifier: serviceinstance; view=default' - type: object - properties: - created_at: - type: string - description: The time that the service instance was created. - example: "2025-01-28T10:00:00Z" - format: date-time - database_id: - type: string - description: The ID of the database this service belongs to. - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - error: - type: string - description: An error message if the service instance is in an error state. - example: 'failed to start container: image not found' - host_id: - type: string - description: The ID of the host this service instance is running on. - example: host-1 - service_id: - type: string - description: The service ID from the DatabaseSpec. - example: mcp-server - service_instance_id: - type: string - description: Unique identifier for the service instance. - example: mcp-server-host-1 - state: - type: string - description: Current state of the service instance. - example: running - enum: - - creating - - running - - failed - - deleting - status: - $ref: '#/definitions/ServiceInstanceStatus' - updated_at: - type: string - description: The time that the service instance was last updated. - example: "2025-01-28T10:05:00Z" - format: date-time - description: A service instance running on a host alongside the database. (default view) - example: - created_at: "2025-01-28T10:00:00Z" - database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" - required: - - service_instance_id - - service_id - - database_id - - host_id - - state - - created_at - - updated_at - ServiceinstanceResponseBodyCollection: - title: 'Mediatype identifier: serviceinstance; type=collection; view=default' - type: array - items: - $ref: '#/definitions/ServiceinstanceResponseBody' - description: ServiceinstanceCollectionResponseBody is the result type for an array of ServiceinstanceResponseBody (default view) - example: - - created_at: "2025-01-28T10:00:00Z" - database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" - - created_at: "2025-01-28T10:00:00Z" - database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" - - created_at: "2025-01-28T10:00:00Z" - database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" StartInstanceResponse: title: StartInstanceResponse type: object @@ -5990,7 +6272,7 @@ definitions: traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) additionalProperties: type: string - example: Possimus error eligendi recusandae. + example: Reprehenderit error. extra_networks: type: array items: @@ -6190,11 +6472,6 @@ definitions: status: creating message: task started timestamp: "2025-05-29T15:43:13Z" - - fields: - option.enabled: true - status: creating - message: task started - timestamp: "2025-05-29T15:43:13Z" last_entry_id: type: string description: The ID of the last entry in the task log. @@ -6306,7 +6583,7 @@ definitions: $ref: '#/definitions/DatabaseSpec' tenant_id: type: string - description: Unique identifier for the databases's owner. + description: Unique identifier for the database's owner. example: 76f9b8c0-4958-11f0-a489-3bb29577c696 minLength: 1 maxLength: 63 diff --git a/api/apiv1/gen/http/openapi3.json b/api/apiv1/gen/http/openapi3.json index 0ac9db13..3ed5a502 100644 --- a/api/apiv1/gen/http/openapi3.json +++ b/api/apiv1/gen/http/openapi3.json @@ -149,7 +149,7 @@ ], "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", "status": { - "state": "error" + "state": "available" } } } @@ -434,7 +434,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Listdatabasesresponse" + "$ref": "#/components/schemas/ListDatabasesResponse" }, "example": { "databases": [ @@ -443,48 +443,222 @@ "id": "inventory", "instances": [ { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2025-06-17T20:05:10Z", "host_id": "us-east-1", "id": "inventory-n1-689qacsi", "node_name": "n1", - "state": "available" + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n3", + "provider_node": "n3", + "status": "replicating" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-17T20:05:10Z" }, { + "connection_info": { + "hostname": "i-058731542fee493f.ec2.internal", + "ipv4_address": "10.24.35.2", + "port": 5432 + }, + "created_at": "2025-06-17T20:05:10Z", "host_id": "ap-south-1", "id": "inventory-n2-9ptayhma", "node_name": "n2", - "state": "available" + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n2n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n2n3", + "provider_node": "n3", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-17T20:05:10Z" }, { + "connection_info": { + "hostname": "i-494027b7b53f6a23.ec2.internal", + "ipv4_address": "10.24.36.2", + "port": 5432 + }, + "created_at": "2025-06-17T20:05:10Z", "host_id": "eu-central-1", "id": "inventory-n3-ant97dj4", "node_name": "n3", - "state": "available" + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n3n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n3n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-17T20:05:10Z" } ], "state": "available", "updated_at": "2025-06-17T20:05:10Z" }, { - "created_at": "2025-06-17T20:05:10Z", + "created_at": "2025-06-12T15:10:05Z", "id": "storefront", "instances": [ { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 6432 + }, + "created_at": "2025-06-12T15:10:05Z", "host_id": "us-east-1", "id": "storefront-n1-689qacsi", "node_name": "n1", - "state": "available" + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n3", + "provider_node": "n3", + "status": "replicating" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-12T15:10:05Z" }, { + "connection_info": { + "hostname": "i-058731542fee493f.ec2.internal", + "ipv4_address": "10.24.35.2", + "port": 6432 + }, + "created_at": "2025-06-12T15:10:05Z", "host_id": "ap-south-1", "id": "storefront-n2-9ptayhma", "node_name": "n2", - "state": "available" + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n2n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n2n3", + "provider_node": "n3", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-12T15:10:05Z" }, { + "connection_info": { + "hostname": "i-494027b7b53f6a23.ec2.internal", + "ipv4_address": "10.24.36.2", + "port": 6432 + }, + "created_at": "2025-06-12T15:10:05Z", "host_id": "eu-central-1", "id": "storefront-n3-ant97dj4", "node_name": "n3", - "state": "available" + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n3n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n3n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-12T15:10:05Z" } ], "state": "available", @@ -931,7 +1105,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateDatabaseResponse" + "$ref": "#/components/schemas/CreateDatabaseResponse2" }, "example": { "database": { @@ -1176,7 +1350,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ControlPlaneGetDatabaseResponseBody" + "$ref": "#/components/schemas/Database3" }, "example": { "created_at": "2025-06-18T16:52:05Z", @@ -1418,19 +1592,21 @@ "type": "array", "items": { "type": "string", - "example": "Et architecto." + "example": "Deserunt earum doloribus eos et error vel." }, "description": "Host IDs to treat as removed during this update. Events targeting these hosts will be skipped.", "example": [ - "Fuga qui id libero dignissimos.", - "Est numquam perspiciatis." + "Recusandae aspernatur non sit aliquam dolor quam.", + "Tempore veniam et.", + "Dignissimos voluptatem soluta veritatis repellat est rerum.", + "Inventore modi explicabo dicta sint." ] }, "example": [ - "Sequi saepe velit.", - "Ex sint dolorum vel.", - "Laboriosam aut dolorum est.", - "Consequatur mollitia illo delectus dolorum aut ducimus." + "Et animi magnam velit vitae praesentium ad.", + "Eos pariatur nobis hic.", + "Et consectetur eius temporibus.", + "Porro ut placeat non ut." ] }, { @@ -1578,7 +1754,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateDatabaseResponse" + "$ref": "#/components/schemas/UpdateDatabaseResponse2" }, "example": { "database": { @@ -2426,7 +2602,7 @@ }, "example": { "candidate_instance_id": "68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi", - "skip_validation": true + "skip_validation": false } } } @@ -2728,7 +2904,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RestoreDatabaseResponse" + "$ref": "#/components/schemas/RestoreDatabaseResponse2" }, "example": { "database": { @@ -4036,25 +4212,7 @@ "orchestrator": "swarm", "status": { "components": { - "Eveniet possimus dicta laudantium.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Repellendus in doloremque.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Rerum exercitationem laborum dignissimos incidunt in quas.": { + "Id dolorem rerum labore commodi.": { "details": { "alarms": [ "3: NOSPACE" @@ -5021,29 +5179,6 @@ }, "example": { "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, { "azure_account": "pgedge-backups", "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", @@ -5121,7 +5256,7 @@ }, "additionalProperties": { "type": "string", - "example": "Ut dolor dolorem impedit." + "example": "Nobis explicabo eum dolores quae." } }, "backup_options": { @@ -5132,7 +5267,7 @@ }, "additionalProperties": { "type": "string", - "example": "Et quia commodi consequatur ex possimus." + "example": "Molestiae neque." } }, "type": { @@ -5204,7 +5339,7 @@ }, "additionalProperties": { "type": "string", - "example": "Aut facere eius." + "example": "Ipsum officiis et est et dolorem labore." } }, "gcs_bucket": { @@ -5882,181 +6017,39 @@ "healthy" ] }, - "ControlPlaneGetDatabaseResponseBody": { + "CreateDatabaseRequest": { "type": "object", "properties": { - "created_at": { - "type": "string", - "description": "The time that the database was created.", - "example": "2025-01-01T01:30:00Z", - "format": "date-time" - }, "id": { "type": "string", - "description": "Unique identifier for the database.", + "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", "minLength": 1, "maxLength": 63 }, - "instances": { - "$ref": "#/components/schemas/InstanceResponseBodyCollection" - }, - "service_instances": { - "$ref": "#/components/schemas/ServiceinstanceResponseBodyCollection" - }, "spec": { - "$ref": "#/components/schemas/DatabaseSpec3" - }, - "state": { - "type": "string", - "description": "Current state of the database.", - "example": "creating", - "enum": [ - "creating", - "modifying", - "available", - "deleting", - "degraded", - "failed", - "backing_up", - "restoring", - "unknown" - ] + "$ref": "#/components/schemas/DatabaseSpec" }, "tenant_id": { "type": "string", - "description": "Unique identifier for the database.", + "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", "minLength": 1, "maxLength": 63 - }, - "updated_at": { - "type": "string", - "description": "The time that the database was last updated.", - "example": "2025-01-01T02:30:00Z", - "format": "date-time" } }, - "description": "Get-DatabaseResponseBody result type (default view)", "example": { - "created_at": "2025-06-18T16:52:05Z", "id": "storefront", - "instances": [ - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "2025-06-18T16:52:22Z", - "host_id": "us-east-1", - "id": "storefront-n1-689qacsi", - "node_name": "n1", - "postgres": { - "patroni_state": "running", - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n3", - "provider_node": "n3", - "status": "replicating" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "replicating" - } - ], - "version": "4.0.10" - }, - "state": "available", - "status_updated_at": "2025-06-18T17:58:56Z", - "updated_at": "2025-06-18T17:54:36Z" - }, - { - "connection_info": { - "hostname": "i-058731542fee493f.ec2.internal", - "ipv4_address": "10.24.35.2", - "port": 5432 - }, - "created_at": "2025-06-18T16:52:22Z", - "host_id": "ap-south-1", - "id": "storefront-n2-9ptayhma", - "node_name": "n2", - "postgres": { - "patroni_state": "running", - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n2n1", - "provider_node": "n1", - "status": "replicating" - }, - { - "name": "sub_n2n3", - "provider_node": "n3", - "status": "replicating" - } - ], - "version": "4.0.10" - }, - "state": "available", - "status_updated_at": "2025-06-18T17:58:56Z", - "updated_at": "2025-06-18T17:54:01Z" - }, - { - "connection_info": { - "hostname": "i-494027b7b53f6a23.ec2.internal", - "ipv4_address": "10.24.36.2", - "port": 5432 - }, - "created_at": "2025-06-18T16:52:22Z", - "host_id": "eu-central-1", - "id": "storefront-n3-ant97dj4", - "node_name": "n3", - "postgres": { - "patroni_state": "running", - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n3n1", - "provider_node": "n1", - "status": "replicating" - }, - { - "name": "sub_n3n2", - "provider_node": "n2", - "status": "replicating" - } - ], - "version": "4.0.10" - }, - "state": "available", - "status_updated_at": "2025-06-18T17:58:56Z", - "updated_at": "2025-06-18T17:54:01Z" - } - ], "spec": { "database_name": "storefront", "database_users": [ { "attributes": [ - "SUPERUSER", - "LOGIN" + "LOGIN", + "SUPERUSER" ], "db_owner": true, + "password": "password", "username": "admin" } ], @@ -6081,37 +6074,31 @@ } ], "port": 5432, - "postgres_version": "17.6", - "spock_version": "5" - }, - "state": "restoring", - "updated_at": "2025-06-18T17:58:59Z" + "postgresql_conf": { + "max_connections": 5000 + } + } }, "required": [ - "id", - "created_at", - "updated_at", - "state", - "instances", - "service_instances" + "spec" ] }, - "CreateDatabaseRequest": { + "CreateDatabaseRequest2": { "type": "object", "properties": { "id": { "type": "string", - "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", + "description": "Unique identifier for the database.", "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", "minLength": 1, "maxLength": 63 }, "spec": { - "$ref": "#/components/schemas/DatabaseSpec" + "$ref": "#/components/schemas/DatabaseSpec2" }, "tenant_id": { "type": "string", - "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", + "description": "Unique identifier for the database's owner.", "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", "minLength": 1, "maxLength": 63 @@ -6162,77 +6149,77 @@ "spec" ] }, - "CreateDatabaseRequest2": { + "CreateDatabaseResponse": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "Unique identifier for the database.", - "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "minLength": 1, - "maxLength": 63 - }, - "spec": { - "$ref": "#/components/schemas/DatabaseSpec2" + "database": { + "$ref": "#/components/schemas/Database" }, - "tenant_id": { - "type": "string", - "description": "Unique identifier for the databases's owner.", - "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "minLength": 1, - "maxLength": 63 + "task": { + "$ref": "#/components/schemas/Task" } }, "example": { - "id": "storefront", - "spec": { - "database_name": "storefront", - "database_users": [ - { - "attributes": [ - "LOGIN", - "SUPERUSER" - ], - "db_owner": true, - "password": "password", - "username": "admin" - } - ], - "nodes": [ - { - "host_ids": [ - "us-east-1" - ], - "name": "n1" - }, - { - "host_ids": [ - "ap-south-1" - ], - "name": "n2" - }, - { - "host_ids": [ - "eu-central-1" - ], - "name": "n3" - } - ], - "port": 5432, - "postgresql_conf": { - "max_connections": 5000 - } + "database": { + "created_at": "2025-06-18T16:52:05Z", + "id": "storefront", + "spec": { + "database_name": "storefront", + "database_users": [ + { + "attributes": [ + "SUPERUSER", + "LOGIN" + ], + "db_owner": true, + "username": "admin" + } + ], + "nodes": [ + { + "host_ids": [ + "us-east-1" + ], + "name": "n1" + }, + { + "host_ids": [ + "ap-south-1" + ], + "name": "n2" + }, + { + "host_ids": [ + "eu-central-1" + ], + "name": "n3" + } + ], + "port": 5432, + "postgres_version": "17.6", + "spock_version": "5" + }, + "state": "creating", + "updated_at": "2025-06-18T16:52:05Z" + }, + "task": { + "created_at": "2025-06-18T16:52:05Z", + "database_id": "storefront", + "status": "pending", + "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", + "type": "create" } }, "required": [ - "spec" + "task", + "database" ] }, - "CreateDatabaseResponse": { + "CreateDatabaseResponse2": { "type": "object", "properties": { "database": { - "$ref": "#/components/schemas/Database" + "$ref": "#/components/schemas/Database2" }, "task": { "$ref": "#/components/schemas/Task" @@ -6311,712 +6298,115 @@ "maxLength": 63 }, "instances": { - "$ref": "#/components/schemas/InstanceCollection" - }, - "service_instances": { - "$ref": "#/components/schemas/ServiceinstanceCollection" - }, - "spec": { - "$ref": "#/components/schemas/DatabaseSpec" - }, - "state": { - "type": "string", - "description": "Current state of the database.", - "example": "restoring", - "enum": [ - "creating", - "modifying", - "available", - "deleting", - "degraded", - "failed", - "backing_up", - "restoring", - "unknown" - ] - }, - "tenant_id": { - "type": "string", - "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", - "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "minLength": 1, - "maxLength": 63 - }, - "updated_at": { - "type": "string", - "description": "The time that the database was last updated.", - "example": "2025-01-01T02:30:00Z", - "format": "date-time" - } - }, - "example": { - "created_at": "2025-01-01T01:30:00Z", - "id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "instances": [ - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1987-03-24T21:22:02Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": false, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" + "type": "array", + "items": { + "$ref": "#/components/schemas/Instance" }, - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1987-03-24T21:22:02Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": false, - "role": "primary", - "version": "18.1" + "description": "All of the instances in the database.", + "example": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "1970-10-16T01:30:13Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" - }, - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1987-03-24T21:22:02Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": false, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" - }, - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1987-03-24T21:22:02Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": false, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" - } - ], - "service_instances": [ - { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "production", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", - "service_instance_id": "mcp-server-host-1", - "state": "running", - "status": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" - }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ], - "service_ready": true - }, - "updated_at": "2025-01-28T10:05:00Z" - }, - { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "production", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", - "service_instance_id": "mcp-server-host-1", - "state": "running", - "status": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" - }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ], - "service_ready": true - }, - "updated_at": "2025-01-28T10:05:00Z" - }, - { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "production", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", - "service_instance_id": "mcp-server-host-1", - "state": "running", - "status": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" - }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ], - "service_ready": true - }, - "updated_at": "2025-01-28T10:05:00Z" - } - ], - "spec": { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "created_at": "1970-10-16T01:30:13Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] - }, - "cpus": "500m", - "database_name": "northwind", - "database_users": [ - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - } - ], - "memory": "500M", - "nodes": [ - { - "backup_config": { - "repositories": [ + "spock": { + "read_only": "off", + "subscriptions": [ { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" }, { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" }, { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" } - ] + ], + "version": "4.10.0" }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 - }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "source_database_name": "northwind", - "source_node_name": "n1" - }, - "source_node": "n1" - } - ], - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 - }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "source_database_name": "northwind", - "source_node_name": "n1" - }, - "services": [ - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - } - ], - "spock_version": "5" - }, - "state": "restoring", - "tenant_id": "8210ec10-2dca-406c-ac4a-0661d2189954", - "updated_at": "2025-01-01T02:30:00Z" - }, - "required": [ - "id", - "created_at", - "updated_at", - "state", - "instances", - "service_instances" - ] - }, - "DatabaseCollection": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Database" - }, - "example": [ - { - "created_at": "2025-01-01T01:30:00Z", - "id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "instances": [ { "connection_info": { "hostname": "i-0123456789abcdef.ec2.internal", "ipv4_address": "10.24.34.2", "port": 5432 }, - "created_at": "1987-03-24T21:22:02Z", + "created_at": "1970-10-16T01:30:13Z", "error": "failed to get patroni status: connection refused", "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", @@ -7024,7 +6414,7 @@ "postgres": { "patroni_paused": true, "patroni_state": "unknown", - "pending_restart": false, + "pending_restart": true, "role": "primary", "version": "18.1" }, @@ -7040,35 +6430,7 @@ "name": "sub_n1n2", "provider_node": "n2", "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" - }, - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1987-03-24T21:22:02Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": false, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ + }, { "name": "sub_n1n2", "provider_node": "n2", @@ -7082,9 +6444,9 @@ ], "version": "4.10.0" }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" }, { "connection_info": { @@ -7092,7 +6454,7 @@ "ipv4_address": "10.24.34.2", "port": 5432 }, - "created_at": "1987-03-24T21:22:02Z", + "created_at": "1970-10-16T01:30:13Z", "error": "failed to get patroni status: connection refused", "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", @@ -7100,7 +6462,7 @@ "postgres": { "patroni_paused": true, "patroni_state": "unknown", - "pending_restart": false, + "pending_restart": true, "role": "primary", "version": "18.1" }, @@ -7116,35 +6478,7 @@ "name": "sub_n1n2", "provider_node": "n2", "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" - }, - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1987-03-24T21:22:02Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": false, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ + }, { "name": "sub_n1n2", "provider_node": "n2", @@ -7158,12 +6492,19 @@ ], "version": "4.10.0" }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" } - ], - "service_instances": [ + ] + }, + "service_instances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceInstance" + }, + "description": "Service instances running alongside this database.", + "example": [ { "created_at": "2025-01-28T10:00:00Z", "database_id": "production", @@ -7189,6 +6530,11 @@ "host_port": 8080, "name": "web-client" }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, { "container_port": 8080, "host_port": 8080, @@ -7228,7 +6574,52 @@ "container_port": 8080, "host_port": 8080, "name": "web-client" - } + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + } + ], + "service_ready": true + }, + "updated_at": "2025-01-28T10:05:00Z" + }, + { + "created_at": "2025-01-28T10:00:00Z", + "database_id": "production", + "error": "failed to start container: image not found", + "host_id": "host-1", + "service_id": "mcp-server", + "service_instance_id": "mcp-server-host-1", + "state": "running", + "status": { + "container_id": "a1b2c3d4e5f6", + "health_check": { + "checked_at": "2025-01-28T10:00:00Z", + "message": "Connection refused", + "status": "healthy" + }, + "hostname": "mcp-server-host-1.internal", + "image_version": "1.0.0", + "ipv4_address": "10.0.1.5", + "last_health_at": "2025-01-28T10:00:00Z", + "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + } ], "service_ready": true }, @@ -7259,6 +6650,11 @@ "host_port": 8080, "name": "web-client" }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, { "container_port": 8080, "host_port": 8080, @@ -7269,404 +6665,235 @@ }, "updated_at": "2025-01-28T10:05:00Z" } - ], - "spec": { - "backup_config": { - "repositories": [ + ] + }, + "spec": { + "$ref": "#/components/schemas/DatabaseSpec" + }, + "state": { + "type": "string", + "description": "Current state of the database.", + "example": "backing_up", + "enum": [ + "creating", + "modifying", + "available", + "deleting", + "degraded", + "failed", + "backing_up", + "restoring", + "unknown" + ] + }, + "tenant_id": { + "type": "string", + "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "updated_at": { + "type": "string", + "description": "The time that the database was last updated.", + "example": "2025-01-01T02:30:00Z", + "format": "date-time" + } + }, + "example": { + "created_at": "2025-06-18T16:52:05Z", + "id": "storefront", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "us-east-1", + "id": "storefront-n1-689qacsi", + "node_name": "n1", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" + "name": "sub_n1n3", + "provider_node": "n3", + "status": "replicating" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "replicating" } ], - "schedules": [ + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:36Z" + }, + { + "connection_info": { + "hostname": "i-058731542fee493f.ec2.internal", + "ipv4_address": "10.24.35.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "ap-south-1", + "id": "storefront-n2-9ptayhma", + "node_name": "n2", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "name": "sub_n2n1", + "provider_node": "n1", + "status": "replicating" }, { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "name": "sub_n2n3", + "provider_node": "n3", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:01Z" + }, + { + "connection_info": { + "hostname": "i-494027b7b53f6a23.ec2.internal", + "ipv4_address": "10.24.36.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "eu-central-1", + "id": "storefront-n3-ant97dj4", + "node_name": "n3", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n3n1", + "provider_node": "n1", + "status": "replicating" }, { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "name": "sub_n3n2", + "provider_node": "n2", + "status": "replicating" } - ] + ], + "version": "4.0.10" }, - "cpus": "500m", - "database_name": "northwind", - "database_users": [ - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - } - ], - "memory": "500M", - "nodes": [ - { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 - }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "source_database_name": "northwind", - "source_node_name": "n1" - }, - "source_node": "n1" - } - ], - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:01Z" + } + ], + "spec": { + "database_name": "storefront", + "database_users": [ + { + "attributes": [ + "SUPERUSER", + "LOGIN" + ], + "db_owner": true, + "username": "admin" + } + ], + "nodes": [ + { + "host_ids": [ + "us-east-1" + ], + "name": "n1" }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "source_database_name": "northwind", - "source_node_name": "n1" + { + "host_ids": [ + "ap-south-1" + ], + "name": "n2" }, - "services": [ - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - } - ], - "spock_version": "5" - }, - "state": "creating", - "tenant_id": "8210ec10-2dca-406c-ac4a-0661d2189954", - "updated_at": "2025-01-01T02:30:00Z" + { + "host_ids": [ + "eu-central-1" + ], + "name": "n3" + } + ], + "port": 5432, + "postgres_version": "17.6", + "spock_version": "5" }, - { - "created_at": "2025-01-01T01:30:00Z", - "id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "instances": [ + "state": "restoring", + "updated_at": "2025-06-18T17:58:59Z" + }, + "required": [ + "id", + "created_at", + "updated_at", + "state" + ] + }, + "Database2": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "description": "The time that the database was created.", + "example": "2025-01-01T01:30:00Z", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "Unique identifier for the database.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "instances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Instance" + }, + "description": "All of the instances in the database.", + "example": [ { "connection_info": { "hostname": "i-0123456789abcdef.ec2.internal", "ipv4_address": "10.24.34.2", "port": 5432 }, - "created_at": "1987-03-24T21:22:02Z", + "created_at": "2011-03-15T17:48:48Z", "error": "failed to get patroni status: connection refused", "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", "node_name": "n1", "postgres": { - "patroni_paused": true, + "patroni_paused": false, "patroni_state": "unknown", - "pending_restart": false, + "pending_restart": true, "role": "primary", "version": "18.1" }, @@ -7678,6 +6905,11 @@ "provider_node": "n2", "status": "down" }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, { "name": "sub_n1n2", "provider_node": "n2", @@ -7686,9 +6918,9 @@ ], "version": "4.10.0" }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" }, { "connection_info": { @@ -7696,15 +6928,15 @@ "ipv4_address": "10.24.34.2", "port": 5432 }, - "created_at": "1987-03-24T21:22:02Z", + "created_at": "2011-03-15T17:48:48Z", "error": "failed to get patroni status: connection refused", "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", "node_name": "n1", "postgres": { - "patroni_paused": true, + "patroni_paused": false, "patroni_state": "unknown", - "pending_restart": false, + "pending_restart": true, "role": "primary", "version": "18.1" }, @@ -7716,6 +6948,11 @@ "provider_node": "n2", "status": "down" }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, { "name": "sub_n1n2", "provider_node": "n2", @@ -7724,9 +6961,9 @@ ], "version": "4.10.0" }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" }, { "connection_info": { @@ -7734,15 +6971,15 @@ "ipv4_address": "10.24.34.2", "port": 5432 }, - "created_at": "1987-03-24T21:22:02Z", + "created_at": "2011-03-15T17:48:48Z", "error": "failed to get patroni status: connection refused", "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", "node_name": "n1", "postgres": { - "patroni_paused": true, + "patroni_paused": false, "patroni_state": "unknown", - "pending_restart": false, + "pending_restart": true, "role": "primary", "version": "18.1" }, @@ -7754,6 +6991,11 @@ "provider_node": "n2", "status": "down" }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, { "name": "sub_n1n2", "provider_node": "n2", @@ -7762,9 +7004,9 @@ ], "version": "4.10.0" }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" }, { "connection_info": { @@ -7772,15 +7014,15 @@ "ipv4_address": "10.24.34.2", "port": 5432 }, - "created_at": "1987-03-24T21:22:02Z", + "created_at": "2011-03-15T17:48:48Z", "error": "failed to get patroni status: connection refused", "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", "node_name": "n1", "postgres": { - "patroni_paused": true, + "patroni_paused": false, "patroni_state": "unknown", - "pending_restart": false, + "pending_restart": true, "role": "primary", "version": "18.1" }, @@ -7792,6 +7034,11 @@ "provider_node": "n2", "status": "down" }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, { "name": "sub_n1n2", "provider_node": "n2", @@ -7800,18 +7047,25 @@ ], "version": "4.10.0" }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" } - ], - "service_instances": [ - { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "production", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", + ] + }, + "service_instances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceInstance" + }, + "description": "Service instances running alongside this database.", + "example": [ + { + "created_at": "2025-01-28T10:00:00Z", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "error": "failed to start container: image not found", + "host_id": "host-1", + "service_id": "mcp-server", "service_instance_id": "mcp-server-host-1", "state": "running", "status": { @@ -7826,6 +7080,16 @@ "ipv4_address": "10.0.1.5", "last_health_at": "2025-01-28T10:00:00Z", "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, { "container_port": 8080, "host_port": 8080, @@ -7843,7 +7107,7 @@ }, { "created_at": "2025-01-28T10:00:00Z", - "database_id": "production", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", "error": "failed to start container: image not found", "host_id": "host-1", "service_id": "mcp-server", @@ -7861,6 +7125,16 @@ "ipv4_address": "10.0.1.5", "last_health_at": "2025-01-28T10:00:00Z", "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, { "container_port": 8080, "host_port": 8080, @@ -7878,7 +7152,7 @@ }, { "created_at": "2025-01-28T10:00:00Z", - "database_id": "production", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", "error": "failed to start container: image not found", "host_id": "host-1", "service_id": "mcp-server", @@ -7896,6 +7170,16 @@ "ipv4_address": "10.0.1.5", "last_health_at": "2025-01-28T10:00:00Z", "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, { "container_port": 8080, "host_port": 8080, @@ -7911,404 +7195,235 @@ }, "updated_at": "2025-01-28T10:05:00Z" } - ], - "spec": { - "backup_config": { - "repositories": [ + ] + }, + "spec": { + "$ref": "#/components/schemas/DatabaseSpec3" + }, + "state": { + "type": "string", + "description": "Current state of the database.", + "example": "backing_up", + "enum": [ + "creating", + "modifying", + "available", + "deleting", + "degraded", + "failed", + "backing_up", + "restoring", + "unknown" + ] + }, + "tenant_id": { + "type": "string", + "description": "Unique identifier for the database's owner.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "updated_at": { + "type": "string", + "description": "The time that the database was last updated.", + "example": "2025-01-01T02:30:00Z", + "format": "date-time" + } + }, + "example": { + "created_at": "2025-06-18T16:52:05Z", + "id": "storefront", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "us-east-1", + "id": "storefront-n1-689qacsi", + "node_name": "n1", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" + "name": "sub_n1n3", + "provider_node": "n3", + "status": "replicating" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "replicating" } ], - "schedules": [ + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:36Z" + }, + { + "connection_info": { + "hostname": "i-058731542fee493f.ec2.internal", + "ipv4_address": "10.24.35.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "ap-south-1", + "id": "storefront-n2-9ptayhma", + "node_name": "n2", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "name": "sub_n2n1", + "provider_node": "n1", + "status": "replicating" }, { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "name": "sub_n2n3", + "provider_node": "n3", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:01Z" + }, + { + "connection_info": { + "hostname": "i-494027b7b53f6a23.ec2.internal", + "ipv4_address": "10.24.36.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "eu-central-1", + "id": "storefront-n3-ant97dj4", + "node_name": "n3", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n3n1", + "provider_node": "n1", + "status": "replicating" }, { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "name": "sub_n3n2", + "provider_node": "n2", + "status": "replicating" } - ] + ], + "version": "4.0.10" }, - "cpus": "500m", - "database_name": "northwind", - "database_users": [ - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - } - ], - "memory": "500M", - "nodes": [ - { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 - }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "source_database_name": "northwind", - "source_node_name": "n1" - }, - "source_node": "n1" - } - ], - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:01Z" + } + ], + "spec": { + "database_name": "storefront", + "database_users": [ + { + "attributes": [ + "SUPERUSER", + "LOGIN" + ], + "db_owner": true, + "username": "admin" + } + ], + "nodes": [ + { + "host_ids": [ + "us-east-1" + ], + "name": "n1" }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "source_database_name": "northwind", - "source_node_name": "n1" + { + "host_ids": [ + "ap-south-1" + ], + "name": "n2" }, - "services": [ - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - } - ], - "spock_version": "5" - }, - "state": "creating", - "tenant_id": "8210ec10-2dca-406c-ac4a-0661d2189954", - "updated_at": "2025-01-01T02:30:00Z" + { + "host_ids": [ + "eu-central-1" + ], + "name": "n3" + } + ], + "port": 5432, + "postgres_version": "17.6", + "spock_version": "5" }, - { - "created_at": "2025-01-01T01:30:00Z", - "id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "instances": [ + "state": "restoring", + "updated_at": "2025-06-18T17:58:59Z" + }, + "required": [ + "id", + "created_at", + "updated_at", + "state" + ] + }, + "Database3": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "description": "The time that the database was created.", + "example": "2025-01-01T01:30:00Z", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "Unique identifier for the database.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "instances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Instance" + }, + "description": "All of the instances in the database.", + "example": [ { "connection_info": { "hostname": "i-0123456789abcdef.ec2.internal", "ipv4_address": "10.24.34.2", "port": 5432 }, - "created_at": "1987-03-24T21:22:02Z", + "created_at": "2011-03-15T17:48:48Z", "error": "failed to get patroni status: connection refused", "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", "node_name": "n1", "postgres": { - "patroni_paused": true, + "patroni_paused": false, "patroni_state": "unknown", - "pending_restart": false, + "pending_restart": true, "role": "primary", "version": "18.1" }, @@ -8320,39 +7435,6 @@ "provider_node": "n2", "status": "down" }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" - }, - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1987-03-24T21:22:02Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": false, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ { "name": "sub_n1n2", "provider_node": "n2", @@ -8366,9 +7448,9 @@ ], "version": "4.10.0" }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" }, { "connection_info": { @@ -8376,15 +7458,15 @@ "ipv4_address": "10.24.34.2", "port": 5432 }, - "created_at": "1987-03-24T21:22:02Z", + "created_at": "2011-03-15T17:48:48Z", "error": "failed to get patroni status: connection refused", "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", "node_name": "n1", "postgres": { - "patroni_paused": true, + "patroni_paused": false, "patroni_state": "unknown", - "pending_restart": false, + "pending_restart": true, "role": "primary", "version": "18.1" }, @@ -8396,6 +7478,11 @@ "provider_node": "n2", "status": "down" }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, { "name": "sub_n1n2", "provider_node": "n2", @@ -8404,9 +7491,9 @@ ], "version": "4.10.0" }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" }, { "connection_info": { @@ -8414,15 +7501,15 @@ "ipv4_address": "10.24.34.2", "port": 5432 }, - "created_at": "1987-03-24T21:22:02Z", + "created_at": "2011-03-15T17:48:48Z", "error": "failed to get patroni status: connection refused", "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", "node_name": "n1", "postgres": { - "patroni_paused": true, + "patroni_paused": false, "patroni_state": "unknown", - "pending_restart": false, + "pending_restart": true, "role": "primary", "version": "18.1" }, @@ -8438,19 +7525,31 @@ "name": "sub_n1n2", "provider_node": "n2", "status": "down" - } - ], - "version": "4.10.0" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" } - ], - "service_instances": [ + ] + }, + "service_instances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceInstance" + }, + "description": "Service instances running alongside this database.", + "example": [ { "created_at": "2025-01-28T10:00:00Z", - "database_id": "production", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", "error": "failed to start container: image not found", "host_id": "host-1", "service_id": "mcp-server", @@ -8468,6 +7567,16 @@ "ipv4_address": "10.0.1.5", "last_health_at": "2025-01-28T10:00:00Z", "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, { "container_port": 8080, "host_port": 8080, @@ -8485,7 +7594,7 @@ }, { "created_at": "2025-01-28T10:00:00Z", - "database_id": "production", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", "error": "failed to start container: image not found", "host_id": "host-1", "service_id": "mcp-server", @@ -8503,6 +7612,16 @@ "ipv4_address": "10.0.1.5", "last_health_at": "2025-01-28T10:00:00Z", "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, { "container_port": 8080, "host_port": 8080, @@ -8520,7 +7639,7 @@ }, { "created_at": "2025-01-28T10:00:00Z", - "database_id": "production", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", "error": "failed to start container: image not found", "host_id": "host-1", "service_id": "mcp-server", @@ -8538,6 +7657,16 @@ "ipv4_address": "10.0.1.5", "last_health_at": "2025-01-28T10:00:00Z", "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, { "container_port": 8080, "host_port": 8080, @@ -8552,443 +7681,281 @@ "service_ready": true }, "updated_at": "2025-01-28T10:05:00Z" - } - ], - "spec": { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] }, - "cpus": "500m", - "database_name": "northwind", - "database_users": [ - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - } - ], - "memory": "500M", - "nodes": [ - { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 - }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "source_database_name": "northwind", - "source_node_name": "n1" - }, - "source_node": "n1" - } - ], - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + { + "created_at": "2025-01-28T10:00:00Z", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "error": "failed to start container: image not found", + "host_id": "host-1", + "service_id": "mcp-server", + "service_instance_id": "mcp-server-host-1", + "state": "running", + "status": { + "container_id": "a1b2c3d4e5f6", + "health_check": { + "checked_at": "2025-01-28T10:00:00Z", + "message": "Connection refused", + "status": "healthy" }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, + "hostname": "mcp-server-host-1.internal", + "image_version": "1.0.0", + "ipv4_address": "10.0.1.5", + "last_health_at": "2025-01-28T10:00:00Z", + "ports": [ { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" + "container_port": 8080, + "host_port": 8080, + "name": "web-client" }, { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" + "container_port": 8080, + "host_port": 8080, + "name": "web-client" }, { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" + "container_port": 8080, + "host_port": 8080, + "name": "web-client" }, { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" + "container_port": 8080, + "host_port": 8080, + "name": "web-client" } - ] - } + ], + "service_ready": true + }, + "updated_at": "2025-01-28T10:05:00Z" + } + ] + }, + "spec": { + "$ref": "#/components/schemas/DatabaseSpec4" + }, + "state": { + "type": "string", + "description": "Current state of the database.", + "example": "available", + "enum": [ + "creating", + "modifying", + "available", + "deleting", + "degraded", + "failed", + "backing_up", + "restoring", + "unknown" + ] + }, + "tenant_id": { + "type": "string", + "description": "Unique identifier for the database's owner.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "updated_at": { + "type": "string", + "description": "The time that the database was last updated.", + "example": "2025-01-01T02:30:00Z", + "format": "date-time" + } + }, + "example": { + "created_at": "2025-06-18T16:52:05Z", + "id": "storefront", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 + "created_at": "2025-06-18T16:52:22Z", + "host_id": "us-east-1", + "id": "storefront-n1-689qacsi", + "node_name": "n1", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n3", + "provider_node": "n3", + "status": "replicating" }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "source_database_name": "northwind", - "source_node_name": "n1" + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" }, - "services": [ - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:36Z" + }, + { + "connection_info": { + "hostname": "i-058731542fee493f.ec2.internal", + "ipv4_address": "10.24.35.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "ap-south-1", + "id": "storefront-n2-9ptayhma", + "node_name": "n2", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n2n1", + "provider_node": "n1", + "status": "replicating" }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - } - ], - "spock_version": "5" + { + "name": "sub_n2n3", + "provider_node": "n3", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:01Z" }, - "state": "creating", - "tenant_id": "8210ec10-2dca-406c-ac4a-0661d2189954", - "updated_at": "2025-01-01T02:30:00Z" - }, - { - "created_at": "2025-01-01T01:30:00Z", - "id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "instances": [ + { + "connection_info": { + "hostname": "i-494027b7b53f6a23.ec2.internal", + "ipv4_address": "10.24.36.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "eu-central-1", + "id": "storefront-n3-ant97dj4", + "node_name": "n3", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n3n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n3n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:01Z" + } + ], + "spec": { + "database_name": "storefront", + "database_users": [ { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1987-03-24T21:22:02Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": false, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" + "attributes": [ + "SUPERUSER", + "LOGIN" + ], + "db_owner": true, + "username": "admin" + } + ], + "nodes": [ + { + "host_ids": [ + "us-east-1" + ], + "name": "n1" }, { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1987-03-24T21:22:02Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, + "host_ids": [ + "ap-south-1" + ], + "name": "n2" + }, + { + "host_ids": [ + "eu-central-1" + ], + "name": "n3" + } + ], + "port": 5432, + "postgres_version": "17.6", + "spock_version": "5" + }, + "state": "restoring", + "updated_at": "2025-06-18T17:58:59Z" + }, + "required": [ + "id", + "created_at", + "updated_at", + "state" + ] + }, + "Database4": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "description": "The time that the database was created.", + "example": "2025-01-01T01:30:00Z", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "Unique identifier for the database.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "instances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Instance" + }, + "description": "All of the instances in the database.", + "example": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, "patroni_state": "unknown", - "pending_restart": false, + "pending_restart": true, "role": "primary", "version": "18.1" }, @@ -9000,6 +7967,11 @@ "provider_node": "n2", "status": "down" }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, { "name": "sub_n1n2", "provider_node": "n2", @@ -9008,9 +7980,9 @@ ], "version": "4.10.0" }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" }, { "connection_info": { @@ -9018,15 +7990,58 @@ "ipv4_address": "10.24.34.2", "port": 5432 }, - "created_at": "1987-03-24T21:22:02Z", + "created_at": "2011-03-15T17:48:48Z", "error": "failed to get patroni status: connection refused", "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", "node_name": "n1", "postgres": { - "patroni_paused": true, + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + }, + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, "patroni_state": "unknown", - "pending_restart": false, + "pending_restart": true, "role": "primary", "version": "18.1" }, @@ -9038,6 +8053,11 @@ "provider_node": "n2", "status": "down" }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, { "name": "sub_n1n2", "provider_node": "n2", @@ -9046,9 +8066,9 @@ ], "version": "4.10.0" }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" }, { "connection_info": { @@ -9056,15 +8076,15 @@ "ipv4_address": "10.24.34.2", "port": 5432 }, - "created_at": "1987-03-24T21:22:02Z", + "created_at": "2011-03-15T17:48:48Z", "error": "failed to get patroni status: connection refused", "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", "node_name": "n1", "postgres": { - "patroni_paused": true, + "patroni_paused": false, "patroni_state": "unknown", - "pending_restart": false, + "pending_restart": true, "role": "primary", "version": "18.1" }, @@ -9076,6 +8096,11 @@ "provider_node": "n2", "status": "down" }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, { "name": "sub_n1n2", "provider_node": "n2", @@ -9084,15 +8109,22 @@ ], "version": "4.10.0" }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" } - ], - "service_instances": [ + ] + }, + "service_instances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceInstance" + }, + "description": "Service instances running alongside this database.", + "example": [ { "created_at": "2025-01-28T10:00:00Z", - "database_id": "production", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", "error": "failed to start container: image not found", "host_id": "host-1", "service_id": "mcp-server", @@ -9110,6 +8142,16 @@ "ipv4_address": "10.0.1.5", "last_health_at": "2025-01-28T10:00:00Z", "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, { "container_port": 8080, "host_port": 8080, @@ -9127,7 +8169,7 @@ }, { "created_at": "2025-01-28T10:00:00Z", - "database_id": "production", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", "error": "failed to start container: image not found", "host_id": "host-1", "service_id": "mcp-server", @@ -9145,6 +8187,16 @@ "ipv4_address": "10.0.1.5", "last_health_at": "2025-01-28T10:00:00Z", "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, { "container_port": 8080, "host_port": 8080, @@ -9162,7 +8214,7 @@ }, { "created_at": "2025-01-28T10:00:00Z", - "database_id": "production", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", "error": "failed to start container: image not found", "host_id": "host-1", "service_id": "mcp-server", @@ -9180,6 +8232,16 @@ "ipv4_address": "10.0.1.5", "last_health_at": "2025-01-28T10:00:00Z", "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, { "container_port": 8080, "host_port": 8080, @@ -9195,1124 +8257,773 @@ }, "updated_at": "2025-01-28T10:05:00Z" } - ], - "spec": { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, + ] + }, + "spec": { + "$ref": "#/components/schemas/DatabaseSpec6" + }, + "state": { + "type": "string", + "description": "Current state of the database.", + "example": "deleting", + "enum": [ + "creating", + "modifying", + "available", + "deleting", + "degraded", + "failed", + "backing_up", + "restoring", + "unknown" + ] + }, + "tenant_id": { + "type": "string", + "description": "Unique identifier for the database's owner.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "updated_at": { + "type": "string", + "description": "The time that the database was last updated.", + "example": "2025-01-01T02:30:00Z", + "format": "date-time" + } + }, + "example": { + "created_at": "2025-06-18T16:52:05Z", + "id": "storefront", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "us-east-1", + "id": "storefront-n1-689qacsi", + "node_name": "n1", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "name": "sub_n1n3", + "provider_node": "n3", + "status": "replicating" }, { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "name": "sub_n1n2", + "provider_node": "n2", + "status": "replicating" } - ] + ], + "version": "4.0.10" }, - "cpus": "500m", - "database_name": "northwind", - "database_users": [ - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - } - ], - "memory": "500M", - "nodes": [ - { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 - }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "source_database_name": "northwind", - "source_node_name": "n1" - }, - "source_node": "n1" - } - ], - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:36Z" + }, + { + "connection_info": { + "hostname": "i-058731542fee493f.ec2.internal", + "ipv4_address": "10.24.35.2", + "port": 5432 }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 + "created_at": "2025-06-18T16:52:22Z", + "host_id": "ap-south-1", + "id": "storefront-n2-9ptayhma", + "node_name": "n2", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n2n1", + "provider_node": "n1", + "status": "replicating" }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "source_database_name": "northwind", - "source_node_name": "n1" + { + "name": "sub_n2n3", + "provider_node": "n3", + "status": "replicating" + } + ], + "version": "4.0.10" }, - "services": [ - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - } - ], - "spock_version": "5" - }, - "state": "creating", - "tenant_id": "8210ec10-2dca-406c-ac4a-0661d2189954", - "updated_at": "2025-01-01T02:30:00Z" - } - ] - }, - "DatabaseNodeSpec": { - "type": "object", - "properties": { - "backup_config": { - "$ref": "#/components/schemas/BackupConfigSpec" - }, - "cpus": { - "type": "string", - "description": "The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.", - "example": "500m", - "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" - }, - "host_ids": { - "type": "array", - "items": { - "type": "string", - "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", - "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "minLength": 1, - "maxLength": 63 + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:01Z" }, - "description": "The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.", - "example": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "minItems": 1 - }, - "memory": { - "type": "string", - "description": "The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", - "example": "500M", - "maxLength": 16 - }, - "name": { - "type": "string", - "description": "The name of the database node.", - "example": "n1", - "pattern": "n[0-9]+" - }, - "orchestrator_opts": { - "$ref": "#/components/schemas/OrchestratorOpts" - }, - "port": { - "type": "integer", - "description": "The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.", - "example": 5432, - "format": "int64", - "minimum": 0, - "maximum": 65535 - }, - "postgres_version": { - "type": "string", - "description": "The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.", - "example": "17.6", - "pattern": "^\\d{2}\\.\\d{1,2}$" - }, - "postgresql_conf": { - "type": "object", - "description": "Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.", - "example": { - "max_connections": 1000 - }, - "additionalProperties": true - }, - "restore_config": { - "$ref": "#/components/schemas/RestoreConfigSpec" - }, - "source_node": { - "type": "string", - "description": "The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.", - "example": "n1" - } - }, - "example": { - "backup_config": { - "repositories": [ + { + "connection_info": { + "hostname": "i-494027b7b53f6a23.ec2.internal", + "ipv4_address": "10.24.36.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "eu-central-1", + "id": "storefront-n3-ant97dj4", + "node_name": "n3", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n3n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n3n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:01Z" + } + ], + "spec": { + "database_name": "storefront", + "database_users": [ { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" + "attributes": [ + "SUPERUSER", + "LOGIN" + ], + "db_owner": true, + "username": "admin" } ], - "schedules": [ + "nodes": [ { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "host_ids": [ + "us-east-1" + ], + "name": "n1" }, { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "host_ids": [ + "ap-south-1" + ], + "name": "n2" }, { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "host_ids": [ + "eu-central-1" + ], + "name": "n3" } - ] - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 - }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "source_database_name": "northwind", - "source_node_name": "n1" + ], + "port": 5432, + "postgres_version": "17.6", + "spock_version": "5" }, - "source_node": "n1" + "state": "restoring", + "updated_at": "2025-06-18T17:58:59Z" }, "required": [ - "name", - "host_ids" + "id", + "created_at", + "updated_at", + "state" ] }, - "DatabaseNodeSpec2": { + "Database5": { "type": "object", "properties": { - "backup_config": { - "$ref": "#/components/schemas/BackupConfigSpec" - }, - "cpus": { + "created_at": { "type": "string", - "description": "The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.", - "example": "500m", - "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" + "description": "The time that the database was created.", + "example": "2025-01-01T01:30:00Z", + "format": "date-time" }, - "host_ids": { + "id": { + "type": "string", + "description": "Unique identifier for the database.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "instances": { "type": "array", "items": { - "type": "string", - "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "minLength": 1, - "maxLength": 63 + "$ref": "#/components/schemas/Instance" }, - "description": "The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.", + "description": "All of the instances in the database.", "example": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "minItems": 1 - }, - "memory": { - "type": "string", - "description": "The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", - "example": "500M", - "maxLength": 16 - }, - "name": { - "type": "string", - "description": "The name of the database node.", - "example": "n1", - "pattern": "n[0-9]+" - }, - "orchestrator_opts": { - "$ref": "#/components/schemas/OrchestratorOpts" - }, - "port": { - "type": "integer", - "description": "The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.", - "example": 5432, - "format": "int64", - "minimum": 0, - "maximum": 65535 - }, - "postgres_version": { - "type": "string", - "description": "The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.", - "example": "17.6", - "pattern": "^\\d{2}\\.\\d{1,2}$" - }, - "postgresql_conf": { - "type": "object", - "description": "Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.", - "example": { - "max_connections": 1000 - }, - "additionalProperties": true - }, - "restore_config": { - "$ref": "#/components/schemas/RestoreConfigSpec" - }, - "source_node": { - "type": "string", - "description": "The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.", - "example": "n1" - } - }, - "example": { - "backup_config": { - "repositories": [ { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" }, { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" }, { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" }, { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" + "created_at": "2011-03-15T17:48:48Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" }, - { - "aliases": [ - "pg-db", - "db-alias" + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" + "version": "4.10.0" }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 - }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "source_database_name": "northwind", - "source_node_name": "n1" - }, - "source_node": "n1" - }, - "required": [ - "name", - "host_ids" - ] - }, - "DatabaseNodeSpec3": { - "type": "object", - "properties": { - "backup_config": { - "$ref": "#/components/schemas/BackupConfigSpec" - }, - "cpus": { - "type": "string", - "description": "The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.", - "example": "500m", - "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" + "state": "unknown", + "status_updated_at": "1993-04-25T23:06:28Z", + "updated_at": "1981-08-22T23:20:01Z" + } + ] }, - "host_ids": { + "service_instances": { "type": "array", "items": { - "type": "string", - "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "minLength": 1, - "maxLength": 63 + "$ref": "#/components/schemas/ServiceInstance" }, - "description": "The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.", + "description": "Service instances running alongside this database.", "example": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "minItems": 1 - }, - "memory": { - "type": "string", - "description": "The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", - "example": "500M", - "maxLength": 16 - }, - "name": { - "type": "string", - "description": "The name of the database node.", - "example": "n1", - "pattern": "n[0-9]+" - }, - "orchestrator_opts": { - "$ref": "#/components/schemas/OrchestratorOpts" - }, - "port": { - "type": "integer", - "description": "The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.", - "example": 5432, - "format": "int64", - "minimum": 0, - "maximum": 65535 - }, - "postgres_version": { - "type": "string", - "description": "The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.", - "example": "17.6", - "pattern": "^\\d{2}\\.\\d{1,2}$" - }, - "postgresql_conf": { - "type": "object", - "description": "Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.", - "example": { - "max_connections": 1000 - }, - "additionalProperties": true - }, - "restore_config": { - "$ref": "#/components/schemas/RestoreConfigSpec" - }, - "source_node": { - "type": "string", - "description": "The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.", - "example": "n1" - } - }, - "example": { - "backup_config": { - "repositories": [ { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" + "created_at": "2025-01-28T10:00:00Z", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "error": "failed to start container: image not found", + "host_id": "host-1", + "service_id": "mcp-server", + "service_instance_id": "mcp-server-host-1", + "state": "running", + "status": { + "container_id": "a1b2c3d4e5f6", + "health_check": { + "checked_at": "2025-01-28T10:00:00Z", + "message": "Connection refused", + "status": "healthy" + }, + "hostname": "mcp-server-host-1.internal", + "image_version": "1.0.0", + "ipv4_address": "10.0.1.5", + "last_health_at": "2025-01-28T10:00:00Z", + "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + } + ], + "service_ready": true }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" + "updated_at": "2025-01-28T10:05:00Z" }, { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" + "created_at": "2025-01-28T10:00:00Z", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "error": "failed to start container: image not found", + "host_id": "host-1", + "service_id": "mcp-server", + "service_instance_id": "mcp-server-host-1", + "state": "running", + "status": { + "container_id": "a1b2c3d4e5f6", + "health_check": { + "checked_at": "2025-01-28T10:00:00Z", + "message": "Connection refused", + "status": "healthy" + }, + "hostname": "mcp-server-host-1.internal", + "image_version": "1.0.0", + "ipv4_address": "10.0.1.5", + "last_health_at": "2025-01-28T10:00:00Z", + "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + } + ], + "service_ready": true }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "updated_at": "2025-01-28T10:05:00Z" }, { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" + "created_at": "2025-01-28T10:00:00Z", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "error": "failed to start container: image not found", + "host_id": "host-1", + "service_id": "mcp-server", + "service_instance_id": "mcp-server-host-1", + "state": "running", + "status": { + "container_id": "a1b2c3d4e5f6", + "health_check": { + "checked_at": "2025-01-28T10:00:00Z", + "message": "Connection refused", + "status": "healthy" }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" + "hostname": "mcp-server-host-1.internal", + "image_version": "1.0.0", + "ipv4_address": "10.0.1.5", + "last_health_at": "2025-01-28T10:00:00Z", + "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + } ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" + "service_ready": true }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" + "updated_at": "2025-01-28T10:05:00Z" + }, + { + "created_at": "2025-01-28T10:00:00Z", + "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "error": "failed to start container: image not found", + "host_id": "host-1", + "service_id": "mcp-server", + "service_instance_id": "mcp-server-host-1", + "state": "running", + "status": { + "container_id": "a1b2c3d4e5f6", + "health_check": { + "checked_at": "2025-01-28T10:00:00Z", + "message": "Connection refused", + "status": "healthy" }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" + "hostname": "mcp-server-host-1.internal", + "image_version": "1.0.0", + "ipv4_address": "10.0.1.5", + "last_health_at": "2025-01-28T10:00:00Z", + "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + } + ], + "service_ready": true }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } + "updated_at": "2025-01-28T10:05:00Z" + } + ] }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 + "spec": { + "$ref": "#/components/schemas/DatabaseSpec7" }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "source_database_name": "northwind", - "source_node_name": "n1" + "state": { + "type": "string", + "description": "Current state of the database.", + "example": "creating", + "enum": [ + "creating", + "modifying", + "available", + "deleting", + "degraded", + "failed", + "backing_up", + "restoring", + "unknown" + ] }, - "source_node": "n1" + "tenant_id": { + "type": "string", + "description": "Unique identifier for the database's owner.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "updated_at": { + "type": "string", + "description": "The time that the database was last updated.", + "example": "2025-01-01T02:30:00Z", + "format": "date-time" + } + }, + "example": { + "created_at": "2025-06-18T16:52:05Z", + "id": "storefront", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "us-east-1", + "id": "storefront-n1-689qacsi", + "node_name": "n1", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n3", + "provider_node": "n3", + "status": "replicating" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:36Z" + }, + { + "connection_info": { + "hostname": "i-058731542fee493f.ec2.internal", + "ipv4_address": "10.24.35.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "ap-south-1", + "id": "storefront-n2-9ptayhma", + "node_name": "n2", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n2n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n2n3", + "provider_node": "n3", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:01Z" + }, + { + "connection_info": { + "hostname": "i-494027b7b53f6a23.ec2.internal", + "ipv4_address": "10.24.36.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "eu-central-1", + "id": "storefront-n3-ant97dj4", + "node_name": "n3", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n3n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n3n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:01Z" + } + ], + "spec": { + "database_name": "storefront", + "database_users": [ + { + "attributes": [ + "SUPERUSER", + "LOGIN" + ], + "db_owner": true, + "username": "admin" + } + ], + "nodes": [ + { + "host_ids": [ + "us-east-1" + ], + "name": "n1" + }, + { + "host_ids": [ + "ap-south-1" + ], + "name": "n2" + }, + { + "host_ids": [ + "eu-central-1" + ], + "name": "n3" + } + ], + "port": 5432, + "postgres_version": "17.6", + "spock_version": "5" + }, + "state": "restoring", + "updated_at": "2025-06-18T17:58:59Z" }, "required": [ - "name", - "host_ids" + "id", + "created_at", + "updated_at", + "state" ] }, - "DatabaseNodeSpec4": { + "DatabaseNodeSpec": { "type": "object", "properties": { "backup_config": { @@ -10328,13 +9039,16 @@ "type": "array", "items": { "type": "string", + "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", "minLength": 1, "maxLength": 63 }, "description": "The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.", "example": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696" + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec" ], "minItems": 1 }, @@ -10400,53 +9114,7 @@ "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", "gcs_endpoint": "localhost", "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", "retention_full": 2, "retention_full_type": "count", "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", @@ -10477,9 +9145,8 @@ }, "cpus": "500m", "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec" ], "memory": "500M", "name": "n1", @@ -10555,7 +9222,7 @@ "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", "gcs_endpoint": "localhost", "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", "s3_endpoint": "s3.us-east-1.amazonaws.com", "s3_key": "AKIAIOSFODNN7EXAMPLE", @@ -10568,7 +9235,7 @@ "target": "123456", "type": "xid" }, - "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", "source_database_name": "northwind", "source_node_name": "n1" }, @@ -10579,7 +9246,7 @@ "host_ids" ] }, - "DatabaseSpec": { + "DatabaseNodeSpec2": { "type": "object", "properties": { "backup_config": { @@ -10587,231 +9254,42 @@ }, "cpus": { "type": "string", - "description": "The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.", + "description": "The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.", "example": "500m", "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" }, - "database_name": { - "type": "string", - "description": "The name of the Postgres database.", - "example": "northwind", - "minLength": 1, - "maxLength": 31 - }, - "database_users": { + "host_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/DatabaseUserSpec" + "type": "string", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 }, - "description": "The users to create for this database.", + "description": "The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.", "example": [ - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - } + "76f9b8c0-4958-11f0-a489-3bb29577c696" ], - "maxItems": 16 + "minItems": 1 }, "memory": { "type": "string", - "description": "The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", + "description": "The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", "example": "500M", "maxLength": 16 }, - "nodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DatabaseNodeSpec" - }, - "description": "The Spock nodes for this database.", - "example": [ - { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 - }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "source_database_name": "northwind", - "source_node_name": "n1" - }, - "source_node": "n1" - } - ], - "minItems": 1, - "maxItems": 9 + "name": { + "type": "string", + "description": "The name of the database node.", + "example": "n1", + "pattern": "n[0-9]+" }, "orchestrator_opts": { "$ref": "#/components/schemas/OrchestratorOpts" }, "port": { "type": "integer", - "description": "The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.", + "description": "The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.", "example": 5432, "format": "int64", "minimum": 0, @@ -10819,105 +9297,76 @@ }, "postgres_version": { "type": "string", - "description": "The Postgres version in 'major.minor' format.", + "description": "The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.", "example": "17.6", "pattern": "^\\d{2}\\.\\d{1,2}$" }, "postgresql_conf": { "type": "object", - "description": "Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.", + "description": "Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.", "example": { "max_connections": 1000 }, - "maxLength": 64, "additionalProperties": true }, "restore_config": { "$ref": "#/components/schemas/RestoreConfigSpec" }, - "services": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ServiceSpec" - }, - "description": "Service instances to run alongside the database (e.g., MCP servers).", - "example": [ + "source_node": { + "type": "string", + "description": "The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.", + "example": "n1" + } + }, + "example": { + "backup_config": { + "repositories": [ { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" }, { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - } - ] - }, - "spock_version": { - "type": "string", - "description": "The major version of the Spock extension.", - "example": "5", - "pattern": "^\\d{1}$" - } - }, - "example": { - "backup_config": { - "repositories": [ { "azure_account": "pgedge-backups", "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", @@ -10931,7 +9380,7 @@ "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", "gcs_endpoint": "localhost", "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", "retention_full": 2, "retention_full_type": "count", "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", @@ -10961,214 +9410,32 @@ ] }, "cpus": "500m", - "database_name": "northwind", - "database_users": [ - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - } + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696" ], "memory": "500M", - "nodes": [ - { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 - }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", - "source_database_name": "northwind", - "source_node_name": "n1" - }, - "source_node": "n1" - } - ], - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" ], "driver_opts": { "com.docker.network.endpoint.expose": "true" @@ -11220,7 +9487,7 @@ "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", "gcs_endpoint": "localhost", "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", "s3_endpoint": "s3.us-east-1.amazonaws.com", "s3_key": "AKIAIOSFODNN7EXAMPLE", @@ -11233,68 +9500,18 @@ "target": "123456", "type": "xid" }, - "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", "source_database_name": "northwind", "source_node_name": "n1" }, - "services": [ - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" - } - ], - "spock_version": "5" + "source_node": "n1" }, "required": [ - "database_name", - "nodes" + "name", + "host_ids" ] }, - "DatabaseSpec2": { + "DatabaseNodeSpec3": { "type": "object", "properties": { "backup_config": { @@ -11302,538 +9519,334 @@ }, "cpus": { "type": "string", - "description": "The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.", + "description": "The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.", "example": "500m", "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" }, - "database_name": { - "type": "string", - "description": "The name of the Postgres database.", - "example": "northwind", - "minLength": 1, - "maxLength": 31 - }, - "database_users": { + "host_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/DatabaseUserSpec" + "type": "string", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 }, - "description": "The users to create for this database.", + "description": "The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.", "example": [ - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - } + "76f9b8c0-4958-11f0-a489-3bb29577c696" ], - "maxItems": 16 + "minItems": 1 }, "memory": { "type": "string", - "description": "The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", + "description": "The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", "example": "500M", "maxLength": 16 }, - "nodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DatabaseNodeSpec2" + "name": { + "type": "string", + "description": "The name of the database node.", + "example": "n1", + "pattern": "n[0-9]+" + }, + "orchestrator_opts": { + "$ref": "#/components/schemas/OrchestratorOpts" + }, + "port": { + "type": "integer", + "description": "The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.", + "example": 5432, + "format": "int64", + "minimum": 0, + "maximum": 65535 + }, + "postgres_version": { + "type": "string", + "description": "The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.", + "example": "17.6", + "pattern": "^\\d{2}\\.\\d{1,2}$" + }, + "postgresql_conf": { + "type": "object", + "description": "Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.", + "example": { + "max_connections": 1000 }, - "description": "The Spock nodes for this database.", - "example": [ + "additionalProperties": true + }, + "restore_config": { + "$ref": "#/components/schemas/RestoreConfigSpec" + }, + "source_node": { + "type": "string", + "description": "The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.", + "example": "n1" + } + }, + "example": { + "backup_config": { + "repositories": [ { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "source_database_name": "northwind", - "source_node_name": "n1" + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" }, - "source_node": "n1" + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" }, { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" }, - "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "source_database_name": "northwind", - "source_node_name": "n1" + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" }, - "source_node": "n1" - } - ], - "minItems": 1, - "maxItems": 9 - }, - "orchestrator_opts": { - "$ref": "#/components/schemas/OrchestratorOpts" - }, - "port": { - "type": "integer", - "description": "The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.", - "example": 5432, - "format": "int64", - "minimum": 0, - "maximum": 65535 - }, - "postgres_version": { - "type": "string", - "description": "The Postgres version in 'major.minor' format.", - "example": "17.6", - "pattern": "^\\d{2}\\.\\d{1,2}$" + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } }, + "port": 5432, + "postgres_version": "17.6", "postgresql_conf": { - "type": "object", - "description": "Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.", - "example": { - "max_connections": 1000 - }, - "maxLength": 64, - "additionalProperties": true + "max_connections": 1000 }, "restore_config": { - "$ref": "#/components/schemas/RestoreConfigSpec" + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" }, - "services": { + "source_node": "n1" + }, + "required": [ + "name", + "host_ids" + ] + }, + "DatabaseNodeSpec4": { + "type": "object", + "properties": { + "backup_config": { + "$ref": "#/components/schemas/BackupConfigSpec" + }, + "cpus": { + "type": "string", + "description": "The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.", + "example": "500m", + "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" + }, + "host_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/ServiceSpec" + "type": "string", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 }, - "description": "Service instances to run alongside the database (e.g., MCP servers).", + "description": "The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.", "example": [ - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" - } - ] + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "minItems": 1 }, - "spock_version": { + "memory": { "type": "string", - "description": "The major version of the Spock extension.", - "example": "5", - "pattern": "^\\d{1}$" + "description": "The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", + "example": "500M", + "maxLength": 16 + }, + "name": { + "type": "string", + "description": "The name of the database node.", + "example": "n1", + "pattern": "n[0-9]+" + }, + "orchestrator_opts": { + "$ref": "#/components/schemas/OrchestratorOpts" + }, + "port": { + "type": "integer", + "description": "The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.", + "example": 5432, + "format": "int64", + "minimum": 0, + "maximum": 65535 + }, + "postgres_version": { + "type": "string", + "description": "The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.", + "example": "17.6", + "pattern": "^\\d{2}\\.\\d{1,2}$" + }, + "postgresql_conf": { + "type": "object", + "description": "Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.", + "example": { + "max_connections": 1000 + }, + "additionalProperties": true + }, + "restore_config": { + "$ref": "#/components/schemas/RestoreConfigSpec" + }, + "source_node": { + "type": "string", + "description": "The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.", + "example": "n1" } }, "example": { @@ -11928,253 +9941,27 @@ ] }, "cpus": "500m", - "database_name": "northwind", - "database_users": [ - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": true, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - } + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" ], "memory": "500M", - "nodes": [ - { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 - }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "source_database_name": "northwind", - "source_node_name": "n1" - }, - "source_node": "n1" - } - ], - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" }, "id": "traefik-public" }, @@ -12250,70 +10037,14 @@ "source_database_name": "northwind", "source_node_name": "n1" }, - "services": [ - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" - } - ], - "spock_version": "5" + "source_node": "n1" }, "required": [ - "database_name", - "nodes" + "name", + "host_ids" ] }, - "DatabaseSpec3": { + "DatabaseNodeSpec5": { "type": "object", "properties": { "backup_config": { @@ -12321,79 +10052,7658 @@ }, "cpus": { "type": "string", - "description": "The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.", + "description": "The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.", "example": "500m", "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" }, - "database_name": { - "type": "string", - "description": "The name of the Postgres database.", - "example": "northwind", - "minLength": 1, - "maxLength": 31 - }, - "database_users": { + "host_ids": { "type": "array", "items": { - "$ref": "#/components/schemas/DatabaseUserSpec" + "type": "string", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 }, - "description": "The users to create for this database.", + "description": "The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.", "example": [ - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": false, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": false, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": false, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - } + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" ], - "maxItems": 16 + "minItems": 1 }, "memory": { "type": "string", - "description": "The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", + "description": "The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", "example": "500M", "maxLength": 16 }, - "nodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DatabaseNodeSpec3" + "name": { + "type": "string", + "description": "The name of the database node.", + "example": "n1", + "pattern": "n[0-9]+" + }, + "orchestrator_opts": { + "$ref": "#/components/schemas/OrchestratorOpts" + }, + "port": { + "type": "integer", + "description": "The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.", + "example": 5432, + "format": "int64", + "minimum": 0, + "maximum": 65535 + }, + "postgres_version": { + "type": "string", + "description": "The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.", + "example": "17.6", + "pattern": "^\\d{2}\\.\\d{1,2}$" + }, + "postgresql_conf": { + "type": "object", + "description": "Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.", + "example": { + "max_connections": 1000 }, - "description": "The Spock nodes for this database.", - "example": [ + "additionalProperties": true + }, + "restore_config": { + "$ref": "#/components/schemas/RestoreConfigSpec" + }, + "source_node": { + "type": "string", + "description": "The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.", + "example": "n1" + } + }, + "example": { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + "required": [ + "name", + "host_ids" + ] + }, + "DatabaseNodeSpec6": { + "type": "object", + "properties": { + "backup_config": { + "$ref": "#/components/schemas/BackupConfigSpec" + }, + "cpus": { + "type": "string", + "description": "The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.", + "example": "500m", + "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" + }, + "host_ids": { + "type": "array", + "items": { + "type": "string", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "description": "The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.", + "example": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "minItems": 1 + }, + "memory": { + "type": "string", + "description": "The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", + "example": "500M", + "maxLength": 16 + }, + "name": { + "type": "string", + "description": "The name of the database node.", + "example": "n1", + "pattern": "n[0-9]+" + }, + "orchestrator_opts": { + "$ref": "#/components/schemas/OrchestratorOpts" + }, + "port": { + "type": "integer", + "description": "The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.", + "example": 5432, + "format": "int64", + "minimum": 0, + "maximum": 65535 + }, + "postgres_version": { + "type": "string", + "description": "The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.", + "example": "17.6", + "pattern": "^\\d{2}\\.\\d{1,2}$" + }, + "postgresql_conf": { + "type": "object", + "description": "Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.", + "example": { + "max_connections": 1000 + }, + "additionalProperties": true + }, + "restore_config": { + "$ref": "#/components/schemas/RestoreConfigSpec" + }, + "source_node": { + "type": "string", + "description": "The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.", + "example": "n1" + } + }, + "example": { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + "required": [ + "name", + "host_ids" + ] + }, + "DatabaseNodeSpec7": { + "type": "object", + "properties": { + "backup_config": { + "$ref": "#/components/schemas/BackupConfigSpec" + }, + "cpus": { + "type": "string", + "description": "The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.", + "example": "500m", + "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" + }, + "host_ids": { + "type": "array", + "items": { + "type": "string", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "description": "The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.", + "example": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "minItems": 1 + }, + "memory": { + "type": "string", + "description": "The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", + "example": "500M", + "maxLength": 16 + }, + "name": { + "type": "string", + "description": "The name of the database node.", + "example": "n1", + "pattern": "n[0-9]+" + }, + "orchestrator_opts": { + "$ref": "#/components/schemas/OrchestratorOpts" + }, + "port": { + "type": "integer", + "description": "The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.", + "example": 5432, + "format": "int64", + "minimum": 0, + "maximum": 65535 + }, + "postgres_version": { + "type": "string", + "description": "The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.", + "example": "17.6", + "pattern": "^\\d{2}\\.\\d{1,2}$" + }, + "postgresql_conf": { + "type": "object", + "description": "Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.", + "example": { + "max_connections": 1000 + }, + "additionalProperties": true + }, + "restore_config": { + "$ref": "#/components/schemas/RestoreConfigSpec" + }, + "source_node": { + "type": "string", + "description": "The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.", + "example": "n1" + } + }, + "example": { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + "required": [ + "name", + "host_ids" + ] + }, + "DatabaseSpec": { + "type": "object", + "properties": { + "backup_config": { + "$ref": "#/components/schemas/BackupConfigSpec" + }, + "cpus": { + "type": "string", + "description": "The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.", + "example": "500m", + "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" + }, + "database_name": { + "type": "string", + "description": "The name of the Postgres database.", + "example": "northwind", + "minLength": 1, + "maxLength": 31 + }, + "database_users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatabaseUserSpec" + }, + "description": "The users to create for this database.", + "example": [ + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": true, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": true, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": true, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + } + ], + "maxItems": 16 + }, + "memory": { + "type": "string", + "description": "The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", + "example": "500M", + "maxLength": 16 + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatabaseNodeSpec" + }, + "description": "The Spock nodes for this database.", + "example": [ + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + } + ], + "minItems": 1, + "maxItems": 9 + }, + "orchestrator_opts": { + "$ref": "#/components/schemas/OrchestratorOpts" + }, + "port": { + "type": "integer", + "description": "The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.", + "example": 5432, + "format": "int64", + "minimum": 0, + "maximum": 65535 + }, + "postgres_version": { + "type": "string", + "description": "The Postgres version in 'major.minor' format.", + "example": "17.6", + "pattern": "^\\d{2}\\.\\d{1,2}$" + }, + "postgresql_conf": { + "type": "object", + "description": "Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.", + "example": { + "max_connections": 1000 + }, + "maxLength": 64, + "additionalProperties": true + }, + "restore_config": { + "$ref": "#/components/schemas/RestoreConfigSpec" + }, + "services": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceSpec" + }, + "description": "Service instances to run alongside the database (e.g., MCP servers).", + "example": [ + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec" + ], + "memory": "512M", + "port": 0, + "service_id": "analytics-service", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec" + ], + "memory": "512M", + "port": 0, + "service_id": "analytics-service", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec" + ], + "memory": "512M", + "port": 0, + "service_id": "analytics-service", + "service_type": "mcp", + "version": "latest" + } + ] + }, + "spock_version": { + "type": "string", + "description": "The major version of the Spock extension.", + "example": "5", + "pattern": "^\\d{1}$" + } + }, + "example": { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "database_name": "northwind", + "database_users": [ + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": true, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": true, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": true, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + } + ], + "memory": "500M", + "nodes": [ + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + } + ], + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "services": [ + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec" + ], + "memory": "512M", + "port": 0, + "service_id": "analytics-service", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec" + ], + "memory": "512M", + "port": 0, + "service_id": "analytics-service", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec" + ], + "memory": "512M", + "port": 0, + "service_id": "analytics-service", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec" + ], + "memory": "512M", + "port": 0, + "service_id": "analytics-service", + "service_type": "mcp", + "version": "latest" + } + ], + "spock_version": "5" + }, + "required": [ + "database_name", + "nodes" + ] + }, + "DatabaseSpec2": { + "type": "object", + "properties": { + "backup_config": { + "$ref": "#/components/schemas/BackupConfigSpec" + }, + "cpus": { + "type": "string", + "description": "The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.", + "example": "500m", + "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" + }, + "database_name": { + "type": "string", + "description": "The name of the Postgres database.", + "example": "northwind", + "minLength": 1, + "maxLength": 31 + }, + "database_users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatabaseUserSpec" + }, + "description": "The users to create for this database.", + "example": [ + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": true, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": true, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": true, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + } + ], + "maxItems": 16 + }, + "memory": { + "type": "string", + "description": "The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", + "example": "500M", + "maxLength": 16 + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatabaseNodeSpec2" + }, + "description": "The Spock nodes for this database.", + "example": [ + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + } + ], + "minItems": 1, + "maxItems": 9 + }, + "orchestrator_opts": { + "$ref": "#/components/schemas/OrchestratorOpts" + }, + "port": { + "type": "integer", + "description": "The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.", + "example": 5432, + "format": "int64", + "minimum": 0, + "maximum": 65535 + }, + "postgres_version": { + "type": "string", + "description": "The Postgres version in 'major.minor' format.", + "example": "17.6", + "pattern": "^\\d{2}\\.\\d{1,2}$" + }, + "postgresql_conf": { + "type": "object", + "description": "Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.", + "example": { + "max_connections": 1000 + }, + "maxLength": 64, + "additionalProperties": true + }, + "restore_config": { + "$ref": "#/components/schemas/RestoreConfigSpec" + }, + "services": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceSpec" + }, + "description": "Service instances to run alongside the database (e.g., MCP servers).", + "example": [ + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + } + ] + }, + "spock_version": { + "type": "string", + "description": "The major version of the Spock extension.", + "example": "5", + "pattern": "^\\d{1}$" + } + }, + "example": { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "database_name": "northwind", + "database_users": [ + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": true, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": true, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": true, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + } + ], + "memory": "500M", + "nodes": [ + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + } + ], + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "services": [ + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + } + ], + "spock_version": "5" + }, + "required": [ + "database_name", + "nodes" + ] + }, + "DatabaseSpec3": { + "type": "object", + "properties": { + "backup_config": { + "$ref": "#/components/schemas/BackupConfigSpec" + }, + "cpus": { + "type": "string", + "description": "The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.", + "example": "500m", + "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" + }, + "database_name": { + "type": "string", + "description": "The name of the Postgres database.", + "example": "northwind", + "minLength": 1, + "maxLength": 31 + }, + "database_users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatabaseUserSpec" + }, + "description": "The users to create for this database.", + "example": [ + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + } + ], + "maxItems": 16 + }, + "memory": { + "type": "string", + "description": "The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", + "example": "500M", + "maxLength": 16 + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatabaseNodeSpec3" + }, + "description": "The Spock nodes for this database.", + "example": [ + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + } + ], + "minItems": 1, + "maxItems": 9 + }, + "orchestrator_opts": { + "$ref": "#/components/schemas/OrchestratorOpts" + }, + "port": { + "type": "integer", + "description": "The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.", + "example": 5432, + "format": "int64", + "minimum": 0, + "maximum": 65535 + }, + "postgres_version": { + "type": "string", + "description": "The Postgres version in 'major.minor' format.", + "example": "17.6", + "pattern": "^\\d{2}\\.\\d{1,2}$" + }, + "postgresql_conf": { + "type": "object", + "description": "Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.", + "example": { + "max_connections": 1000 + }, + "maxLength": 64, + "additionalProperties": true + }, + "restore_config": { + "$ref": "#/components/schemas/RestoreConfigSpec" + }, + "services": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceSpec" + }, + "description": "Service instances to run alongside the database (e.g., MCP servers).", + "example": [ + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + } + ] + }, + "spock_version": { + "type": "string", + "description": "The major version of the Spock extension.", + "example": "5", + "pattern": "^\\d{1}$" + } + }, + "example": { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "database_name": "northwind", + "database_users": [ + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + } + ], + "memory": "500M", + "nodes": [ + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + } + ], + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "services": [ + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + } + ], + "spock_version": "5" + }, + "required": [ + "database_name", + "nodes" + ] + }, + "DatabaseSpec4": { + "type": "object", + "properties": { + "backup_config": { + "$ref": "#/components/schemas/BackupConfigSpec" + }, + "cpus": { + "type": "string", + "description": "The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.", + "example": "500m", + "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" + }, + "database_name": { + "type": "string", + "description": "The name of the Postgres database.", + "example": "northwind", + "minLength": 1, + "maxLength": 31 + }, + "database_users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatabaseUserSpec" + }, + "description": "The users to create for this database.", + "example": [ + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + } + ], + "maxItems": 16 + }, + "memory": { + "type": "string", + "description": "The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", + "example": "500M", + "maxLength": 16 + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatabaseNodeSpec4" + }, + "description": "The Spock nodes for this database.", + "example": [ + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + } + ], + "minItems": 1, + "maxItems": 9 + }, + "orchestrator_opts": { + "$ref": "#/components/schemas/OrchestratorOpts" + }, + "port": { + "type": "integer", + "description": "The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.", + "example": 5432, + "format": "int64", + "minimum": 0, + "maximum": 65535 + }, + "postgres_version": { + "type": "string", + "description": "The Postgres version in 'major.minor' format.", + "example": "17.6", + "pattern": "^\\d{2}\\.\\d{1,2}$" + }, + "postgresql_conf": { + "type": "object", + "description": "Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.", + "example": { + "max_connections": 1000 + }, + "maxLength": 64, + "additionalProperties": true + }, + "restore_config": { + "$ref": "#/components/schemas/RestoreConfigSpec" + }, + "services": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceSpec" + }, + "description": "Service instances to run alongside the database (e.g., MCP servers).", + "example": [ + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + } + ] + }, + "spock_version": { + "type": "string", + "description": "The major version of the Spock extension.", + "example": "5", + "pattern": "^\\d{1}$" + } + }, + "example": { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "database_name": "northwind", + "database_users": [ + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + } + ], + "memory": "500M", + "nodes": [ + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + } + ], + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "services": [ + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + } + ], + "spock_version": "5" + }, + "required": [ + "database_name", + "nodes" + ] + }, + "DatabaseSpec5": { + "type": "object", + "properties": { + "backup_config": { + "$ref": "#/components/schemas/BackupConfigSpec" + }, + "cpus": { + "type": "string", + "description": "The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.", + "example": "500m", + "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" + }, + "database_name": { + "type": "string", + "description": "The name of the Postgres database.", + "example": "northwind", + "minLength": 1, + "maxLength": 31 + }, + "database_users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatabaseUserSpec" + }, + "description": "The users to create for this database.", + "example": [ + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + } + ], + "maxItems": 16 + }, + "memory": { + "type": "string", + "description": "The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", + "example": "500M", + "maxLength": 16 + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatabaseNodeSpec5" + }, + "description": "The Spock nodes for this database.", + "example": [ + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + } + ], + "minItems": 1, + "maxItems": 9 + }, + "orchestrator_opts": { + "$ref": "#/components/schemas/OrchestratorOpts" + }, + "port": { + "type": "integer", + "description": "The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.", + "example": 5432, + "format": "int64", + "minimum": 0, + "maximum": 65535 + }, + "postgres_version": { + "type": "string", + "description": "The Postgres version in 'major.minor' format.", + "example": "17.6", + "pattern": "^\\d{2}\\.\\d{1,2}$" + }, + "postgresql_conf": { + "type": "object", + "description": "Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.", + "example": { + "max_connections": 1000 + }, + "maxLength": 64, + "additionalProperties": true + }, + "restore_config": { + "$ref": "#/components/schemas/RestoreConfigSpec" + }, + "services": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceSpec" + }, + "description": "Service instances to run alongside the database (e.g., MCP servers).", + "example": [ + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + } + ] + }, + "spock_version": { + "type": "string", + "description": "The major version of the Spock extension.", + "example": "5", + "pattern": "^\\d{1}$" + } + }, + "example": { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "database_name": "northwind", + "database_users": [ + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + } + ], + "memory": "500M", + "nodes": [ + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + } + ], + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "services": [ + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + } + ], + "spock_version": "5" + }, + "required": [ + "database_name", + "nodes" + ] + }, + "DatabaseSpec6": { + "type": "object", + "properties": { + "backup_config": { + "$ref": "#/components/schemas/BackupConfigSpec" + }, + "cpus": { + "type": "string", + "description": "The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.", + "example": "500m", + "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" + }, + "database_name": { + "type": "string", + "description": "The name of the Postgres database.", + "example": "northwind", + "minLength": 1, + "maxLength": 31 + }, + "database_users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatabaseUserSpec" + }, + "description": "The users to create for this database.", + "example": [ + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + } + ], + "maxItems": 16 + }, + "memory": { + "type": "string", + "description": "The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", + "example": "500M", + "maxLength": 16 + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatabaseNodeSpec6" + }, + "description": "The Spock nodes for this database.", + "example": [ + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, { "backup_config": { "repositories": [ @@ -12420,6 +17730,29 @@ "s3_region": "us-east-1", "type": "s3" }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, { "azure_account": "pgedge-backups", "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", @@ -12536,12 +17869,285 @@ "azure_key": "YXpLZXk=", "base_path": "/backups", "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + } + ], + "minItems": 1, + "maxItems": 9 + }, + "orchestrator_opts": { + "$ref": "#/components/schemas/OrchestratorOpts" + }, + "port": { + "type": "integer", + "description": "The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.", + "example": 5432, + "format": "int64", + "minimum": 0, + "maximum": 65535 + }, + "postgres_version": { + "type": "string", + "description": "The Postgres version in 'major.minor' format.", + "example": "17.6", + "pattern": "^\\d{2}\\.\\d{1,2}$" + }, + "postgresql_conf": { + "type": "object", + "description": "Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.", + "example": { + "max_connections": 1000 + }, + "maxLength": 64, + "additionalProperties": true + }, + "restore_config": { + "$ref": "#/components/schemas/RestoreConfigSpec" + }, + "services": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceSpec" + }, + "description": "Service instances to run alongside the database (e.g., MCP servers).", + "example": [ + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + } + ] + }, + "spock_version": { + "type": "string", + "description": "The major version of the Spock extension.", + "example": "5", + "pattern": "^\\d{1}$" + } + }, + "example": { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "database_name": "northwind", + "database_users": [ + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + } + ], + "memory": "500M", + "nodes": [ + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" }, "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", "gcs_endpoint": "localhost", "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", "s3_endpoint": "s3.us-east-1.amazonaws.com", "s3_key": "AKIAIOSFODNN7EXAMPLE", @@ -12549,565 +18155,859 @@ "s3_region": "us-east-1", "type": "s3" }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" }, - "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "source_database_name": "northwind", - "source_node_name": "n1" - }, - "source_node": "n1" - } - ], - "minItems": 1, - "maxItems": 9 - }, - "orchestrator_opts": { - "$ref": "#/components/schemas/OrchestratorOpts" - }, - "port": { - "type": "integer", - "description": "The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.", - "example": 5432, - "format": "int64", - "minimum": 0, - "maximum": 65535 - }, - "postgres_version": { - "type": "string", - "description": "The Postgres version in 'major.minor' format.", - "example": "17.6", - "pattern": "^\\d{2}\\.\\d{1,2}$" - }, - "postgresql_conf": { - "type": "object", - "description": "Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.", - "example": { - "max_connections": 1000 - }, - "maxLength": 64, - "additionalProperties": true - }, - "restore_config": { - "$ref": "#/components/schemas/RestoreConfigSpec" - }, - "services": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ServiceSpec" - }, - "description": "Service instances to run alongside the database (e.g., MCP servers).", - "example": [ - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" - } - ] - }, - "spock_version": { - "type": "string", - "description": "The major version of the Spock extension.", - "example": "5", - "pattern": "^\\d{1}$" - } - }, - "example": { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "source_node": "n1" + } + ], + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" }, - "cpus": "500m", - "database_name": "northwind", - "database_users": [ + "services": [ { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" ], - "db_owner": false, - "password": "secret", - "roles": [ - "pgedge_superuser" + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" ], - "username": "admin" + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" }, { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": false, - "password": "secret", - "roles": [ - "pgedge_superuser" + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" ], - "username": "admin" + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" }, { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": false, - "password": "secret", - "roles": [ - "pgedge_superuser" + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" ], - "username": "admin" + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" } ], - "memory": "500M", - "nodes": [ - { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" + "spock_version": "5" + }, + "required": [ + "database_name", + "nodes" + ] + }, + "DatabaseSpec7": { + "type": "object", + "properties": { + "backup_config": { + "$ref": "#/components/schemas/BackupConfigSpec" + }, + "cpus": { + "type": "string", + "description": "The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.", + "example": "500m", + "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" + }, + "database_name": { + "type": "string", + "description": "The name of the Postgres database.", + "example": "northwind", + "minLength": 1, + "maxLength": 31 + }, + "database_users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatabaseUserSpec" + }, + "description": "The users to create for this database.", + "example": [ + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + } + ], + "maxItems": 16 + }, + "memory": { + "type": "string", + "description": "The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", + "example": "500M", + "maxLength": 16 + }, + "nodes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DatabaseNodeSpec7" + }, + "description": "The Spock nodes for this database.", + "example": [ + { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - { + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { "azure_account": "pgedge-backups", "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", "azure_endpoint": "blob.core.usgovcloudapi.net", "azure_key": "YXpLZXk=", "base_path": "/backups", "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" }, "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", "gcs_endpoint": "localhost", "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", "s3_endpoint": "s3.us-east-1.amazonaws.com", "s3_key": "AKIAIOSFODNN7EXAMPLE", "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", "s3_region": "us-east-1", "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 - }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" + "source_node": "n1" + } + ], + "minItems": 1, + "maxItems": 9 + }, + "orchestrator_opts": { + "$ref": "#/components/schemas/OrchestratorOpts" + }, + "port": { + "type": "integer", + "description": "The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.", + "example": 5432, + "format": "int64", + "minimum": 0, + "maximum": 65535 + }, + "postgres_version": { + "type": "string", + "description": "The Postgres version in 'major.minor' format.", + "example": "17.6", + "pattern": "^\\d{2}\\.\\d{1,2}$" + }, + "postgresql_conf": { + "type": "object", + "description": "Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.", + "example": { + "max_connections": 1000 + }, + "maxLength": 64, + "additionalProperties": true + }, + "restore_config": { + "$ref": "#/components/schemas/RestoreConfigSpec" + }, + "services": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceSpec" + }, + "description": "Service instances to run alongside the database (e.g., MCP servers).", + "example": [ + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." }, - "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "source_database_name": "northwind", - "source_node_name": "n1" + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" }, - "source_node": "n1" - }, - { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 + { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + } + ] + }, + "spock_version": { + "type": "string", + "description": "The major version of the Spock extension.", + "example": "5", + "pattern": "^\\d{1}$" + } + }, + "example": { + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" }, - "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "source_database_name": "northwind", - "source_node_name": "n1" + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" }, - "source_node": "n1" + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "database_name": "northwind", + "database_users": [ + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + }, + { + "attributes": [ + "LOGIN", + "CREATEDB", + "CREATEROLE" + ], + "db_owner": false, + "password": "secret", + "roles": [ + "pgedge_superuser" + ], + "username": "admin" + } + ], + "memory": "500M", + "nodes": [ { "backup_config": { "repositories": [ @@ -13134,6 +19034,29 @@ "s3_region": "us-east-1", "type": "s3" }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, { "azure_account": "pgedge-backups", "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", @@ -13273,413 +19196,215 @@ "source_node_name": "n1" }, "source_node": "n1" - } - ], - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 - }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" - }, - "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "source_database_name": "northwind", - "source_node_name": "n1" - }, - "services": [ - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" - }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" }, { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." + "backup_config": { + "repositories": [ + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] }, "cpus": "500m", "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696" ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" - } - ], - "spock_version": "5" - }, - "required": [ - "database_name", - "nodes" - ] - }, - "DatabaseSpec4": { - "type": "object", - "properties": { - "backup_config": { - "$ref": "#/components/schemas/BackupConfigSpec" - }, - "cpus": { - "type": "string", - "description": "The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.", - "example": "500m", - "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" - }, - "database_name": { - "type": "string", - "description": "The name of the Postgres database.", - "example": "northwind", - "minLength": 1, - "maxLength": 31 - }, - "database_users": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DatabaseUserSpec" - }, - "description": "The users to create for this database.", - "example": [ - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": false, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": false, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - }, - { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": false, - "password": "secret", - "roles": [ - "pgedge_superuser" - ], - "username": "admin" - } - ], - "maxItems": 16 - }, - "memory": { - "type": "string", - "description": "The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.", - "example": "500M", - "maxLength": 16 - }, - "nodes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DatabaseNodeSpec4" - }, - "description": "The Spock nodes for this database.", - "example": [ - { - "backup_config": { - "repositories": [ + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" + "id": "traefik-public" }, { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" + "id": "traefik-public" }, { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" + "id": "traefik-public" } ], - "schedules": [ + "extra_volumes": [ { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" }, { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" }, { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" } ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696", - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" }, - "restore_config": { - "repository": { + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" + }, + "source_node": "n1" + }, + { + "backup_config": { + "repositories": [ + { "azure_account": "pgedge-backups", "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", "azure_endpoint": "blob.core.usgovcloudapi.net", "azure_key": "YXpLZXk=", "base_path": "/backups", "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" }, "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", "gcs_endpoint": "localhost", "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", "s3_endpoint": "s3.us-east-1.amazonaws.com", "s3_key": "AKIAIOSFODNN7EXAMPLE", @@ -13687,553 +19412,741 @@ "s3_region": "us-east-1", "type": "s3" }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", + "storage-upload-chunk-size": "5MiB" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "retention_full": 2, + "retention_full_type": "count", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + } + ], + "schedules": [ + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + }, + { + "cron_expression": "0 6 * * ?", + "id": "daily-full-backup", + "type": "full" + } + ] + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" + ], + "memory": "500M", + "name": "n1", + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + }, + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + }, + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" }, - "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "source_database_name": "northwind", - "source_node_name": "n1" + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" }, - "source_node": "n1" - } - ], - "minItems": 1, - "maxItems": 9 - }, - "orchestrator_opts": { - "$ref": "#/components/schemas/OrchestratorOpts" - }, - "port": { - "type": "integer", - "description": "The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.", - "example": 5432, - "format": "int64", - "minimum": 0, - "maximum": 65535 - }, - "postgres_version": { - "type": "string", - "description": "The Postgres version in 'major.minor' format.", - "example": "17.6", - "pattern": "^\\d{2}\\.\\d{1,2}$" - }, - "postgresql_conf": { - "type": "object", - "description": "Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.", - "example": { - "max_connections": 1000 - }, - "maxLength": 64, - "additionalProperties": true - }, - "restore_config": { - "$ref": "#/components/schemas/RestoreConfigSpec" - }, - "services": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ServiceSpec" - }, - "description": "Service instances to run alongside the database (e.g., MCP servers).", - "example": [ - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" }, - { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" - } - ] - }, - "spock_version": { - "type": "string", - "description": "The major version of the Spock extension.", - "example": "5", - "pattern": "^\\d{1}$" - } - }, - "example": { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" + "source_node": "n1" + } + ], + "orchestrator_opts": { + "swarm": { + "extra_labels": { + "traefik.enable": "true", + "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" + "extra_networks": [ + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" + { + "aliases": [ + "pg-db", + "db-alias" + ], + "driver_opts": { + "com.docker.network.endpoint.expose": "true" + }, + "id": "traefik-public" + } + ], + "extra_volumes": [ + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + }, + { + "destination_path": "/backups/container", + "host_path": "/Users/user/backups/host" + } + ] + } + }, + "port": 5432, + "postgres_version": "17.6", + "postgresql_conf": { + "max_connections": 1000 + }, + "restore_config": { + "repository": { + "azure_account": "pgedge-backups", + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" + }, + "restore_options": { + "set": "20250505-153628F", + "target": "123456", + "type": "xid" + }, + "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "source_database_name": "northwind", + "source_node_name": "n1" }, - "cpus": "500m", - "database_name": "northwind", - "database_users": [ + "services": [ { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": false, - "password": "secret", - "roles": [ - "pgedge_superuser" + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" ], - "username": "admin" + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" }, { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": false, - "password": "secret", - "roles": [ - "pgedge_superuser" + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" ], - "username": "admin" + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" }, { - "attributes": [ - "LOGIN", - "CREATEDB", - "CREATEROLE" - ], - "db_owner": false, - "password": "secret", - "roles": [ - "pgedge_superuser" + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "76f9b8c0-4958-11f0-a489-3bb29577c696", + "76f9b8c0-4958-11f0-a489-3bb29577c696" ], - "username": "admin" - } - ], - "memory": "500M", - "nodes": [ + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + }, { - "backup_config": { - "repositories": [ - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", - "storage-upload-chunk-size": "5MiB" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "retention_full": 2, - "retention_full_type": "count", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - } - ], - "schedules": [ - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - }, - { - "cron_expression": "0 6 * * ?", - "id": "daily-full-backup", - "type": "full" - } - ] + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." }, "cpus": "500m", "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696", "76f9b8c0-4958-11f0-a489-3bb29577c696" ], - "memory": "500M", - "name": "n1", - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" - }, - "extra_networks": [ + "memory": "512M", + "port": 0, + "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "service_type": "mcp", + "version": "latest" + } + ], + "spock_version": "5" + }, + "required": [ + "database_name", + "nodes" + ] + }, + "DatabaseSummary": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "description": "The time that the database was created.", + "example": "2025-01-01T01:30:00Z", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "instances": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Instance" + }, + "description": "All of the instances in the database.", + "example": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "1970-10-16T01:30:13Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" }, { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" }, { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" - }, - "id": "traefik-public" + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" } ], - "extra_volumes": [ + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" + }, + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "1970-10-16T01:30:13Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" }, { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" }, { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" } - ] - } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "1970-10-16T01:30:13Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" + "created_at": "1970-10-16T01:30:13Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" }, - "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "source_database_name": "northwind", - "source_node_name": "n1" + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" + } + ] + }, + "state": { + "type": "string", + "description": "Current state of the database.", + "example": "failed", + "enum": [ + "creating", + "modifying", + "available", + "deleting", + "degraded", + "failed", + "backing_up", + "restoring", + "unknown" + ] + }, + "tenant_id": { + "type": "string", + "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 + }, + "updated_at": { + "type": "string", + "description": "The time that the database was last updated.", + "example": "2025-01-01T02:30:00Z", + "format": "date-time" + } + }, + "example": { + "created_at": "2025-01-01T01:30:00Z", + "id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 }, - "source_node": "n1" - } - ], - "orchestrator_opts": { - "swarm": { - "extra_labels": { - "traefik.enable": "true", - "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)" + "created_at": "1970-10-16T01:30:13Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" }, - "extra_networks": [ - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" }, - "id": "traefik-public" - }, - { - "aliases": [ - "pg-db", - "db-alias" - ], - "driver_opts": { - "com.docker.network.endpoint.expose": "true" + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" }, - "id": "traefik-public" - } - ], - "extra_volumes": [ - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - }, - { - "destination_path": "/backups/container", - "host_path": "/Users/user/backups/host" - } - ] - } - }, - "port": 5432, - "postgres_version": "17.6", - "postgresql_conf": { - "max_connections": 1000 - }, - "restore_config": { - "repository": { - "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "restore_options": { - "set": "20250505-153628F", - "target": "123456", - "type": "xid" + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" }, - "source_database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "source_database_name": "northwind", - "source_node_name": "n1" - }, - "services": [ { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" + "created_at": "1970-10-16T01:30:13Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" }, { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 }, - "cpus": "500m", - "host_ids": [ - "76f9b8c0-4958-11f0-a489-3bb29577c696" - ], - "memory": "512M", - "port": 0, - "service_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "service_type": "mcp", - "version": "latest" + "created_at": "1970-10-16T01:30:13Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" } ], - "spock_version": "5" + "state": "creating", + "tenant_id": "8210ec10-2dca-406c-ac4a-0661d2189954", + "updated_at": "2025-01-01T02:30:00Z" }, "required": [ - "database_name", - "nodes" + "id", + "created_at", + "updated_at", + "state" ] }, "DatabaseUserSpec": { @@ -14243,7 +20156,7 @@ "type": "array", "items": { "type": "string", - "example": "Molestiae voluptates laborum." + "example": "Veniam debitis non expedita sequi." }, "description": "The attributes to assign to this database user.", "example": [ @@ -14256,7 +20169,7 @@ "db_owner": { "type": "boolean", "description": "If true, this user will be granted database ownership.", - "example": false + "example": true }, "password": { "type": "string", @@ -14268,7 +20181,7 @@ "type": "array", "items": { "type": "string", - "example": "Illo aut et corporis harum." + "example": "Delectus sit quas." }, "description": "The roles to assign to this database user.", "example": [ @@ -14327,7 +20240,7 @@ "type": "array", "items": { "type": "string", - "example": "Et labore in dolor quisquam placeat." + "example": "Totam ea velit consequatur sequi error." }, "description": "The Etcd client endpoint for this cluster member.", "example": [ @@ -14343,7 +20256,7 @@ "type": "array", "items": { "type": "string", - "example": "Quam id aut." + "example": "Itaque aut." }, "description": "The Etcd peer endpoint for this cluster member.", "example": [ @@ -14373,7 +20286,7 @@ "type": "array", "items": { "type": "string", - "example": "Nesciunt consequuntur reprehenderit esse id." + "example": "Qui natus qui." }, "description": "Optional network-scoped aliases for the container.", "example": [ @@ -14390,7 +20303,7 @@ }, "additionalProperties": { "type": "string", - "example": "Et qui quod veniam." + "example": "Exercitationem placeat temporibus aut facilis repudiandae." } }, "id": { @@ -14465,14 +20378,14 @@ "type": "boolean", "description": "If true, skip the health validations that prevent running failover on a healthy cluster.", "default": false, - "example": true + "example": false } }, "example": { "candidate_instance_id": "68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi", "database_id": "my-app", "node_name": "n1", - "skip_validation": true + "skip_validation": false }, "required": [ "database_id", @@ -14491,12 +20404,12 @@ "type": "boolean", "description": "If true, skip the health validations that prevent running failover on a healthy cluster.", "default": false, - "example": true + "example": false } }, "example": { "candidate_instance_id": "68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi", - "skip_validation": false + "skip_validation": true } }, "FailoverDatabaseNodeResponse": { @@ -14630,10 +20543,6 @@ "postgres_version": "17.6", "spock_version": "5" }, - { - "postgres_version": "17.6", - "spock_version": "5" - }, { "postgres_version": "17.6", "spock_version": "5" @@ -14688,10 +20597,6 @@ "postgres_version": "17.6", "spock_version": "5" }, - { - "postgres_version": "17.6", - "spock_version": "5" - }, { "postgres_version": "17.6", "spock_version": "5" @@ -14744,7 +20649,7 @@ "type": "object", "description": "The status of each component of the host.", "example": { - "Rerum ipsam nemo ut nemo.": { + "Eius at.": { "details": { "alarms": [ "3: NOSPACE" @@ -14752,422 +20657,103 @@ }, "error": "failed to connect to etcd", "healthy": false - } - }, - "additionalProperties": { - "$ref": "#/components/schemas/ComponentStatus" - } - }, - "state": { - "type": "string", - "example": "available", - "enum": [ - "healthy", - "unreachable", - "degraded", - "unknown" - ] - }, - "updated_at": { - "type": "string", - "description": "The last time the host status was updated.", - "example": "2021-07-01T12:34:56Z", - "format": "date-time" - } - }, - "example": { - "components": { - "Et animi laborum et.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Eum officia similique non.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Quisquam quibusdam id est.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - } - }, - "state": "available", - "updated_at": "2021-07-01T12:34:56Z" - }, - "required": [ - "state", - "updated_at", - "components" - ] - }, - "InitClusterRequest": { - "type": "object", - "properties": { - "cluster_id": { - "type": "string", - "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", - "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "minLength": 1, - "maxLength": 63 - } - }, - "description": "Request to initialize a cluster", - "example": { - "cluster_id": "76f9b8c0-4958-11f0-a489-3bb29577c696" - } - }, - "Instance": { - "type": "object", - "properties": { - "connection_info": { - "$ref": "#/components/schemas/InstanceConnectionInfo" - }, - "created_at": { - "type": "string", - "description": "The time that the instance was created.", - "example": "1988-06-18T10:35:35Z", - "format": "date-time" - }, - "error": { - "type": "string", - "description": "An error message if the instance is in an error state.", - "example": "failed to get patroni status: connection refused" - }, - "host_id": { - "type": "string", - "description": "The ID of the host this instance is running on.", - "example": "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - }, - "id": { - "type": "string", - "description": "Unique identifier for the instance.", - "example": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d" - }, - "node_name": { - "type": "string", - "description": "The Spock node name for this instance.", - "example": "n1" - }, - "postgres": { - "$ref": "#/components/schemas/InstancePostgresStatus" - }, - "spock": { - "$ref": "#/components/schemas/InstanceSpockStatus" - }, - "state": { - "type": "string", - "example": "creating", - "enum": [ - "creating", - "modifying", - "backing_up", - "available", - "degraded", - "failed", - "stopped", - "unknown" - ] - }, - "status_updated_at": { - "type": "string", - "description": "The time that the instance status information was last updated.", - "example": "1981-11-30T17:32:33Z", - "format": "date-time" - }, - "updated_at": { - "type": "string", - "description": "The time that the instance was last modified.", - "example": "1972-02-06T12:03:40Z", - "format": "date-time" - } - }, - "description": "An instance of pgEdge Postgres running on a host.", - "example": { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1985-07-21T07:05:35Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": false, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "creating", - "status_updated_at": "1970-02-13T01:14:37Z", - "updated_at": "1991-04-04T09:33:29Z" - }, - "required": [ - "id", - "host_id", - "node_name", - "created_at", - "updated_at", - "state" - ] - }, - "InstanceCollection": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Instance" - }, - "example": [ - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1987-03-24T21:22:02Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": false, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" - }, - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1987-03-24T21:22:02Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": false, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" - }, - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1987-03-24T21:22:02Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": false, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" - }, - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1987-03-24T21:22:02Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": false, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" + "Placeat illo dolore totam accusamus alias ipsa.": { + "details": { + "alarms": [ + "3: NOSPACE" + ] }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "creating", - "status_updated_at": "1974-12-13T04:15:04Z", - "updated_at": "2006-10-18T16:07:16Z" - } - ] - }, - "InstanceConnectionInfo": { - "type": "object", - "properties": { - "hostname": { - "type": "string", - "description": "The hostname of the host that's running this instance.", - "example": "i-0123456789abcdef.ec2.internal" + "error": "failed to connect to etcd", + "healthy": false + }, + "Ut dolorem.": { + "details": { + "alarms": [ + "3: NOSPACE" + ] + }, + "error": "failed to connect to etcd", + "healthy": false + } + }, + "additionalProperties": { + "$ref": "#/components/schemas/ComponentStatus" + } }, - "ipv4_address": { + "state": { "type": "string", - "description": "The IPv4 address of the host that's running this instance.", - "example": "10.24.34.2", - "format": "ipv4" + "example": "available", + "enum": [ + "healthy", + "unreachable", + "degraded", + "unknown" + ] }, - "port": { - "type": "integer", - "description": "The host port that Postgres is listening on for this instance.", - "example": 5432, - "format": "int64" + "updated_at": { + "type": "string", + "description": "The last time the host status was updated.", + "example": "2021-07-01T12:34:56Z", + "format": "date-time" } }, - "description": "Connection information for a pgEdge instance.", "example": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - } + "components": { + "Et aut aut.": { + "details": { + "alarms": [ + "3: NOSPACE" + ] + }, + "error": "failed to connect to etcd", + "healthy": false + }, + "Minus dolore eos et sunt culpa animi.": { + "details": { + "alarms": [ + "3: NOSPACE" + ] + }, + "error": "failed to connect to etcd", + "healthy": false + }, + "Rem culpa.": { + "details": { + "alarms": [ + "3: NOSPACE" + ] + }, + "error": "failed to connect to etcd", + "healthy": false + } + }, + "state": "available", + "updated_at": "2021-07-01T12:34:56Z" + }, + "required": [ + "state", + "updated_at", + "components" + ] }, - "InstancePostgresStatus": { + "InitClusterRequest": { "type": "object", "properties": { - "patroni_paused": { - "type": "boolean", - "description": "True if Patroni is paused for this instance.", - "example": true - }, - "patroni_state": { - "type": "string", - "example": "unknown" - }, - "pending_restart": { - "type": "boolean", - "description": "True if this instance has a pending restart from a configuration change.", - "example": true - }, - "role": { - "type": "string", - "example": "primary" - }, - "version": { + "cluster_id": { "type": "string", - "description": "The version of Postgres for this instance.", - "example": "18.1" + "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 } }, - "description": "Postgres status information for a pgEdge instance.", + "description": "Request to initialize a cluster", "example": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": false, - "role": "primary", - "version": "18.1" + "cluster_id": "76f9b8c0-4958-11f0-a489-3bb29577c696" } }, - "InstanceResponseBody": { + "Instance": { "type": "object", "properties": { "connection_info": { @@ -15176,7 +20762,7 @@ "created_at": { "type": "string", "description": "The time that the instance was created.", - "example": "1996-05-27T17:04:41Z", + "example": "1972-03-21T12:41:47Z", "format": "date-time" }, "error": { @@ -15207,7 +20793,7 @@ }, "state": { "type": "string", - "example": "failed", + "example": "stopped", "enum": [ "creating", "modifying", @@ -15222,24 +20808,24 @@ "status_updated_at": { "type": "string", "description": "The time that the instance status information was last updated.", - "example": "1977-03-14T09:54:12Z", + "example": "1995-02-03T18:46:08Z", "format": "date-time" }, "updated_at": { "type": "string", "description": "The time that the instance was last modified.", - "example": "1976-03-01T20:13:25Z", + "example": "1984-04-26T06:38:50Z", "format": "date-time" } }, - "description": "An instance of pgEdge Postgres running on a host. (default view)", + "description": "An instance of pgEdge Postgres running on a host.", "example": { "connection_info": { "hostname": "i-0123456789abcdef.ec2.internal", "ipv4_address": "10.24.34.2", "port": 5432 }, - "created_at": "2002-03-20T15:42:21Z", + "created_at": "2003-06-04T21:30:35Z", "error": "failed to get patroni status: connection refused", "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", @@ -15264,6 +20850,11 @@ "provider_node": "n2", "status": "down" }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, { "name": "sub_n1n2", "provider_node": "n2", @@ -15272,9 +20863,9 @@ ], "version": "4.10.0" }, - "state": "backing_up", - "status_updated_at": "1999-12-24T18:19:13Z", - "updated_at": "1988-02-08T05:38:12Z" + "state": "degraded", + "status_updated_at": "1982-02-16T16:16:42Z", + "updated_at": "1993-11-23T04:43:18Z" }, "required": [ "id", @@ -15285,100 +20876,69 @@ "state" ] }, - "InstanceResponseBodyCollection": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InstanceResponseBody" + "InstanceConnectionInfo": { + "type": "object", + "properties": { + "hostname": { + "type": "string", + "description": "The hostname of the host that's running this instance.", + "example": "i-0123456789abcdef.ec2.internal" + }, + "ipv4_address": { + "type": "string", + "description": "The IPv4 address of the host that's running this instance.", + "example": "10.24.34.2", + "format": "ipv4" + }, + "port": { + "type": "integer", + "description": "The host port that Postgres is listening on for this instance.", + "example": 5432, + "format": "int64" + } }, - "description": "InstanceCollectionResponseBody is the result type for an array of InstanceResponseBody (default view)", - "example": [ - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1978-12-28T17:33:35Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": true, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "modifying", - "status_updated_at": "2001-10-17T14:50:56Z", - "updated_at": "2013-05-14T14:25:56Z" + "description": "Connection information for a pgEdge instance.", + "example": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + } + }, + "InstancePostgresStatus": { + "type": "object", + "properties": { + "patroni_paused": { + "type": "boolean", + "description": "True if Patroni is paused for this instance.", + "example": false }, - { - "connection_info": { - "hostname": "i-0123456789abcdef.ec2.internal", - "ipv4_address": "10.24.34.2", - "port": 5432 - }, - "created_at": "1978-12-28T17:33:35Z", - "error": "failed to get patroni status: connection refused", - "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", - "node_name": "n1", - "postgres": { - "patroni_paused": true, - "patroni_state": "unknown", - "pending_restart": true, - "role": "primary", - "version": "18.1" - }, - "spock": { - "read_only": "off", - "subscriptions": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - } - ], - "version": "4.10.0" - }, - "state": "modifying", - "status_updated_at": "2001-10-17T14:50:56Z", - "updated_at": "2013-05-14T14:25:56Z" + "patroni_state": { + "type": "string", + "example": "unknown" + }, + "pending_restart": { + "type": "boolean", + "description": "True if this instance has a pending restart from a configuration change.", + "example": true + }, + "role": { + "type": "string", + "example": "primary" + }, + "version": { + "type": "string", + "description": "The version of Postgres for this instance.", + "example": "18.1" } - ] + }, + "description": "Postgres status information for a pgEdge instance.", + "example": { + "patroni_paused": false, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + } }, "InstanceSpockStatus": { "type": "object", @@ -15395,16 +20955,6 @@ }, "description": "Status information for this instance's Spock subscriptions.", "example": [ - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, { "name": "sub_n1n2", "provider_node": "n2", @@ -15432,11 +20982,6 @@ "provider_node": "n2", "status": "down" }, - { - "name": "sub_n1n2", - "provider_node": "n2", - "status": "down" - }, { "name": "sub_n1n2", "provider_node": "n2", @@ -15551,192 +21096,628 @@ "scope": "database", "status": "completed", "task_id": "01978410-fb5d-7cd2-bbd2-66c0bf929dc0", - "type": "update" - }, - { - "completed_at": "2025-06-18T16:52:35Z", - "created_at": "2025-06-18T16:52:05Z", - "database_id": "storefront", - "entity_id": "storefront", - "scope": "database", - "status": "completed", - "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", - "type": "create" - } - ] - } - }, - "ListHostTasksResponse": { - "type": "object", - "properties": { - "tasks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Task" - }, - "example": [ - { - "completed_at": "2025-06-18T16:52:35Z", - "created_at": "2025-06-18T16:52:05Z", - "database_id": "storefront", - "entity_id": "storefront", - "scope": "database", - "status": "completed", - "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", - "type": "create" - }, - { - "completed_at": "2025-06-18T16:52:35Z", - "created_at": "2025-06-18T16:52:05Z", - "database_id": "storefront", - "entity_id": "storefront", - "scope": "database", - "status": "completed", - "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", - "type": "create" - } - ] - } - }, - "example": { - "tasks": [ + "type": "update" + }, { - "completed_at": "2025-06-18T17:54:36Z", - "created_at": "2025-06-18T17:54:28Z", - "entity_id": "host-1", - "host_id": "host-1", - "scope": "host", + "completed_at": "2025-06-18T16:52:35Z", + "created_at": "2025-06-18T16:52:05Z", + "database_id": "storefront", + "entity_id": "storefront", + "scope": "database", "status": "completed", - "task_id": "0197842d-9082-7496-b787-77bd2e11809f", - "type": "remove_host" + "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", + "type": "create" } ] } }, - "ListHostsResponse": { + "ListDatabasesResponse": { "type": "object", "properties": { - "hosts": { + "databases": { "type": "array", "items": { - "$ref": "#/components/schemas/Host" + "$ref": "#/components/schemas/DatabaseSummary" }, - "description": "List of hosts in the cluster", + "description": "The databases managed by this cluster.", "example": [ { - "cohort": { - "control_available": true, - "member_id": "lah4bsznw6kc0hp7biylmmmll", - "type": "swarm" - }, - "cpus": 4, - "data_dir": "/data", - "default_pgedge_version": { - "postgres_version": "17.6", - "spock_version": "5" - }, - "etcd_mode": "server", - "hostname": "i-0123456789abcdef.ec2.internal", - "id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "ipv4_address": "10.24.34.2", - "memory": "16GiB", - "orchestrator": "swarm", - "status": { - "components": { - "Enim et voluptatum ex ea dolore.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Tenetur nostrum repellendus sint qui.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - } - }, - "state": "available", - "updated_at": "2021-07-01T12:34:56Z" - }, - "supported_pgedge_versions": [ + "created_at": "2025-01-01T01:30:00Z", + "id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", + "instances": [ { - "postgres_version": "17.6", - "spock_version": "5" + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "1970-10-16T01:30:13Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" }, { - "postgres_version": "17.6", - "spock_version": "5" + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "1970-10-16T01:30:13Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" }, { - "postgres_version": "17.6", - "spock_version": "5" + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "1970-10-16T01:30:13Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" } - ] + ], + "state": "modifying", + "tenant_id": "8210ec10-2dca-406c-ac4a-0661d2189954", + "updated_at": "2025-01-01T02:30:00Z" }, { - "cohort": { - "control_available": true, - "member_id": "lah4bsznw6kc0hp7biylmmmll", - "type": "swarm" + "created_at": "2025-01-01T01:30:00Z", + "id": "02f1a7db-fca8-4521-b57a-2a375c1ced51", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "1970-10-16T01:30:13Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" + }, + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "1970-10-16T01:30:13Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" + }, + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "1970-10-16T01:30:13Z", + "error": "failed to get patroni status: connection refused", + "host_id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "id": "a67cbb36-c3c3-49c9-8aac-f4a0438a883d", + "node_name": "n1", + "postgres": { + "patroni_paused": true, + "patroni_state": "unknown", + "pending_restart": true, + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "down" + } + ], + "version": "4.10.0" + }, + "state": "unknown", + "status_updated_at": "2013-04-06T16:38:09Z", + "updated_at": "1971-07-18T16:52:12Z" + } + ], + "state": "modifying", + "tenant_id": "8210ec10-2dca-406c-ac4a-0661d2189954", + "updated_at": "2025-01-01T02:30:00Z" + } + ] + } + }, + "example": { + "databases": [ + { + "created_at": "2025-06-17T20:05:10Z", + "id": "inventory", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2025-06-17T20:05:10Z", + "host_id": "us-east-1", + "id": "inventory-n1-689qacsi", + "node_name": "n1", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n3", + "provider_node": "n3", + "status": "replicating" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-17T20:05:10Z" }, - "cpus": 4, - "data_dir": "/data", - "default_pgedge_version": { - "postgres_version": "17.6", - "spock_version": "5" + { + "connection_info": { + "hostname": "i-058731542fee493f.ec2.internal", + "ipv4_address": "10.24.35.2", + "port": 5432 + }, + "created_at": "2025-06-17T20:05:10Z", + "host_id": "ap-south-1", + "id": "inventory-n2-9ptayhma", + "node_name": "n2", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n2n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n2n3", + "provider_node": "n3", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-17T20:05:10Z" }, - "etcd_mode": "server", - "hostname": "i-0123456789abcdef.ec2.internal", - "id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "ipv4_address": "10.24.34.2", - "memory": "16GiB", - "orchestrator": "swarm", - "status": { - "components": { - "Enim et voluptatum ex ea dolore.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] + { + "connection_info": { + "hostname": "i-494027b7b53f6a23.ec2.internal", + "ipv4_address": "10.24.36.2", + "port": 5432 + }, + "created_at": "2025-06-17T20:05:10Z", + "host_id": "eu-central-1", + "id": "inventory-n3-ant97dj4", + "node_name": "n3", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n3n1", + "provider_node": "n1", + "status": "replicating" }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Tenetur nostrum repellendus sint qui.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] + { + "name": "sub_n3n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-17T20:05:10Z" + } + ], + "state": "available", + "updated_at": "2025-06-17T20:05:10Z" + }, + { + "created_at": "2025-06-12T15:10:05Z", + "id": "storefront", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 6432 + }, + "created_at": "2025-06-12T15:10:05Z", + "host_id": "us-east-1", + "id": "storefront-n1-689qacsi", + "node_name": "n1", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n3", + "provider_node": "n3", + "status": "replicating" }, - "error": "failed to connect to etcd", - "healthy": false - } + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" }, "state": "available", - "updated_at": "2021-07-01T12:34:56Z" + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-12T15:10:05Z" }, - "supported_pgedge_versions": [ - { - "postgres_version": "17.6", - "spock_version": "5" + { + "connection_info": { + "hostname": "i-058731542fee493f.ec2.internal", + "ipv4_address": "10.24.35.2", + "port": 6432 }, - { - "postgres_version": "17.6", - "spock_version": "5" + "created_at": "2025-06-12T15:10:05Z", + "host_id": "ap-south-1", + "id": "storefront-n2-9ptayhma", + "node_name": "n2", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" }, - { - "postgres_version": "17.6", - "spock_version": "5" - } - ] + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n2n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n2n3", + "provider_node": "n3", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-12T15:10:05Z" + }, + { + "connection_info": { + "hostname": "i-494027b7b53f6a23.ec2.internal", + "ipv4_address": "10.24.36.2", + "port": 6432 + }, + "created_at": "2025-06-12T15:10:05Z", + "host_id": "eu-central-1", + "id": "storefront-n3-ant97dj4", + "node_name": "n3", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n3n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n3n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-17T20:05:10Z", + "updated_at": "2025-06-12T15:10:05Z" + } + ], + "state": "available", + "updated_at": "2025-06-12T15:10:05Z" + } + ] + } + }, + "ListHostTasksResponse": { + "type": "object", + "properties": { + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task" + }, + "example": [ + { + "completed_at": "2025-06-18T16:52:35Z", + "created_at": "2025-06-18T16:52:05Z", + "database_id": "storefront", + "entity_id": "storefront", + "scope": "database", + "status": "completed", + "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", + "type": "create" }, + { + "completed_at": "2025-06-18T16:52:35Z", + "created_at": "2025-06-18T16:52:05Z", + "database_id": "storefront", + "entity_id": "storefront", + "scope": "database", + "status": "completed", + "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", + "type": "create" + } + ] + } + }, + "example": { + "tasks": [ + { + "completed_at": "2025-06-18T17:54:36Z", + "created_at": "2025-06-18T17:54:28Z", + "entity_id": "host-1", + "host_id": "host-1", + "scope": "host", + "status": "completed", + "task_id": "0197842d-9082-7496-b787-77bd2e11809f", + "type": "remove_host" + } + ] + } + }, + "ListHostsResponse": { + "type": "object", + "properties": { + "hosts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Host" + }, + "description": "List of hosts in the cluster", + "example": [ { "cohort": { "control_available": true, @@ -15914,63 +21895,6 @@ } ] }, - { - "cohort": { - "control_available": true, - "member_id": "lah4bsznw6kc0hp7biylmmmll", - "type": "swarm" - }, - "cpus": 4, - "data_dir": "/data", - "default_pgedge_version": { - "postgres_version": "17.6", - "spock_version": "5" - }, - "etcd_mode": "server", - "hostname": "i-0123456789abcdef.ec2.internal", - "id": "de3b1388-1f0c-42f1-a86c-59ab72f255ec", - "ipv4_address": "10.24.34.2", - "memory": "16GiB", - "orchestrator": "swarm", - "status": { - "components": { - "Enim et voluptatum ex ea dolore.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - }, - "Tenetur nostrum repellendus sint qui.": { - "details": { - "alarms": [ - "3: NOSPACE" - ] - }, - "error": "failed to connect to etcd", - "healthy": false - } - }, - "state": "available", - "updated_at": "2021-07-01T12:34:56Z" - }, - "supported_pgedge_versions": [ - { - "postgres_version": "17.6", - "spock_version": "5" - }, - { - "postgres_version": "17.6", - "spock_version": "5" - }, - { - "postgres_version": "17.6", - "spock_version": "5" - } - ] - }, { "cohort": { "control_available": true, @@ -16053,6 +21977,16 @@ "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", "type": "create" }, + { + "completed_at": "2025-06-18T16:52:35Z", + "created_at": "2025-06-18T16:52:05Z", + "database_id": "storefront", + "entity_id": "storefront", + "scope": "database", + "status": "completed", + "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", + "type": "create" + }, { "completed_at": "2025-06-18T16:52:35Z", "created_at": "2025-06-18T16:52:05Z", @@ -16068,90 +22002,26 @@ }, "example": { "tasks": [ - { - "completed_at": "2025-06-18T17:54:36Z", - "created_at": "2025-06-18T17:54:28Z", - "database_id": "storefront", - "entity_id": "storefront", - "instance_id": "storefront-n1-689qacsi", - "scope": "database", - "status": "completed", - "task_id": "0197842d-9082-7496-b787-77bd2e11809f", - "type": "node_backup" - }, - { - "completed_at": "2025-06-18T17:54:36Z", - "created_at": "2025-06-18T17:54:28Z", - "entity_id": "host-1", - "host_id": "host-1", - "scope": "host", - "status": "completed", - "task_id": "0197842d-9082-7496-b787-77bd2e11809f", - "type": "remove_host" - } - ] - } - }, - "Listdatabasesresponse": { - "type": "object", - "properties": { - "databases": { - "$ref": "#/components/schemas/DatabaseCollection" - } - }, - "example": { - "databases": [ - { - "created_at": "2025-06-17T20:05:10Z", - "id": "inventory", - "instances": [ - { - "host_id": "us-east-1", - "id": "inventory-n1-689qacsi", - "node_name": "n1", - "state": "available" - }, - { - "host_id": "ap-south-1", - "id": "inventory-n2-9ptayhma", - "node_name": "n2", - "state": "available" - }, - { - "host_id": "eu-central-1", - "id": "inventory-n3-ant97dj4", - "node_name": "n3", - "state": "available" - } - ], - "state": "available", - "updated_at": "2025-06-17T20:05:10Z" - }, - { - "created_at": "2025-06-17T20:05:10Z", - "id": "storefront", - "instances": [ - { - "host_id": "us-east-1", - "id": "storefront-n1-689qacsi", - "node_name": "n1", - "state": "available" - }, - { - "host_id": "ap-south-1", - "id": "storefront-n2-9ptayhma", - "node_name": "n2", - "state": "available" - }, - { - "host_id": "eu-central-1", - "id": "storefront-n3-ant97dj4", - "node_name": "n3", - "state": "available" - } - ], - "state": "available", - "updated_at": "2025-06-12T15:10:05Z" + { + "completed_at": "2025-06-18T17:54:36Z", + "created_at": "2025-06-18T17:54:28Z", + "database_id": "storefront", + "entity_id": "storefront", + "instance_id": "storefront-n1-689qacsi", + "scope": "database", + "status": "completed", + "task_id": "0197842d-9082-7496-b787-77bd2e11809f", + "type": "node_backup" + }, + { + "completed_at": "2025-06-18T17:54:36Z", + "created_at": "2025-06-18T17:54:28Z", + "entity_id": "host-1", + "host_id": "host-1", + "scope": "host", + "status": "completed", + "task_id": "0197842d-9082-7496-b787-77bd2e11809f", + "type": "remove_host" } ] } @@ -16345,16 +22215,6 @@ "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", "type": "create" }, - { - "completed_at": "2025-06-18T16:52:35Z", - "created_at": "2025-06-18T16:52:05Z", - "database_id": "storefront", - "entity_id": "storefront", - "scope": "database", - "status": "completed", - "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", - "type": "create" - }, { "completed_at": "2025-06-18T16:52:35Z", "created_at": "2025-06-18T16:52:05Z", @@ -16413,7 +22273,7 @@ "maxLength": 32, "additionalProperties": { "type": "string", - "example": "Quis ipsa." + "example": "Qui sed quis architecto." } }, "source_database_id": { @@ -16484,7 +22344,7 @@ "type": "array", "items": { "type": "string", - "example": "Tenetur iure quisquam dignissimos veritatis et omnis." + "example": "Et et reprehenderit et nam quo." }, "description": "The nodes to restore. Defaults to all nodes if empty or unspecified.", "example": [ @@ -16499,23 +22359,265 @@ "base_path": "/backups", "type": "posix" }, - "source_database_id": "storefront", - "source_database_name": "storefront", - "source_node_name": "n1" - }, - "target_nodes": [ - "n1" - ] + "source_database_id": "storefront", + "source_database_name": "storefront", + "source_node_name": "n1" + }, + "target_nodes": [ + "n1" + ] + }, + "required": [ + "restore_config" + ] + }, + "RestoreDatabaseResponse": { + "type": "object", + "properties": { + "database": { + "$ref": "#/components/schemas/Database" + }, + "node_tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Task" + }, + "description": "The tasks that will restore each database node.", + "example": [ + { + "completed_at": "2025-06-18T16:52:35Z", + "created_at": "2025-06-18T16:52:05Z", + "database_id": "storefront", + "entity_id": "storefront", + "scope": "database", + "status": "completed", + "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", + "type": "create" + }, + { + "completed_at": "2025-06-18T16:52:35Z", + "created_at": "2025-06-18T16:52:05Z", + "database_id": "storefront", + "entity_id": "storefront", + "scope": "database", + "status": "completed", + "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", + "type": "create" + }, + { + "completed_at": "2025-06-18T16:52:35Z", + "created_at": "2025-06-18T16:52:05Z", + "database_id": "storefront", + "entity_id": "storefront", + "scope": "database", + "status": "completed", + "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", + "type": "create" + } + ] + }, + "task": { + "$ref": "#/components/schemas/Task" + } + }, + "example": { + "database": { + "created_at": "2025-06-18T16:52:05Z", + "id": "storefront", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "us-east-1", + "id": "storefront-n1-689qacsi", + "node_name": "n1", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n3", + "provider_node": "n3", + "status": "replicating" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:36Z" + }, + { + "connection_info": { + "hostname": "i-058731542fee493f.ec2.internal", + "ipv4_address": "10.24.35.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "ap-south-1", + "id": "storefront-n2-9ptayhma", + "node_name": "n2", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n2n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n2n3", + "provider_node": "n3", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:01Z" + }, + { + "connection_info": { + "hostname": "i-494027b7b53f6a23.ec2.internal", + "ipv4_address": "10.24.36.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "eu-central-1", + "id": "storefront-n3-ant97dj4", + "node_name": "n3", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n3n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n3n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:01Z" + } + ], + "spec": { + "database_name": "storefront", + "database_users": [ + { + "attributes": [ + "SUPERUSER", + "LOGIN" + ], + "db_owner": true, + "username": "admin" + } + ], + "nodes": [ + { + "host_ids": [ + "us-east-1" + ], + "name": "n1" + }, + { + "host_ids": [ + "ap-south-1" + ], + "name": "n2" + }, + { + "host_ids": [ + "eu-central-1" + ], + "name": "n3" + } + ], + "port": 5432, + "postgres_version": "17.6", + "spock_version": "5" + }, + "state": "restoring", + "updated_at": "2025-06-18T17:58:59Z" + }, + "node_tasks": [ + { + "created_at": "2025-06-18T17:58:59Z", + "database_id": "storefront", + "node_name": "n1", + "parent_id": "01978431-b628-758a-aec6-03b331fa1a17", + "status": "pending", + "task_id": "01978431-b62b-723b-a09c-e4072cd64bdb", + "type": "node_restore" + }, + { + "created_at": "2025-06-18T17:58:59Z", + "database_id": "storefront", + "node_name": "n2", + "parent_id": "01978431-b628-758a-aec6-03b331fa1a17", + "status": "pending", + "task_id": "01978431-b62c-7593-aad8-43b03df2031b", + "type": "node_restore" + }, + { + "created_at": "2025-06-18T17:58:59Z", + "database_id": "storefront", + "node_name": "n3", + "parent_id": "01978431-b628-758a-aec6-03b331fa1a17", + "status": "pending", + "task_id": "01978431-b62d-7b65-ab09-272d0b2fea91", + "type": "node_restore" + } + ], + "task": { + "created_at": "2025-06-18T17:58:59Z", + "database_id": "storefront", + "status": "pending", + "task_id": "01978431-b628-758a-aec6-03b331fa1a17", + "type": "restore" + } }, "required": [ - "restore_config" + "task", + "node_tasks", + "database" ] }, - "RestoreDatabaseResponse": { + "RestoreDatabaseResponse2": { "type": "object", "properties": { "database": { - "$ref": "#/components/schemas/Database" + "$ref": "#/components/schemas/Database5" }, "node_tasks": { "type": "array", @@ -16524,6 +22626,26 @@ }, "description": "The tasks that will restore each database node.", "example": [ + { + "completed_at": "2025-06-18T16:52:35Z", + "created_at": "2025-06-18T16:52:05Z", + "database_id": "storefront", + "entity_id": "storefront", + "scope": "database", + "status": "completed", + "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", + "type": "create" + }, + { + "completed_at": "2025-06-18T16:52:35Z", + "created_at": "2025-06-18T16:52:05Z", + "database_id": "storefront", + "entity_id": "storefront", + "scope": "database", + "status": "completed", + "task_id": "019783f4-75f4-71e7-85a3-c9b96b345d77", + "type": "create" + }, { "completed_at": "2025-06-18T16:52:35Z", "created_at": "2025-06-18T16:52:05Z", @@ -16787,7 +22909,7 @@ }, "additionalProperties": { "type": "string", - "example": "Cupiditate sunt." + "example": "Excepturi consectetur accusantium ut." } }, "gcs_bucket": { @@ -16865,218 +22987,29 @@ }, "example": { "azure_account": "pgedge-backups", - "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "azure_endpoint": "blob.core.usgovcloudapi.net", - "azure_key": "YXpLZXk=", - "base_path": "/backups", - "custom_options": { - "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" - }, - "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "gcs_endpoint": "localhost", - "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", - "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", - "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", - "s3_endpoint": "s3.us-east-1.amazonaws.com", - "s3_key": "AKIAIOSFODNN7EXAMPLE", - "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - "s3_region": "us-east-1", - "type": "s3" - }, - "required": [ - "type" - ] - }, - "ServiceInstanceStatus": { - "type": "object", - "properties": { - "container_id": { - "type": "string", - "description": "The Docker container ID.", - "example": "a1b2c3d4e5f6" - }, - "health_check": { - "$ref": "#/components/schemas/HealthCheckResult" - }, - "hostname": { - "type": "string", - "description": "The hostname of the service instance.", - "example": "mcp-server-host-1.internal" - }, - "image_version": { - "type": "string", - "description": "The container image version currently running.", - "example": "1.0.0" - }, - "ipv4_address": { - "type": "string", - "description": "The IPv4 address of the service instance.", - "example": "10.0.1.5", - "format": "ipv4" - }, - "last_health_at": { - "type": "string", - "description": "The time of the last health check attempt.", - "example": "2025-01-28T10:00:00Z", - "format": "date-time" - }, - "ports": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PortMapping" - }, - "description": "Port mappings for this service instance.", - "example": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ] - }, - "service_ready": { - "type": "boolean", - "description": "Whether the service is ready to accept requests.", - "example": true - } - }, - "description": "Runtime status information for a service instance.", - "example": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" - }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ], - "service_ready": true - } - }, - "ServiceSpec": { - "type": "object", - "properties": { - "config": { - "type": "object", - "description": "Service-specific configuration. For MCP services, this includes llm_provider, llm_model, and provider-specific API keys.", - "example": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "additionalProperties": true - }, - "cpus": { - "type": "string", - "description": "The number of CPUs to allocate for this service. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if unspecified.", - "example": "500m", - "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" - }, - "host_ids": { - "type": "array", - "items": { - "type": "string", - "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", - "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "minLength": 1, - "maxLength": 63 - }, - "description": "The IDs of the hosts that should run this service. One service instance will be created per host.", - "example": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "minItems": 1 - }, - "memory": { - "type": "string", - "description": "The amount of memory in SI or IEC notation to allocate for this service. Defaults to container defaults if unspecified.", - "example": "512M", - "maxLength": 16 - }, - "port": { - "type": "integer", - "description": "The port to publish the service on the host. If 0, Docker assigns a random port. If unspecified, no port is published and the service is not accessible from outside the Docker network.", - "example": 0, - "format": "int64", - "minimum": 0, - "maximum": 65535 - }, - "service_id": { - "type": "string", - "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", - "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "minLength": 1, - "maxLength": 63 - }, - "service_type": { - "type": "string", - "description": "The type of service to run.", - "example": "mcp", - "enum": [ - "mcp" - ] - }, - "version": { - "type": "string", - "description": "The version of the service in semver format (e.g., '1.0.0') or the literal 'latest'.", - "example": "latest", - "pattern": "^(\\d+\\.\\d+\\.\\d+|latest)$" - } - }, - "example": { - "config": { - "llm_model": "gpt-4", - "llm_provider": "openai", - "openai_api_key": "sk-..." - }, - "cpus": "500m", - "host_ids": [ - "de3b1388-1f0c-42f1-a86c-59ab72f255ec" - ], - "memory": "512M", - "port": 0, - "service_id": "analytics-service", - "service_type": "mcp", - "version": "latest" + "azure_container": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "azure_endpoint": "blob.core.usgovcloudapi.net", + "azure_key": "YXpLZXk=", + "base_path": "/backups", + "custom_options": { + "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "gcs_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "gcs_endpoint": "localhost", + "gcs_key": "ZXhhbXBsZSBnY3Mga2V5Cg==", + "id": "f6b84a99-5e91-4203-be1e-131fe82e5984", + "s3_bucket": "pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1", + "s3_endpoint": "s3.us-east-1.amazonaws.com", + "s3_key": "AKIAIOSFODNN7EXAMPLE", + "s3_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "s3_region": "us-east-1", + "type": "s3" }, "required": [ - "service_id", - "service_type", - "version", - "host_ids", - "config" + "type" ] }, - "Serviceinstance": { + "ServiceInstance": { "type": "object", "properties": { "created_at": { @@ -17159,6 +23092,11 @@ "host_port": 8080, "name": "web-client" }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, { "container_port": 8080, "host_port": 8080, @@ -17179,207 +23117,46 @@ "updated_at" ] }, - "ServiceinstanceCollection": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Serviceinstance" - }, - "example": [ - { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "production", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", - "service_instance_id": "mcp-server-host-1", - "state": "running", - "status": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" - }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ], - "service_ready": true - }, - "updated_at": "2025-01-28T10:05:00Z" - }, - { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "production", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", - "service_instance_id": "mcp-server-host-1", - "state": "running", - "status": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" - }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ], - "service_ready": true - }, - "updated_at": "2025-01-28T10:05:00Z" - }, - { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "production", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", - "service_instance_id": "mcp-server-host-1", - "state": "running", - "status": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" - }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ], - "service_ready": true - }, - "updated_at": "2025-01-28T10:05:00Z" - } - ] - }, - "ServiceinstanceResponseBody": { + "ServiceInstanceStatus": { "type": "object", "properties": { - "created_at": { - "type": "string", - "description": "The time that the service instance was created.", - "example": "2025-01-28T10:00:00Z", - "format": "date-time" - }, - "database_id": { - "type": "string", - "description": "Unique identifier for the database.", - "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "minLength": 1, - "maxLength": 63 - }, - "error": { + "container_id": { "type": "string", - "description": "An error message if the service instance is in an error state.", - "example": "failed to start container: image not found" + "description": "The Docker container ID.", + "example": "a1b2c3d4e5f6" }, - "host_id": { - "type": "string", - "description": "The ID of the host this service instance is running on.", - "example": "host-1" + "health_check": { + "$ref": "#/components/schemas/HealthCheckResult" }, - "service_id": { + "hostname": { "type": "string", - "description": "The service ID from the DatabaseSpec.", - "example": "mcp-server" + "description": "The hostname of the service instance.", + "example": "mcp-server-host-1.internal" }, - "service_instance_id": { + "image_version": { "type": "string", - "description": "Unique identifier for the service instance.", - "example": "mcp-server-host-1" + "description": "The container image version currently running.", + "example": "1.0.0" }, - "state": { + "ipv4_address": { "type": "string", - "description": "Current state of the service instance.", - "example": "running", - "enum": [ - "creating", - "running", - "failed", - "deleting" - ] - }, - "status": { - "$ref": "#/components/schemas/ServiceInstanceStatus" + "description": "The IPv4 address of the service instance.", + "example": "10.0.1.5", + "format": "ipv4" }, - "updated_at": { + "last_health_at": { "type": "string", - "description": "The time that the service instance was last updated.", - "example": "2025-01-28T10:05:00Z", + "description": "The time of the last health check attempt.", + "example": "2025-01-28T10:00:00Z", "format": "date-time" - } - }, - "description": "A service instance running on a host alongside the database. (default view)", - "example": { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", - "service_instance_id": "mcp-server-host-1", - "state": "running", - "status": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" + }, + "ports": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PortMapping" }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, + "description": "Port mappings for this service instance.", + "example": [ { "container_port": 8080, "host_port": 8080, @@ -17390,208 +23167,137 @@ "host_port": 8080, "name": "web-client" } - ], - "service_ready": true + ] }, - "updated_at": "2025-01-28T10:05:00Z" + "service_ready": { + "type": "boolean", + "description": "Whether the service is ready to accept requests.", + "example": true + } }, - "required": [ - "service_instance_id", - "service_id", - "database_id", - "host_id", - "state", - "created_at", - "updated_at" - ] + "description": "Runtime status information for a service instance.", + "example": { + "container_id": "a1b2c3d4e5f6", + "health_check": { + "checked_at": "2025-01-28T10:00:00Z", + "message": "Connection refused", + "status": "healthy" + }, + "hostname": "mcp-server-host-1.internal", + "image_version": "1.0.0", + "ipv4_address": "10.0.1.5", + "last_health_at": "2025-01-28T10:00:00Z", + "ports": [ + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + }, + { + "container_port": 8080, + "host_port": 8080, + "name": "web-client" + } + ], + "service_ready": true + } }, - "ServiceinstanceResponseBodyCollection": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ServiceinstanceResponseBody" - }, - "description": "ServiceinstanceCollectionResponseBody is the result type for an array of ServiceinstanceResponseBody (default view)", - "example": [ - { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", - "service_instance_id": "mcp-server-host-1", - "state": "running", - "status": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" - }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ], - "service_ready": true + "ServiceSpec": { + "type": "object", + "properties": { + "config": { + "type": "object", + "description": "Service-specific configuration. For MCP services, this includes llm_provider, llm_model, and provider-specific API keys.", + "example": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "additionalProperties": true + }, + "cpus": { + "type": "string", + "description": "The number of CPUs to allocate for this service. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if unspecified.", + "example": "500m", + "pattern": "^[0-9]+(\\.[0-9]{1,3}|m)?$" + }, + "host_ids": { + "type": "array", + "items": { + "type": "string", + "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 }, - "updated_at": "2025-01-28T10:05:00Z" + "description": "The IDs of the hosts that should run this service. One service instance will be created per host.", + "example": [ + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec" + ], + "minItems": 1 + }, + "memory": { + "type": "string", + "description": "The amount of memory in SI or IEC notation to allocate for this service. Defaults to container defaults if unspecified.", + "example": "512M", + "maxLength": 16 + }, + "port": { + "type": "integer", + "description": "The port to publish the service on the host. If 0, Docker assigns a random port. If unspecified, no port is published and the service is not accessible from outside the Docker network.", + "example": 0, + "format": "int64", + "minimum": 0, + "maximum": 65535 }, - { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", - "service_instance_id": "mcp-server-host-1", - "state": "running", - "status": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" - }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ], - "service_ready": true - }, - "updated_at": "2025-01-28T10:05:00Z" + "service_id": { + "type": "string", + "description": "A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens.", + "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", + "minLength": 1, + "maxLength": 63 }, - { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", - "service_instance_id": "mcp-server-host-1", - "state": "running", - "status": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" - }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ], - "service_ready": true - }, - "updated_at": "2025-01-28T10:05:00Z" + "service_type": { + "type": "string", + "description": "The type of service to run.", + "example": "mcp", + "enum": [ + "mcp" + ] }, - { - "created_at": "2025-01-28T10:00:00Z", - "database_id": "76f9b8c0-4958-11f0-a489-3bb29577c696", - "error": "failed to start container: image not found", - "host_id": "host-1", - "service_id": "mcp-server", - "service_instance_id": "mcp-server-host-1", - "state": "running", - "status": { - "container_id": "a1b2c3d4e5f6", - "health_check": { - "checked_at": "2025-01-28T10:00:00Z", - "message": "Connection refused", - "status": "healthy" - }, - "hostname": "mcp-server-host-1.internal", - "image_version": "1.0.0", - "ipv4_address": "10.0.1.5", - "last_health_at": "2025-01-28T10:00:00Z", - "ports": [ - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - }, - { - "container_port": 8080, - "host_port": 8080, - "name": "web-client" - } - ], - "service_ready": true - }, - "updated_at": "2025-01-28T10:05:00Z" + "version": { + "type": "string", + "description": "The version of the service in semver format (e.g., '1.0.0') or the literal 'latest'.", + "example": "latest", + "pattern": "^(\\d+\\.\\d+\\.\\d+|latest)$" } + }, + "example": { + "config": { + "llm_model": "gpt-4", + "llm_provider": "openai", + "openai_api_key": "sk-..." + }, + "cpus": "500m", + "host_ids": [ + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec", + "de3b1388-1f0c-42f1-a86c-59ab72f255ec" + ], + "memory": "512M", + "port": 0, + "service_id": "analytics-service", + "service_type": "mcp", + "version": "latest" + }, + "required": [ + "service_id", + "service_type", + "version", + "host_ids", + "config" ] }, "StartInstanceResponse": { @@ -17654,7 +23360,7 @@ }, "additionalProperties": { "type": "string", - "example": "Quos autem perspiciatis odit iusto quis." + "example": "Rerum animi et itaque placeat placeat." } }, "extra_networks": { @@ -17986,6 +23692,14 @@ "message": "task started", "timestamp": "2025-05-29T15:43:13Z" }, + { + "fields": { + "option.enabled": true, + "status": "creating" + }, + "message": "task started", + "timestamp": "2025-05-29T15:43:13Z" + }, { "fields": { "option.enabled": true, @@ -18226,11 +23940,11 @@ "type": "object", "properties": { "spec": { - "$ref": "#/components/schemas/DatabaseSpec4" + "$ref": "#/components/schemas/DatabaseSpec5" }, "tenant_id": { "type": "string", - "description": "Unique identifier for the databases's owner.", + "description": "Unique identifier for the database's owner.", "example": "76f9b8c0-4958-11f0-a489-3bb29577c696", "minLength": 1, "maxLength": 63 @@ -18482,6 +24196,179 @@ "database" ] }, + "UpdateDatabaseResponse2": { + "type": "object", + "properties": { + "database": { + "$ref": "#/components/schemas/Database4" + }, + "task": { + "$ref": "#/components/schemas/Task" + } + }, + "example": { + "database": { + "created_at": "2025-06-18T16:52:05Z", + "id": "storefront", + "instances": [ + { + "connection_info": { + "hostname": "i-0123456789abcdef.ec2.internal", + "ipv4_address": "10.24.34.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "us-east-1", + "id": "storefront-n1-689qacsi", + "node_name": "n1", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n1n3", + "provider_node": "n3", + "status": "replicating" + }, + { + "name": "sub_n1n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:36Z" + }, + { + "connection_info": { + "hostname": "i-058731542fee493f.ec2.internal", + "ipv4_address": "10.24.35.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "ap-south-1", + "id": "storefront-n2-9ptayhma", + "node_name": "n2", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n2n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n2n3", + "provider_node": "n3", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:01Z" + }, + { + "connection_info": { + "hostname": "i-494027b7b53f6a23.ec2.internal", + "ipv4_address": "10.24.36.2", + "port": 5432 + }, + "created_at": "2025-06-18T16:52:22Z", + "host_id": "eu-central-1", + "id": "storefront-n3-ant97dj4", + "node_name": "n3", + "postgres": { + "patroni_state": "running", + "role": "primary", + "version": "18.1" + }, + "spock": { + "read_only": "off", + "subscriptions": [ + { + "name": "sub_n3n1", + "provider_node": "n1", + "status": "replicating" + }, + { + "name": "sub_n3n2", + "provider_node": "n2", + "status": "replicating" + } + ], + "version": "4.0.10" + }, + "state": "available", + "status_updated_at": "2025-06-18T17:58:56Z", + "updated_at": "2025-06-18T17:54:01Z" + } + ], + "spec": { + "database_name": "storefront", + "database_users": [ + { + "attributes": [ + "SUPERUSER", + "LOGIN" + ], + "db_owner": true, + "username": "admin" + } + ], + "nodes": [ + { + "host_ids": [ + "us-east-1" + ], + "name": "n1" + }, + { + "host_ids": [ + "ap-south-1" + ], + "name": "n2" + }, + { + "host_ids": [ + "eu-central-1" + ], + "name": "n3" + } + ], + "port": 5432, + "postgres_version": "17.6", + "spock_version": "5" + }, + "state": "restoring", + "updated_at": "2025-06-18T17:58:59Z" + }, + "task": { + "created_at": "2025-06-18T17:23:14Z", + "database_id": "storefront", + "status": "pending", + "task_id": "01978410-fb5d-7cd2-bbd2-66c0bf929dc0", + "type": "update" + } + }, + "required": [ + "task", + "database" + ] + }, "VersionInfo": { "type": "object", "properties": { diff --git a/api/apiv1/gen/http/openapi3.yaml b/api/apiv1/gen/http/openapi3.yaml index 1693db4f..c28405e0 100644 --- a/api/apiv1/gen/http/openapi3.yaml +++ b/api/apiv1/gen/http/openapi3.yaml @@ -105,7 +105,7 @@ paths: spock_version: "5" id: 76f9b8c0-4958-11f0-a489-3bb29577c696 status: - state: error + state: available "409": description: 'cluster_not_initialized: Conflict response.' content: @@ -291,41 +291,167 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Listdatabasesresponse' + $ref: '#/components/schemas/ListDatabasesResponse' example: databases: - created_at: "2025-06-17T20:05:10Z" id: inventory instances: - - host_id: us-east-1 + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2025-06-17T20:05:10Z" + host_id: us-east-1 id: inventory-n1-689qacsi node_name: n1 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n3 + provider_node: n3 + status: replicating + - name: sub_n1n2 + provider_node: n2 + status: replicating + version: 4.0.10 state: available - - host_id: ap-south-1 + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-17T20:05:10Z" + - connection_info: + hostname: i-058731542fee493f.ec2.internal + ipv4_address: 10.24.35.2 + port: 5432 + created_at: "2025-06-17T20:05:10Z" + host_id: ap-south-1 id: inventory-n2-9ptayhma node_name: n2 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n2n1 + provider_node: n1 + status: replicating + - name: sub_n2n3 + provider_node: n3 + status: replicating + version: 4.0.10 state: available - - host_id: eu-central-1 + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-17T20:05:10Z" + - connection_info: + hostname: i-494027b7b53f6a23.ec2.internal + ipv4_address: 10.24.36.2 + port: 5432 + created_at: "2025-06-17T20:05:10Z" + host_id: eu-central-1 id: inventory-n3-ant97dj4 node_name: n3 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n3n1 + provider_node: n1 + status: replicating + - name: sub_n3n2 + provider_node: n2 + status: replicating + version: 4.0.10 state: available + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-17T20:05:10Z" state: available updated_at: "2025-06-17T20:05:10Z" - - created_at: "2025-06-17T20:05:10Z" + - created_at: "2025-06-12T15:10:05Z" id: storefront instances: - - host_id: us-east-1 + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 6432 + created_at: "2025-06-12T15:10:05Z" + host_id: us-east-1 id: storefront-n1-689qacsi node_name: n1 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n3 + provider_node: n3 + status: replicating + - name: sub_n1n2 + provider_node: n2 + status: replicating + version: 4.0.10 state: available - - host_id: ap-south-1 + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-12T15:10:05Z" + - connection_info: + hostname: i-058731542fee493f.ec2.internal + ipv4_address: 10.24.35.2 + port: 6432 + created_at: "2025-06-12T15:10:05Z" + host_id: ap-south-1 id: storefront-n2-9ptayhma node_name: n2 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n2n1 + provider_node: n1 + status: replicating + - name: sub_n2n3 + provider_node: n3 + status: replicating + version: 4.0.10 state: available - - host_id: eu-central-1 + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-12T15:10:05Z" + - connection_info: + hostname: i-494027b7b53f6a23.ec2.internal + ipv4_address: 10.24.36.2 + port: 6432 + created_at: "2025-06-12T15:10:05Z" + host_id: eu-central-1 id: storefront-n3-ant97dj4 node_name: n3 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n3n1 + provider_node: n1 + status: replicating + - name: sub_n3n2 + provider_node: n2 + status: replicating + version: 4.0.10 state: available + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-12T15:10:05Z" state: available updated_at: "2025-06-12T15:10:05Z" "409": @@ -589,7 +715,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CreateDatabaseResponse' + $ref: '#/components/schemas/CreateDatabaseResponse2' example: database: created_at: "2025-06-18T16:52:05Z" @@ -753,7 +879,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ControlPlaneGetDatabaseResponseBody' + $ref: '#/components/schemas/Database3' example: created_at: "2025-06-18T16:52:05Z" id: storefront @@ -917,16 +1043,18 @@ paths: type: array items: type: string - example: Et architecto. + example: Deserunt earum doloribus eos et error vel. description: Host IDs to treat as removed during this update. Events targeting these hosts will be skipped. example: - - Fuga qui id libero dignissimos. - - Est numquam perspiciatis. + - Recusandae aspernatur non sit aliquam dolor quam. + - Tempore veniam et. + - Dignissimos voluptatem soluta veritatis repellat est rerum. + - Inventore modi explicabo dicta sint. example: - - Sequi saepe velit. - - Ex sint dolorum vel. - - Laboriosam aut dolorum est. - - Consequatur mollitia illo delectus dolorum aut ducimus. + - Et animi magnam velit vitae praesentium ad. + - Eos pariatur nobis hic. + - Et consectetur eius temporibus. + - Porro ut placeat non ut. - name: database_id in: path description: ID of the database to update. @@ -1015,7 +1143,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateDatabaseResponse' + $ref: '#/components/schemas/UpdateDatabaseResponse2' example: database: created_at: "2025-06-18T16:52:05Z" @@ -1596,7 +1724,7 @@ paths: $ref: '#/components/schemas/FailoverDatabaseNodeRequest2' example: candidate_instance_id: 68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi - skip_validation: true + skip_validation: false responses: "200": description: OK response. @@ -1801,7 +1929,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RestoreDatabaseResponse' + $ref: '#/components/schemas/RestoreDatabaseResponse2' example: database: created_at: "2025-06-18T16:52:05Z" @@ -2705,19 +2833,7 @@ paths: orchestrator: swarm status: components: - Eveniet possimus dicta laudantium.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Repellendus in doloremque.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Rerum exercitationem laborum dignissimos incidunt in quas.: + Id dolorem rerum labore commodi.: details: alarms: - '3: NOSPACE' @@ -3404,26 +3520,6 @@ components: s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY s3_region: us-east-1 type: s3 - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 schedules: - cron_expression: 0 6 * * ? id: daily-full-backup @@ -3460,7 +3556,7 @@ components: key: value additionalProperties: type: string - example: Ut dolor dolorem impedit. + example: Nobis explicabo eum dolores quae. backup_options: type: object description: Options for the backup. @@ -3468,7 +3564,7 @@ components: archive-check: "n" additionalProperties: type: string - example: Et quia commodi consequatur ex possimus. + example: Molestiae neque. type: type: string description: The type of backup. @@ -3524,7 +3620,7 @@ components: storage-upload-chunk-size: 5MiB additionalProperties: type: string - example: Aut facere eius. + example: Ipsum officiis et est et dolorem labore. gcs_bucket: type: string description: The GCS bucket name for this repository. Only applies when type = 'gcs'. @@ -4031,161 +4127,6 @@ components: healthy: false required: - healthy - ControlPlaneGetDatabaseResponseBody: - type: object - properties: - created_at: - type: string - description: The time that the database was created. - example: "2025-01-01T01:30:00Z" - format: date-time - id: - type: string - description: Unique identifier for the database. - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - instances: - $ref: '#/components/schemas/InstanceResponseBodyCollection' - service_instances: - $ref: '#/components/schemas/ServiceinstanceResponseBodyCollection' - spec: - $ref: '#/components/schemas/DatabaseSpec3' - state: - type: string - description: Current state of the database. - example: creating - enum: - - creating - - modifying - - available - - deleting - - degraded - - failed - - backing_up - - restoring - - unknown - tenant_id: - type: string - description: Unique identifier for the database. - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - updated_at: - type: string - description: The time that the database was last updated. - example: "2025-01-01T02:30:00Z" - format: date-time - description: Get-DatabaseResponseBody result type (default view) - example: - created_at: "2025-06-18T16:52:05Z" - id: storefront - instances: - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "2025-06-18T16:52:22Z" - host_id: us-east-1 - id: storefront-n1-689qacsi - node_name: n1 - postgres: - patroni_state: running - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n3 - provider_node: n3 - status: replicating - - name: sub_n1n2 - provider_node: n2 - status: replicating - version: 4.0.10 - state: available - status_updated_at: "2025-06-18T17:58:56Z" - updated_at: "2025-06-18T17:54:36Z" - - connection_info: - hostname: i-058731542fee493f.ec2.internal - ipv4_address: 10.24.35.2 - port: 5432 - created_at: "2025-06-18T16:52:22Z" - host_id: ap-south-1 - id: storefront-n2-9ptayhma - node_name: n2 - postgres: - patroni_state: running - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n2n1 - provider_node: n1 - status: replicating - - name: sub_n2n3 - provider_node: n3 - status: replicating - version: 4.0.10 - state: available - status_updated_at: "2025-06-18T17:58:56Z" - updated_at: "2025-06-18T17:54:01Z" - - connection_info: - hostname: i-494027b7b53f6a23.ec2.internal - ipv4_address: 10.24.36.2 - port: 5432 - created_at: "2025-06-18T16:52:22Z" - host_id: eu-central-1 - id: storefront-n3-ant97dj4 - node_name: n3 - postgres: - patroni_state: running - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n3n1 - provider_node: n1 - status: replicating - - name: sub_n3n2 - provider_node: n2 - status: replicating - version: 4.0.10 - state: available - status_updated_at: "2025-06-18T17:58:56Z" - updated_at: "2025-06-18T17:54:01Z" - spec: - database_name: storefront - database_users: - - attributes: - - SUPERUSER - - LOGIN - db_owner: true - username: admin - nodes: - - host_ids: - - us-east-1 - name: n1 - - host_ids: - - ap-south-1 - name: n2 - - host_ids: - - eu-central-1 - name: n3 - port: 5432 - postgres_version: "17.6" - spock_version: "5" - state: restoring - updated_at: "2025-06-18T17:58:59Z" - required: - - id - - created_at - - updated_at - - state - - instances - - service_instances CreateDatabaseRequest: type: object properties: @@ -4242,7 +4183,7 @@ components: $ref: '#/components/schemas/DatabaseSpec2' tenant_id: type: string - description: Unique identifier for the databases's owner. + description: Unique identifier for the database's owner. example: 76f9b8c0-4958-11f0-a489-3bb29577c696 minLength: 1 maxLength: 63 @@ -4315,6 +4256,49 @@ components: required: - task - database + CreateDatabaseResponse2: + type: object + properties: + database: + $ref: '#/components/schemas/Database2' + task: + $ref: '#/components/schemas/Task' + example: + database: + created_at: "2025-06-18T16:52:05Z" + id: storefront + spec: + database_name: storefront + database_users: + - attributes: + - SUPERUSER + - LOGIN + db_owner: true + username: admin + nodes: + - host_ids: + - us-east-1 + name: n1 + - host_ids: + - ap-south-1 + name: n2 + - host_ids: + - eu-central-1 + name: n3 + port: 5432 + postgres_version: "17.6" + spock_version: "5" + state: creating + updated_at: "2025-06-18T16:52:05Z" + task: + created_at: "2025-06-18T16:52:05Z" + database_id: storefront + status: pending + task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 + type: create + required: + - task + - database Database: type: object properties: @@ -4330,525 +4314,436 @@ components: minLength: 1 maxLength: 63 instances: - $ref: '#/components/schemas/InstanceCollection' - service_instances: - $ref: '#/components/schemas/ServiceinstanceCollection' - spec: - $ref: '#/components/schemas/DatabaseSpec' - state: - type: string - description: Current state of the database. - example: restoring - enum: - - creating - - modifying - - available - - deleting - - degraded - - failed - - backing_up - - restoring - - unknown - tenant_id: - type: string - description: A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens. - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - updated_at: - type: string - description: The time that the database was last updated. - example: "2025-01-01T02:30:00Z" - format: date-time - example: - created_at: "2025-01-01T01:30:00Z" - id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - instances: - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" + type: array + items: + $ref: '#/components/schemas/Instance' + description: All of the instances in the database. + example: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" service_instances: - - created_at: "2025-01-28T10:00:00Z" - database_id: production - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" - - created_at: "2025-01-28T10:00:00Z" - database_id: production - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" - - created_at: "2025-01-28T10:00:00Z" - database_id: production - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" - spec: - backup_config: - repositories: - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - schedules: - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - cpus: 500m - database_name: northwind - database_users: - - attributes: - - LOGIN - - CREATEDB - - CREATEROLE - db_owner: true - password: secret - roles: - - pgedge_superuser - username: admin - - attributes: - - LOGIN - - CREATEDB - - CREATEROLE - db_owner: true - password: secret - roles: - - pgedge_superuser - username: admin - - attributes: - - LOGIN - - CREATEDB - - CREATEROLE - db_owner: true - password: secret - roles: - - pgedge_superuser + type: array + items: + $ref: '#/components/schemas/ServiceInstance' + description: Service instances running alongside this database. + example: + - created_at: "2025-01-28T10:00:00Z" + database_id: production + error: 'failed to start container: image not found' + host_id: host-1 + service_id: mcp-server + service_instance_id: mcp-server-host-1 + state: running + status: + container_id: a1b2c3d4e5f6 + health_check: + checked_at: "2025-01-28T10:00:00Z" + message: Connection refused + status: healthy + hostname: mcp-server-host-1.internal + image_version: 1.0.0 + ipv4_address: 10.0.1.5 + last_health_at: "2025-01-28T10:00:00Z" + ports: + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + service_ready: true + updated_at: "2025-01-28T10:05:00Z" + - created_at: "2025-01-28T10:00:00Z" + database_id: production + error: 'failed to start container: image not found' + host_id: host-1 + service_id: mcp-server + service_instance_id: mcp-server-host-1 + state: running + status: + container_id: a1b2c3d4e5f6 + health_check: + checked_at: "2025-01-28T10:00:00Z" + message: Connection refused + status: healthy + hostname: mcp-server-host-1.internal + image_version: 1.0.0 + ipv4_address: 10.0.1.5 + last_health_at: "2025-01-28T10:00:00Z" + ports: + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + service_ready: true + updated_at: "2025-01-28T10:05:00Z" + - created_at: "2025-01-28T10:00:00Z" + database_id: production + error: 'failed to start container: image not found' + host_id: host-1 + service_id: mcp-server + service_instance_id: mcp-server-host-1 + state: running + status: + container_id: a1b2c3d4e5f6 + health_check: + checked_at: "2025-01-28T10:00:00Z" + message: Connection refused + status: healthy + hostname: mcp-server-host-1.internal + image_version: 1.0.0 + ipv4_address: 10.0.1.5 + last_health_at: "2025-01-28T10:00:00Z" + ports: + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + service_ready: true + updated_at: "2025-01-28T10:05:00Z" + - created_at: "2025-01-28T10:00:00Z" + database_id: production + error: 'failed to start container: image not found' + host_id: host-1 + service_id: mcp-server + service_instance_id: mcp-server-host-1 + state: running + status: + container_id: a1b2c3d4e5f6 + health_check: + checked_at: "2025-01-28T10:00:00Z" + message: Connection refused + status: healthy + hostname: mcp-server-host-1.internal + image_version: 1.0.0 + ipv4_address: 10.0.1.5 + last_health_at: "2025-01-28T10:00:00Z" + ports: + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + service_ready: true + updated_at: "2025-01-28T10:05:00Z" + spec: + $ref: '#/components/schemas/DatabaseSpec' + state: + type: string + description: Current state of the database. + example: backing_up + enum: + - creating + - modifying + - available + - deleting + - degraded + - failed + - backing_up + - restoring + - unknown + tenant_id: + type: string + description: A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + updated_at: + type: string + description: The time that the database was last updated. + example: "2025-01-01T02:30:00Z" + format: date-time + example: + created_at: "2025-06-18T16:52:05Z" + id: storefront + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: us-east-1 + id: storefront-n1-689qacsi + node_name: n1 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n3 + provider_node: n3 + status: replicating + - name: sub_n1n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:36Z" + - connection_info: + hostname: i-058731542fee493f.ec2.internal + ipv4_address: 10.24.35.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: ap-south-1 + id: storefront-n2-9ptayhma + node_name: n2 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n2n1 + provider_node: n1 + status: replicating + - name: sub_n2n3 + provider_node: n3 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:01Z" + - connection_info: + hostname: i-494027b7b53f6a23.ec2.internal + ipv4_address: 10.24.36.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: eu-central-1 + id: storefront-n3-ant97dj4 + node_name: n3 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n3n1 + provider_node: n1 + status: replicating + - name: sub_n3n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:01Z" + spec: + database_name: storefront + database_users: + - attributes: + - SUPERUSER + - LOGIN + db_owner: true username: admin - memory: 500M nodes: - - backup_config: - repositories: - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - schedules: - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 500M + - host_ids: + - us-east-1 name: n1 - orchestrator_opts: - swarm: - extra_labels: - traefik.enable: "true" - traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) - extra_networks: - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - extra_volumes: - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - port: 5432 - postgres_version: "17.6" - postgresql_conf: - max_connections: 1000 - restore_config: - repository: - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - source_database_name: northwind - source_node_name: n1 - source_node: n1 - orchestrator_opts: - swarm: - extra_labels: - traefik.enable: "true" - traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) - extra_networks: - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - extra_volumes: - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host + - host_ids: + - ap-south-1 + name: n2 + - host_ids: + - eu-central-1 + name: n3 port: 5432 postgres_version: "17.6" - postgresql_conf: - max_connections: 1000 - restore_config: - repository: - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - source_database_name: northwind - source_node_name: n1 - services: - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest spock_version: "5" state: restoring - tenant_id: 8210ec10-2dca-406c-ac4a-0661d2189954 - updated_at: "2025-01-01T02:30:00Z" + updated_at: "2025-06-18T17:58:59Z" required: - id - created_at - updated_at - state - - instances - - service_instances - DatabaseCollection: - type: array - items: - $ref: '#/components/schemas/Database' - example: - - created_at: "2025-01-01T01:30:00Z" - id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - instances: + Database2: + type: object + properties: + created_at: + type: string + description: The time that the database was created. + example: "2025-01-01T01:30:00Z" + format: date-time + id: + type: string + description: Unique identifier for the database. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + instances: + type: array + items: + $ref: '#/components/schemas/Instance' + description: All of the instances in the database. + example: - connection_info: hostname: i-0123456789abcdef.ec2.internal ipv4_address: 10.24.34.2 port: 5432 - created_at: "1987-03-24T21:22:02Z" + created_at: "2011-03-15T17:48:48Z" error: 'failed to get patroni status: connection refused' host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d node_name: n1 postgres: - patroni_paused: true + patroni_paused: false patroni_state: unknown - pending_restart: false + pending_restart: true role: primary version: "18.1" spock: @@ -4860,23 +4755,26 @@ components: - name: sub_n1n2 provider_node: n2 status: down + - name: sub_n1n2 + provider_node: n2 + status: down version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" - connection_info: hostname: i-0123456789abcdef.ec2.internal ipv4_address: 10.24.34.2 port: 5432 - created_at: "1987-03-24T21:22:02Z" + created_at: "2011-03-15T17:48:48Z" error: 'failed to get patroni status: connection refused' host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d node_name: n1 postgres: - patroni_paused: true + patroni_paused: false patroni_state: unknown - pending_restart: false + pending_restart: true role: primary version: "18.1" spock: @@ -4888,23 +4786,26 @@ components: - name: sub_n1n2 provider_node: n2 status: down + - name: sub_n1n2 + provider_node: n2 + status: down version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" - connection_info: hostname: i-0123456789abcdef.ec2.internal ipv4_address: 10.24.34.2 port: 5432 - created_at: "1987-03-24T21:22:02Z" + created_at: "2011-03-15T17:48:48Z" error: 'failed to get patroni status: connection refused' host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d node_name: n1 postgres: - patroni_paused: true + patroni_paused: false patroni_state: unknown - pending_restart: false + pending_restart: true role: primary version: "18.1" spock: @@ -4916,23 +4817,26 @@ components: - name: sub_n1n2 provider_node: n2 status: down + - name: sub_n1n2 + provider_node: n2 + status: down version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" - connection_info: hostname: i-0123456789abcdef.ec2.internal ipv4_address: 10.24.34.2 port: 5432 - created_at: "1987-03-24T21:22:02Z" + created_at: "2011-03-15T17:48:48Z" error: 'failed to get patroni status: connection refused' host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d node_name: n1 postgres: - patroni_paused: true + patroni_paused: false patroni_state: unknown - pending_restart: false + pending_restart: true role: primary version: "18.1" spock: @@ -4944,13 +4848,21 @@ components: - name: sub_n1n2 provider_node: n2 status: down + - name: sub_n1n2 + provider_node: n2 + status: down version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - service_instances: + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + service_instances: + type: array + items: + $ref: '#/components/schemas/ServiceInstance' + description: Service instances running alongside this database. + example: - created_at: "2025-01-28T10:00:00Z" - database_id: production + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 error: 'failed to start container: image not found' host_id: host-1 service_id: mcp-server @@ -4973,10 +4885,16 @@ components: - container_port: 8080 host_port: 8080 name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client service_ready: true updated_at: "2025-01-28T10:05:00Z" - created_at: "2025-01-28T10:00:00Z" - database_id: production + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 error: 'failed to start container: image not found' host_id: host-1 service_id: mcp-server @@ -4999,10 +4917,16 @@ components: - container_port: 8080 host_port: 8080 name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client service_ready: true updated_at: "2025-01-28T10:05:00Z" - created_at: "2025-01-28T10:00:00Z" - database_id: production + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 error: 'failed to start container: image not found' host_id: host-1 service_id: mcp-server @@ -5025,290 +4949,181 @@ components: - container_port: 8080 host_port: 8080 name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client service_ready: true updated_at: "2025-01-28T10:05:00Z" - spec: - backup_config: - repositories: - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - schedules: - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - cpus: 500m - database_name: northwind - database_users: - - attributes: - - LOGIN - - CREATEDB - - CREATEROLE - db_owner: true - password: secret - roles: - - pgedge_superuser - username: admin - - attributes: - - LOGIN - - CREATEDB - - CREATEROLE - db_owner: true - password: secret - roles: - - pgedge_superuser - username: admin - - attributes: - - LOGIN - - CREATEDB - - CREATEROLE - db_owner: true - password: secret - roles: - - pgedge_superuser - username: admin - memory: 500M - nodes: - - backup_config: - repositories: - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - schedules: - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 500M - name: n1 - orchestrator_opts: - swarm: - extra_labels: - traefik.enable: "true" - traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) - extra_networks: - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - extra_volumes: - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - port: 5432 - postgres_version: "17.6" - postgresql_conf: - max_connections: 1000 - restore_config: - repository: - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - source_database_name: northwind - source_node_name: n1 - source_node: n1 - orchestrator_opts: - swarm: - extra_labels: - traefik.enable: "true" - traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) - extra_networks: - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - extra_volumes: - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - port: 5432 - postgres_version: "17.6" - postgresql_conf: - max_connections: 1000 - restore_config: - repository: - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - source_database_name: northwind - source_node_name: n1 - services: - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - spock_version: "5" - state: creating - tenant_id: 8210ec10-2dca-406c-ac4a-0661d2189954 - updated_at: "2025-01-01T02:30:00Z" - - created_at: "2025-01-01T01:30:00Z" - id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - instances: + spec: + $ref: '#/components/schemas/DatabaseSpec3' + state: + type: string + description: Current state of the database. + example: backing_up + enum: + - creating + - modifying + - available + - deleting + - degraded + - failed + - backing_up + - restoring + - unknown + tenant_id: + type: string + description: Unique identifier for the database's owner. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + updated_at: + type: string + description: The time that the database was last updated. + example: "2025-01-01T02:30:00Z" + format: date-time + example: + created_at: "2025-06-18T16:52:05Z" + id: storefront + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: us-east-1 + id: storefront-n1-689qacsi + node_name: n1 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n3 + provider_node: n3 + status: replicating + - name: sub_n1n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:36Z" + - connection_info: + hostname: i-058731542fee493f.ec2.internal + ipv4_address: 10.24.35.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: ap-south-1 + id: storefront-n2-9ptayhma + node_name: n2 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n2n1 + provider_node: n1 + status: replicating + - name: sub_n2n3 + provider_node: n3 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:01Z" + - connection_info: + hostname: i-494027b7b53f6a23.ec2.internal + ipv4_address: 10.24.36.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: eu-central-1 + id: storefront-n3-ant97dj4 + node_name: n3 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n3n1 + provider_node: n1 + status: replicating + - name: sub_n3n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:01Z" + spec: + database_name: storefront + database_users: + - attributes: + - SUPERUSER + - LOGIN + db_owner: true + username: admin + nodes: + - host_ids: + - us-east-1 + name: n1 + - host_ids: + - ap-south-1 + name: n2 + - host_ids: + - eu-central-1 + name: n3 + port: 5432 + postgres_version: "17.6" + spock_version: "5" + state: restoring + updated_at: "2025-06-18T17:58:59Z" + required: + - id + - created_at + - updated_at + - state + Database3: + type: object + properties: + created_at: + type: string + description: The time that the database was created. + example: "2025-01-01T01:30:00Z" + format: date-time + id: + type: string + description: Unique identifier for the database. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + instances: + type: array + items: + $ref: '#/components/schemas/Instance' + description: All of the instances in the database. + example: - connection_info: hostname: i-0123456789abcdef.ec2.internal ipv4_address: 10.24.34.2 port: 5432 - created_at: "1987-03-24T21:22:02Z" + created_at: "2011-03-15T17:48:48Z" error: 'failed to get patroni status: connection refused' host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d node_name: n1 postgres: - patroni_paused: true + patroni_paused: false patroni_state: unknown - pending_restart: false + pending_restart: true role: primary version: "18.1" spock: @@ -5320,51 +5135,26 @@ components: - name: sub_n1n2 provider_node: n2 status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - name: sub_n1n2 provider_node: n2 status: down version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" - connection_info: hostname: i-0123456789abcdef.ec2.internal ipv4_address: 10.24.34.2 port: 5432 - created_at: "1987-03-24T21:22:02Z" + created_at: "2011-03-15T17:48:48Z" error: 'failed to get patroni status: connection refused' host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d node_name: n1 postgres: - patroni_paused: true + patroni_paused: false patroni_state: unknown - pending_restart: false + pending_restart: true role: primary version: "18.1" spock: @@ -5376,23 +5166,26 @@ components: - name: sub_n1n2 provider_node: n2 status: down + - name: sub_n1n2 + provider_node: n2 + status: down version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" - connection_info: hostname: i-0123456789abcdef.ec2.internal ipv4_address: 10.24.34.2 port: 5432 - created_at: "1987-03-24T21:22:02Z" + created_at: "2011-03-15T17:48:48Z" error: 'failed to get patroni status: connection refused' host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d node_name: n1 postgres: - patroni_paused: true + patroni_paused: false patroni_state: unknown - pending_restart: false + pending_restart: true role: primary version: "18.1" spock: @@ -5404,13 +5197,21 @@ components: - name: sub_n1n2 provider_node: n2 status: down + - name: sub_n1n2 + provider_node: n2 + status: down version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - service_instances: - - created_at: "2025-01-28T10:00:00Z" - database_id: production + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + service_instances: + type: array + items: + $ref: '#/components/schemas/ServiceInstance' + description: Service instances running alongside this database. + example: + - created_at: "2025-01-28T10:00:00Z" + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 error: 'failed to start container: image not found' host_id: host-1 service_id: mcp-server @@ -5433,10 +5234,16 @@ components: - container_port: 8080 host_port: 8080 name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client service_ready: true updated_at: "2025-01-28T10:05:00Z" - created_at: "2025-01-28T10:00:00Z" - database_id: production + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 error: 'failed to start container: image not found' host_id: host-1 service_id: mcp-server @@ -5459,10 +5266,16 @@ components: - container_port: 8080 host_port: 8080 name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client service_ready: true updated_at: "2025-01-28T10:05:00Z" - created_at: "2025-01-28T10:00:00Z" - database_id: production + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 error: 'failed to start container: image not found' host_id: host-1 service_id: mcp-server @@ -5485,392 +5298,16 @@ components: - container_port: 8080 host_port: 8080 name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client service_ready: true updated_at: "2025-01-28T10:05:00Z" - spec: - backup_config: - repositories: - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - schedules: - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - cpus: 500m - database_name: northwind - database_users: - - attributes: - - LOGIN - - CREATEDB - - CREATEROLE - db_owner: true - password: secret - roles: - - pgedge_superuser - username: admin - - attributes: - - LOGIN - - CREATEDB - - CREATEROLE - db_owner: true - password: secret - roles: - - pgedge_superuser - username: admin - - attributes: - - LOGIN - - CREATEDB - - CREATEROLE - db_owner: true - password: secret - roles: - - pgedge_superuser - username: admin - memory: 500M - nodes: - - backup_config: - repositories: - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - schedules: - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 500M - name: n1 - orchestrator_opts: - swarm: - extra_labels: - traefik.enable: "true" - traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) - extra_networks: - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - extra_volumes: - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - port: 5432 - postgres_version: "17.6" - postgresql_conf: - max_connections: 1000 - restore_config: - repository: - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - source_database_name: northwind - source_node_name: n1 - source_node: n1 - orchestrator_opts: - swarm: - extra_labels: - traefik.enable: "true" - traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) - extra_networks: - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - extra_volumes: - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - port: 5432 - postgres_version: "17.6" - postgresql_conf: - max_connections: 1000 - restore_config: - repository: - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - source_database_name: northwind - source_node_name: n1 - services: - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - spock_version: "5" - state: creating - tenant_id: 8210ec10-2dca-406c-ac4a-0661d2189954 - updated_at: "2025-01-01T02:30:00Z" - - created_at: "2025-01-01T01:30:00Z" - id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - instances: - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - service_instances: - created_at: "2025-01-28T10:00:00Z" - database_id: production + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 error: 'failed to start container: image not found' host_id: host-1 service_id: mcp-server @@ -5893,10 +5330,300 @@ components: - container_port: 8080 host_port: 8080 name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client service_ready: true updated_at: "2025-01-28T10:05:00Z" + spec: + $ref: '#/components/schemas/DatabaseSpec4' + state: + type: string + description: Current state of the database. + example: available + enum: + - creating + - modifying + - available + - deleting + - degraded + - failed + - backing_up + - restoring + - unknown + tenant_id: + type: string + description: Unique identifier for the database's owner. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + updated_at: + type: string + description: The time that the database was last updated. + example: "2025-01-01T02:30:00Z" + format: date-time + example: + created_at: "2025-06-18T16:52:05Z" + id: storefront + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: us-east-1 + id: storefront-n1-689qacsi + node_name: n1 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n3 + provider_node: n3 + status: replicating + - name: sub_n1n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:36Z" + - connection_info: + hostname: i-058731542fee493f.ec2.internal + ipv4_address: 10.24.35.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: ap-south-1 + id: storefront-n2-9ptayhma + node_name: n2 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n2n1 + provider_node: n1 + status: replicating + - name: sub_n2n3 + provider_node: n3 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:01Z" + - connection_info: + hostname: i-494027b7b53f6a23.ec2.internal + ipv4_address: 10.24.36.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: eu-central-1 + id: storefront-n3-ant97dj4 + node_name: n3 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n3n1 + provider_node: n1 + status: replicating + - name: sub_n3n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:01Z" + spec: + database_name: storefront + database_users: + - attributes: + - SUPERUSER + - LOGIN + db_owner: true + username: admin + nodes: + - host_ids: + - us-east-1 + name: n1 + - host_ids: + - ap-south-1 + name: n2 + - host_ids: + - eu-central-1 + name: n3 + port: 5432 + postgres_version: "17.6" + spock_version: "5" + state: restoring + updated_at: "2025-06-18T17:58:59Z" + required: + - id + - created_at + - updated_at + - state + Database4: + type: object + properties: + created_at: + type: string + description: The time that the database was created. + example: "2025-01-01T01:30:00Z" + format: date-time + id: + type: string + description: Unique identifier for the database. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + instances: + type: array + items: + $ref: '#/components/schemas/Instance' + description: All of the instances in the database. + example: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + service_instances: + type: array + items: + $ref: '#/components/schemas/ServiceInstance' + description: Service instances running alongside this database. + example: - created_at: "2025-01-28T10:00:00Z" - database_id: production + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 error: 'failed to start container: image not found' host_id: host-1 service_id: mcp-server @@ -5919,26 +5646,6 @@ components: - container_port: 8080 host_port: 8080 name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" - - created_at: "2025-01-28T10:00:00Z" - database_id: production - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - container_port: 8080 host_port: 8080 name: web-client @@ -5947,390 +5654,8 @@ components: name: web-client service_ready: true updated_at: "2025-01-28T10:05:00Z" - spec: - backup_config: - repositories: - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - schedules: - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - cpus: 500m - database_name: northwind - database_users: - - attributes: - - LOGIN - - CREATEDB - - CREATEROLE - db_owner: true - password: secret - roles: - - pgedge_superuser - username: admin - - attributes: - - LOGIN - - CREATEDB - - CREATEROLE - db_owner: true - password: secret - roles: - - pgedge_superuser - username: admin - - attributes: - - LOGIN - - CREATEDB - - CREATEROLE - db_owner: true - password: secret - roles: - - pgedge_superuser - username: admin - memory: 500M - nodes: - - backup_config: - repositories: - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - schedules: - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 500M - name: n1 - orchestrator_opts: - swarm: - extra_labels: - traefik.enable: "true" - traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) - extra_networks: - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - extra_volumes: - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - port: 5432 - postgres_version: "17.6" - postgresql_conf: - max_connections: 1000 - restore_config: - repository: - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - source_database_name: northwind - source_node_name: n1 - source_node: n1 - orchestrator_opts: - swarm: - extra_labels: - traefik.enable: "true" - traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) - extra_networks: - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - extra_volumes: - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - port: 5432 - postgres_version: "17.6" - postgresql_conf: - max_connections: 1000 - restore_config: - repository: - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - source_database_name: northwind - source_node_name: n1 - services: - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - spock_version: "5" - state: creating - tenant_id: 8210ec10-2dca-406c-ac4a-0661d2189954 - updated_at: "2025-01-01T02:30:00Z" - - created_at: "2025-01-01T01:30:00Z" - id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - instances: - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - service_instances: - created_at: "2025-01-28T10:00:00Z" - database_id: production + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 error: 'failed to start container: image not found' host_id: host-1 service_id: mcp-server @@ -6353,10 +5678,16 @@ components: - container_port: 8080 host_port: 8080 name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client service_ready: true updated_at: "2025-01-28T10:05:00Z" - created_at: "2025-01-28T10:00:00Z" - database_id: production + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 error: 'failed to start container: image not found' host_id: host-1 service_id: mcp-server @@ -6379,26 +5710,6 @@ components: - container_port: 8080 host_port: 8080 name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" - - created_at: "2025-01-28T10:00:00Z" - database_id: production - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - container_port: 8080 host_port: 8080 name: web-client @@ -6407,879 +5718,4236 @@ components: name: web-client service_ready: true updated_at: "2025-01-28T10:05:00Z" - spec: - backup_config: - repositories: - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - schedules: - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - cpus: 500m - database_name: northwind - database_users: - - attributes: - - LOGIN - - CREATEDB - - CREATEROLE - db_owner: true - password: secret - roles: - - pgedge_superuser - username: admin - - attributes: - - LOGIN - - CREATEDB - - CREATEROLE - db_owner: true - password: secret - roles: - - pgedge_superuser - username: admin - - attributes: - - LOGIN - - CREATEDB - - CREATEROLE - db_owner: true - password: secret - roles: - - pgedge_superuser - username: admin - memory: 500M - nodes: - - backup_config: - repositories: - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - schedules: - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 500M - name: n1 - orchestrator_opts: - swarm: - extra_labels: - traefik.enable: "true" - traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) - extra_networks: - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - extra_volumes: - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - port: 5432 - postgres_version: "17.6" - postgresql_conf: - max_connections: 1000 - restore_config: - repository: - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - source_database_name: northwind - source_node_name: n1 - source_node: n1 - orchestrator_opts: - swarm: - extra_labels: - traefik.enable: "true" - traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) - extra_networks: - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - extra_volumes: - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - port: 5432 - postgres_version: "17.6" - postgresql_conf: - max_connections: 1000 - restore_config: - repository: - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - source_database_name: northwind - source_node_name: n1 - services: - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - spock_version: "5" - state: creating - tenant_id: 8210ec10-2dca-406c-ac4a-0661d2189954 - updated_at: "2025-01-01T02:30:00Z" - DatabaseNodeSpec: - type: object - properties: - backup_config: - $ref: '#/components/schemas/BackupConfigSpec' - cpus: - type: string - description: The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator. - example: 500m - pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ - host_ids: - type: array - items: - type: string - description: A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens. - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - description: The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas. - example: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - minItems: 1 - memory: - type: string - description: The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator. - example: 500M - maxLength: 16 - name: + spec: + $ref: '#/components/schemas/DatabaseSpec6' + state: type: string - description: The name of the database node. - example: n1 - pattern: n[0-9]+ - orchestrator_opts: - $ref: '#/components/schemas/OrchestratorOpts' - port: - type: integer - description: The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec. - example: 5432 - format: int64 - minimum: 0 - maximum: 65535 - postgres_version: + description: Current state of the database. + example: deleting + enum: + - creating + - modifying + - available + - deleting + - degraded + - failed + - backing_up + - restoring + - unknown + tenant_id: type: string - description: The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec. - example: "17.6" - pattern: ^\d{2}\.\d{1,2}$ - postgresql_conf: - type: object - description: Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane. - example: - max_connections: 1000 - additionalProperties: true - restore_config: - $ref: '#/components/schemas/RestoreConfigSpec' - source_node: + description: Unique identifier for the database's owner. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + updated_at: type: string - description: The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node. - example: n1 + description: The time that the database was last updated. + example: "2025-01-01T02:30:00Z" + format: date-time example: - backup_config: - repositories: - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - schedules: - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 500M - name: n1 - orchestrator_opts: - swarm: - extra_labels: - traefik.enable: "true" - traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) - extra_networks: - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - extra_volumes: - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - port: 5432 - postgres_version: "17.6" - postgresql_conf: - max_connections: 1000 - restore_config: - repository: - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 - source_database_name: northwind - source_node_name: n1 - source_node: n1 + created_at: "2025-06-18T16:52:05Z" + id: storefront + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: us-east-1 + id: storefront-n1-689qacsi + node_name: n1 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n3 + provider_node: n3 + status: replicating + - name: sub_n1n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:36Z" + - connection_info: + hostname: i-058731542fee493f.ec2.internal + ipv4_address: 10.24.35.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: ap-south-1 + id: storefront-n2-9ptayhma + node_name: n2 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n2n1 + provider_node: n1 + status: replicating + - name: sub_n2n3 + provider_node: n3 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:01Z" + - connection_info: + hostname: i-494027b7b53f6a23.ec2.internal + ipv4_address: 10.24.36.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: eu-central-1 + id: storefront-n3-ant97dj4 + node_name: n3 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n3n1 + provider_node: n1 + status: replicating + - name: sub_n3n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:01Z" + spec: + database_name: storefront + database_users: + - attributes: + - SUPERUSER + - LOGIN + db_owner: true + username: admin + nodes: + - host_ids: + - us-east-1 + name: n1 + - host_ids: + - ap-south-1 + name: n2 + - host_ids: + - eu-central-1 + name: n3 + port: 5432 + postgres_version: "17.6" + spock_version: "5" + state: restoring + updated_at: "2025-06-18T17:58:59Z" required: - - name - - host_ids - DatabaseNodeSpec2: + - id + - created_at + - updated_at + - state + Database5: type: object properties: - backup_config: - $ref: '#/components/schemas/BackupConfigSpec' - cpus: + created_at: type: string - description: The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator. - example: 500m - pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ - host_ids: + description: The time that the database was created. + example: "2025-01-01T01:30:00Z" + format: date-time + id: + type: string + description: Unique identifier for the database. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + instances: type: array items: - type: string - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - description: The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas. - example: - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - minItems: 1 - memory: - type: string - description: The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator. - example: 500M - maxLength: 16 - name: - type: string - description: The name of the database node. - example: n1 - pattern: n[0-9]+ - orchestrator_opts: - $ref: '#/components/schemas/OrchestratorOpts' - port: - type: integer - description: The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec. - example: 5432 - format: int64 - minimum: 0 - maximum: 65535 - postgres_version: - type: string - description: The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec. - example: "17.6" - pattern: ^\d{2}\.\d{1,2}$ - postgresql_conf: - type: object - description: Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane. + $ref: '#/components/schemas/Instance' + description: All of the instances in the database. example: - max_connections: 1000 - additionalProperties: true - restore_config: - $ref: '#/components/schemas/RestoreConfigSpec' - source_node: - type: string - description: The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node. - example: n1 - example: - backup_config: - repositories: - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - schedules: - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - cpus: 500m - host_ids: - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - memory: 500M - name: n1 - orchestrator_opts: - swarm: - extra_labels: - traefik.enable: "true" - traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) - extra_networks: - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - extra_volumes: - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - port: 5432 - postgres_version: "17.6" - postgresql_conf: - max_connections: 1000 - restore_config: - repository: - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - source_database_name: northwind - source_node_name: n1 - source_node: n1 - required: - - name - - host_ids - DatabaseNodeSpec3: - type: object - properties: - backup_config: - $ref: '#/components/schemas/BackupConfigSpec' - cpus: - type: string - description: The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator. - example: 500m - pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ - host_ids: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2011-03-15T17:48:48Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "1993-04-25T23:06:28Z" + updated_at: "1981-08-22T23:20:01Z" + service_instances: type: array items: - type: string - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - description: The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas. + $ref: '#/components/schemas/ServiceInstance' + description: Service instances running alongside this database. example: - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - created_at: "2025-01-28T10:00:00Z" + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + error: 'failed to start container: image not found' + host_id: host-1 + service_id: mcp-server + service_instance_id: mcp-server-host-1 + state: running + status: + container_id: a1b2c3d4e5f6 + health_check: + checked_at: "2025-01-28T10:00:00Z" + message: Connection refused + status: healthy + hostname: mcp-server-host-1.internal + image_version: 1.0.0 + ipv4_address: 10.0.1.5 + last_health_at: "2025-01-28T10:00:00Z" + ports: + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + service_ready: true + updated_at: "2025-01-28T10:05:00Z" + - created_at: "2025-01-28T10:00:00Z" + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + error: 'failed to start container: image not found' + host_id: host-1 + service_id: mcp-server + service_instance_id: mcp-server-host-1 + state: running + status: + container_id: a1b2c3d4e5f6 + health_check: + checked_at: "2025-01-28T10:00:00Z" + message: Connection refused + status: healthy + hostname: mcp-server-host-1.internal + image_version: 1.0.0 + ipv4_address: 10.0.1.5 + last_health_at: "2025-01-28T10:00:00Z" + ports: + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + service_ready: true + updated_at: "2025-01-28T10:05:00Z" + - created_at: "2025-01-28T10:00:00Z" + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + error: 'failed to start container: image not found' + host_id: host-1 + service_id: mcp-server + service_instance_id: mcp-server-host-1 + state: running + status: + container_id: a1b2c3d4e5f6 + health_check: + checked_at: "2025-01-28T10:00:00Z" + message: Connection refused + status: healthy + hostname: mcp-server-host-1.internal + image_version: 1.0.0 + ipv4_address: 10.0.1.5 + last_health_at: "2025-01-28T10:00:00Z" + ports: + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + service_ready: true + updated_at: "2025-01-28T10:05:00Z" + - created_at: "2025-01-28T10:00:00Z" + database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + error: 'failed to start container: image not found' + host_id: host-1 + service_id: mcp-server + service_instance_id: mcp-server-host-1 + state: running + status: + container_id: a1b2c3d4e5f6 + health_check: + checked_at: "2025-01-28T10:00:00Z" + message: Connection refused + status: healthy + hostname: mcp-server-host-1.internal + image_version: 1.0.0 + ipv4_address: 10.0.1.5 + last_health_at: "2025-01-28T10:00:00Z" + ports: + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + service_ready: true + updated_at: "2025-01-28T10:05:00Z" + spec: + $ref: '#/components/schemas/DatabaseSpec7' + state: + type: string + description: Current state of the database. + example: creating + enum: + - creating + - modifying + - available + - deleting + - degraded + - failed + - backing_up + - restoring + - unknown + tenant_id: + type: string + description: Unique identifier for the database's owner. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + updated_at: + type: string + description: The time that the database was last updated. + example: "2025-01-01T02:30:00Z" + format: date-time + example: + created_at: "2025-06-18T16:52:05Z" + id: storefront + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: us-east-1 + id: storefront-n1-689qacsi + node_name: n1 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n3 + provider_node: n3 + status: replicating + - name: sub_n1n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:36Z" + - connection_info: + hostname: i-058731542fee493f.ec2.internal + ipv4_address: 10.24.35.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: ap-south-1 + id: storefront-n2-9ptayhma + node_name: n2 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n2n1 + provider_node: n1 + status: replicating + - name: sub_n2n3 + provider_node: n3 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:01Z" + - connection_info: + hostname: i-494027b7b53f6a23.ec2.internal + ipv4_address: 10.24.36.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: eu-central-1 + id: storefront-n3-ant97dj4 + node_name: n3 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n3n1 + provider_node: n1 + status: replicating + - name: sub_n3n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:01Z" + spec: + database_name: storefront + database_users: + - attributes: + - SUPERUSER + - LOGIN + db_owner: true + username: admin + nodes: + - host_ids: + - us-east-1 + name: n1 + - host_ids: + - ap-south-1 + name: n2 + - host_ids: + - eu-central-1 + name: n3 + port: 5432 + postgres_version: "17.6" + spock_version: "5" + state: restoring + updated_at: "2025-06-18T17:58:59Z" + required: + - id + - created_at + - updated_at + - state + DatabaseNodeSpec: + type: object + properties: + backup_config: + $ref: '#/components/schemas/BackupConfigSpec' + cpus: + type: string + description: The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator. + example: 500m + pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ + host_ids: + type: array + items: + type: string + description: A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + description: The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas. + example: + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + minItems: 1 + memory: + type: string + description: The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator. + example: 500M + maxLength: 16 + name: + type: string + description: The name of the database node. + example: n1 + pattern: n[0-9]+ + orchestrator_opts: + $ref: '#/components/schemas/OrchestratorOpts' + port: + type: integer + description: The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec. + example: 5432 + format: int64 + minimum: 0 + maximum: 65535 + postgres_version: + type: string + description: The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec. + example: "17.6" + pattern: ^\d{2}\.\d{1,2}$ + postgresql_conf: + type: object + description: Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane. + example: + max_connections: 1000 + additionalProperties: true + restore_config: + $ref: '#/components/schemas/RestoreConfigSpec' + source_node: + type: string + description: The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node. + example: n1 + example: + backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: f6b84a99-5e91-4203-be1e-131fe82e5984 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: f6b84a99-5e91-4203-be1e-131fe82e5984 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + required: + - name + - host_ids + DatabaseNodeSpec2: + type: object + properties: + backup_config: + $ref: '#/components/schemas/BackupConfigSpec' + cpus: + type: string + description: The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator. + example: 500m + pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ + host_ids: + type: array + items: + type: string + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + description: The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas. + example: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + minItems: 1 + memory: + type: string + description: The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator. + example: 500M + maxLength: 16 + name: + type: string + description: The name of the database node. + example: n1 + pattern: n[0-9]+ + orchestrator_opts: + $ref: '#/components/schemas/OrchestratorOpts' + port: + type: integer + description: The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec. + example: 5432 + format: int64 + minimum: 0 + maximum: 65535 + postgres_version: + type: string + description: The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec. + example: "17.6" + pattern: ^\d{2}\.\d{1,2}$ + postgresql_conf: + type: object + description: Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane. + example: + max_connections: 1000 + additionalProperties: true + restore_config: + $ref: '#/components/schemas/RestoreConfigSpec' + source_node: + type: string + description: The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node. + example: n1 + example: + backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + required: + - name + - host_ids + DatabaseNodeSpec3: + type: object + properties: + backup_config: + $ref: '#/components/schemas/BackupConfigSpec' + cpus: + type: string + description: The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator. + example: 500m + pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ + host_ids: + type: array + items: + type: string + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + description: The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas. + example: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + minItems: 1 + memory: + type: string + description: The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator. + example: 500M + maxLength: 16 + name: + type: string + description: The name of the database node. + example: n1 + pattern: n[0-9]+ + orchestrator_opts: + $ref: '#/components/schemas/OrchestratorOpts' + port: + type: integer + description: The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec. + example: 5432 + format: int64 + minimum: 0 + maximum: 65535 + postgres_version: + type: string + description: The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec. + example: "17.6" + pattern: ^\d{2}\.\d{1,2}$ + postgresql_conf: + type: object + description: Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane. + example: + max_connections: 1000 + additionalProperties: true + restore_config: + $ref: '#/components/schemas/RestoreConfigSpec' + source_node: + type: string + description: The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node. + example: n1 + example: + backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + required: + - name + - host_ids + DatabaseNodeSpec4: + type: object + properties: + backup_config: + $ref: '#/components/schemas/BackupConfigSpec' + cpus: + type: string + description: The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator. + example: 500m + pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ + host_ids: + type: array + items: + type: string + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + description: The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas. + example: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + minItems: 1 + memory: + type: string + description: The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator. + example: 500M + maxLength: 16 + name: + type: string + description: The name of the database node. + example: n1 + pattern: n[0-9]+ + orchestrator_opts: + $ref: '#/components/schemas/OrchestratorOpts' + port: + type: integer + description: The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec. + example: 5432 + format: int64 + minimum: 0 + maximum: 65535 + postgres_version: + type: string + description: The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec. + example: "17.6" + pattern: ^\d{2}\.\d{1,2}$ + postgresql_conf: + type: object + description: Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane. + example: + max_connections: 1000 + additionalProperties: true + restore_config: + $ref: '#/components/schemas/RestoreConfigSpec' + source_node: + type: string + description: The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node. + example: n1 + example: + backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + required: + - name + - host_ids + DatabaseNodeSpec5: + type: object + properties: + backup_config: + $ref: '#/components/schemas/BackupConfigSpec' + cpus: + type: string + description: The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator. + example: 500m + pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ + host_ids: + type: array + items: + type: string + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + description: The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas. + example: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + minItems: 1 + memory: + type: string + description: The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator. + example: 500M + maxLength: 16 + name: + type: string + description: The name of the database node. + example: n1 + pattern: n[0-9]+ + orchestrator_opts: + $ref: '#/components/schemas/OrchestratorOpts' + port: + type: integer + description: The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec. + example: 5432 + format: int64 + minimum: 0 + maximum: 65535 + postgres_version: + type: string + description: The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec. + example: "17.6" + pattern: ^\d{2}\.\d{1,2}$ + postgresql_conf: + type: object + description: Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane. + example: + max_connections: 1000 + additionalProperties: true + restore_config: + $ref: '#/components/schemas/RestoreConfigSpec' + source_node: + type: string + description: The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node. + example: n1 + example: + backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + required: + - name + - host_ids + DatabaseNodeSpec6: + type: object + properties: + backup_config: + $ref: '#/components/schemas/BackupConfigSpec' + cpus: + type: string + description: The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator. + example: 500m + pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ + host_ids: + type: array + items: + type: string + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + description: The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas. + example: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + minItems: 1 + memory: + type: string + description: The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator. + example: 500M + maxLength: 16 + name: + type: string + description: The name of the database node. + example: n1 + pattern: n[0-9]+ + orchestrator_opts: + $ref: '#/components/schemas/OrchestratorOpts' + port: + type: integer + description: The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec. + example: 5432 + format: int64 + minimum: 0 + maximum: 65535 + postgres_version: + type: string + description: The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec. + example: "17.6" + pattern: ^\d{2}\.\d{1,2}$ + postgresql_conf: + type: object + description: Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane. + example: + max_connections: 1000 + additionalProperties: true + restore_config: + $ref: '#/components/schemas/RestoreConfigSpec' + source_node: + type: string + description: The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node. + example: n1 + example: + backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + required: + - name + - host_ids + DatabaseNodeSpec7: + type: object + properties: + backup_config: + $ref: '#/components/schemas/BackupConfigSpec' + cpus: + type: string + description: The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator. + example: 500m + pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ + host_ids: + type: array + items: + type: string + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + description: The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas. + example: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + minItems: 1 + memory: + type: string + description: The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator. + example: 500M + maxLength: 16 + name: + type: string + description: The name of the database node. + example: n1 + pattern: n[0-9]+ + orchestrator_opts: + $ref: '#/components/schemas/OrchestratorOpts' + port: + type: integer + description: The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec. + example: 5432 + format: int64 + minimum: 0 + maximum: 65535 + postgres_version: + type: string + description: The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec. + example: "17.6" + pattern: ^\d{2}\.\d{1,2}$ + postgresql_conf: + type: object + description: Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane. + example: + max_connections: 1000 + additionalProperties: true + restore_config: + $ref: '#/components/schemas/RestoreConfigSpec' + source_node: + type: string + description: The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node. + example: n1 + example: + backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + required: + - name + - host_ids + DatabaseSpec: + type: object + properties: + backup_config: + $ref: '#/components/schemas/BackupConfigSpec' + cpus: + type: string + description: The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator. + example: 500m + pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ + database_name: + type: string + description: The name of the Postgres database. + example: northwind + minLength: 1 + maxLength: 31 + database_users: + type: array + items: + $ref: '#/components/schemas/DatabaseUserSpec' + description: The users to create for this database. + example: + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: true + password: secret + roles: + - pgedge_superuser + username: admin + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: true + password: secret + roles: + - pgedge_superuser + username: admin + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: true + password: secret + roles: + - pgedge_superuser + username: admin + maxItems: 16 + memory: + type: string + description: The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator. + example: 500M + maxLength: 16 + nodes: + type: array + items: + $ref: '#/components/schemas/DatabaseNodeSpec' + description: The Spock nodes for this database. + example: + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: f6b84a99-5e91-4203-be1e-131fe82e5984 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: f6b84a99-5e91-4203-be1e-131fe82e5984 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + minItems: 1 + maxItems: 9 + orchestrator_opts: + $ref: '#/components/schemas/OrchestratorOpts' + port: + type: integer + description: The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature. + example: 5432 + format: int64 + minimum: 0 + maximum: 65535 + postgres_version: + type: string + description: The Postgres version in 'major.minor' format. + example: "17.6" + pattern: ^\d{2}\.\d{1,2}$ + postgresql_conf: + type: object + description: Additional postgresql.conf settings. Will be merged with the settings provided by control-plane. + example: + max_connections: 1000 + maxLength: 64 + additionalProperties: true + restore_config: + $ref: '#/components/schemas/RestoreConfigSpec' + services: + type: array + items: + $ref: '#/components/schemas/ServiceSpec' + description: Service instances to run alongside the database (e.g., MCP servers). + example: + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + memory: 512M + port: 0 + service_id: analytics-service + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + memory: 512M + port: 0 + service_id: analytics-service + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + memory: 512M + port: 0 + service_id: analytics-service + service_type: mcp + version: latest + spock_version: + type: string + description: The major version of the Spock extension. + example: "5" + pattern: ^\d{1}$ + example: + backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: f6b84a99-5e91-4203-be1e-131fe82e5984 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + database_name: northwind + database_users: + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: true + password: secret + roles: + - pgedge_superuser + username: admin + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: true + password: secret + roles: + - pgedge_superuser + username: admin + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: true + password: secret + roles: + - pgedge_superuser + username: admin + memory: 500M + nodes: + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: f6b84a99-5e91-4203-be1e-131fe82e5984 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: f6b84a99-5e91-4203-be1e-131fe82e5984 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: f6b84a99-5e91-4203-be1e-131fe82e5984 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: f6b84a99-5e91-4203-be1e-131fe82e5984 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: f6b84a99-5e91-4203-be1e-131fe82e5984 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: f6b84a99-5e91-4203-be1e-131fe82e5984 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: f6b84a99-5e91-4203-be1e-131fe82e5984 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 + source_database_name: northwind + source_node_name: n1 + services: + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + memory: 512M + port: 0 + service_id: analytics-service + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + memory: 512M + port: 0 + service_id: analytics-service + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + memory: 512M + port: 0 + service_id: analytics-service + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + memory: 512M + port: 0 + service_id: analytics-service + service_type: mcp + version: latest + spock_version: "5" + required: + - database_name + - nodes + DatabaseSpec2: + type: object + properties: + backup_config: + $ref: '#/components/schemas/BackupConfigSpec' + cpus: + type: string + description: The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator. + example: 500m + pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ + database_name: + type: string + description: The name of the Postgres database. + example: northwind + minLength: 1 + maxLength: 31 + database_users: + type: array + items: + $ref: '#/components/schemas/DatabaseUserSpec' + description: The users to create for this database. + example: + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: true + password: secret + roles: + - pgedge_superuser + username: admin + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: true + password: secret + roles: + - pgedge_superuser + username: admin + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: true + password: secret + roles: + - pgedge_superuser + username: admin + maxItems: 16 + memory: + type: string + description: The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator. + example: 500M + maxLength: 16 + nodes: + type: array + items: + $ref: '#/components/schemas/DatabaseNodeSpec2' + description: The Spock nodes for this database. + example: + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + minItems: 1 + maxItems: 9 + orchestrator_opts: + $ref: '#/components/schemas/OrchestratorOpts' + port: + type: integer + description: The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature. + example: 5432 + format: int64 + minimum: 0 + maximum: 65535 + postgres_version: + type: string + description: The Postgres version in 'major.minor' format. + example: "17.6" + pattern: ^\d{2}\.\d{1,2}$ + postgresql_conf: + type: object + description: Additional postgresql.conf settings. Will be merged with the settings provided by control-plane. + example: + max_connections: 1000 + maxLength: 64 + additionalProperties: true + restore_config: + $ref: '#/components/schemas/RestoreConfigSpec' + services: + type: array + items: + $ref: '#/components/schemas/ServiceSpec' + description: Service instances to run alongside the database (e.g., MCP servers). + example: + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + spock_version: + type: string + description: The major version of the Spock extension. + example: "5" + pattern: ^\d{1}$ + example: + backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + database_name: northwind + database_users: + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: true + password: secret + roles: + - pgedge_superuser + username: admin + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: true + password: secret + roles: + - pgedge_superuser + username: admin + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: true + password: secret + roles: + - pgedge_superuser + username: admin + memory: 500M + nodes: + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + services: + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + spock_version: "5" + required: + - database_name + - nodes + DatabaseSpec3: + type: object + properties: + backup_config: + $ref: '#/components/schemas/BackupConfigSpec' + cpus: + type: string + description: The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator. + example: 500m + pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ + database_name: + type: string + description: The name of the Postgres database. + example: northwind + minLength: 1 + maxLength: 31 + database_users: + type: array + items: + $ref: '#/components/schemas/DatabaseUserSpec' + description: The users to create for this database. + example: + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: false + password: secret + roles: + - pgedge_superuser + username: admin + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: false + password: secret + roles: + - pgedge_superuser + username: admin + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: false + password: secret + roles: + - pgedge_superuser + username: admin + maxItems: 16 + memory: + type: string + description: The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator. + example: 500M + maxLength: 16 + nodes: + type: array + items: + $ref: '#/components/schemas/DatabaseNodeSpec3' + description: The Spock nodes for this database. + example: + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 minItems: 1 - memory: - type: string - description: The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator. - example: 500M - maxLength: 16 - name: - type: string - description: The name of the database node. - example: n1 - pattern: n[0-9]+ + maxItems: 9 orchestrator_opts: $ref: '#/components/schemas/OrchestratorOpts' port: type: integer - description: The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec. + description: The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature. example: 5432 format: int64 minimum: 0 maximum: 65535 postgres_version: type: string - description: The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec. + description: The Postgres version in 'major.minor' format. example: "17.6" pattern: ^\d{2}\.\d{1,2}$ postgresql_conf: type: object - description: Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane. + description: Additional postgresql.conf settings. Will be merged with the settings provided by control-plane. example: max_connections: 1000 + maxLength: 64 additionalProperties: true restore_config: $ref: '#/components/schemas/RestoreConfigSpec' - source_node: - type: string - description: The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node. - example: n1 - example: - backup_config: - repositories: - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - schedules: - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - cpus: 500m - host_ids: - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - memory: 500M - name: n1 - orchestrator_opts: - swarm: - extra_labels: - traefik.enable: "true" - traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) - extra_networks: - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - extra_volumes: - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - port: 5432 - postgres_version: "17.6" - postgresql_conf: - max_connections: 1000 - restore_config: - repository: - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - source_database_name: northwind - source_node_name: n1 - source_node: n1 - required: - - name - - host_ids - DatabaseNodeSpec4: - type: object - properties: - backup_config: - $ref: '#/components/schemas/BackupConfigSpec' - cpus: - type: string - description: The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator. - example: 500m - pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ - host_ids: + services: type: array items: - type: string - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - description: The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas. - example: - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - minItems: 1 - memory: - type: string - description: The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator. - example: 500M - maxLength: 16 - name: - type: string - description: The name of the database node. - example: n1 - pattern: n[0-9]+ - orchestrator_opts: - $ref: '#/components/schemas/OrchestratorOpts' - port: - type: integer - description: The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec. - example: 5432 - format: int64 - minimum: 0 - maximum: 65535 - postgres_version: - type: string - description: The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec. - example: "17.6" - pattern: ^\d{2}\.\d{1,2}$ - postgresql_conf: - type: object - description: Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane. + $ref: '#/components/schemas/ServiceSpec' + description: Service instances to run alongside the database (e.g., MCP servers). example: - max_connections: 1000 - additionalProperties: true - restore_config: - $ref: '#/components/schemas/RestoreConfigSpec' - source_node: + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + spock_version: type: string - description: The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node. - example: n1 + description: The major version of the Spock extension. + example: "5" + pattern: ^\d{1}$ example: backup_config: repositories: @@ -7354,12 +10022,457 @@ components: id: daily-full-backup type: full cpus: 500m - host_ids: - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 + database_name: northwind + database_users: + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: false + password: secret + roles: + - pgedge_superuser + username: admin + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: false + password: secret + roles: + - pgedge_superuser + username: admin + - attributes: + - LOGIN + - CREATEDB + - CREATEROLE + db_owner: false + password: secret + roles: + - pgedge_superuser + username: admin memory: 500M - name: n1 + nodes: + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 orchestrator_opts: swarm: extra_labels: @@ -7421,11 +10534,51 @@ components: source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 source_database_name: northwind source_node_name: n1 - source_node: n1 + services: + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + spock_version: "5" required: - - name - - host_ids - DatabaseSpec: + - database_name + - nodes + DatabaseSpec4: type: object properties: backup_config: @@ -7451,7 +10604,7 @@ components: - LOGIN - CREATEDB - CREATEROLE - db_owner: true + db_owner: false password: secret roles: - pgedge_superuser @@ -7460,7 +10613,7 @@ components: - LOGIN - CREATEDB - CREATEROLE - db_owner: true + db_owner: false password: secret roles: - pgedge_superuser @@ -7469,7 +10622,7 @@ components: - LOGIN - CREATEDB - CREATEROLE - db_owner: true + db_owner: false password: secret roles: - pgedge_superuser @@ -7483,7 +10636,7 @@ components: nodes: type: array items: - $ref: '#/components/schemas/DatabaseNodeSpec' + $ref: '#/components/schemas/DatabaseNodeSpec4' description: The Spock nodes for this database. example: - backup_config: @@ -7499,7 +10652,47 @@ components: gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 gcs_endpoint: localhost gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 retention_full: 2 retention_full_type: count s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 @@ -7520,7 +10713,8 @@ components: type: full cpus: 500m host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 500M name: n1 orchestrator_opts: @@ -7570,7 +10764,7 @@ components: gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 gcs_endpoint: localhost gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 s3_endpoint: s3.us-east-1.amazonaws.com s3_key: AKIAIOSFODNN7EXAMPLE @@ -7581,7 +10775,147 @@ components: set: 20250505-153628F target: "123456" type: xid - source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 source_database_name: northwind source_node_name: n1 source_node: n1 @@ -7597,59 +10931,36 @@ components: minimum: 0 maximum: 65535 postgres_version: - type: string - description: The Postgres version in 'major.minor' format. - example: "17.6" - pattern: ^\d{2}\.\d{1,2}$ - postgresql_conf: - type: object - description: Additional postgresql.conf settings. Will be merged with the settings provided by control-plane. - example: - max_connections: 1000 - maxLength: 64 - additionalProperties: true - restore_config: - $ref: '#/components/schemas/RestoreConfigSpec' - services: - type: array - items: - $ref: '#/components/schemas/ServiceSpec' - description: Service instances to run alongside the database (e.g., MCP servers). - example: - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest + type: string + description: The Postgres version in 'major.minor' format. + example: "17.6" + pattern: ^\d{2}\.\d{1,2}$ + postgresql_conf: + type: object + description: Additional postgresql.conf settings. Will be merged with the settings provided by control-plane. + example: + max_connections: 1000 + maxLength: 64 + additionalProperties: true + restore_config: + $ref: '#/components/schemas/RestoreConfigSpec' + services: + type: array + items: + $ref: '#/components/schemas/ServiceSpec' + description: Service instances to run alongside the database (e.g., MCP servers). + example: - config: llm_model: gpt-4 llm_provider: openai openai_api_key: sk-... cpus: 500m host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 - service_id: analytics-service + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 service_type: mcp version: latest - config: @@ -7658,10 +10969,11 @@ components: openai_api_key: sk-... cpus: 500m host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 - service_id: analytics-service + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 service_type: mcp version: latest spock_version: @@ -7683,7 +10995,47 @@ components: gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 gcs_endpoint: localhost gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 retention_full: 2 retention_full_type: count s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 @@ -7709,7 +11061,7 @@ components: - LOGIN - CREATEDB - CREATEROLE - db_owner: true + db_owner: false password: secret roles: - pgedge_superuser @@ -7718,7 +11070,7 @@ components: - LOGIN - CREATEDB - CREATEROLE - db_owner: true + db_owner: false password: secret roles: - pgedge_superuser @@ -7727,7 +11079,7 @@ components: - LOGIN - CREATEDB - CREATEROLE - db_owner: true + db_owner: false password: secret roles: - pgedge_superuser @@ -7747,7 +11099,187 @@ components: gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 gcs_endpoint: localhost gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 retention_full: 2 retention_full_type: count s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 @@ -7768,7 +11300,8 @@ components: type: full cpus: 500m host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 500M name: n1 orchestrator_opts: @@ -7818,7 +11351,7 @@ components: gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 gcs_endpoint: localhost gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 s3_endpoint: s3.us-east-1.amazonaws.com s3_key: AKIAIOSFODNN7EXAMPLE @@ -7829,7 +11362,7 @@ components: set: 20250505-153628F target: "123456" type: xid - source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 source_database_name: northwind source_node_name: n1 source_node: n1 @@ -7880,7 +11413,7 @@ components: gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 gcs_endpoint: localhost gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: f6b84a99-5e91-4203-be1e-131fe82e5984 + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 s3_endpoint: s3.us-east-1.amazonaws.com s3_key: AKIAIOSFODNN7EXAMPLE @@ -7891,7 +11424,7 @@ components: set: 20250505-153628F target: "123456" type: xid - source_database_id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 source_database_name: northwind source_node_name: n1 services: @@ -7901,10 +11434,11 @@ components: openai_api_key: sk-... cpus: 500m host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 - service_id: analytics-service + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 service_type: mcp version: latest - config: @@ -7913,10 +11447,11 @@ components: openai_api_key: sk-... cpus: 500m host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 - service_id: analytics-service + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 service_type: mcp version: latest - config: @@ -7925,17 +11460,18 @@ components: openai_api_key: sk-... cpus: 500m host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 - service_id: analytics-service + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 service_type: mcp version: latest spock_version: "5" required: - database_name - nodes - DatabaseSpec2: + DatabaseSpec5: type: object properties: backup_config: @@ -7961,7 +11497,7 @@ components: - LOGIN - CREATEDB - CREATEROLE - db_owner: true + db_owner: false password: secret roles: - pgedge_superuser @@ -7970,7 +11506,7 @@ components: - LOGIN - CREATEDB - CREATEROLE - db_owner: true + db_owner: false password: secret roles: - pgedge_superuser @@ -7979,7 +11515,7 @@ components: - LOGIN - CREATEDB - CREATEROLE - db_owner: true + db_owner: false password: secret roles: - pgedge_superuser @@ -7993,7 +11529,7 @@ components: nodes: type: array items: - $ref: '#/components/schemas/DatabaseNodeSpec2' + $ref: '#/components/schemas/DatabaseNodeSpec5' description: The Spock nodes for this database. example: - backup_config: @@ -8071,6 +11607,7 @@ components: cpus: 500m host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 500M name: n1 orchestrator_opts: @@ -8210,6 +11747,7 @@ components: cpus: 500m host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 500M name: n1 orchestrator_opts: @@ -8312,8 +11850,6 @@ components: cpus: 500m host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -8326,8 +11862,6 @@ components: cpus: 500m host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -8418,7 +11952,7 @@ components: - LOGIN - CREATEDB - CREATEROLE - db_owner: true + db_owner: false password: secret roles: - pgedge_superuser @@ -8427,7 +11961,7 @@ components: - LOGIN - CREATEDB - CREATEROLE - db_owner: true + db_owner: false password: secret roles: - pgedge_superuser @@ -8436,7 +11970,7 @@ components: - LOGIN - CREATEDB - CREATEROLE - db_owner: true + db_owner: false password: secret roles: - pgedge_superuser @@ -8518,6 +12052,147 @@ components: cpus: 500m host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 500M name: n1 orchestrator_opts: @@ -8651,22 +12326,6 @@ components: cpus: 500m host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - memory: 512M - port: 0 - service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - service_type: mcp - version: latest - - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -8679,8 +12338,6 @@ components: cpus: 500m host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -8690,7 +12347,7 @@ components: required: - database_name - nodes - DatabaseSpec3: + DatabaseSpec6: type: object properties: backup_config: @@ -8748,7 +12405,7 @@ components: nodes: type: array items: - $ref: '#/components/schemas/DatabaseNodeSpec3' + $ref: '#/components/schemas/DatabaseNodeSpec6' description: The Spock nodes for this database. example: - backup_config: @@ -8793,6 +12450,306 @@ components: s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY s3_region: us-east-1 type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 schedules: - cron_expression: 0 6 * * ? id: daily-full-backup @@ -8910,7 +12867,6 @@ components: host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -8924,7 +12880,6 @@ components: host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -8938,7 +12893,6 @@ components: host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -8992,6 +12946,26 @@ components: s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY s3_region: us-east-1 type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 schedules: - cron_expression: 0 6 * * ? id: daily-full-backup @@ -9076,226 +13050,6 @@ components: s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY s3_region: us-east-1 type: s3 - schedules: - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - cpus: 500m - host_ids: - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - memory: 500M - name: n1 - orchestrator_opts: - swarm: - extra_labels: - traefik.enable: "true" - traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) - extra_networks: - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - extra_volumes: - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - port: 5432 - postgres_version: "17.6" - postgresql_conf: - max_connections: 1000 - restore_config: - repository: - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - source_database_name: northwind - source_node_name: n1 - source_node: n1 - - backup_config: - repositories: - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - schedules: - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - - cron_expression: 0 6 * * ? - id: daily-full-backup - type: full - cpus: 500m - host_ids: - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 - memory: 500M - name: n1 - orchestrator_opts: - swarm: - extra_labels: - traefik.enable: "true" - traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) - extra_networks: - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - - aliases: - - pg-db - - db-alias - driver_opts: - com.docker.network.endpoint.expose: "true" - id: traefik-public - extra_volumes: - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - - destination_path: /backups/container - host_path: /Users/user/backups/host - port: 5432 - postgres_version: "17.6" - postgresql_conf: - max_connections: 1000 - restore_config: - repository: - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - restore_options: - set: 20250505-153628F - target: "123456" - type: xid - source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - source_database_name: northwind - source_node_name: n1 - source_node: n1 - - backup_config: - repositories: - - azure_account: pgedge-backups - azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - azure_endpoint: blob.core.usgovcloudapi.net - azure_key: YXpLZXk= - base_path: /backups - custom_options: - s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab - storage-upload-chunk-size: 5MiB - gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - gcs_endpoint: localhost - gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== - id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - retention_full: 2 - retention_full_type: count - s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 - s3_endpoint: s3.us-east-1.amazonaws.com - s3_key: AKIAIOSFODNN7EXAMPLE - s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY - s3_region: us-east-1 - type: s3 - azure_account: pgedge-backups azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 azure_endpoint: blob.core.usgovcloudapi.net @@ -9464,7 +13218,6 @@ components: host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -9478,7 +13231,6 @@ components: host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -9492,6 +13244,18 @@ components: host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 @@ -9502,7 +13266,7 @@ components: required: - database_name - nodes - DatabaseSpec4: + DatabaseSpec7: type: object properties: backup_config: @@ -9560,7 +13324,7 @@ components: nodes: type: array items: - $ref: '#/components/schemas/DatabaseNodeSpec4' + $ref: '#/components/schemas/DatabaseNodeSpec7' description: The Spock nodes for this database. example: - backup_config: @@ -9639,7 +13403,6 @@ components: host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 500M name: n1 orchestrator_opts: @@ -9742,6 +13505,33 @@ components: cpus: 500m host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -9754,6 +13544,7 @@ components: cpus: 500m host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -9945,7 +13736,286 @@ components: host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 - 76f9b8c0-4958-11f0-a489-3bb29577c696 - - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 500M + name: n1 + orchestrator_opts: + swarm: + extra_labels: + traefik.enable: "true" + traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) + extra_networks: + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + - aliases: + - pg-db + - db-alias + driver_opts: + com.docker.network.endpoint.expose: "true" + id: traefik-public + extra_volumes: + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + - destination_path: /backups/container + host_path: /Users/user/backups/host + port: 5432 + postgres_version: "17.6" + postgresql_conf: + max_connections: 1000 + restore_config: + repository: + azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + restore_options: + set: 20250505-153628F + target: "123456" + type: xid + source_database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + source_database_name: northwind + source_node_name: n1 + source_node: n1 + - backup_config: + repositories: + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + - azure_account: pgedge-backups + azure_container: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + azure_endpoint: blob.core.usgovcloudapi.net + azure_key: YXpLZXk= + base_path: /backups + custom_options: + s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab + storage-upload-chunk-size: 5MiB + gcs_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + gcs_endpoint: localhost + gcs_key: ZXhhbXBsZSBnY3Mga2V5Cg== + id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + retention_full: 2 + retention_full_type: count + s3_bucket: pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1 + s3_endpoint: s3.us-east-1.amazonaws.com + s3_key: AKIAIOSFODNN7EXAMPLE + s3_key_secret: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + s3_region: us-east-1 + type: s3 + schedules: + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + - cron_expression: 0 6 * * ? + id: daily-full-backup + type: full + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 500M name: n1 orchestrator_opts: @@ -10079,6 +14149,33 @@ components: cpus: 500m host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + memory: 512M + port: 0 + service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + service_type: mcp + version: latest + - config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -10091,6 +14188,7 @@ components: cpus: 500m host_ids: - 76f9b8c0-4958-11f0-a489-3bb29577c696 + - 76f9b8c0-4958-11f0-a489-3bb29577c696 memory: 512M port: 0 service_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 @@ -10098,8 +14196,303 @@ components: version: latest spock_version: "5" required: - - database_name - - nodes + - database_name + - nodes + DatabaseSummary: + type: object + properties: + created_at: + type: string + description: The time that the database was created. + example: "2025-01-01T01:30:00Z" + format: date-time + id: + type: string + description: A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + instances: + type: array + items: + $ref: '#/components/schemas/Instance' + description: All of the instances in the database. + example: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + state: + type: string + description: Current state of the database. + example: failed + enum: + - creating + - modifying + - available + - deleting + - degraded + - failed + - backing_up + - restoring + - unknown + tenant_id: + type: string + description: A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + updated_at: + type: string + description: The time that the database was last updated. + example: "2025-01-01T02:30:00Z" + format: date-time + example: + created_at: "2025-01-01T01:30:00Z" + id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + state: creating + tenant_id: 8210ec10-2dca-406c-ac4a-0661d2189954 + updated_at: "2025-01-01T02:30:00Z" + required: + - id + - created_at + - updated_at + - state DatabaseUserSpec: type: object properties: @@ -10107,7 +14500,7 @@ components: type: array items: type: string - example: Molestiae voluptates laborum. + example: Veniam debitis non expedita sequi. description: The attributes to assign to this database user. example: - LOGIN @@ -10117,7 +14510,7 @@ components: db_owner: type: boolean description: If true, this user will be granted database ownership. - example: false + example: true password: type: string description: The password for this database user. This field will be excluded from the response of all endpoints. It can also be omitted from update requests to keep the current value. @@ -10127,7 +14520,7 @@ components: type: array items: type: string - example: Illo aut et corporis harum. + example: Delectus sit quas. description: The roles to assign to this database user. example: - pgedge_superuser @@ -10170,7 +14563,7 @@ components: type: array items: type: string - example: Et labore in dolor quisquam placeat. + example: Totam ea velit consequatur sequi error. description: The Etcd client endpoint for this cluster member. example: - http://192.168.1.1:2379 @@ -10182,7 +14575,7 @@ components: type: array items: type: string - example: Quam id aut. + example: Itaque aut. description: The Etcd peer endpoint for this cluster member. example: - http://192.168.1.1:2380 @@ -10203,7 +14596,7 @@ components: type: array items: type: string - example: Nesciunt consequuntur reprehenderit esse id. + example: Qui natus qui. description: Optional network-scoped aliases for the container. example: - pg-db @@ -10216,7 +14609,7 @@ components: com.docker.network.endpoint.expose: "true" additionalProperties: type: string - example: Et qui quod veniam. + example: Exercitationem placeat temporibus aut facilis repudiandae. id: type: string description: The name or ID of the network to connect to. @@ -10273,12 +14666,12 @@ components: type: boolean description: If true, skip the health validations that prevent running failover on a healthy cluster. default: false - example: true + example: false example: candidate_instance_id: 68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi database_id: my-app node_name: n1 - skip_validation: true + skip_validation: false required: - database_id - node_name @@ -10293,10 +14686,10 @@ components: type: boolean description: If true, skip the health validations that prevent running failover on a healthy cluster. default: false - example: true + example: false example: candidate_instance_id: 68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi - skip_validation: false + skip_validation: true FailoverDatabaseNodeResponse: type: object properties: @@ -10399,8 +14792,6 @@ components: spock_version: "5" - postgres_version: "17.6" spock_version: "5" - - postgres_version: "17.6" - spock_version: "5" example: cohort: control_available: true @@ -10438,8 +14829,6 @@ components: spock_version: "5" - postgres_version: "17.6" spock_version: "5" - - postgres_version: "17.6" - spock_version: "5" required: - id - orchestrator @@ -10477,7 +14866,19 @@ components: type: object description: The status of each component of the host. example: - Rerum ipsam nemo ut nemo.: + Eius at.: + details: + alarms: + - '3: NOSPACE' + error: failed to connect to etcd + healthy: false + Placeat illo dolore totam accusamus alias ipsa.: + details: + alarms: + - '3: NOSPACE' + error: failed to connect to etcd + healthy: false + Ut dolorem.: details: alarms: - '3: NOSPACE' @@ -10500,299 +14901,43 @@ components: format: date-time example: components: - Et animi laborum et.: + Et aut aut.: details: alarms: - '3: NOSPACE' error: failed to connect to etcd healthy: false - Eum officia similique non.: + Minus dolore eos et sunt culpa animi.: details: alarms: - '3: NOSPACE' error: failed to connect to etcd healthy: false - Quisquam quibusdam id est.: + Rem culpa.: details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - state: available - updated_at: "2021-07-01T12:34:56Z" - required: - - state - - updated_at - - components - InitClusterRequest: - type: object - properties: - cluster_id: - type: string - description: A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens. - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - description: Request to initialize a cluster - example: - cluster_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - Instance: - type: object - properties: - connection_info: - $ref: '#/components/schemas/InstanceConnectionInfo' - created_at: - type: string - description: The time that the instance was created. - example: "1988-06-18T10:35:35Z" - format: date-time - error: - type: string - description: An error message if the instance is in an error state. - example: 'failed to get patroni status: connection refused' - host_id: - type: string - description: The ID of the host this instance is running on. - example: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: - type: string - description: Unique identifier for the instance. - example: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: - type: string - description: The Spock node name for this instance. - example: n1 - postgres: - $ref: '#/components/schemas/InstancePostgresStatus' - spock: - $ref: '#/components/schemas/InstanceSpockStatus' - state: - type: string - example: creating - enum: - - creating - - modifying - - backing_up - - available - - degraded - - failed - - stopped - - unknown - status_updated_at: - type: string - description: The time that the instance status information was last updated. - example: "1981-11-30T17:32:33Z" - format: date-time - updated_at: - type: string - description: The time that the instance was last modified. - example: "1972-02-06T12:03:40Z" - format: date-time - description: An instance of pgEdge Postgres running on a host. - example: - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1985-07-21T07:05:35Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1970-02-13T01:14:37Z" - updated_at: "1991-04-04T09:33:29Z" - required: - - id - - host_id - - node_name - - created_at - - updated_at - - state - InstanceCollection: - type: array - items: - $ref: '#/components/schemas/Instance' - example: - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1987-03-24T21:22:02Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: creating - status_updated_at: "1974-12-13T04:15:04Z" - updated_at: "2006-10-18T16:07:16Z" - InstanceConnectionInfo: - type: object - properties: - hostname: - type: string - description: The hostname of the host that's running this instance. - example: i-0123456789abcdef.ec2.internal - ipv4_address: - type: string - description: The IPv4 address of the host that's running this instance. - example: 10.24.34.2 - format: ipv4 - port: - type: integer - description: The host port that Postgres is listening on for this instance. - example: 5432 - format: int64 - description: Connection information for a pgEdge instance. - example: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - InstancePostgresStatus: + alarms: + - '3: NOSPACE' + error: failed to connect to etcd + healthy: false + state: available + updated_at: "2021-07-01T12:34:56Z" + required: + - state + - updated_at + - components + InitClusterRequest: type: object properties: - patroni_paused: - type: boolean - description: True if Patroni is paused for this instance. - example: true - patroni_state: - type: string - example: unknown - pending_restart: - type: boolean - description: True if this instance has a pending restart from a configuration change. - example: true - role: - type: string - example: primary - version: + cluster_id: type: string - description: The version of Postgres for this instance. - example: "18.1" - description: Postgres status information for a pgEdge instance. + description: A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + description: Request to initialize a cluster example: - patroni_paused: true - patroni_state: unknown - pending_restart: false - role: primary - version: "18.1" - InstanceResponseBody: + cluster_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 + Instance: type: object properties: connection_info: @@ -10800,7 +14945,7 @@ components: created_at: type: string description: The time that the instance was created. - example: "1996-05-27T17:04:41Z" + example: "1972-03-21T12:41:47Z" format: date-time error: type: string @@ -10824,7 +14969,7 @@ components: $ref: '#/components/schemas/InstanceSpockStatus' state: type: string - example: failed + example: stopped enum: - creating - modifying @@ -10837,20 +14982,20 @@ components: status_updated_at: type: string description: The time that the instance status information was last updated. - example: "1977-03-14T09:54:12Z" + example: "1995-02-03T18:46:08Z" format: date-time updated_at: type: string description: The time that the instance was last modified. - example: "1976-03-01T20:13:25Z" + example: "1984-04-26T06:38:50Z" format: date-time - description: An instance of pgEdge Postgres running on a host. (default view) + description: An instance of pgEdge Postgres running on a host. example: connection_info: hostname: i-0123456789abcdef.ec2.internal ipv4_address: 10.24.34.2 port: 5432 - created_at: "2002-03-20T15:42:21Z" + created_at: "2003-06-04T21:30:35Z" error: 'failed to get patroni status: connection refused' host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d @@ -10873,10 +15018,13 @@ components: - name: sub_n1n2 provider_node: n2 status: down + - name: sub_n1n2 + provider_node: n2 + status: down version: 4.10.0 - state: backing_up - status_updated_at: "1999-12-24T18:19:13Z" - updated_at: "1988-02-08T05:38:12Z" + state: degraded + status_updated_at: "1982-02-16T16:16:42Z" + updated_at: "1993-11-23T04:43:18Z" required: - id - host_id @@ -10884,74 +15032,56 @@ components: - created_at - updated_at - state - InstanceResponseBodyCollection: - type: array - items: - $ref: '#/components/schemas/InstanceResponseBody' - description: InstanceCollectionResponseBody is the result type for an array of InstanceResponseBody (default view) + InstanceConnectionInfo: + type: object + properties: + hostname: + type: string + description: The hostname of the host that's running this instance. + example: i-0123456789abcdef.ec2.internal + ipv4_address: + type: string + description: The IPv4 address of the host that's running this instance. + example: 10.24.34.2 + format: ipv4 + port: + type: integer + description: The host port that Postgres is listening on for this instance. + example: 5432 + format: int64 + description: Connection information for a pgEdge instance. example: - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1978-12-28T17:33:35Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: true - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: modifying - status_updated_at: "2001-10-17T14:50:56Z" - updated_at: "2013-05-14T14:25:56Z" - - connection_info: - hostname: i-0123456789abcdef.ec2.internal - ipv4_address: 10.24.34.2 - port: 5432 - created_at: "1978-12-28T17:33:35Z" - error: 'failed to get patroni status: connection refused' - host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d - node_name: n1 - postgres: - patroni_paused: true - patroni_state: unknown - pending_restart: true - role: primary - version: "18.1" - spock: - read_only: "off" - subscriptions: - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down - version: 4.10.0 - state: modifying - status_updated_at: "2001-10-17T14:50:56Z" - updated_at: "2013-05-14T14:25:56Z" + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + InstancePostgresStatus: + type: object + properties: + patroni_paused: + type: boolean + description: True if Patroni is paused for this instance. + example: false + patroni_state: + type: string + example: unknown + pending_restart: + type: boolean + description: True if this instance has a pending restart from a configuration change. + example: true + role: + type: string + example: primary + version: + type: string + description: The version of Postgres for this instance. + example: "18.1" + description: Postgres status information for a pgEdge instance. + example: + patroni_paused: false + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" InstanceSpockStatus: type: object properties: @@ -10971,12 +15101,6 @@ components: - name: sub_n1n2 provider_node: n2 status: down - - name: sub_n1n2 - provider_node: n2 - status: down - - name: sub_n1n2 - provider_node: n2 - status: down version: type: string description: The version of Spock for this instance. @@ -10991,9 +15115,6 @@ components: - name: sub_n1n2 provider_node: n2 status: down - - name: sub_n1n2 - provider_node: n2 - status: down version: 4.10.0 InstanceSubscription: type: object @@ -11087,6 +15208,393 @@ components: status: completed task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 type: create + ListDatabasesResponse: + type: object + properties: + databases: + type: array + items: + $ref: '#/components/schemas/DatabaseSummary' + description: The databases managed by this cluster. + example: + - created_at: "2025-01-01T01:30:00Z" + id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + state: modifying + tenant_id: 8210ec10-2dca-406c-ac4a-0661d2189954 + updated_at: "2025-01-01T02:30:00Z" + - created_at: "2025-01-01T01:30:00Z" + id: 02f1a7db-fca8-4521-b57a-2a375c1ced51 + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "1970-10-16T01:30:13Z" + error: 'failed to get patroni status: connection refused' + host_id: de3b1388-1f0c-42f1-a86c-59ab72f255ec + id: a67cbb36-c3c3-49c9-8aac-f4a0438a883d + node_name: n1 + postgres: + patroni_paused: true + patroni_state: unknown + pending_restart: true + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + - name: sub_n1n2 + provider_node: n2 + status: down + version: 4.10.0 + state: unknown + status_updated_at: "2013-04-06T16:38:09Z" + updated_at: "1971-07-18T16:52:12Z" + state: modifying + tenant_id: 8210ec10-2dca-406c-ac4a-0661d2189954 + updated_at: "2025-01-01T02:30:00Z" + example: + databases: + - created_at: "2025-06-17T20:05:10Z" + id: inventory + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2025-06-17T20:05:10Z" + host_id: us-east-1 + id: inventory-n1-689qacsi + node_name: n1 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n3 + provider_node: n3 + status: replicating + - name: sub_n1n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-17T20:05:10Z" + - connection_info: + hostname: i-058731542fee493f.ec2.internal + ipv4_address: 10.24.35.2 + port: 5432 + created_at: "2025-06-17T20:05:10Z" + host_id: ap-south-1 + id: inventory-n2-9ptayhma + node_name: n2 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n2n1 + provider_node: n1 + status: replicating + - name: sub_n2n3 + provider_node: n3 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-17T20:05:10Z" + - connection_info: + hostname: i-494027b7b53f6a23.ec2.internal + ipv4_address: 10.24.36.2 + port: 5432 + created_at: "2025-06-17T20:05:10Z" + host_id: eu-central-1 + id: inventory-n3-ant97dj4 + node_name: n3 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n3n1 + provider_node: n1 + status: replicating + - name: sub_n3n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-17T20:05:10Z" + state: available + updated_at: "2025-06-17T20:05:10Z" + - created_at: "2025-06-12T15:10:05Z" + id: storefront + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 6432 + created_at: "2025-06-12T15:10:05Z" + host_id: us-east-1 + id: storefront-n1-689qacsi + node_name: n1 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n3 + provider_node: n3 + status: replicating + - name: sub_n1n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-12T15:10:05Z" + - connection_info: + hostname: i-058731542fee493f.ec2.internal + ipv4_address: 10.24.35.2 + port: 6432 + created_at: "2025-06-12T15:10:05Z" + host_id: ap-south-1 + id: storefront-n2-9ptayhma + node_name: n2 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n2n1 + provider_node: n1 + status: replicating + - name: sub_n2n3 + provider_node: n3 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-12T15:10:05Z" + - connection_info: + hostname: i-494027b7b53f6a23.ec2.internal + ipv4_address: 10.24.36.2 + port: 6432 + created_at: "2025-06-12T15:10:05Z" + host_id: eu-central-1 + id: storefront-n3-ant97dj4 + node_name: n3 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n3n1 + provider_node: n1 + status: replicating + - name: sub_n3n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-17T20:05:10Z" + updated_at: "2025-06-12T15:10:05Z" + state: available + updated_at: "2025-06-12T15:10:05Z" ListHostTasksResponse: type: object properties: @@ -11113,99 +15621,23 @@ components: type: create example: tasks: - - completed_at: "2025-06-18T17:54:36Z" - created_at: "2025-06-18T17:54:28Z" - entity_id: host-1 - host_id: host-1 - scope: host - status: completed - task_id: 0197842d-9082-7496-b787-77bd2e11809f - type: remove_host - ListHostsResponse: - type: object - properties: - hosts: - type: array - items: - $ref: '#/components/schemas/Host' - description: List of hosts in the cluster - example: - - cohort: - control_available: true - member_id: lah4bsznw6kc0hp7biylmmmll - type: swarm - cpus: 4 - data_dir: /data - default_pgedge_version: - postgres_version: "17.6" - spock_version: "5" - etcd_mode: server - hostname: i-0123456789abcdef.ec2.internal - id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - ipv4_address: 10.24.34.2 - memory: 16GiB - orchestrator: swarm - status: - components: - Enim et voluptatum ex ea dolore.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Tenetur nostrum repellendus sint qui.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - state: available - updated_at: "2021-07-01T12:34:56Z" - supported_pgedge_versions: - - postgres_version: "17.6" - spock_version: "5" - - postgres_version: "17.6" - spock_version: "5" - - postgres_version: "17.6" - spock_version: "5" - - cohort: - control_available: true - member_id: lah4bsznw6kc0hp7biylmmmll - type: swarm - cpus: 4 - data_dir: /data - default_pgedge_version: - postgres_version: "17.6" - spock_version: "5" - etcd_mode: server - hostname: i-0123456789abcdef.ec2.internal - id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - ipv4_address: 10.24.34.2 - memory: 16GiB - orchestrator: swarm - status: - components: - Enim et voluptatum ex ea dolore.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Tenetur nostrum repellendus sint qui.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - state: available - updated_at: "2021-07-01T12:34:56Z" - supported_pgedge_versions: - - postgres_version: "17.6" - spock_version: "5" - - postgres_version: "17.6" - spock_version: "5" - - postgres_version: "17.6" - spock_version: "5" + - completed_at: "2025-06-18T17:54:36Z" + created_at: "2025-06-18T17:54:28Z" + entity_id: host-1 + host_id: host-1 + scope: host + status: completed + task_id: 0197842d-9082-7496-b787-77bd2e11809f + type: remove_host + ListHostsResponse: + type: object + properties: + hosts: + type: array + items: + $ref: '#/components/schemas/Host' + description: List of hosts in the cluster + example: - cohort: control_available: true member_id: lah4bsznw6kc0hp7biylmmmll @@ -11361,44 +15793,6 @@ components: spock_version: "5" - postgres_version: "17.6" spock_version: "5" - - cohort: - control_available: true - member_id: lah4bsznw6kc0hp7biylmmmll - type: swarm - cpus: 4 - data_dir: /data - default_pgedge_version: - postgres_version: "17.6" - spock_version: "5" - etcd_mode: server - hostname: i-0123456789abcdef.ec2.internal - id: de3b1388-1f0c-42f1-a86c-59ab72f255ec - ipv4_address: 10.24.34.2 - memory: 16GiB - orchestrator: swarm - status: - components: - Enim et voluptatum ex ea dolore.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - Tenetur nostrum repellendus sint qui.: - details: - alarms: - - '3: NOSPACE' - error: failed to connect to etcd - healthy: false - state: available - updated_at: "2021-07-01T12:34:56Z" - supported_pgedge_versions: - - postgres_version: "17.6" - spock_version: "5" - - postgres_version: "17.6" - spock_version: "5" - - postgres_version: "17.6" - spock_version: "5" required: - hosts ListTasksResponse: @@ -11425,6 +15819,14 @@ components: status: completed task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 type: create + - completed_at: "2025-06-18T16:52:35Z" + created_at: "2025-06-18T16:52:05Z" + database_id: storefront + entity_id: storefront + scope: database + status: completed + task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 + type: create example: tasks: - completed_at: "2025-06-18T17:54:36Z" @@ -11444,47 +15846,6 @@ components: status: completed task_id: 0197842d-9082-7496-b787-77bd2e11809f type: remove_host - Listdatabasesresponse: - type: object - properties: - databases: - $ref: '#/components/schemas/DatabaseCollection' - example: - databases: - - created_at: "2025-06-17T20:05:10Z" - id: inventory - instances: - - host_id: us-east-1 - id: inventory-n1-689qacsi - node_name: n1 - state: available - - host_id: ap-south-1 - id: inventory-n2-9ptayhma - node_name: n2 - state: available - - host_id: eu-central-1 - id: inventory-n3-ant97dj4 - node_name: n3 - state: available - state: available - updated_at: "2025-06-17T20:05:10Z" - - created_at: "2025-06-17T20:05:10Z" - id: storefront - instances: - - host_id: us-east-1 - id: storefront-n1-689qacsi - node_name: n1 - state: available - - host_id: ap-south-1 - id: storefront-n2-9ptayhma - node_name: n2 - state: available - - host_id: eu-central-1 - id: storefront-n3-ant97dj4 - node_name: n3 - state: available - state: available - updated_at: "2025-06-12T15:10:05Z" OrchestratorOpts: type: object properties: @@ -11629,14 +15990,6 @@ components: status: completed task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 type: create - - completed_at: "2025-06-18T16:52:35Z" - created_at: "2025-06-18T16:52:05Z" - database_id: storefront - entity_id: storefront - scope: database - status: completed - task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 - type: create required: - task - update_database_tasks @@ -11673,7 +16026,7 @@ components: maxLength: 32 additionalProperties: type: string - example: Quis ipsa. + example: Qui sed quis architecto. source_database_id: type: string description: A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens. @@ -11731,7 +16084,7 @@ components: type: array items: type: string - example: Tenetur iure quisquam dignissimos veritatis et omnis. + example: Et et reprehenderit et nam quo. description: The nodes to restore. Defaults to all nodes if empty or unspecified. example: - n1 @@ -11747,12 +16100,184 @@ components: target_nodes: - n1 required: - - restore_config - RestoreDatabaseResponse: + - restore_config + RestoreDatabaseResponse: + type: object + properties: + database: + $ref: '#/components/schemas/Database' + node_tasks: + type: array + items: + $ref: '#/components/schemas/Task' + description: The tasks that will restore each database node. + example: + - completed_at: "2025-06-18T16:52:35Z" + created_at: "2025-06-18T16:52:05Z" + database_id: storefront + entity_id: storefront + scope: database + status: completed + task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 + type: create + - completed_at: "2025-06-18T16:52:35Z" + created_at: "2025-06-18T16:52:05Z" + database_id: storefront + entity_id: storefront + scope: database + status: completed + task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 + type: create + - completed_at: "2025-06-18T16:52:35Z" + created_at: "2025-06-18T16:52:05Z" + database_id: storefront + entity_id: storefront + scope: database + status: completed + task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 + type: create + task: + $ref: '#/components/schemas/Task' + example: + database: + created_at: "2025-06-18T16:52:05Z" + id: storefront + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: us-east-1 + id: storefront-n1-689qacsi + node_name: n1 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n3 + provider_node: n3 + status: replicating + - name: sub_n1n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:36Z" + - connection_info: + hostname: i-058731542fee493f.ec2.internal + ipv4_address: 10.24.35.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: ap-south-1 + id: storefront-n2-9ptayhma + node_name: n2 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n2n1 + provider_node: n1 + status: replicating + - name: sub_n2n3 + provider_node: n3 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:01Z" + - connection_info: + hostname: i-494027b7b53f6a23.ec2.internal + ipv4_address: 10.24.36.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: eu-central-1 + id: storefront-n3-ant97dj4 + node_name: n3 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n3n1 + provider_node: n1 + status: replicating + - name: sub_n3n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:01Z" + spec: + database_name: storefront + database_users: + - attributes: + - SUPERUSER + - LOGIN + db_owner: true + username: admin + nodes: + - host_ids: + - us-east-1 + name: n1 + - host_ids: + - ap-south-1 + name: n2 + - host_ids: + - eu-central-1 + name: n3 + port: 5432 + postgres_version: "17.6" + spock_version: "5" + state: restoring + updated_at: "2025-06-18T17:58:59Z" + node_tasks: + - created_at: "2025-06-18T17:58:59Z" + database_id: storefront + node_name: n1 + parent_id: 01978431-b628-758a-aec6-03b331fa1a17 + status: pending + task_id: 01978431-b62b-723b-a09c-e4072cd64bdb + type: node_restore + - created_at: "2025-06-18T17:58:59Z" + database_id: storefront + node_name: n2 + parent_id: 01978431-b628-758a-aec6-03b331fa1a17 + status: pending + task_id: 01978431-b62c-7593-aad8-43b03df2031b + type: node_restore + - created_at: "2025-06-18T17:58:59Z" + database_id: storefront + node_name: n3 + parent_id: 01978431-b628-758a-aec6-03b331fa1a17 + status: pending + task_id: 01978431-b62d-7b65-ab09-272d0b2fea91 + type: node_restore + task: + created_at: "2025-06-18T17:58:59Z" + database_id: storefront + status: pending + task_id: 01978431-b628-758a-aec6-03b331fa1a17 + type: restore + required: + - task + - node_tasks + - database + RestoreDatabaseResponse2: type: object properties: database: - $ref: '#/components/schemas/Database' + $ref: '#/components/schemas/Database5' node_tasks: type: array items: @@ -11775,6 +16300,22 @@ components: status: completed task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 type: create + - completed_at: "2025-06-18T16:52:35Z" + created_at: "2025-06-18T16:52:05Z" + database_id: storefront + entity_id: storefront + scope: database + status: completed + task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 + type: create + - completed_at: "2025-06-18T16:52:35Z" + created_at: "2025-06-18T16:52:05Z" + database_id: storefront + entity_id: storefront + scope: database + status: completed + task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 + type: create task: $ref: '#/components/schemas/Task' example: @@ -11950,7 +16491,7 @@ components: s3-kms-key-id: 1234abcd-12ab-34cd-56ef-1234567890ab additionalProperties: type: string - example: Cupiditate sunt. + example: Excepturi consectetur accusantium ut. gcs_bucket: type: string description: The GCS bucket name for this repository. Only applies when type = 'gcs'. @@ -12032,151 +16573,7 @@ components: type: s3 required: - type - ServiceInstanceStatus: - type: object - properties: - container_id: - type: string - description: The Docker container ID. - example: a1b2c3d4e5f6 - health_check: - $ref: '#/components/schemas/HealthCheckResult' - hostname: - type: string - description: The hostname of the service instance. - example: mcp-server-host-1.internal - image_version: - type: string - description: The container image version currently running. - example: 1.0.0 - ipv4_address: - type: string - description: The IPv4 address of the service instance. - example: 10.0.1.5 - format: ipv4 - last_health_at: - type: string - description: The time of the last health check attempt. - example: "2025-01-28T10:00:00Z" - format: date-time - ports: - type: array - items: - $ref: '#/components/schemas/PortMapping' - description: Port mappings for this service instance. - example: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: - type: boolean - description: Whether the service is ready to accept requests. - example: true - description: Runtime status information for a service instance. - example: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - ServiceSpec: - type: object - properties: - config: - type: object - description: Service-specific configuration. For MCP services, this includes llm_provider, llm_model, and provider-specific API keys. - example: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - additionalProperties: true - cpus: - type: string - description: The number of CPUs to allocate for this service. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if unspecified. - example: 500m - pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ - host_ids: - type: array - items: - type: string - description: A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens. - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - description: The IDs of the hosts that should run this service. One service instance will be created per host. - example: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - minItems: 1 - memory: - type: string - description: The amount of memory in SI or IEC notation to allocate for this service. Defaults to container defaults if unspecified. - example: 512M - maxLength: 16 - port: - type: integer - description: The port to publish the service on the host. If 0, Docker assigns a random port. If unspecified, no port is published and the service is not accessible from outside the Docker network. - example: 0 - format: int64 - minimum: 0 - maximum: 65535 - service_id: - type: string - description: A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens. - example: 76f9b8c0-4958-11f0-a489-3bb29577c696 - minLength: 1 - maxLength: 63 - service_type: - type: string - description: The type of service to run. - example: mcp - enum: - - mcp - version: - type: string - description: The version of the service in semver format (e.g., '1.0.0') or the literal 'latest'. - example: latest - pattern: ^(\d+\.\d+\.\d+|latest)$ - example: - config: - llm_model: gpt-4 - llm_provider: openai - openai_api_key: sk-... - cpus: 500m - host_ids: - - de3b1388-1f0c-42f1-a86c-59ab72f255ec - memory: 512M - port: 0 - service_id: analytics-service - service_type: mcp - version: latest - required: - - service_id - - service_type - - version - - host_ids - - config - Serviceinstance: + ServiceInstance: type: object properties: created_at: @@ -12248,6 +16645,9 @@ components: - container_port: 8080 host_port: 8080 name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client service_ready: true updated_at: "2025-01-28T10:05:00Z" required: @@ -12258,311 +16658,148 @@ components: - state - created_at - updated_at - ServiceinstanceCollection: - type: array - items: - $ref: '#/components/schemas/Serviceinstance' + ServiceInstanceStatus: + type: object + properties: + container_id: + type: string + description: The Docker container ID. + example: a1b2c3d4e5f6 + health_check: + $ref: '#/components/schemas/HealthCheckResult' + hostname: + type: string + description: The hostname of the service instance. + example: mcp-server-host-1.internal + image_version: + type: string + description: The container image version currently running. + example: 1.0.0 + ipv4_address: + type: string + description: The IPv4 address of the service instance. + example: 10.0.1.5 + format: ipv4 + last_health_at: + type: string + description: The time of the last health check attempt. + example: "2025-01-28T10:00:00Z" + format: date-time + ports: + type: array + items: + $ref: '#/components/schemas/PortMapping' + description: Port mappings for this service instance. + example: + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + service_ready: + type: boolean + description: Whether the service is ready to accept requests. + example: true + description: Runtime status information for a service instance. example: - - created_at: "2025-01-28T10:00:00Z" - database_id: production - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" - - created_at: "2025-01-28T10:00:00Z" - database_id: production - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" - - created_at: "2025-01-28T10:00:00Z" - database_id: production - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" - ServiceinstanceResponseBody: + container_id: a1b2c3d4e5f6 + health_check: + checked_at: "2025-01-28T10:00:00Z" + message: Connection refused + status: healthy + hostname: mcp-server-host-1.internal + image_version: 1.0.0 + ipv4_address: 10.0.1.5 + last_health_at: "2025-01-28T10:00:00Z" + ports: + - container_port: 8080 + host_port: 8080 + name: web-client + - container_port: 8080 + host_port: 8080 + name: web-client + service_ready: true + ServiceSpec: type: object properties: - created_at: + config: + type: object + description: Service-specific configuration. For MCP services, this includes llm_provider, llm_model, and provider-specific API keys. + example: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + additionalProperties: true + cpus: type: string - description: The time that the service instance was created. - example: "2025-01-28T10:00:00Z" - format: date-time - database_id: + description: The number of CPUs to allocate for this service. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if unspecified. + example: 500m + pattern: ^[0-9]+(\.[0-9]{1,3}|m)?$ + host_ids: + type: array + items: + type: string + description: A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens. + example: 76f9b8c0-4958-11f0-a489-3bb29577c696 + minLength: 1 + maxLength: 63 + description: The IDs of the hosts that should run this service. One service instance will be created per host. + example: + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + minItems: 1 + memory: type: string - description: Unique identifier for the database. + description: The amount of memory in SI or IEC notation to allocate for this service. Defaults to container defaults if unspecified. + example: 512M + maxLength: 16 + port: + type: integer + description: The port to publish the service on the host. If 0, Docker assigns a random port. If unspecified, no port is published and the service is not accessible from outside the Docker network. + example: 0 + format: int64 + minimum: 0 + maximum: 65535 + service_id: + type: string + description: A user-specified identifier. Must be 1-63 characters, contain only lower-cased letters and hyphens, start and end with a letter or number, and not contain consecutive hyphens. example: 76f9b8c0-4958-11f0-a489-3bb29577c696 minLength: 1 maxLength: 63 - error: - type: string - description: An error message if the service instance is in an error state. - example: 'failed to start container: image not found' - host_id: - type: string - description: The ID of the host this service instance is running on. - example: host-1 - service_id: - type: string - description: The service ID from the DatabaseSpec. - example: mcp-server - service_instance_id: - type: string - description: Unique identifier for the service instance. - example: mcp-server-host-1 - state: + service_type: type: string - description: Current state of the service instance. - example: running + description: The type of service to run. + example: mcp enum: - - creating - - running - - failed - - deleting - status: - $ref: '#/components/schemas/ServiceInstanceStatus' - updated_at: + - mcp + version: type: string - description: The time that the service instance was last updated. - example: "2025-01-28T10:05:00Z" - format: date-time - description: A service instance running on a host alongside the database. (default view) + description: The version of the service in semver format (e.g., '1.0.0') or the literal 'latest'. + example: latest + pattern: ^(\d+\.\d+\.\d+|latest)$ example: - created_at: "2025-01-28T10:00:00Z" - database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" + config: + llm_model: gpt-4 + llm_provider: openai + openai_api_key: sk-... + cpus: 500m + host_ids: + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + - de3b1388-1f0c-42f1-a86c-59ab72f255ec + memory: 512M + port: 0 + service_id: analytics-service + service_type: mcp + version: latest required: - - service_instance_id - service_id - - database_id - - host_id - - state - - created_at - - updated_at - ServiceinstanceResponseBodyCollection: - type: array - items: - $ref: '#/components/schemas/ServiceinstanceResponseBody' - description: ServiceinstanceCollectionResponseBody is the result type for an array of ServiceinstanceResponseBody (default view) - example: - - created_at: "2025-01-28T10:00:00Z" - database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" - - created_at: "2025-01-28T10:00:00Z" - database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" - - created_at: "2025-01-28T10:00:00Z" - database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" - - created_at: "2025-01-28T10:00:00Z" - database_id: 76f9b8c0-4958-11f0-a489-3bb29577c696 - error: 'failed to start container: image not found' - host_id: host-1 - service_id: mcp-server - service_instance_id: mcp-server-host-1 - state: running - status: - container_id: a1b2c3d4e5f6 - health_check: - checked_at: "2025-01-28T10:00:00Z" - message: Connection refused - status: healthy - hostname: mcp-server-host-1.internal - image_version: 1.0.0 - ipv4_address: 10.0.1.5 - last_health_at: "2025-01-28T10:00:00Z" - ports: - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - - container_port: 8080 - host_port: 8080 - name: web-client - service_ready: true - updated_at: "2025-01-28T10:05:00Z" + - service_type + - version + - host_ids + - config StartInstanceResponse: type: object properties: @@ -12610,7 +16847,7 @@ components: traefik.tcp.routers.mydb.rule: HostSNI(`mydb.example.com`) additionalProperties: type: string - example: Quos autem perspiciatis odit iusto quis. + example: Rerum animi et itaque placeat placeat. extra_networks: type: array items: @@ -12853,6 +17090,11 @@ components: status: creating message: task started timestamp: "2025-05-29T15:43:13Z" + - fields: + option.enabled: true + status: creating + message: task started + timestamp: "2025-05-29T15:43:13Z" last_entry_id: type: string description: The ID of the last entry in the task log. @@ -13011,10 +17253,10 @@ components: type: object properties: spec: - $ref: '#/components/schemas/DatabaseSpec4' + $ref: '#/components/schemas/DatabaseSpec5' tenant_id: type: string - description: Unique identifier for the databases's owner. + description: Unique identifier for the database's owner. example: 76f9b8c0-4958-11f0-a489-3bb29577c696 minLength: 1 maxLength: 63 @@ -13178,6 +17420,125 @@ components: required: - task - database + UpdateDatabaseResponse2: + type: object + properties: + database: + $ref: '#/components/schemas/Database4' + task: + $ref: '#/components/schemas/Task' + example: + database: + created_at: "2025-06-18T16:52:05Z" + id: storefront + instances: + - connection_info: + hostname: i-0123456789abcdef.ec2.internal + ipv4_address: 10.24.34.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: us-east-1 + id: storefront-n1-689qacsi + node_name: n1 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n1n3 + provider_node: n3 + status: replicating + - name: sub_n1n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:36Z" + - connection_info: + hostname: i-058731542fee493f.ec2.internal + ipv4_address: 10.24.35.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: ap-south-1 + id: storefront-n2-9ptayhma + node_name: n2 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n2n1 + provider_node: n1 + status: replicating + - name: sub_n2n3 + provider_node: n3 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:01Z" + - connection_info: + hostname: i-494027b7b53f6a23.ec2.internal + ipv4_address: 10.24.36.2 + port: 5432 + created_at: "2025-06-18T16:52:22Z" + host_id: eu-central-1 + id: storefront-n3-ant97dj4 + node_name: n3 + postgres: + patroni_state: running + role: primary + version: "18.1" + spock: + read_only: "off" + subscriptions: + - name: sub_n3n1 + provider_node: n1 + status: replicating + - name: sub_n3n2 + provider_node: n2 + status: replicating + version: 4.0.10 + state: available + status_updated_at: "2025-06-18T17:58:56Z" + updated_at: "2025-06-18T17:54:01Z" + spec: + database_name: storefront + database_users: + - attributes: + - SUPERUSER + - LOGIN + db_owner: true + username: admin + nodes: + - host_ids: + - us-east-1 + name: n1 + - host_ids: + - ap-south-1 + name: n2 + - host_ids: + - eu-central-1 + name: n3 + port: 5432 + postgres_version: "17.6" + spock_version: "5" + state: restoring + updated_at: "2025-06-18T17:58:59Z" + task: + created_at: "2025-06-18T17:23:14Z" + database_id: storefront + status: pending + task_id: 01978410-fb5d-7cd2-bbd2-66c0bf929dc0 + type: update + required: + - task + - database VersionInfo: type: object properties: diff --git a/changes/unreleased/Added-20260209-091526.yaml b/changes/unreleased/Added-20260209-091526.yaml new file mode 100644 index 00000000..86176fbd --- /dev/null +++ b/changes/unreleased/Added-20260209-091526.yaml @@ -0,0 +1,3 @@ +kind: Added +body: Added all instance fields to `list-databases` API response. +time: 2026-02-09T09:15:26.483049-05:00 diff --git a/changes/unreleased/Changed-20260209-091536.yaml b/changes/unreleased/Changed-20260209-091536.yaml new file mode 100644 index 00000000..0125bac8 --- /dev/null +++ b/changes/unreleased/Changed-20260209-091536.yaml @@ -0,0 +1,3 @@ +kind: Changed +body: '`client` package: `ListDatabasesResponse.Databases` is now a `[]*DatabaseSummary` instead of a `DatabaseCollection`.' +time: 2026-02-09T09:15:36.853868-05:00 diff --git a/server/internal/api/apiv1/convert.go b/server/internal/api/apiv1/convert.go index 9d50ada7..36e3a1ea 100644 --- a/server/internal/api/apiv1/convert.go +++ b/server/internal/api/apiv1/convert.go @@ -309,12 +309,12 @@ func serviceInstanceStatusToAPI(status *database.ServiceInstanceStatus) *api.Ser } } -func serviceInstanceToAPI(si *database.ServiceInstance) *api.Serviceinstance { +func serviceInstanceToAPI(si *database.ServiceInstance) *api.ServiceInstance { if si == nil { return nil } - return &api.Serviceinstance{ + return &api.ServiceInstance{ ServiceInstanceID: si.ServiceInstanceID, ServiceID: si.ServiceID, DatabaseID: api.Identifier(si.DatabaseID), @@ -327,6 +327,22 @@ func serviceInstanceToAPI(si *database.ServiceInstance) *api.Serviceinstance { } } +func instancesToAPI(instances []*database.Instance) []*api.Instance { + out := make([]*api.Instance, len(instances)) + for i, inst := range instances { + out[i] = instanceToAPI(inst) + } + // Sort by node name, instance ID asc + slices.SortStableFunc(out, func(a, b *api.Instance) int { + if nodeEq := strings.Compare(a.NodeName, b.NodeName); nodeEq != 0 { + return nodeEq + } + return strings.Compare(a.ID, b.ID) + }) + + return out +} + func databaseToAPI(d *database.Database) *api.Database { if d == nil { return nil @@ -337,24 +353,12 @@ func databaseToAPI(d *database.Database) *api.Database { spec = databaseSpecToAPI(d.Spec) } - instances := make([]*api.Instance, len(d.Instances)) - for i, inst := range d.Instances { - instances[i] = instanceToAPI(inst) - } - // Sort by node ID, instance ID asc - slices.SortStableFunc(instances, func(a, b *api.Instance) int { - if nodeEq := strings.Compare(a.NodeName, b.NodeName); nodeEq != 0 { - return nodeEq - } - return strings.Compare(a.ID, b.ID) - }) - - serviceInstances := make([]*api.Serviceinstance, len(d.ServiceInstances)) + serviceInstances := make([]*api.ServiceInstance, len(d.ServiceInstances)) for i, si := range d.ServiceInstances { serviceInstances[i] = serviceInstanceToAPI(si) } // Sort by service ID, host ID asc - slices.SortStableFunc(serviceInstances, func(a, b *api.Serviceinstance) int { + slices.SortStableFunc(serviceInstances, func(a, b *api.ServiceInstance) int { if svcEq := strings.Compare(a.ServiceID, b.ServiceID); svcEq != 0 { return svcEq } @@ -373,8 +377,28 @@ func databaseToAPI(d *database.Database) *api.Database { UpdatedAt: d.UpdatedAt.Format(time.RFC3339), State: string(d.State), Spec: spec, - Instances: instances, ServiceInstances: serviceInstances, + Instances: instancesToAPI(d.Instances), + } +} + +func databaseToSummaryAPI(d *database.Database) *api.DatabaseSummary { + if d == nil { + return nil + } + + var tenantID *api.Identifier + if d.TenantID != nil { + tenantID = utils.PointerTo(api.Identifier(*d.TenantID)) + } + + return &api.DatabaseSummary{ + ID: api.Identifier(d.DatabaseID), + TenantID: tenantID, + CreatedAt: d.CreatedAt.Format(time.RFC3339), + UpdatedAt: d.UpdatedAt.Format(time.RFC3339), + State: string(d.State), + Instances: instancesToAPI(d.Instances), } } diff --git a/server/internal/api/apiv1/post_init_handlers.go b/server/internal/api/apiv1/post_init_handlers.go index 8c869d28..3243d7b5 100644 --- a/server/internal/api/apiv1/post_init_handlers.go +++ b/server/internal/api/apiv1/post_init_handlers.go @@ -273,14 +273,14 @@ func (s *PostInitHandlers) ListDatabases(ctx context.Context) (*api.ListDatabase // Ensure we return an empty (non-nil) slice if no databases found if len(databases) == 0 { return &api.ListDatabasesResponse{ - Databases: []*api.Database{}, + Databases: []*api.DatabaseSummary{}, }, nil } // Preallocate the output slice with the length of the databases - apiDatabases := make(api.DatabaseCollection, 0, len(databases)) + apiDatabases := make([]*api.DatabaseSummary, 0, len(databases)) for _, db := range databases { - apiDB := databaseToAPI(db) + apiDB := databaseToSummaryAPI(db) if apiDB != nil { // Only append non-nil API databases apiDatabases = append(apiDatabases, apiDB) From 246327cb7044df50c82f4539080e1f86b3f8af57 Mon Sep 17 00:00:00 2001 From: Jason Lynch Date: Sun, 8 Feb 2026 15:17:53 -0500 Subject: [PATCH 2/5] chore: standardize attribute format in api design Standardizes the format of `Attribute` calls in the API design so that we can more easily write tools to modify these calls. --- api/apiv1/design/cancel.go | 8 ++- api/apiv1/design/database.go | 1 + api/apiv1/design/host.go | 4 +- api/apiv1/design/instance.go | 12 +++- api/apiv1/design/task.go | 15 ++++- api/apiv1/gen/control_plane/service.go | 3 + .../control_plane/client/encode_decode.go | 3 - .../gen/http/control_plane/client/types.go | 59 +++++++++---------- .../control_plane/server/encode_decode.go | 3 - .../gen/http/control_plane/server/types.go | 19 ++++-- api/apiv1/gen/http/openapi.json | 43 +++++++++++--- api/apiv1/gen/http/openapi.yaml | 19 ++++++ api/apiv1/gen/http/openapi3.json | 23 ++++++-- api/apiv1/gen/http/openapi3.yaml | 11 ++++ 14 files changed, 160 insertions(+), 63 deletions(-) diff --git a/api/apiv1/design/cancel.go b/api/apiv1/design/cancel.go index 3179d26b..721fc605 100644 --- a/api/apiv1/design/cancel.go +++ b/api/apiv1/design/cancel.go @@ -5,7 +5,11 @@ import ( ) var CancelDatabaseTaskPayload = g.Type("CancelDatabaseTaskPayload", func() { - g.Attribute("database_id", Identifier) - g.Attribute("task_id", Identifier) + g.Attribute("database_id", Identifier, func() { + g.Description("The ID of the database that the task belongs to.") + }) + g.Attribute("task_id", Identifier, func() { + g.Description("The ID of task to cancel.") + }) g.Required("database_id", "task_id") }) diff --git a/api/apiv1/design/database.go b/api/apiv1/design/database.go index 0300cbd1..80fd795a 100644 --- a/api/apiv1/design/database.go +++ b/api/apiv1/design/database.go @@ -1295,6 +1295,7 @@ var ListDatabasesResponse = g.Type("ListDatabasesResponse", func() { g.Attribute("databases", g.ArrayOf(DatabaseSummary), func() { g.Description("The databases managed by this cluster.") }) + g.Required("databases") g.Example(map[string]any{ "databases": []map[string]any{ diff --git a/api/apiv1/design/host.go b/api/apiv1/design/host.go index 11867345..3ee020c3 100644 --- a/api/apiv1/design/host.go +++ b/api/apiv1/design/host.go @@ -6,7 +6,9 @@ import ( var ListHostsResponse = g.Type("ListHostsResponse", func() { g.Description("Response containing the list of hosts") - g.Attribute("hosts", g.ArrayOf(Host), "List of hosts in the cluster") + g.Attribute("hosts", g.ArrayOf(Host), func() { + g.Description("List of hosts in the cluster") + }) g.Required("hosts") }) diff --git a/api/apiv1/design/instance.go b/api/apiv1/design/instance.go index e0a7cf6e..ebbcd2c7 100644 --- a/api/apiv1/design/instance.go +++ b/api/apiv1/design/instance.go @@ -6,19 +6,25 @@ import ( var RestartInstanceResponse = g.Type("RestartInstanceResponse", func() { g.Description("Response containing the restart task") - g.Attribute("task", Task, "Task representing the restart operation") + g.Attribute("task", Task, func() { + g.Description("Task representing the restart operation") + }) g.Required("task") }) var StopInstanceResponse = g.Type("StopInstanceResponse", func() { g.Description("Response containing the stop task") - g.Attribute("task", Task, "Task representing the stop operation") + g.Attribute("task", Task, func() { + g.Description("Task representing the stop operation") + }) g.Required("task") }) var StartInstanceResponse = g.Type("StartInstanceResponse", func() { g.Description("Response containing the start task") - g.Attribute("task", Task, "Task representing the start operation") + g.Attribute("task", Task, func() { + g.Description("Task representing the start operation") + }) g.Required("task") }) diff --git a/api/apiv1/design/task.go b/api/apiv1/design/task.go index dc61bb08..66a4cb5e 100644 --- a/api/apiv1/design/task.go +++ b/api/apiv1/design/task.go @@ -262,7 +262,10 @@ var TaskLog = g.Type("TaskLog", func() { }) var ListDatabaseTasksResponse = g.Type("ListDatabaseTasksResponse", func() { - g.Attribute("tasks", g.ArrayOf(Task)) + g.Attribute("tasks", g.ArrayOf(Task), func() { + g.Description("The tasks for the given database.") + }) + g.Required("tasks") g.Example(map[string]any{ "tasks": []map[string]any{ @@ -312,7 +315,10 @@ var ListDatabaseTasksResponse = g.Type("ListDatabaseTasksResponse", func() { }) var ListHostTasksResponse = g.Type("ListHostTasksResponse", func() { - g.Attribute("tasks", g.ArrayOf(Task)) + g.Attribute("tasks", g.ArrayOf(Task), func() { + g.Description("The tasks for the given host.") + }) + g.Required("tasks") g.Example(map[string]any{ "tasks": []map[string]any{ @@ -331,7 +337,10 @@ var ListHostTasksResponse = g.Type("ListHostTasksResponse", func() { }) var ListTasksResponse = g.Type("ListTasksResponse", func() { - g.Attribute("tasks", g.ArrayOf(Task)) + g.Attribute("tasks", g.ArrayOf(Task), func() { + g.Description("The tasks for the given entity.") + }) + g.Required("tasks") g.Example(map[string]any{ "tasks": []map[string]any{ diff --git a/api/apiv1/gen/control_plane/service.go b/api/apiv1/gen/control_plane/service.go index 1133f443..ecbd2c22 100644 --- a/api/apiv1/gen/control_plane/service.go +++ b/api/apiv1/gen/control_plane/service.go @@ -703,6 +703,7 @@ type ListDatabaseTasksPayload struct { // ListDatabaseTasksResponse is the result type of the control-plane service // list-database-tasks method. type ListDatabaseTasksResponse struct { + // The tasks for the given database. Tasks []*Task } @@ -729,6 +730,7 @@ type ListHostTasksPayload struct { // ListHostTasksResponse is the result type of the control-plane service // list-host-tasks method. type ListHostTasksResponse struct { + // The tasks for the given host. Tasks []*Task } @@ -757,6 +759,7 @@ type ListTasksPayload struct { // ListTasksResponse is the result type of the control-plane service list-tasks // method. type ListTasksResponse struct { + // The tasks for the given entity. Tasks []*Task } diff --git a/api/apiv1/gen/http/control_plane/client/encode_decode.go b/api/apiv1/gen/http/control_plane/client/encode_decode.go index 0d70fd13..7c9bee56 100644 --- a/api/apiv1/gen/http/control_plane/client/encode_decode.go +++ b/api/apiv1/gen/http/control_plane/client/encode_decode.go @@ -4176,9 +4176,6 @@ func unmarshalTaskResponseBodyToControlplaneTask(v *TaskResponseBody) *controlpl // value of type *controlplane.DatabaseSummary from a value of type // *DatabaseSummaryResponseBody. func unmarshalDatabaseSummaryResponseBodyToControlplaneDatabaseSummary(v *DatabaseSummaryResponseBody) *controlplane.DatabaseSummary { - if v == nil { - return nil - } res := &controlplane.DatabaseSummary{ ID: controlplane.Identifier(*v.ID), CreatedAt: *v.CreatedAt, diff --git a/api/apiv1/gen/http/control_plane/client/types.go b/api/apiv1/gen/http/control_plane/client/types.go index 83d31c9e..c682e69a 100644 --- a/api/apiv1/gen/http/control_plane/client/types.go +++ b/api/apiv1/gen/http/control_plane/client/types.go @@ -259,6 +259,7 @@ type FailoverDatabaseNodeResponseBody struct { // ListDatabaseTasksResponseBody is the type of the "control-plane" service // "list-database-tasks" endpoint HTTP response body. type ListDatabaseTasksResponseBody struct { + // The tasks for the given database. Tasks []*TaskResponseBody `form:"tasks,omitempty" json:"tasks,omitempty" xml:"tasks,omitempty"` } @@ -315,6 +316,7 @@ type GetDatabaseTaskLogResponseBody struct { // ListHostTasksResponseBody is the type of the "control-plane" service // "list-host-tasks" endpoint HTTP response body. type ListHostTasksResponseBody struct { + // The tasks for the given host. Tasks []*TaskResponseBody `form:"tasks,omitempty" json:"tasks,omitempty" xml:"tasks,omitempty"` } @@ -371,6 +373,7 @@ type GetHostTaskLogResponseBody struct { // ListTasksResponseBody is the type of the "control-plane" service // "list-tasks" endpoint HTTP response body. type ListTasksResponseBody struct { + // The tasks for the given entity. Tasks []*TaskResponseBody `form:"tasks,omitempty" json:"tasks,omitempty" xml:"tasks,omitempty"` } @@ -3317,15 +3320,13 @@ func NewRemoveHostServerError(body *RemoveHostServerErrorResponseBody) *controlp // endpoint result from a HTTP "OK" response. func NewListDatabasesResponseOK(body *ListDatabasesResponseBody) *controlplane.ListDatabasesResponse { v := &controlplane.ListDatabasesResponse{} - if body.Databases != nil { - v.Databases = make([]*controlplane.DatabaseSummary, len(body.Databases)) - for i, val := range body.Databases { - if val == nil { - v.Databases[i] = nil - continue - } - v.Databases[i] = unmarshalDatabaseSummaryResponseBodyToControlplaneDatabaseSummary(val) + v.Databases = make([]*controlplane.DatabaseSummary, len(body.Databases)) + for i, val := range body.Databases { + if val == nil { + v.Databases[i] = nil + continue } + v.Databases[i] = unmarshalDatabaseSummaryResponseBodyToControlplaneDatabaseSummary(val) } return v @@ -3883,15 +3884,13 @@ func NewFailoverDatabaseNodeServerError(body *FailoverDatabaseNodeServerErrorRes // "list-database-tasks" endpoint result from a HTTP "OK" response. func NewListDatabaseTasksResponseOK(body *ListDatabaseTasksResponseBody) *controlplane.ListDatabaseTasksResponse { v := &controlplane.ListDatabaseTasksResponse{} - if body.Tasks != nil { - v.Tasks = make([]*controlplane.Task, len(body.Tasks)) - for i, val := range body.Tasks { - if val == nil { - v.Tasks[i] = nil - continue - } - v.Tasks[i] = unmarshalTaskResponseBodyToControlplaneTask(val) + v.Tasks = make([]*controlplane.Task, len(body.Tasks)) + for i, val := range body.Tasks { + if val == nil { + v.Tasks[i] = nil + continue } + v.Tasks[i] = unmarshalTaskResponseBodyToControlplaneTask(val) } return v @@ -4078,15 +4077,13 @@ func NewGetDatabaseTaskLogServerError(body *GetDatabaseTaskLogServerErrorRespons // "list-host-tasks" endpoint result from a HTTP "OK" response. func NewListHostTasksResponseOK(body *ListHostTasksResponseBody) *controlplane.ListHostTasksResponse { v := &controlplane.ListHostTasksResponse{} - if body.Tasks != nil { - v.Tasks = make([]*controlplane.Task, len(body.Tasks)) - for i, val := range body.Tasks { - if val == nil { - v.Tasks[i] = nil - continue - } - v.Tasks[i] = unmarshalTaskResponseBodyToControlplaneTask(val) + v.Tasks = make([]*controlplane.Task, len(body.Tasks)) + for i, val := range body.Tasks { + if val == nil { + v.Tasks[i] = nil + continue } + v.Tasks[i] = unmarshalTaskResponseBodyToControlplaneTask(val) } return v @@ -4273,15 +4270,13 @@ func NewGetHostTaskLogServerError(body *GetHostTaskLogServerErrorResponseBody) * // endpoint result from a HTTP "OK" response. func NewListTasksResponseOK(body *ListTasksResponseBody) *controlplane.ListTasksResponse { v := &controlplane.ListTasksResponse{} - if body.Tasks != nil { - v.Tasks = make([]*controlplane.Task, len(body.Tasks)) - for i, val := range body.Tasks { - if val == nil { - v.Tasks[i] = nil - continue - } - v.Tasks[i] = unmarshalTaskResponseBodyToControlplaneTask(val) + v.Tasks = make([]*controlplane.Task, len(body.Tasks)) + for i, val := range body.Tasks { + if val == nil { + v.Tasks[i] = nil + continue } + v.Tasks[i] = unmarshalTaskResponseBodyToControlplaneTask(val) } return v diff --git a/api/apiv1/gen/http/control_plane/server/encode_decode.go b/api/apiv1/gen/http/control_plane/server/encode_decode.go index 37a1525d..7a201789 100644 --- a/api/apiv1/gen/http/control_plane/server/encode_decode.go +++ b/api/apiv1/gen/http/control_plane/server/encode_decode.go @@ -3549,9 +3549,6 @@ func marshalControlplaneTaskToTaskResponseBody(v *controlplane.Task) *TaskRespon // value of type *DatabaseSummaryResponseBody from a value of type // *controlplane.DatabaseSummary. func marshalControlplaneDatabaseSummaryToDatabaseSummaryResponseBody(v *controlplane.DatabaseSummary) *DatabaseSummaryResponseBody { - if v == nil { - return nil - } res := &DatabaseSummaryResponseBody{ ID: string(v.ID), CreatedAt: v.CreatedAt, diff --git a/api/apiv1/gen/http/control_plane/server/types.go b/api/apiv1/gen/http/control_plane/server/types.go index 821e98fa..7bc3e5aa 100644 --- a/api/apiv1/gen/http/control_plane/server/types.go +++ b/api/apiv1/gen/http/control_plane/server/types.go @@ -186,7 +186,7 @@ type RemoveHostResponseBody struct { // "list-databases" endpoint HTTP response body. type ListDatabasesResponseBody struct { // The databases managed by this cluster. - Databases []*DatabaseSummaryResponseBody `form:"databases,omitempty" json:"databases,omitempty" xml:"databases,omitempty"` + Databases []*DatabaseSummaryResponseBody `form:"databases" json:"databases" xml:"databases"` } // CreateDatabaseResponseBody is the type of the "control-plane" service @@ -259,7 +259,8 @@ type FailoverDatabaseNodeResponseBody struct { // ListDatabaseTasksResponseBody is the type of the "control-plane" service // "list-database-tasks" endpoint HTTP response body. type ListDatabaseTasksResponseBody struct { - Tasks []*TaskResponseBody `form:"tasks,omitempty" json:"tasks,omitempty" xml:"tasks,omitempty"` + // The tasks for the given database. + Tasks []*TaskResponseBody `form:"tasks" json:"tasks" xml:"tasks"` } // GetDatabaseTaskResponseBody is the type of the "control-plane" service @@ -315,7 +316,8 @@ type GetDatabaseTaskLogResponseBody struct { // ListHostTasksResponseBody is the type of the "control-plane" service // "list-host-tasks" endpoint HTTP response body. type ListHostTasksResponseBody struct { - Tasks []*TaskResponseBody `form:"tasks,omitempty" json:"tasks,omitempty" xml:"tasks,omitempty"` + // The tasks for the given host. + Tasks []*TaskResponseBody `form:"tasks" json:"tasks" xml:"tasks"` } // GetHostTaskResponseBody is the type of the "control-plane" service @@ -371,7 +373,8 @@ type GetHostTaskLogResponseBody struct { // ListTasksResponseBody is the type of the "control-plane" service // "list-tasks" endpoint HTTP response body. type ListTasksResponseBody struct { - Tasks []*TaskResponseBody `form:"tasks,omitempty" json:"tasks,omitempty" xml:"tasks,omitempty"` + // The tasks for the given entity. + Tasks []*TaskResponseBody `form:"tasks" json:"tasks" xml:"tasks"` } // RestoreDatabaseResponseBody is the type of the "control-plane" service @@ -2941,6 +2944,8 @@ func NewListDatabasesResponseBody(res *controlplane.ListDatabasesResponse) *List } body.Databases[i] = marshalControlplaneDatabaseSummaryToDatabaseSummaryResponseBody(val) } + } else { + body.Databases = []*DatabaseSummaryResponseBody{} } return body } @@ -3065,6 +3070,8 @@ func NewListDatabaseTasksResponseBody(res *controlplane.ListDatabaseTasksRespons } body.Tasks[i] = marshalControlplaneTaskToTaskResponseBody(val) } + } else { + body.Tasks = []*TaskResponseBody{} } return body } @@ -3130,6 +3137,8 @@ func NewListHostTasksResponseBody(res *controlplane.ListHostTasksResponse) *List } body.Tasks[i] = marshalControlplaneTaskToTaskResponseBody(val) } + } else { + body.Tasks = []*TaskResponseBody{} } return body } @@ -3194,6 +3203,8 @@ func NewListTasksResponseBody(res *controlplane.ListTasksResponse) *ListTasksRes } body.Tasks[i] = marshalControlplaneTaskToTaskResponseBody(val) } + } else { + body.Tasks = []*TaskResponseBody{} } return body } diff --git a/api/apiv1/gen/http/openapi.json b/api/apiv1/gen/http/openapi.json index e68cf352..8b0e5601 100644 --- a/api/apiv1/gen/http/openapi.json +++ b/api/apiv1/gen/http/openapi.json @@ -256,7 +256,10 @@ "200": { "description": "OK response.", "schema": { - "$ref": "#/definitions/ListDatabasesResponse" + "$ref": "#/definitions/ListDatabasesResponse", + "required": [ + "databases" + ] } }, "409": { @@ -1294,7 +1297,10 @@ "200": { "description": "OK response.", "schema": { - "$ref": "#/definitions/ListDatabaseTasksResponse" + "$ref": "#/definitions/ListDatabaseTasksResponse", + "required": [ + "tasks" + ] } }, "400": { @@ -1857,7 +1863,10 @@ "200": { "description": "OK response.", "schema": { - "$ref": "#/definitions/ListHostTasksResponse" + "$ref": "#/definitions/ListHostTasksResponse", + "required": [ + "tasks" + ] } }, "400": { @@ -2154,7 +2163,10 @@ "200": { "description": "OK response.", "schema": { - "$ref": "#/definitions/ListTasksResponse" + "$ref": "#/definitions/ListTasksResponse", + "required": [ + "tasks" + ] } }, "400": { @@ -6367,6 +6379,7 @@ "items": { "$ref": "#/definitions/Task" }, + "description": "The tasks for the given database.", "example": [ { "completed_at": "2025-06-18T16:52:35Z", @@ -6435,7 +6448,10 @@ "type": "create" } ] - } + }, + "required": [ + "tasks" + ] }, "ListDatabasesResponse": { "title": "ListDatabasesResponse", @@ -7060,7 +7076,10 @@ "updated_at": "2025-06-12T15:10:05Z" } ] - } + }, + "required": [ + "databases" + ] }, "ListHostTasksResponse": { "title": "ListHostTasksResponse", @@ -7071,6 +7090,7 @@ "items": { "$ref": "#/definitions/Task" }, + "description": "The tasks for the given host.", "example": [ { "completed_at": "2025-06-18T16:52:35Z", @@ -7108,7 +7128,10 @@ "type": "remove_host" } ] - } + }, + "required": [ + "tasks" + ] }, "ListHostsResponse": { "title": "ListHostsResponse", @@ -7466,6 +7489,7 @@ "items": { "$ref": "#/definitions/Task" }, + "description": "The tasks for the given entity.", "example": [ { "completed_at": "2025-06-18T16:52:35Z", @@ -7524,7 +7548,10 @@ "type": "remove_host" } ] - } + }, + "required": [ + "tasks" + ] }, "OrchestratorOpts": { "title": "OrchestratorOpts", diff --git a/api/apiv1/gen/http/openapi.yaml b/api/apiv1/gen/http/openapi.yaml index 0883b2c2..3e69dbea 100644 --- a/api/apiv1/gen/http/openapi.yaml +++ b/api/apiv1/gen/http/openapi.yaml @@ -181,6 +181,8 @@ paths: description: OK response. schema: $ref: '#/definitions/ListDatabasesResponse' + required: + - databases "409": description: Conflict response. schema: @@ -900,6 +902,8 @@ paths: description: OK response. schema: $ref: '#/definitions/ListDatabaseTasksResponse' + required: + - tasks "400": description: Bad Request response. schema: @@ -1297,6 +1301,8 @@ paths: description: OK response. schema: $ref: '#/definitions/ListHostTasksResponse' + required: + - tasks "400": description: Bad Request response. schema: @@ -1508,6 +1514,8 @@ paths: description: OK response. schema: $ref: '#/definitions/ListTasksResponse' + required: + - tasks "400": description: Bad Request response. schema: @@ -4617,6 +4625,7 @@ definitions: type: array items: $ref: '#/definitions/Task' + description: The tasks for the given database. example: - completed_at: "2025-06-18T16:52:35Z" created_at: "2025-06-18T16:52:05Z" @@ -4669,6 +4678,8 @@ definitions: status: completed task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 type: create + required: + - tasks ListDatabasesResponse: title: ListDatabasesResponse type: object @@ -5113,6 +5124,8 @@ definitions: updated_at: "2025-06-12T15:10:05Z" state: available updated_at: "2025-06-12T15:10:05Z" + required: + - databases ListHostTasksResponse: title: ListHostTasksResponse type: object @@ -5121,6 +5134,7 @@ definitions: type: array items: $ref: '#/definitions/Task' + description: The tasks for the given host. example: - completed_at: "2025-06-18T16:52:35Z" created_at: "2025-06-18T16:52:05Z" @@ -5148,6 +5162,8 @@ definitions: status: completed task_id: 0197842d-9082-7496-b787-77bd2e11809f type: remove_host + required: + - tasks ListHostsResponse: title: ListHostsResponse type: object @@ -5387,6 +5403,7 @@ definitions: type: array items: $ref: '#/definitions/Task' + description: The tasks for the given entity. example: - completed_at: "2025-06-18T16:52:35Z" created_at: "2025-06-18T16:52:05Z" @@ -5431,6 +5448,8 @@ definitions: status: completed task_id: 0197842d-9082-7496-b787-77bd2e11809f type: remove_host + required: + - tasks OrchestratorOpts: title: OrchestratorOpts type: object diff --git a/api/apiv1/gen/http/openapi3.json b/api/apiv1/gen/http/openapi3.json index 3ed5a502..1b3c3910 100644 --- a/api/apiv1/gen/http/openapi3.json +++ b/api/apiv1/gen/http/openapi3.json @@ -21031,6 +21031,7 @@ "items": { "$ref": "#/components/schemas/Task" }, + "description": "The tasks for the given database.", "example": [ { "completed_at": "2025-06-18T16:52:35Z", @@ -21109,7 +21110,10 @@ "type": "create" } ] - } + }, + "required": [ + "tasks" + ] }, "ListDatabasesResponse": { "type": "object", @@ -21659,7 +21663,10 @@ "updated_at": "2025-06-12T15:10:05Z" } ] - } + }, + "required": [ + "databases" + ] }, "ListHostTasksResponse": { "type": "object", @@ -21669,6 +21676,7 @@ "items": { "$ref": "#/components/schemas/Task" }, + "description": "The tasks for the given host.", "example": [ { "completed_at": "2025-06-18T16:52:35Z", @@ -21706,7 +21714,10 @@ "type": "remove_host" } ] - } + }, + "required": [ + "tasks" + ] }, "ListHostsResponse": { "type": "object", @@ -21966,6 +21977,7 @@ "items": { "$ref": "#/components/schemas/Task" }, + "description": "The tasks for the given entity.", "example": [ { "completed_at": "2025-06-18T16:52:35Z", @@ -22024,7 +22036,10 @@ "type": "remove_host" } ] - } + }, + "required": [ + "tasks" + ] }, "OrchestratorOpts": { "type": "object", diff --git a/api/apiv1/gen/http/openapi3.yaml b/api/apiv1/gen/http/openapi3.yaml index c28405e0..57fabfde 100644 --- a/api/apiv1/gen/http/openapi3.yaml +++ b/api/apiv1/gen/http/openapi3.yaml @@ -15148,6 +15148,7 @@ components: type: array items: $ref: '#/components/schemas/Task' + description: The tasks for the given database. example: - completed_at: "2025-06-18T16:52:35Z" created_at: "2025-06-18T16:52:05Z" @@ -15208,6 +15209,8 @@ components: status: completed task_id: 019783f4-75f4-71e7-85a3-c9b96b345d77 type: create + required: + - tasks ListDatabasesResponse: type: object properties: @@ -15595,6 +15598,8 @@ components: updated_at: "2025-06-12T15:10:05Z" state: available updated_at: "2025-06-12T15:10:05Z" + required: + - databases ListHostTasksResponse: type: object properties: @@ -15602,6 +15607,7 @@ components: type: array items: $ref: '#/components/schemas/Task' + description: The tasks for the given host. example: - completed_at: "2025-06-18T16:52:35Z" created_at: "2025-06-18T16:52:05Z" @@ -15629,6 +15635,8 @@ components: status: completed task_id: 0197842d-9082-7496-b787-77bd2e11809f type: remove_host + required: + - tasks ListHostsResponse: type: object properties: @@ -15802,6 +15810,7 @@ components: type: array items: $ref: '#/components/schemas/Task' + description: The tasks for the given entity. example: - completed_at: "2025-06-18T16:52:35Z" created_at: "2025-06-18T16:52:05Z" @@ -15846,6 +15855,8 @@ components: status: completed task_id: 0197842d-9082-7496-b787-77bd2e11809f type: remove_host + required: + - tasks OrchestratorOpts: type: object properties: From 0cb13a17c89a2e62fedda9fead2471bf5c2166e5 Mon Sep 17 00:00:00 2001 From: Jason Lynch Date: Sun, 8 Feb 2026 15:32:22 -0500 Subject: [PATCH 3/5] feat: add json tags to generated service structs Goa produces separate structs for the client, server, and programmatic users. The latter structs do not have JSON tags, which makes it difficult to use the client libraries in some use-cases, such as CLIs. In order to make it easier to consistently maintain these tags, I've added a tool that programmatically edits the API design files to add tags to every attribute. --- api/Makefile | 1 + api/apiv1/design/api.go | 2 + api/apiv1/design/backup.go | 3 + api/apiv1/design/cancel.go | 2 + api/apiv1/design/cluster.go | 24 + api/apiv1/design/database.go | 131 ++ api/apiv1/design/host.go | 26 + api/apiv1/design/instance.go | 51 + api/apiv1/design/task.go | 26 + api/apiv1/design/version.go | 4 + api/apiv1/gen/control_plane/service.go | 526 +++--- .../gen/http/control_plane/client/types.go | 1476 ++++++++--------- .../gen/http/control_plane/server/types.go | 1476 ++++++++--------- api/tags/main.go | 280 ++++ changes/unreleased/Added-20260209-091508.yaml | 3 + 15 files changed, 2292 insertions(+), 1739 deletions(-) create mode 100644 api/tags/main.go create mode 100644 changes/unreleased/Added-20260209-091508.yaml diff --git a/api/Makefile b/api/Makefile index 3292752b..5bc916d9 100644 --- a/api/Makefile +++ b/api/Makefile @@ -2,6 +2,7 @@ include ../common.mk .PHONY: generate-v1 generate-v1: + go run $(CURDIR)/tags $(CURDIR)/apiv1/design/*.go $(goa) gen github.com/pgEdge/control-plane/api/apiv1/design -o apiv1 $(yamlfmt) $(CURDIR)/apiv1/gen/http/*.yaml diff --git a/api/apiv1/design/api.go b/api/apiv1/design/api.go index 7cbb4c72..a883b774 100644 --- a/api/apiv1/design/api.go +++ b/api/apiv1/design/api.go @@ -941,10 +941,12 @@ var APIError = g.Type("APIError", func() { g.ErrorName("name", g.String, func() { g.Description("The name of the error.") g.Example("error_name") + g.Meta("struct:tag:json", "name") }) g.Attribute("message", g.String, func() { g.Description("The error message.") g.Example("A longer description of the error.") + g.Meta("struct:tag:json", "message") }) g.Required("name", "message") diff --git a/api/apiv1/design/backup.go b/api/apiv1/design/backup.go index 9b45f85a..ae07bbd1 100644 --- a/api/apiv1/design/backup.go +++ b/api/apiv1/design/backup.go @@ -9,18 +9,21 @@ var BackupOptions = g.Type("BackupOptions", func() { g.Enum("full", "diff", "incr") g.Description("The type of backup.") g.Example("full") + g.Meta("struct:tag:json", "type") }) g.Attribute("annotations", g.MapOf(g.String, g.String), func() { g.Description("Annotations for the backup.") g.Example(map[string]string{ "key": "value", }) + g.Meta("struct:tag:json", "annotations,omitempty") }) g.Attribute("backup_options", g.MapOf(g.String, g.String), func() { g.Description("Options for the backup.") g.Example(map[string]string{ "archive-check": "n", }) + g.Meta("struct:tag:json", "backup_options,omitempty") }) g.Required("type") diff --git a/api/apiv1/design/cancel.go b/api/apiv1/design/cancel.go index 721fc605..53fe9390 100644 --- a/api/apiv1/design/cancel.go +++ b/api/apiv1/design/cancel.go @@ -7,9 +7,11 @@ import ( var CancelDatabaseTaskPayload = g.Type("CancelDatabaseTaskPayload", func() { g.Attribute("database_id", Identifier, func() { g.Description("The ID of the database that the task belongs to.") + g.Meta("struct:tag:json", "database_id") }) g.Attribute("task_id", Identifier, func() { g.Description("The ID of task to cancel.") + g.Meta("struct:tag:json", "task_id") }) g.Required("database_id", "task_id") }) diff --git a/api/apiv1/design/cluster.go b/api/apiv1/design/cluster.go index 6b593371..f4360af2 100644 --- a/api/apiv1/design/cluster.go +++ b/api/apiv1/design/cluster.go @@ -8,6 +8,7 @@ var ClusterStatus = g.Type("ClusterStatus", func() { g.Attribute("state", g.String, func() { g.Description("The current state of the cluster.") g.Enum("available", "error") + g.Meta("struct:tag:json", "state") }) g.Required("state") @@ -17,13 +18,16 @@ var Cluster = g.Type("Cluster", func() { g.Attribute("id", Identifier, func() { g.Description("Unique identifier for the cluster.") g.Example("production") + g.Meta("struct:tag:json", "id") }) g.Attribute("status", ClusterStatus, func() { g.Description("Current status of the cluster.") + g.Meta("struct:tag:json", "status") }) g.Attribute("hosts", g.ArrayOf(Host), func() { g.Description("All of the hosts in the cluster.") g.Example(HostsArrayExample) + g.Meta("struct:tag:json", "hosts") }) g.Required("id", "status", "hosts") @@ -33,6 +37,7 @@ var InitClusterRequest = g.Type("InitClusterRequest", func() { g.Description("Request to initialize a cluster") g.Attribute("cluster_id", Identifier, func() { g.Description("Optional id for the cluster, omit for default generated id") + g.Meta("struct:tag:json", "cluster_id,omitempty") }) }) @@ -40,11 +45,13 @@ var ClusterJoinToken = g.Type("ClusterJoinToken", func() { g.Attribute("token", g.String, func() { g.Description("Token to join an existing cluster.") g.Example("PGEDGE-dd440afcf5de20ef8e8cf54f6cb9f125fd55f90e64faa94b906130b31235e730-41e975f41d7ea61058f2fe2572cb52dd") + g.Meta("struct:tag:json", "token") }) g.Attribute("server_url", g.String, func() { g.Format(g.FormatURI) g.Description("Existing server to join") g.Example("http://192.168.1.1:3000") + g.Meta("struct:tag:json", "server_url") }) g.Required("token", "server_url") @@ -55,25 +62,30 @@ var ClusterJoinRequest = g.Type("ClusterJoinRequest", func() { g.Description("Token to join the cluster.") g.Pattern(`^PGEDGE-[\w]{64}-[\w]{32}$`) g.Example("PGEDGE-dd440afcf5de20ef8e8cf54f6cb9f125fd55f90e64faa94b906130b31235e730-41e975f41d7ea61058f2fe2572cb52dd") + g.Meta("struct:tag:json", "token") }) g.Attribute("host_id", Identifier, func() { g.Description("The unique identifier for the host that's joining the cluster.") g.Example("host-1") + g.Meta("struct:tag:json", "host_id") }) g.Attribute("hostname", g.String, func() { g.Description("The hostname of the host that's joining the cluster.") g.MinLength(3) g.MaxLength(128) g.Example("ip-10-1-0-113.ec2.internal") + g.Meta("struct:tag:json", "hostname") }) g.Attribute("ipv4_address", g.String, func() { g.Format(g.FormatIPv4) g.Description("The IPv4 address of the host that's joining the cluster.") g.Example("10.1.0.113") + g.Meta("struct:tag:json", "ipv4_address") }) g.Attribute("embedded_etcd_enabled", g.Boolean, func() { g.Description("True if the joining member is configured to run an embedded an etcd server.") g.Example(true) + g.Meta("struct:tag:json", "embedded_etcd_enabled") }) g.Required("embedded_etcd_enabled", "token", "host_id", "hostname", "ipv4_address") @@ -83,14 +95,17 @@ var EtcdClusterMember = g.Type("EtcdClusterMember", func() { g.Attribute("name", g.String, func() { g.Description("The name of the Etcd cluster member.") g.Example("host-1") + g.Meta("struct:tag:json", "name") }) g.Attribute("peer_urls", g.ArrayOf(g.String), func() { g.Description("The Etcd peer endpoint for this cluster member.") g.Example([]string{"http://192.168.1.1:2380"}) + g.Meta("struct:tag:json", "peer_urls") }) g.Attribute("client_urls", g.ArrayOf(g.String), func() { g.Description("The Etcd client endpoint for this cluster member.") g.Example([]string{"http://192.168.1.1:2379"}) + g.Meta("struct:tag:json", "client_urls") }) g.Required("name", "peer_urls", "client_urls") @@ -100,30 +115,37 @@ var ClusterCredentials = g.Type("ClusterCredentials", func() { g.Attribute("username", g.String, func() { g.Description("The Etcd username for the new host.") g.Example("host-2") + g.Meta("struct:tag:json", "username") }) g.Attribute("password", g.String, func() { g.Description("The Etcd password for the new host.") g.Example("a78v2x866zirk4o737gjdssfi") + g.Meta("struct:tag:json", "password") }) g.Attribute("ca_cert", g.String, func() { g.Description("The base64-encoded CA certificate for the cluster.") g.Example("ZGE4NDdkMzMtM2FiYi00YzE2LTkzOGQtNDRkODU2ZDFlZWZlCg==") + g.Meta("struct:tag:json", "ca_cert") }) g.Attribute("client_cert", g.String, func() { g.Description("The base64-encoded etcd client certificate for the new cluster member.") g.Example("NWM0MGMyZTAtYjAyYS00NzkxLTk0YjAtMjMyN2EyZGQ4ZDc3Cg==") + g.Meta("struct:tag:json", "client_cert") }) g.Attribute("client_key", g.String, func() { g.Description("The base64-encoded etcd client key for the new cluster member.") g.Example("Y2FlNjhmODQtYjE1Ni00YWYyLWFhMWEtM2FhNzI2MmVhYTM0Cg==") + g.Meta("struct:tag:json", "client_key") }) g.Attribute("server_cert", g.String, func() { g.Description("The base64-encoded etcd server certificate for the new cluster member.") g.Example("Nzc1OGQyY2UtZjdjOC00YmE4LTk2ZmQtOWE3MjVmYmY3NDdiCg==") + g.Meta("struct:tag:json", "server_cert") }) g.Attribute("server_key", g.String, func() { g.Description("The base64-encoded etcd server key for the new cluster member.") g.Example("NWRhNzY1ZGUtNzJkMi00OTU3LTk4ODUtOWRiZThjOGE5MGQ3Cg==") + g.Meta("struct:tag:json", "server_key") }) g.Required( @@ -140,9 +162,11 @@ var ClusterCredentials = g.Type("ClusterCredentials", func() { var ClusterJoinOptions = g.Type("ClusterJoinOptions", func() { g.Attribute("leader", EtcdClusterMember, func() { g.Description("Connection information for the etcd cluster leader") + g.Meta("struct:tag:json", "leader") }) g.Attribute("credentials", ClusterCredentials, func() { g.Description("Credentials for the new host joining the cluster.") + g.Meta("struct:tag:json", "credentials") }) g.Required("leader", "credentials") diff --git a/api/apiv1/design/database.go b/api/apiv1/design/database.go index 80fd795a..ec7a73f6 100644 --- a/api/apiv1/design/database.go +++ b/api/apiv1/design/database.go @@ -23,21 +23,25 @@ var DatabaseNodeSpec = g.Type("DatabaseNodeSpec", func() { g.Description("The name of the database node.") g.Pattern(nodeNamePattern) g.Example("n1") + g.Meta("struct:tag:json", "name") }) g.Attribute("host_ids", HostIDs, func() { g.Description("The IDs of the hosts that should run this node. When multiple hosts are specified, one host will chosen as a primary, and the others will be read replicas.") g.MinLength(1) + g.Meta("struct:tag:json", "host_ids") }) g.Attribute("postgres_version", g.String, func() { g.Description("The Postgres version for this node in 'major.minor' format. Overrides the Postgres version set in the DatabaseSpec.") g.Pattern(postgresVersionPattern) g.Example("17.6") + g.Meta("struct:tag:json", "postgres_version,omitempty") }) g.Attribute("port", g.Int, func() { g.Description("The port used by the Postgres database for this node. Overrides the Postgres port set in the DatabaseSpec.") g.Minimum(0) g.Maximum(65535) g.Example(5432) + g.Meta("struct:tag:json", "port,omitempty") }) g.Attribute("cpus", g.String, func() { g.Description("The number of CPUs to allocate for the database on this node and to use for tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Cannot allocate units smaller than 1m. Defaults to the number of available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs than are available on the host. Whether this limit is enforced depends on the orchestrator.") @@ -45,31 +49,38 @@ var DatabaseNodeSpec = g.Type("DatabaseNodeSpec", func() { g.Example("14") g.Example("0.5") g.Example("500m") + g.Meta("struct:tag:json", "cpus,omitempty") }) g.Attribute("memory", g.String, func() { g.Description("The amount of memory in SI or IEC notation to allocate for the database on this node and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.") g.MaxLength(16) g.Example("16GiB") g.Example("500M") + g.Meta("struct:tag:json", "memory,omitempty") }) g.Attribute("postgresql_conf", g.MapOf(g.String, g.Any), func() { g.Description("Additional postgresql.conf settings for this particular node. Will be merged with the settings provided by control-plane.") g.Example(map[string]any{ "max_connections": 1000, }) + g.Meta("struct:tag:json", "postgresql_conf,omitempty") }) g.Attribute("backup_config", BackupConfigSpec, func() { g.Description("The backup configuration for this node. Overrides the backup configuration set in the DatabaseSpec.") + g.Meta("struct:tag:json", "backup_config,omitempty") }) g.Attribute("restore_config", RestoreConfigSpec, func() { g.Description("The restore configuration for this node. Overrides the restore configuration set in the DatabaseSpec.") + g.Meta("struct:tag:json", "restore_config,omitempty") }) g.Attribute("orchestrator_opts", OrchestratorOpts, func() { g.Description("Orchestrator-specific configuration options.") + g.Meta("struct:tag:json", "orchestrator_opts,omitempty") }) g.Attribute("source_node", g.String, func() { g.Description("The name of the source node to use for sync. This is typically the node (like 'n1') from which the data will be copied to initialize this new node.") g.Example("n1") + g.Meta("struct:tag:json", "source_node,omitempty") }) g.Required("name", "host_ids") @@ -80,20 +91,24 @@ var DatabaseUserSpec = g.Type("DatabaseUserSpec", func() { g.Description("The username for this database user.") g.Example("admin") g.MinLength(1) + g.Meta("struct:tag:json", "username") }) g.Attribute("password", g.String, func() { g.Description("The password for this database user. This field will be excluded from the response of all endpoints. It can also be omitted from update requests to keep the current value.") g.Example("secret") g.MinLength(1) + g.Meta("struct:tag:json", "password,omitempty") }) g.Attribute("db_owner", g.Boolean, func() { g.Description("If true, this user will be granted database ownership.") + g.Meta("struct:tag:json", "db_owner,omitempty") }) g.Attribute("attributes", g.ArrayOf(g.String), func() { g.Description("The attributes to assign to this database user.") g.MaxLength(16) g.Example([]string{"LOGIN", "SUPERUSER"}) g.Example([]string{"LOGIN", "CREATEDB", "CREATEROLE"}) + g.Meta("struct:tag:json", "attributes,omitempty") }) g.Attribute("roles", g.ArrayOf(g.String), func() { g.Description("The roles to assign to this database user.") @@ -101,6 +116,7 @@ var DatabaseUserSpec = g.Type("DatabaseUserSpec", func() { g.Example([]string{"application"}) g.Example([]string{"application_read_only"}) g.Example([]string{"pgedge_superuser"}) + g.Meta("struct:tag:json", "roles,omitempty") }) g.Required("username") @@ -111,11 +127,13 @@ var ServiceSpec = g.Type("ServiceSpec", func() { g.Description("The unique identifier for this service.") g.Example("mcp-server") g.Example("analytics-service") + g.Meta("struct:tag:json", "service_id") }) g.Attribute("service_type", g.String, func() { g.Description("The type of service to run.") g.Enum("mcp") g.Example("mcp") + g.Meta("struct:tag:json", "service_type") }) g.Attribute("version", g.String, func() { g.Description("The version of the service in semver format (e.g., '1.0.0') or the literal 'latest'.") @@ -123,10 +141,12 @@ var ServiceSpec = g.Type("ServiceSpec", func() { g.Example("1.0.0") g.Example("1.2.3") g.Example("latest") + g.Meta("struct:tag:json", "version") }) g.Attribute("host_ids", HostIDs, func() { g.Description("The IDs of the hosts that should run this service. One service instance will be created per host.") g.MinLength(1) + g.Meta("struct:tag:json", "host_ids") }) g.Attribute("port", g.Int, func() { g.Description("The port to publish the service on the host. If 0, Docker assigns a random port. If unspecified, no port is published and the service is not accessible from outside the Docker network.") @@ -135,6 +155,7 @@ var ServiceSpec = g.Type("ServiceSpec", func() { g.Example(8080) g.Example(9000) g.Example(0) + g.Meta("struct:tag:json", "port,omitempty") }) g.Attribute("config", g.MapOf(g.String, g.Any), func() { g.Description("Service-specific configuration. For MCP services, this includes llm_provider, llm_model, and provider-specific API keys.") @@ -148,6 +169,7 @@ var ServiceSpec = g.Type("ServiceSpec", func() { "llm_model": "gpt-4", "openai_api_key": "sk-...", }) + g.Meta("struct:tag:json", "config") }) g.Attribute("cpus", g.String, func() { g.Description("The number of CPUs to allocate for this service. It can include the SI suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if unspecified.") @@ -155,12 +177,14 @@ var ServiceSpec = g.Type("ServiceSpec", func() { g.Example("1") g.Example("0.5") g.Example("500m") + g.Meta("struct:tag:json", "cpus,omitempty") }) g.Attribute("memory", g.String, func() { g.Description("The amount of memory in SI or IEC notation to allocate for this service. Defaults to container defaults if unspecified.") g.MaxLength(16) g.Example("1GiB") g.Example("512M") + g.Meta("struct:tag:json", "memory,omitempty") }) g.Required("service_id", "service_type", "version", "host_ids", "config") @@ -171,95 +195,112 @@ var BackupRepositorySpec = g.Type("BackupRepositorySpec", func() { g.Description("The unique identifier of this repository.") g.Example("my-app-1") g.Example("f6b84a99-5e91-4203-be1e-131fe82e5984") + g.Meta("struct:tag:json", "id,omitempty") }) g.Attribute("type", g.String, func() { g.Description("The type of this repository.") g.Enum("s3", "gcs", "azure", "posix", "cifs") g.Example("s3") + g.Meta("struct:tag:json", "type") }) g.Attribute("s3_bucket", g.String, func() { g.Description("The S3 bucket name for this repository. Only applies when type = 's3'.") g.MinLength(3) g.MaxLength(63) g.Example("pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1") + g.Meta("struct:tag:json", "s3_bucket,omitempty") }) g.Attribute("s3_region", g.String, func() { g.Description("The region of the S3 bucket for this repository. Only applies when type = 's3'.") g.MinLength(1) g.MaxLength(32) g.Example("us-east-1") + g.Meta("struct:tag:json", "s3_region,omitempty") }) g.Attribute("s3_endpoint", g.String, func() { g.Description("The optional S3 endpoint for this repository. Only applies when type = 's3'.") g.MinLength(3) g.MaxLength(128) g.Example("s3.us-east-1.amazonaws.com") + g.Meta("struct:tag:json", "s3_endpoint,omitempty") }) g.Attribute("s3_key", g.String, func() { g.Description("An optional AWS access key ID to use for this repository. If not provided, pgbackrest will use the default credential provider chain. This field will be excluded from the response of all endpoints. It can also be omitted from update requests to keep the current value.") g.MaxLength(128) g.Example("AKIAIOSFODNN7EXAMPLE") + g.Meta("struct:tag:json", "s3_key,omitempty") }) g.Attribute("s3_key_secret", g.String, func() { g.Description("The corresponding secret for the AWS access key ID in s3_key. This field will be excluded from the response of all endpoints. It can also be omitted from update requests to keep the current value.") g.MaxLength(128) g.Example("wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY") + g.Meta("struct:tag:json", "s3_key_secret,omitempty") }) g.Attribute("gcs_bucket", g.String, func() { g.Description("The GCS bucket name for this repository. Only applies when type = 'gcs'.") g.MinLength(3) g.MaxLength(63) g.Example("pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1") + g.Meta("struct:tag:json", "gcs_bucket,omitempty") }) g.Attribute("gcs_endpoint", g.String, func() { g.Description("The optional GCS endpoint for this repository. Only applies when type = 'gcs'.") g.MinLength(3) g.MaxLength(128) g.Example("localhost") + g.Meta("struct:tag:json", "gcs_endpoint,omitempty") }) g.Attribute("gcs_key", g.String, func() { g.Description("Optional base64-encoded private key data. If omitted, pgbackrest will use the service account attached to the instance profile. This field will be excluded from the response of all endpoints. It can also be omitted from update requests to keep the current value.") g.MaxLength(1024) g.Example("ZXhhbXBsZSBnY3Mga2V5Cg==") + g.Meta("struct:tag:json", "gcs_key,omitempty") }) g.Attribute("azure_account", g.String, func() { g.Description("The Azure account name for this repository. Only applies when type = 'azure'.") g.MinLength(3) g.MaxLength(24) g.Example("pgedge-backups") + g.Meta("struct:tag:json", "azure_account,omitempty") }) g.Attribute("azure_container", g.String, func() { g.Description("The Azure container name for this repository. Only applies when type = 'azure'.") g.MinLength(3) g.MaxLength(63) g.Example("pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1") + g.Meta("struct:tag:json", "azure_container,omitempty") }) g.Attribute("azure_endpoint", g.String, func() { g.Description("The optional Azure endpoint for this repository. Only applies when type = 'azure'.") g.MinLength(3) g.MaxLength(128) g.Example("blob.core.usgovcloudapi.net") + g.Meta("struct:tag:json", "azure_endpoint,omitempty") }) g.Attribute("azure_key", g.String, func() { g.Description("The Azure storage account access key to use for this repository. This field will be excluded from the response of all endpoints. It can also be omitted from update requests to keep the current value.") g.MaxLength(128) g.Example("YXpLZXk=") + g.Meta("struct:tag:json", "azure_key,omitempty") }) g.Attribute("retention_full", g.Int, func() { g.Description("The count of full backups to retain or the time to retain full backups.") g.Minimum(1) g.Maximum(9999999) g.Example(2) + g.Meta("struct:tag:json", "retention_full,omitempty") }) g.Attribute("retention_full_type", g.String, func() { g.Description("The type of measure used for retention_full.") g.Enum("time", "count") g.Example("count") + g.Meta("struct:tag:json", "retention_full_type,omitempty") }) g.Attribute("base_path", g.String, func() { g.Description("The base path within the repository to store backups. Required for type = 'posix' and 'cifs'.") g.MaxLength(256) g.Example("/backups") + g.Meta("struct:tag:json", "base_path,omitempty") }) g.Attribute("custom_options", g.MapOf(g.String, g.String), func() { g.Description("Additional options to apply to this repository.") @@ -267,6 +308,7 @@ var BackupRepositorySpec = g.Type("BackupRepositorySpec", func() { "storage-upload-chunk-size": "5MiB", "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", }) + g.Meta("struct:tag:json", "custom_options,omitempty") }) g.Required("type") @@ -277,16 +319,19 @@ var BackupScheduleSpec = g.Type("BackupScheduleSpec", func() { g.Description("The unique identifier for this backup schedule.") g.MaxLength(64) g.Example("daily-full-backup") + g.Meta("struct:tag:json", "id") }) g.Attribute("type", g.String, func() { g.Description("The type of backup to take on this schedule.") g.Enum("full", "incr") g.Example("full") + g.Meta("struct:tag:json", "type") }) g.Attribute("cron_expression", g.String, func() { g.Description("The cron expression for this schedule.") g.MaxLength(32) g.Example("0 6 * * ?") + g.Meta("struct:tag:json", "cron_expression") }) g.Required("id", "type", "cron_expression") @@ -296,10 +341,12 @@ var BackupConfigSpec = g.Type("BackupConfigSpec", func() { g.Attribute("repositories", g.ArrayOf(BackupRepositorySpec), func() { g.Description("The repositories for this backup configuration.") g.MinLength(1) + g.Meta("struct:tag:json", "repositories") }) g.Attribute("schedules", g.ArrayOf(BackupScheduleSpec), func() { g.Description("The schedules for this backup configuration.") g.MaxLength(32) + g.Meta("struct:tag:json", "schedules,omitempty") }) g.Required("repositories") @@ -310,90 +357,106 @@ var RestoreRepositorySpec = g.Type("RestoreRepositorySpec", func() { g.Description("The unique identifier of this repository.") g.Example("my-app-1") g.Example("f6b84a99-5e91-4203-be1e-131fe82e5984") + g.Meta("struct:tag:json", "id,omitempty") }) g.Attribute("type", g.String, func() { g.Description("The type of this repository.") g.Enum("s3", "gcs", "azure", "posix", "cifs") g.Example("s3") + g.Meta("struct:tag:json", "type") }) g.Attribute("s3_bucket", g.String, func() { g.Description("The S3 bucket name for this repository. Only applies when type = 's3'.") g.MinLength(3) g.MaxLength(63) g.Example("pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1") + g.Meta("struct:tag:json", "s3_bucket,omitempty") }) g.Attribute("s3_region", g.String, func() { g.Description("The region of the S3 bucket for this repository. Only applies when type = 's3'.") g.MinLength(1) g.MaxLength(32) g.Example("us-east-1") + g.Meta("struct:tag:json", "s3_region,omitempty") }) g.Attribute("s3_endpoint", g.String, func() { g.Description("The optional S3 endpoint for this repository. Only applies when type = 's3'.") g.MinLength(3) g.MaxLength(128) g.Example("s3.us-east-1.amazonaws.com") + g.Meta("struct:tag:json", "s3_endpoint,omitempty") }) g.Attribute("s3_key", g.String, func() { g.Description("An optional AWS access key ID to use for this repository. If not provided, pgbackrest will use the default credential provider chain.") g.MaxLength(128) g.Example("AKIAIOSFODNN7EXAMPLE") + g.Meta("struct:tag:json", "s3_key,omitempty") }) g.Attribute("s3_key_secret", g.String, func() { g.Description("The corresponding secret for the AWS access key ID in s3_key.") g.MaxLength(128) g.Example("wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY") + g.Meta("struct:tag:json", "s3_key_secret,omitempty") }) g.Attribute("gcs_bucket", g.String, func() { g.Description("The GCS bucket name for this repository. Only applies when type = 'gcs'.") g.MinLength(3) g.MaxLength(63) g.Example("pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1") + g.Meta("struct:tag:json", "gcs_bucket,omitempty") }) g.Attribute("gcs_endpoint", g.String, func() { g.Description("The optional GCS endpoint for this repository. Only applies when type = 'gcs'.") g.MinLength(3) g.MaxLength(128) g.Example("localhost") + g.Meta("struct:tag:json", "gcs_endpoint,omitempty") }) g.Attribute("gcs_key", g.String, func() { g.Description("Optional base64-encoded private key data. If omitted, pgbackrest will use the service account attached to the instance profile.") g.MaxLength(1024) g.Example("ZXhhbXBsZSBnY3Mga2V5Cg==") + g.Meta("struct:tag:json", "gcs_key,omitempty") }) g.Attribute("azure_account", g.String, func() { g.Description("The Azure account name for this repository. Only applies when type = 'azure'.") g.MinLength(3) g.MaxLength(24) g.Example("pgedge-backups") + g.Meta("struct:tag:json", "azure_account,omitempty") }) g.Attribute("azure_container", g.String, func() { g.Description("The Azure container name for this repository. Only applies when type = 'azure'.") g.MinLength(3) g.MaxLength(63) g.Example("pgedge-backups-9f81786f-373b-4ff2-afee-e054a06a96f1") + g.Meta("struct:tag:json", "azure_container,omitempty") }) g.Attribute("azure_endpoint", g.String, func() { g.Description("The optional Azure endpoint for this repository. Only applies when type = 'azure'.") g.MinLength(3) g.MaxLength(128) g.Example("blob.core.usgovcloudapi.net") + g.Meta("struct:tag:json", "azure_endpoint,omitempty") }) g.Attribute("azure_key", g.String, func() { g.Description("An optional Azure storage account access key to use for this repository. If not provided, pgbackrest will use the VM's managed identity.") g.MaxLength(128) g.Example("YXpLZXk=") + g.Meta("struct:tag:json", "azure_key,omitempty") }) g.Attribute("base_path", g.String, func() { g.Description("The base path within the repository to store backups. Required for type = 'posix' and 'cifs'.") g.MaxLength(256) g.Example("/backups") + g.Meta("struct:tag:json", "base_path,omitempty") }) g.Attribute("custom_options", g.MapOf(g.String, g.String), func() { g.Description("Additional options to apply to this repository.") g.Example(map[string]any{ "s3-kms-key-id": "1234abcd-12ab-34cd-56ef-1234567890ab", }) + g.Meta("struct:tag:json", "custom_options,omitempty") }) g.Required("type") @@ -405,20 +468,24 @@ var RestoreConfigSpec = g.Type("RestoreConfigSpec", func() { g.Example("production") g.Example("my-app") g.Example("02f1a7db-fca8-4521-b57a-2a375c1ced51") + g.Meta("struct:tag:json", "source_database_id") }) g.Attribute("source_node_name", g.String, func() { g.Description("The name of the node to restore this database from.") g.Pattern(nodeNamePattern) g.Example("n1") + g.Meta("struct:tag:json", "source_node_name") }) g.Attribute("source_database_name", g.String, func() { g.Description("The name of the database in this repository. The database will be renamed to the database_name in the DatabaseSpec after it's restored.") g.MinLength(1) g.MaxLength(31) g.Example("northwind") + g.Meta("struct:tag:json", "source_database_name") }) g.Attribute("repository", RestoreRepositorySpec, func() { g.Description("The repository to restore this database from.") + g.Meta("struct:tag:json", "repository") }) g.Attribute("restore_options", g.MapOf(g.String, g.String), func() { g.Description("Additional options to use when restoring this database. If omitted, the database will be restored to the latest point in the given repository.") @@ -436,6 +503,7 @@ var RestoreConfigSpec = g.Type("RestoreConfigSpec", func() { "type": "xid", "target": "123456", }) + g.Meta("struct:tag:json", "restore_options,omitempty") }) g.Required("source_database_id", "source_node_name", "source_database_name", "repository") @@ -447,22 +515,26 @@ var DatabaseSpec = g.Type("DatabaseSpec", func() { g.MinLength(1) g.MaxLength(31) g.Example("northwind") + g.Meta("struct:tag:json", "database_name") }) g.Attribute("postgres_version", g.String, func() { g.Description("The Postgres version in 'major.minor' format.") g.Pattern(postgresVersionPattern) g.Example("17.6") + g.Meta("struct:tag:json", "postgres_version,omitempty") }) g.Attribute("spock_version", g.String, func() { g.Description("The major version of the Spock extension.") g.Pattern(spockVersionPattern) g.Example("5") + g.Meta("struct:tag:json", "spock_version,omitempty") }) g.Attribute("port", g.Int, func() { g.Description("The port used by the Postgres database. If the port is 0, each instance will be assigned a random port. If the port is unspecified, the database will not be exposed on any port, dependent on orchestrator support for that feature.") g.Minimum(0) g.Maximum(65535) g.Example(5432) + g.Meta("struct:tag:json", "port,omitempty") }) g.Attribute("cpus", g.String, func() { g.Description("The number of CPUs to allocate for the database and to use for tuning Postgres. Defaults to the number of available CPUs on the host. Can include an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced depends on the orchestrator.") @@ -470,30 +542,37 @@ var DatabaseSpec = g.Type("DatabaseSpec", func() { g.Example("14") g.Example("0.5") g.Example("500m") + g.Meta("struct:tag:json", "cpus,omitempty") }) g.Attribute("memory", g.String, func() { g.Description("The amount of memory in SI or IEC notation to allocate for the database and to use for tuning Postgres. Defaults to the total available memory on the host. Whether this limit is enforced depends on the orchestrator.") g.MaxLength(16) g.Example("16GiB") g.Example("500M") + g.Meta("struct:tag:json", "memory,omitempty") }) g.Attribute("nodes", g.ArrayOf(DatabaseNodeSpec), func() { g.Description("The Spock nodes for this database.") g.MinLength(1) g.MaxLength(9) + g.Meta("struct:tag:json", "nodes") }) g.Attribute("database_users", g.ArrayOf(DatabaseUserSpec), func() { g.Description("The users to create for this database.") g.MaxLength(16) + g.Meta("struct:tag:json", "database_users,omitempty") }) g.Attribute("services", g.ArrayOf(ServiceSpec), func() { g.Description("Service instances to run alongside the database (e.g., MCP servers).") + g.Meta("struct:tag:json", "services,omitempty") }) g.Attribute("backup_config", BackupConfigSpec, func() { g.Description("The backup configuration for this database.") + g.Meta("struct:tag:json", "backup_config,omitempty") }) g.Attribute("restore_config", RestoreConfigSpec, func() { g.Description("The restore configuration for this database.") + g.Meta("struct:tag:json", "restore_config,omitempty") }) g.Attribute("postgresql_conf", g.MapOf(g.String, g.Any), func() { g.Description("Additional postgresql.conf settings. Will be merged with the settings provided by control-plane.") @@ -501,9 +580,11 @@ var DatabaseSpec = g.Type("DatabaseSpec", func() { g.Example(map[string]any{ "max_connections": 1000, }) + g.Meta("struct:tag:json", "postgresql_conf,omitempty") }) g.Attribute("orchestrator_opts", OrchestratorOpts, func() { g.Description("Orchestrator-specific configuration options.") + g.Meta("struct:tag:json", "orchestrator_opts,omitempty") }) g.Required("database_name", "nodes") @@ -515,21 +596,25 @@ var Database = g.Type("Database", func() { g.Example("production") g.Example("my-app") g.Example("02f1a7db-fca8-4521-b57a-2a375c1ced51") + g.Meta("struct:tag:json", "id") }) g.Attribute("tenant_id", Identifier, func() { g.Description("Unique identifier for the database's owner.") g.Example("engineering") g.Example("8210ec10-2dca-406c-ac4a-0661d2189954") + g.Meta("struct:tag:json", "tenant_id,omitempty") }) g.Attribute("created_at", g.String, func() { g.Format(g.FormatDateTime) g.Description("The time that the database was created.") g.Example("2025-01-01T01:30:00Z") + g.Meta("struct:tag:json", "created_at") }) g.Attribute("updated_at", g.String, func() { g.Format(g.FormatDateTime) g.Description("The time that the database was last updated.") g.Example("2025-01-01T02:30:00Z") + g.Meta("struct:tag:json", "updated_at") }) g.Attribute("state", g.String, func() { g.Description("Current state of the database.") @@ -544,15 +629,19 @@ var Database = g.Type("Database", func() { "restoring", "unknown", ) + g.Meta("struct:tag:json", "state") }) g.Attribute("instances", g.ArrayOf(Instance), func() { g.Description("All of the instances in the database.") + g.Meta("struct:tag:json", "instances,omitempty") }) g.Attribute("service_instances", g.ArrayOf(ServiceInstance), func() { g.Description("Service instances running alongside this database.") + g.Meta("struct:tag:json", "service_instances,omitempty") }) g.Attribute("spec", DatabaseSpec, func() { g.Description("The user-provided specification for the database.") + g.Meta("struct:tag:json", "spec,omitempty") }) g.Example(exampleDatabase) @@ -566,21 +655,25 @@ var DatabaseSummary = g.Type("DatabaseSummary", func() { g.Example("production") g.Example("my-app") g.Example("02f1a7db-fca8-4521-b57a-2a375c1ced51") + g.Meta("struct:tag:json", "id") }) g.Attribute("tenant_id", Identifier, func() { g.Description("Unique identifier for the database's owner.") g.Example("engineering") g.Example("8210ec10-2dca-406c-ac4a-0661d2189954") + g.Meta("struct:tag:json", "tenant_id,omitempty") }) g.Attribute("created_at", g.String, func() { g.Format(g.FormatDateTime) g.Description("The time that the database was created.") g.Example("2025-01-01T01:30:00Z") + g.Meta("struct:tag:json", "created_at") }) g.Attribute("updated_at", g.String, func() { g.Format(g.FormatDateTime) g.Description("The time that the database was last updated.") g.Example("2025-01-01T02:30:00Z") + g.Meta("struct:tag:json", "updated_at") }) g.Attribute("state", g.String, func() { g.Description("Current state of the database.") @@ -595,9 +688,11 @@ var DatabaseSummary = g.Type("DatabaseSummary", func() { "restoring", "unknown", ) + g.Meta("struct:tag:json", "state") }) g.Attribute("instances", g.ArrayOf(Instance), func() { g.Description("All of the instances in the database.") + g.Meta("struct:tag:json", "instances,omitempty") }) g.Required("id", "created_at", "updated_at", "state") @@ -609,14 +704,17 @@ var CreateDatabaseRequest = g.Type("CreateDatabaseRequest", func() { g.Example("production") g.Example("my-app") g.Example("02f1a7db-fca8-4521-b57a-2a375c1ced51") + g.Meta("struct:tag:json", "id,omitempty") }) g.Attribute("tenant_id", Identifier, func() { g.Description("Unique identifier for the database's owner.") g.Example("engineering") g.Example("8210ec10-2dca-406c-ac4a-0661d2189954") + g.Meta("struct:tag:json", "tenant_id,omitempty") }) g.Attribute("spec", DatabaseSpec, func() { g.Description("The specification for the database.") + g.Meta("struct:tag:json", "spec") }) g.Required("spec") @@ -893,9 +991,11 @@ var CreateDatabaseRequest = g.Type("CreateDatabaseRequest", func() { var CreateDatabaseResponse = g.Type("CreateDatabaseResponse", func() { g.Attribute("task", Task, func() { g.Description("The task that will create this database.") + g.Meta("struct:tag:json", "task") }) g.Attribute("database", Database, func() { g.Description("The database being created.") + g.Meta("struct:tag:json", "database") }) g.Required("task", "database") @@ -943,9 +1043,11 @@ var UpdateDatabaseRequest = g.Type("UpdateDatabaseRequest", func() { g.Description("Unique identifier for the database's owner.") g.Example("engineering") g.Example("8210ec10-2dca-406c-ac4a-0661d2189954") + g.Meta("struct:tag:json", "tenant_id,omitempty") }) g.Attribute("spec", DatabaseSpec, func() { g.Description("The specification for the database.") + g.Meta("struct:tag:json", "spec") }) g.Example("Minimal", func() { @@ -1038,9 +1140,11 @@ var UpdateDatabaseRequest = g.Type("UpdateDatabaseRequest", func() { var UpdateDatabaseResponse = g.Type("UpdateDatabaseResponse", func() { g.Attribute("task", Task, func() { g.Description("The task that will update this database.") + g.Meta("struct:tag:json", "task") }) g.Attribute("database", Database, func() { g.Description("The database being updated.") + g.Meta("struct:tag:json", "database") }) g.Required("task", "database") @@ -1060,6 +1164,7 @@ var UpdateDatabaseResponse = g.Type("UpdateDatabaseResponse", func() { var DeleteDatabaseResponse = g.Type("DeleteDatabaseResponse", func() { g.Attribute("task", Task, func() { g.Description("The task that will delete this database.") + g.Meta("struct:tag:json", "task") }) g.Required("task") @@ -1078,6 +1183,7 @@ var DeleteDatabaseResponse = g.Type("DeleteDatabaseResponse", func() { var BackupDatabaseNodeResponse = g.Type("BackupDatabaseNodeResponse", func() { g.Attribute("task", Task, func() { g.Description("The task that will backup this database node.") + g.Meta("struct:tag:json", "task") }) g.Required("task") @@ -1097,20 +1203,24 @@ var SwitchoverDatabaseNodeRequest = g.Type("SwitchoverDatabaseNodeRequest", func g.Attribute("database_id", Identifier, func() { g.Description("ID of the database to perform the switchover for.") g.Example("my-app") + g.Meta("struct:tag:json", "database_id") }) g.Attribute("node_name", g.String, func() { g.Description("Name of the node to initiate the switchover from (informational).") g.Pattern(nodeNamePattern) g.Example("n1") + g.Meta("struct:tag:json", "node_name") }) g.Attribute("candidate_instance_id", g.String, func() { g.Description("Optional instance_id of the replica to promote. If omitted, a candidate will be selected.") g.Example("3c875a27-f6a6-4c1c-ba5f-6972fb1fc348") + g.Meta("struct:tag:json", "candidate_instance_id,omitempty") }) g.Attribute("scheduled_at", g.String, func() { g.Description("Optional ISO8601 datetime when the switchover should occur. If omitted the switchover occurs immediately.") g.Format(g.FormatDateTime) g.Example("2025-09-20T22:00:00+05:30") + g.Meta("struct:tag:json", "scheduled_at,omitempty") }) g.Required("database_id", "node_name") @@ -1119,6 +1229,7 @@ var SwitchoverDatabaseNodeRequest = g.Type("SwitchoverDatabaseNodeRequest", func var SwitchoverDatabaseNodeResponse = g.Type("SwitchoverDatabaseNodeResponse", func() { g.Attribute("task", Task, func() { g.Description("The task that will perform the switchover.") + g.Meta("struct:tag:json", "task") }) g.Required("task") @@ -1138,19 +1249,23 @@ var FailoverDatabaseNodeRequest = g.Type("FailoverDatabaseNodeRequest", func() { g.Attribute("database_id", Identifier, func() { g.Description("ID of the database to perform the failover for.") g.Example("my-app") + g.Meta("struct:tag:json", "database_id") }) g.Attribute("node_name", g.String, func() { g.Description("Name of the node to initiate the failover from.") g.Pattern(nodeNamePattern) g.Example("n1") + g.Meta("struct:tag:json", "node_name") }) g.Attribute("candidate_instance_id", g.String, func() { g.Description("Optional instance_id of the replica to promote. If omitted, a candidate will be selected.") g.Example("68f50878-44d2-4524-a823-e31bd478706d-n1-689qacsi") + g.Meta("struct:tag:json", "candidate_instance_id,omitempty") }) g.Attribute("skip_validation", g.Boolean, func() { g.Description("If true, skip the health validations that prevent running failover on a healthy cluster.") g.Default(false) + g.Meta("struct:tag:json", "skip_validation,omitempty") }) g.Required("database_id", "node_name") @@ -1159,6 +1274,7 @@ var FailoverDatabaseNodeRequest = g.Type("FailoverDatabaseNodeRequest", func() { var FailoverDatabaseNodeResponse = g.Type("FailoverDatabaseNodeResponse", func() { g.Attribute("task", Task, func() { g.Description("The task that will perform the failover.") + g.Meta("struct:tag:json", "task") }) g.Required("task") @@ -1177,12 +1293,14 @@ var FailoverDatabaseNodeResponse = g.Type("FailoverDatabaseNodeResponse", func() var RestoreDatabaseRequest = g.Type("RestoreDatabaseRequest", func() { g.Attribute("restore_config", RestoreConfigSpec, func() { g.Description("Configuration for the restore process.") + g.Meta("struct:tag:json", "restore_config") }) g.Attribute("target_nodes", g.ArrayOf(g.String), func() { g.Description("The nodes to restore. Defaults to all nodes if empty or unspecified.") g.MaxLength(9) g.Example([]string{"n1", "n2"}) g.Example([]string{"n1"}) + g.Meta("struct:tag:json", "target_nodes,omitempty") }) g.Required("restore_config") @@ -1222,12 +1340,15 @@ var RestoreDatabaseRequest = g.Type("RestoreDatabaseRequest", func() { var RestoreDatabaseResponse = g.Type("RestoreDatabaseResponse", func() { g.Attribute("task", Task, func() { g.Description("The task that will restore this database.") + g.Meta("struct:tag:json", "task") }) g.Attribute("node_tasks", g.ArrayOf(Task), func() { g.Description("The tasks that will restore each database node.") + g.Meta("struct:tag:json", "node_tasks") }) g.Attribute("database", Database, func() { g.Description("The database being restored.") + g.Meta("struct:tag:json", "database") }) g.Required("task", "node_tasks", "database") @@ -1280,12 +1401,14 @@ var ExtraVolumesSpec = g.Type("ExtraVolumesSpec", func() { g.Description("The host path for the volume.") g.MaxLength(256) g.Example("/Users/user/backups/host") + g.Meta("struct:tag:json", "host_path") }) g.Attribute("destination_path", g.String, func() { g.Description("The path inside the container where the volume will be mounted.") g.MaxLength(256) g.Example("/backups/container") + g.Meta("struct:tag:json", "destination_path") }) g.Required("host_path", "destination_path") @@ -1294,6 +1417,7 @@ var ExtraVolumesSpec = g.Type("ExtraVolumesSpec", func() { var ListDatabasesResponse = g.Type("ListDatabasesResponse", func() { g.Attribute("databases", g.ArrayOf(DatabaseSummary), func() { g.Description("The databases managed by this cluster.") + g.Meta("struct:tag:json", "databases") }) g.Required("databases") @@ -1671,17 +1795,20 @@ var ExtraNetworkSpec = g.Type("ExtraNetworkSpec", func() { g.Description("The name or ID of the network to connect to.") g.Example("storefront") g.Example("traefik-public") + g.Meta("struct:tag:json", "id") }) g.Attribute("aliases", g.ArrayOf(g.String), func() { g.Description("Optional network-scoped aliases for the container.") g.MaxLength(8) g.Example([]string{"pg-db", "db-alias"}) + g.Meta("struct:tag:json", "aliases,omitempty") }) g.Attribute("driver_opts", g.MapOf(g.String, g.String), func() { g.Description("Optional driver options for the network connection.") g.Example(map[string]string{ "com.docker.network.endpoint.expose": "true", }) + g.Meta("struct:tag:json", "driver_opts,omitempty") }) g.Required("id") }) @@ -1692,11 +1819,13 @@ var SwarmOpts = g.Type("SwarmOpts", func() { g.Attribute("extra_volumes", g.ArrayOf(ExtraVolumesSpec), func() { g.Description("A list of extra volumes to mount. Each entry defines a host and container path.") g.MaxLength(16) + g.Meta("struct:tag:json", "extra_volumes,omitempty") }) g.Attribute("extra_networks", g.ArrayOf(ExtraNetworkSpec), func() { g.Description("A list of additional Docker Swarm networks to attach containers in this database to.") g.MaxLength(8) + g.Meta("struct:tag:json", "extra_networks,omitempty") }) g.Attribute("extra_labels", g.MapOf(g.String, g.String), func() { g.Description("Arbitrary labels to apply to the Docker Swarm service") @@ -1704,6 +1833,7 @@ var SwarmOpts = g.Type("SwarmOpts", func() { "traefik.enable": "true", "traefik.tcp.routers.mydb.rule": "HostSNI(`mydb.example.com`)", }) + g.Meta("struct:tag:json", "extra_labels,omitempty") }) }) @@ -1712,5 +1842,6 @@ var OrchestratorOpts = g.Type("OrchestratorOpts", func() { g.Attribute("swarm", SwarmOpts, func() { g.Description("Swarm-specific configuration.") + g.Meta("struct:tag:json", "swarm,omitempty") }) }) diff --git a/api/apiv1/design/host.go b/api/apiv1/design/host.go index 3ee020c3..0caab143 100644 --- a/api/apiv1/design/host.go +++ b/api/apiv1/design/host.go @@ -8,6 +8,7 @@ var ListHostsResponse = g.Type("ListHostsResponse", func() { g.Description("Response containing the list of hosts") g.Attribute("hosts", g.ArrayOf(Host), func() { g.Description("List of hosts in the cluster") + g.Meta("struct:tag:json", "hosts") }) g.Required("hosts") }) @@ -16,16 +17,19 @@ var ComponentStatus = g.Type("ComponentStatus", func() { g.Attribute("healthy", g.Boolean, func() { g.Description("Indicates if the component is healthy.") g.Example(false) + g.Meta("struct:tag:json", "healthy") }) g.Attribute("error", g.String, func() { g.Description("Error message from any errors that occurred during the health check.") g.Example("failed to connect to etcd") + g.Meta("struct:tag:json", "error,omitempty") }) g.Attribute("details", g.MapOf(g.String, g.Any), func() { g.Description("Additional details about the component.") g.Example(map[string]any{ "alarms": []string{"3: NOSPACE"}, }) + g.Meta("struct:tag:json", "details,omitempty") }) g.Required("healthy") @@ -35,14 +39,17 @@ var HostStatus = g.Type("HostStatus", func() { g.Attribute("state", g.String, func() { g.Enum("healthy", "unreachable", "degraded", "unknown") g.Example("available") + g.Meta("struct:tag:json", "state") }) g.Attribute("updated_at", g.String, func() { g.Format(g.FormatDateTime) g.Description("The last time the host status was updated.") g.Example("2021-07-01T12:34:56Z") + g.Meta("struct:tag:json", "updated_at") }) g.Attribute("components", g.MapOf(g.String, ComponentStatus), func() { g.Description("The status of each component of the host.") + g.Meta("struct:tag:json", "components") }) g.Required("state", "updated_at", "components") @@ -52,10 +59,12 @@ var PgEdgeVersion = g.Type("PgEdgeVersion", func() { g.Attribute("postgres_version", g.String, func() { g.Description("The Postgres major and minor version.") g.Example("17.6") + g.Meta("struct:tag:json", "postgres_version") }) g.Attribute("spock_version", g.String, func() { g.Description("The Spock major version.") g.Example("5") + g.Meta("struct:tag:json", "spock_version") }) g.Required("postgres_version", "spock_version") @@ -65,14 +74,17 @@ var HostCohort = g.Type("HostCohort", func() { g.Attribute("type", g.String, func() { g.Description("The type of cohort that the host belongs to.") g.Example("swarm") + g.Meta("struct:tag:json", "type") }) g.Attribute("member_id", g.String, func() { g.Description("The member ID of the host within the cohort.") g.Example("lah4bsznw6kc0hp7biylmmmll") + g.Meta("struct:tag:json", "member_id") }) g.Attribute("control_available", g.Boolean, func() { g.Description("Indicates if the host is a control node in the cohort.") g.Example(true) + g.Meta("struct:tag:json", "control_available") }) g.Required("type", "member_id", "control_available") @@ -84,48 +96,60 @@ var Host = g.Type("Host", func() { g.Example("host-1") g.Example("us-east-1") g.Example("de3b1388-1f0c-42f1-a86c-59ab72f255ec") + g.Meta("struct:tag:json", "id") }) g.Attribute("orchestrator", g.String, func() { g.Description("The orchestrator used by this host.") g.Example("swarm") + g.Meta("struct:tag:json", "orchestrator") }) g.Attribute("data_dir", g.String, func() { g.Description("The data directory for the host.") g.Example("/data") + g.Meta("struct:tag:json", "data_dir") }) g.Attribute("cohort", HostCohort, func() { g.Description("The cohort that this host belongs to.") + g.Meta("struct:tag:json", "cohort,omitempty") }) g.Attribute("hostname", g.String, func() { g.Description("The hostname of this host.") g.Example("i-0123456789abcdef.ec2.internal") + g.Meta("struct:tag:json", "hostname") }) g.Attribute("ipv4_address", func() { g.Description("The IPv4 address of this host.") g.Format(g.FormatIPv4) g.Example("10.24.34.2") + g.Meta("struct:tag:json", "ipv4_address") }) g.Attribute("cpus", g.Int, func() { g.Description("The number of CPUs on this host.") g.Example(4) + g.Meta("struct:tag:json", "cpus,omitempty") }) g.Attribute("memory", g.String, func() { g.Description("The amount of memory available on this host.") g.Example("16GiB") + g.Meta("struct:tag:json", "memory,omitempty") }) g.Attribute("status", HostStatus, func() { g.Description("Current status of the host.") + g.Meta("struct:tag:json", "status") }) g.Attribute("default_pgedge_version", PgEdgeVersion, func() { g.Description("The default PgEdge version for this host.") + g.Meta("struct:tag:json", "default_pgedge_version,omitempty") }) g.Attribute("supported_pgedge_versions", g.ArrayOf(PgEdgeVersion), func() { g.Description("The PgEdge versions supported by this host.") + g.Meta("struct:tag:json", "supported_pgedge_versions,omitempty") }) g.Attribute("etcd_mode", g.String, func() { g.Description("The etcd mode for this host.") g.Enum("server", "client") g.Example("server") + g.Meta("struct:tag:json", "etcd_mode,omitempty") }) g.Required( @@ -265,9 +289,11 @@ var ListHostsResponseExample = map[string]any{ var RemoveHostResponse = g.Type("RemoveHostResponse", func() { g.Attribute("task", Task, func() { g.Description("The task that tracks the overall host removal operation.") + g.Meta("struct:tag:json", "task") }) g.Attribute("update_database_tasks", g.ArrayOf(Task), func() { g.Description("The tasks that will update databases affected by the host removal.") + g.Meta("struct:tag:json", "update_database_tasks") }) g.Required("task", "update_database_tasks") diff --git a/api/apiv1/design/instance.go b/api/apiv1/design/instance.go index ebbcd2c7..7d3b35a7 100644 --- a/api/apiv1/design/instance.go +++ b/api/apiv1/design/instance.go @@ -8,6 +8,7 @@ var RestartInstanceResponse = g.Type("RestartInstanceResponse", func() { g.Description("Response containing the restart task") g.Attribute("task", Task, func() { g.Description("Task representing the restart operation") + g.Meta("struct:tag:json", "task") }) g.Required("task") }) @@ -16,6 +17,7 @@ var StopInstanceResponse = g.Type("StopInstanceResponse", func() { g.Description("Response containing the stop task") g.Attribute("task", Task, func() { g.Description("Task representing the stop operation") + g.Meta("struct:tag:json", "task") }) g.Required("task") }) @@ -24,6 +26,7 @@ var StartInstanceResponse = g.Type("StartInstanceResponse", func() { g.Description("Response containing the start task") g.Attribute("task", Task, func() { g.Description("Task representing the start operation") + g.Meta("struct:tag:json", "task") }) g.Required("task") }) @@ -33,15 +36,18 @@ var InstanceConnectionInfo = g.Type("InstanceConnectionInfo", func() { g.Attribute("hostname", g.String, func() { g.Description("The hostname of the host that's running this instance.") g.Example("i-0123456789abcdef.ec2.internal") + g.Meta("struct:tag:json", "hostname,omitempty") }) g.Attribute("ipv4_address", g.String, func() { g.Description("The IPv4 address of the host that's running this instance.") g.Format(g.FormatIPv4) g.Example("10.24.34.2") + g.Meta("struct:tag:json", "ipv4_address,omitempty") }) g.Attribute("port", g.Int, func() { g.Description("The host port that Postgres is listening on for this instance.") g.Example(5432) + g.Meta("struct:tag:json", "port,omitempty") }) }) @@ -50,6 +56,7 @@ var InstancePostgresStatus = g.Type("InstancePostgresStatus", func() { g.Attribute("version", g.String, func() { g.Description("The version of Postgres for this instance.") g.Example("18.1") + g.Meta("struct:tag:json", "version,omitempty") }) g.Attribute("patroni_state", g.String, func() { g.Example("stopping") @@ -67,16 +74,20 @@ var InstancePostgresStatus = g.Type("InstancePostgresStatus", func() { g.Example("custom bootstrap failed") g.Example("creating replica") g.Example("unknown") + g.Meta("struct:tag:json", "patroni_state,omitempty") }) g.Attribute("role", g.String, func() { g.Example("replica") g.Example("primary") + g.Meta("struct:tag:json", "role,omitempty") }) g.Attribute("pending_restart", g.Boolean, func() { g.Description("True if this instance has a pending restart from a configuration change.") + g.Meta("struct:tag:json", "pending_restart,omitempty") }) g.Attribute("patroni_paused", g.Boolean, func() { g.Description("True if Patroni is paused for this instance.") + g.Meta("struct:tag:json", "patroni_paused,omitempty") }) }) @@ -86,15 +97,18 @@ var InstanceSubscription = g.Type("InstanceSubscription", func() { g.Description("The Spock node name of the provider for this subscription.") g.Pattern(nodeNamePattern) g.Example("n2") + g.Meta("struct:tag:json", "provider_node") }) g.Attribute("name", g.String, func() { g.Description("The name of the subscription.") g.Example("sub_n1n2") + g.Meta("struct:tag:json", "name") }) g.Attribute("status", g.String, func() { g.Description("The current status of the subscription.") g.Example("replicating") g.Example("down") + g.Meta("struct:tag:json", "status") }) g.Required("provider_node", "name", "status") @@ -105,13 +119,16 @@ var InstanceSpockStatus = g.Type("InstanceSpockStatus", func() { g.Attribute("read_only", g.String, func() { g.Description("The current spock.readonly setting.") g.Example("off") + g.Meta("struct:tag:json", "read_only,omitempty") }) g.Attribute("version", g.String, func() { g.Description("The version of Spock for this instance.") g.Example("4.10.0") + g.Meta("struct:tag:json", "version,omitempty") }) g.Attribute("subscriptions", g.ArrayOf(InstanceSubscription), func() { g.Description("Status information for this instance's Spock subscriptions.") + g.Meta("struct:tag:json", "subscriptions,omitempty") }) }) @@ -120,26 +137,32 @@ var Instance = g.Type("Instance", func() { g.Attribute("id", g.String, func() { g.Description("Unique identifier for the instance.") g.Example("a67cbb36-c3c3-49c9-8aac-f4a0438a883d") + g.Meta("struct:tag:json", "id") }) g.Attribute("host_id", g.String, func() { g.Description("The ID of the host this instance is running on.") g.Example("de3b1388-1f0c-42f1-a86c-59ab72f255ec") + g.Meta("struct:tag:json", "host_id") }) g.Attribute("node_name", g.String, func() { g.Description("The Spock node name for this instance.") g.Example("n1") + g.Meta("struct:tag:json", "node_name") }) g.Attribute("created_at", g.String, func() { g.Format(g.FormatDateTime) g.Description("The time that the instance was created.") + g.Meta("struct:tag:json", "created_at") }) g.Attribute("updated_at", g.String, func() { g.Format(g.FormatDateTime) g.Description("The time that the instance was last modified.") + g.Meta("struct:tag:json", "updated_at") }) g.Attribute("status_updated_at", g.String, func() { g.Format(g.FormatDateTime) g.Description("The time that the instance status information was last updated.") + g.Meta("struct:tag:json", "status_updated_at,omitempty") }) g.Attribute("state", g.String, func() { g.Enum( @@ -152,19 +175,24 @@ var Instance = g.Type("Instance", func() { "stopped", "unknown", ) + g.Meta("struct:tag:json", "state") }) g.Attribute("connection_info", InstanceConnectionInfo, func() { g.Description("Connection information for the instance.") + g.Meta("struct:tag:json", "connection_info,omitempty") }) g.Attribute("postgres", InstancePostgresStatus, func() { g.Description("Postgres status information for the instance.") + g.Meta("struct:tag:json", "postgres,omitempty") }) g.Attribute("spock", InstanceSpockStatus, func() { g.Description("Spock status information for the instance.") + g.Meta("struct:tag:json", "spock,omitempty") }) g.Attribute("error", g.String, func() { g.Description("An error message if the instance is in an error state.") g.Example("failed to get patroni status: connection refused") + g.Meta("struct:tag:json", "error,omitempty") }) g.Required("id", "host_id", "node_name", "created_at", "updated_at", "state") @@ -176,18 +204,21 @@ var PortMapping = g.Type("PortMapping", func() { g.Description("The name of the port (e.g., 'http', 'web-client').") g.Example("http") g.Example("web-client") + g.Meta("struct:tag:json", "name") }) g.Attribute("container_port", g.Int, func() { g.Description("The port number inside the container.") g.Minimum(1) g.Maximum(65535) g.Example(8080) + g.Meta("struct:tag:json", "container_port,omitempty") }) g.Attribute("host_port", g.Int, func() { g.Description("The port number on the host (if port-forwarded).") g.Minimum(1) g.Maximum(65535) g.Example(8080) + g.Meta("struct:tag:json", "host_port,omitempty") }) g.Required("name") @@ -199,16 +230,19 @@ var HealthCheckResult = g.Type("HealthCheckResult", func() { g.Description("The health status.") g.Enum("healthy", "unhealthy", "unknown") g.Example("healthy") + g.Meta("struct:tag:json", "status") }) g.Attribute("message", g.String, func() { g.Description("Optional message about the health status.") g.Example("Service responding normally") g.Example("Connection refused") + g.Meta("struct:tag:json", "message,omitempty") }) g.Attribute("checked_at", g.String, func() { g.Format(g.FormatDateTime) g.Description("The time this health check was performed.") g.Example("2025-01-28T10:00:00Z") + g.Meta("struct:tag:json", "checked_at") }) g.Required("status", "checked_at") @@ -219,34 +253,42 @@ var ServiceInstanceStatus = g.Type("ServiceInstanceStatus", func() { g.Attribute("container_id", g.String, func() { g.Description("The Docker container ID.") g.Example("a1b2c3d4e5f6") + g.Meta("struct:tag:json", "container_id,omitempty") }) g.Attribute("image_version", g.String, func() { g.Description("The container image version currently running.") g.Example("1.0.0") + g.Meta("struct:tag:json", "image_version,omitempty") }) g.Attribute("hostname", g.String, func() { g.Description("The hostname of the service instance.") g.Example("mcp-server-host-1.internal") + g.Meta("struct:tag:json", "hostname,omitempty") }) g.Attribute("ipv4_address", g.String, func() { g.Description("The IPv4 address of the service instance.") g.Format(g.FormatIPv4) g.Example("10.0.1.5") + g.Meta("struct:tag:json", "ipv4_address,omitempty") }) g.Attribute("ports", g.ArrayOf(PortMapping), func() { g.Description("Port mappings for this service instance.") + g.Meta("struct:tag:json", "ports,omitempty") }) g.Attribute("health_check", HealthCheckResult, func() { g.Description("Most recent health check result.") + g.Meta("struct:tag:json", "health_check,omitempty") }) g.Attribute("last_health_at", g.String, func() { g.Format(g.FormatDateTime) g.Description("The time of the last health check attempt.") g.Example("2025-01-28T10:00:00Z") + g.Meta("struct:tag:json", "last_health_at,omitempty") }) g.Attribute("service_ready", g.Boolean, func() { g.Description("Whether the service is ready to accept requests.") g.Example(true) + g.Meta("struct:tag:json", "service_ready,omitempty") }) }) @@ -256,18 +298,22 @@ var ServiceInstance = g.Type("ServiceInstance", func() { g.Attribute("service_instance_id", g.String, func() { g.Description("Unique identifier for the service instance.") g.Example("mcp-server-host-1") + g.Meta("struct:tag:json", "service_instance_id") }) g.Attribute("service_id", g.String, func() { g.Description("The service ID from the DatabaseSpec.") g.Example("mcp-server") + g.Meta("struct:tag:json", "service_id") }) g.Attribute("database_id", Identifier, func() { g.Description("The ID of the database this service belongs to.") g.Example("production") + g.Meta("struct:tag:json", "database_id") }) g.Attribute("host_id", g.String, func() { g.Description("The ID of the host this service instance is running on.") g.Example("host-1") + g.Meta("struct:tag:json", "host_id") }) g.Attribute("state", g.String, func() { g.Description("Current state of the service instance.") @@ -278,23 +324,28 @@ var ServiceInstance = g.Type("ServiceInstance", func() { "deleting", ) g.Example("running") + g.Meta("struct:tag:json", "state") }) g.Attribute("status", ServiceInstanceStatus, func() { g.Description("Runtime status information for the service instance.") + g.Meta("struct:tag:json", "status,omitempty") }) g.Attribute("created_at", g.String, func() { g.Format(g.FormatDateTime) g.Description("The time that the service instance was created.") g.Example("2025-01-28T10:00:00Z") + g.Meta("struct:tag:json", "created_at") }) g.Attribute("updated_at", g.String, func() { g.Format(g.FormatDateTime) g.Description("The time that the service instance was last updated.") g.Example("2025-01-28T10:05:00Z") + g.Meta("struct:tag:json", "updated_at") }) g.Attribute("error", g.String, func() { g.Description("An error message if the service instance is in an error state.") g.Example("failed to start container: image not found") + g.Meta("struct:tag:json", "error,omitempty") }) g.Required("service_instance_id", "service_id", "database_id", "host_id", "state", "created_at", "updated_at") diff --git a/api/apiv1/design/task.go b/api/apiv1/design/task.go index 66a4cb5e..25c0fa91 100644 --- a/api/apiv1/design/task.go +++ b/api/apiv1/design/task.go @@ -9,59 +9,72 @@ var Task = g.Type("Task", func() { g.Format(g.FormatUUID) g.Description("The parent task ID of the task.") g.Example("439eb515-e700-4740-b508-4a3f12ec4f83") + g.Meta("struct:tag:json", "parent_id,omitempty") }) g.Attribute("scope", g.String, func() { g.Enum("database", "host") g.Description("The scope of the task (database or host).") g.Example("database") + g.Meta("struct:tag:json", "scope") }) g.Attribute("entity_id", g.String, func() { g.Description("The entity ID (database_id or host_id) that this task belongs to.") g.Example("02f1a7db-fca8-4521-b57a-2a375c1ced51") + g.Meta("struct:tag:json", "entity_id") }) g.Attribute("database_id", g.String, func() { g.Description("The database ID of the task.") g.Example("02f1a7db-fca8-4521-b57a-2a375c1ced51") + g.Meta("struct:tag:json", "database_id,omitempty") }) g.Attribute("node_name", g.String, func() { g.Description("The name of the node that the task is operating on.") g.Example("n1") + g.Meta("struct:tag:json", "node_name,omitempty") }) g.Attribute("instance_id", g.String, func() { g.Description("The ID of the instance that the task is operating on.") g.Example("3c875a27-f6a6-4c1c-ba5f-6972fb1fc348") + g.Meta("struct:tag:json", "instance_id,omitempty") }) g.Attribute("host_id", g.String, func() { g.Description("The ID of the host that the task is running on.") g.Example("2e52dcde-86d8-4f71-b58e-8dc3a10c936a") + g.Meta("struct:tag:json", "host_id,omitempty") }) g.Attribute("task_id", g.String, func() { g.Format(g.FormatUUID) g.Description("The unique ID of the task.") g.Example("3c875a27-f6a6-4c1c-ba5f-6972fb1fc348") + g.Meta("struct:tag:json", "task_id") }) g.Attribute("created_at", g.String, func() { g.Format(g.FormatDateTime) g.Description("The time when the task was created.") g.Example("2025-01-01T01:30:00Z") + g.Meta("struct:tag:json", "created_at") }) g.Attribute("completed_at", g.String, func() { g.Format(g.FormatDateTime) g.Description("The time when the task was completed.") g.Example("2025-01-01T02:30:00Z") + g.Meta("struct:tag:json", "completed_at,omitempty") }) g.Attribute("type", g.String, func() { g.Description("The type of the task.") g.Example("backup", "restore") + g.Meta("struct:tag:json", "type") }) g.Attribute("status", g.String, func() { g.Enum("pending", "running", "completed", "canceled", "canceling", "failed", "unknown") g.Description("The status of the task.") g.Example("pending") + g.Meta("struct:tag:json", "status") }) g.Attribute("error", g.String, func() { g.Description("The error message if the task failed.") g.Example("failed to connect to database") + g.Meta("struct:tag:json", "error,omitempty") }) g.Required("scope", "entity_id", "task_id", "created_at", "type", "status") @@ -83,10 +96,12 @@ var TaskLogEntry = g.Type("TaskLogEntry", func() { g.Format(g.FormatDateTime) g.Description("The timestamp of the log entry.") g.Example("2025-05-29T15:43:13Z") + g.Meta("struct:tag:json", "timestamp") }) g.Attribute("message", g.String, func() { g.Description("The log message.") g.Example("task started") + g.Meta("struct:tag:json", "message") }) g.Attribute("fields", g.MapOf(g.String, g.Any), func() { g.Description("Additional fields for the log entry.") @@ -94,6 +109,7 @@ var TaskLogEntry = g.Type("TaskLogEntry", func() { "status": "creating", "option.enabled": true, }) + g.Meta("struct:tag:json", "fields,omitempty") }) g.Required("timestamp", "message") }) @@ -103,30 +119,37 @@ var TaskLog = g.Type("TaskLog", func() { g.Enum("database", "host") g.Description("The scope of the task (database or host).") g.Example("database") + g.Meta("struct:tag:json", "scope") }) g.Attribute("entity_id", g.String, func() { g.Description("The entity ID (database_id or host_id) that this task log belongs to.") g.Example("02f1a7db-fca8-4521-b57a-2a375c1ced51") + g.Meta("struct:tag:json", "entity_id") }) g.Attribute("database_id", g.String, func() { g.Description("The database ID of the task log. Deprecated: use entity_id instead.") g.Example("02f1a7db-fca8-4521-b57a-2a375c1ced51") + g.Meta("struct:tag:json", "database_id,omitempty") }) g.Attribute("task_id", g.String, func() { g.Description("The unique ID of the task log.") g.Example("3c875a27-f6a6-4c1c-ba5f-6972fb1fc348") + g.Meta("struct:tag:json", "task_id") }) g.Attribute("task_status", g.String, func() { g.Enum("pending", "running", "completed", "failed", "unknown", "canceled", "canceling") g.Description("The status of the task.") g.Example("pending") + g.Meta("struct:tag:json", "task_status") }) g.Attribute("last_entry_id", g.String, func() { g.Description("The ID of the last entry in the task log.") g.Example("3c875a27-f6a6-4c1c-ba5f-6972fb1fc348") + g.Meta("struct:tag:json", "last_entry_id,omitempty") }) g.Attribute("entries", g.ArrayOf(TaskLogEntry), func() { g.Description("Entries in the task log.") + g.Meta("struct:tag:json", "entries") }) g.Required("scope", "entity_id", "task_id", "task_status", "entries") @@ -264,6 +287,7 @@ var TaskLog = g.Type("TaskLog", func() { var ListDatabaseTasksResponse = g.Type("ListDatabaseTasksResponse", func() { g.Attribute("tasks", g.ArrayOf(Task), func() { g.Description("The tasks for the given database.") + g.Meta("struct:tag:json", "tasks") }) g.Required("tasks") @@ -317,6 +341,7 @@ var ListDatabaseTasksResponse = g.Type("ListDatabaseTasksResponse", func() { var ListHostTasksResponse = g.Type("ListHostTasksResponse", func() { g.Attribute("tasks", g.ArrayOf(Task), func() { g.Description("The tasks for the given host.") + g.Meta("struct:tag:json", "tasks") }) g.Required("tasks") @@ -339,6 +364,7 @@ var ListHostTasksResponse = g.Type("ListHostTasksResponse", func() { var ListTasksResponse = g.Type("ListTasksResponse", func() { g.Attribute("tasks", g.ArrayOf(Task), func() { g.Description("The tasks for the given entity.") + g.Meta("struct:tag:json", "tasks") }) g.Required("tasks") diff --git a/api/apiv1/design/version.go b/api/apiv1/design/version.go index 0f9d14e8..6c5a83a9 100644 --- a/api/apiv1/design/version.go +++ b/api/apiv1/design/version.go @@ -8,19 +8,23 @@ var VersionInfo = g.Type("VersionInfo", func() { g.Attribute("version", g.String, func() { g.Description("The version of the API server.") g.Example("1.0.0") + g.Meta("struct:tag:json", "version") }) g.Attribute("revision", g.String, func() { g.Description("The VCS revision of the API server.") g.Example("e89ae93b") + g.Meta("struct:tag:json", "revision") }) g.Attribute("revision_time", g.String, func() { g.Format(g.FormatDateTime) g.Description("The timestamp associated with the revision.") g.Example("2025-01-01T01:30:00Z") + g.Meta("struct:tag:json", "revision_time") }) g.Attribute("arch", g.String, func() { g.Description("The CPU architecture of the API server.") g.Example("amd64") + g.Meta("struct:tag:json", "arch") }) g.Required("version", "revision", "revision_time", "arch") diff --git a/api/apiv1/gen/control_plane/service.go b/api/apiv1/gen/control_plane/service.go index ecbd2c22..2115bb8f 100644 --- a/api/apiv1/gen/control_plane/service.go +++ b/api/apiv1/gen/control_plane/service.go @@ -96,16 +96,16 @@ var MethodNames = [29]string{"init-cluster", "join-cluster", "get-join-token", " // A Control Plane API error. type APIError struct { // The name of the error. - Name string + Name string `json:"name"` // The error message. - Message string + Message string `json:"message"` } type BackupConfigSpec struct { // The repositories for this backup configuration. - Repositories []*BackupRepositorySpec + Repositories []*BackupRepositorySpec `json:"repositories"` // The schedules for this backup configuration. - Schedules []*BackupScheduleSpec + Schedules []*BackupScheduleSpec `json:"schedules,omitempty"` } // BackupDatabaseNodePayload is the payload type of the control-plane service @@ -124,79 +124,79 @@ type BackupDatabaseNodePayload struct { // backup-database-node method. type BackupDatabaseNodeResponse struct { // The task that will backup this database node. - Task *Task + Task *Task `json:"task"` } type BackupOptions struct { // The type of backup. - Type string + Type string `json:"type"` // Annotations for the backup. - Annotations map[string]string + Annotations map[string]string `json:"annotations,omitempty"` // Options for the backup. - BackupOptions map[string]string + BackupOptions map[string]string `json:"backup_options,omitempty"` } type BackupRepositorySpec struct { // The unique identifier of this repository. - ID *Identifier + ID *Identifier `json:"id,omitempty"` // The type of this repository. - Type string + Type string `json:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string + S3Bucket *string `json:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = // 's3'. - S3Region *string + S3Region *string `json:"s3_region,omitempty"` // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string + S3Endpoint *string `json:"s3_endpoint,omitempty"` // An optional AWS access key ID to use for this repository. If not provided, // pgbackrest will use the default credential provider chain. This field will // be excluded from the response of all endpoints. It can also be omitted from // update requests to keep the current value. - S3Key *string + S3Key *string `json:"s3_key,omitempty"` // The corresponding secret for the AWS access key ID in s3_key. This field // will be excluded from the response of all endpoints. It can also be omitted // from update requests to keep the current value. - S3KeySecret *string + S3KeySecret *string `json:"s3_key_secret,omitempty"` // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string + GcsBucket *string `json:"gcs_bucket,omitempty"` // The optional GCS endpoint for this repository. Only applies when type = // 'gcs'. - GcsEndpoint *string + GcsEndpoint *string `json:"gcs_endpoint,omitempty"` // Optional base64-encoded private key data. If omitted, pgbackrest will use // the service account attached to the instance profile. This field will be // excluded from the response of all endpoints. It can also be omitted from // update requests to keep the current value. - GcsKey *string + GcsKey *string `json:"gcs_key,omitempty"` // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string + AzureAccount *string `json:"azure_account,omitempty"` // The Azure container name for this repository. Only applies when type = // 'azure'. - AzureContainer *string + AzureContainer *string `json:"azure_container,omitempty"` // The optional Azure endpoint for this repository. Only applies when type = // 'azure'. - AzureEndpoint *string + AzureEndpoint *string `json:"azure_endpoint,omitempty"` // The Azure storage account access key to use for this repository. This field // will be excluded from the response of all endpoints. It can also be omitted // from update requests to keep the current value. - AzureKey *string + AzureKey *string `json:"azure_key,omitempty"` // The count of full backups to retain or the time to retain full backups. - RetentionFull *int + RetentionFull *int `json:"retention_full,omitempty"` // The type of measure used for retention_full. - RetentionFullType *string + RetentionFullType *string `json:"retention_full_type,omitempty"` // The base path within the repository to store backups. Required for type = // 'posix' and 'cifs'. - BasePath *string + BasePath *string `json:"base_path,omitempty"` // Additional options to apply to this repository. - CustomOptions map[string]string + CustomOptions map[string]string `json:"custom_options,omitempty"` } type BackupScheduleSpec struct { // The unique identifier for this backup schedule. - ID string + ID string `json:"id"` // The type of backup to take on this schedule. - Type string + Type string `json:"type"` // The cron expression for this schedule. - CronExpression string + CronExpression string `json:"cron_expression"` } // CancelDatabaseTaskPayload is the payload type of the control-plane service @@ -211,223 +211,223 @@ type CancelDatabaseTaskPayload struct { // Cluster is the result type of the control-plane service get-cluster method. type Cluster struct { // Unique identifier for the cluster. - ID Identifier + ID Identifier `json:"id"` // Current status of the cluster. - Status *ClusterStatus + Status *ClusterStatus `json:"status"` // All of the hosts in the cluster. - Hosts []*Host + Hosts []*Host `json:"hosts"` } type ClusterCredentials struct { // The Etcd username for the new host. - Username string + Username string `json:"username"` // The Etcd password for the new host. - Password string + Password string `json:"password"` // The base64-encoded CA certificate for the cluster. - CaCert string + CaCert string `json:"ca_cert"` // The base64-encoded etcd client certificate for the new cluster member. - ClientCert string + ClientCert string `json:"client_cert"` // The base64-encoded etcd client key for the new cluster member. - ClientKey string + ClientKey string `json:"client_key"` // The base64-encoded etcd server certificate for the new cluster member. - ServerCert string + ServerCert string `json:"server_cert"` // The base64-encoded etcd server key for the new cluster member. - ServerKey string + ServerKey string `json:"server_key"` } // ClusterJoinOptions is the result type of the control-plane service // get-join-options method. type ClusterJoinOptions struct { // Connection information for the etcd cluster leader - Leader *EtcdClusterMember + Leader *EtcdClusterMember `json:"leader"` // Credentials for the new host joining the cluster. - Credentials *ClusterCredentials + Credentials *ClusterCredentials `json:"credentials"` } // ClusterJoinRequest is the payload type of the control-plane service // get-join-options method. type ClusterJoinRequest struct { // Token to join the cluster. - Token string + Token string `json:"token"` // The unique identifier for the host that's joining the cluster. - HostID Identifier + HostID Identifier `json:"host_id"` // The hostname of the host that's joining the cluster. - Hostname string + Hostname string `json:"hostname"` // The IPv4 address of the host that's joining the cluster. - Ipv4Address string + Ipv4Address string `json:"ipv4_address"` // True if the joining member is configured to run an embedded an etcd server. - EmbeddedEtcdEnabled bool + EmbeddedEtcdEnabled bool `json:"embedded_etcd_enabled"` } // ClusterJoinToken is the result type of the control-plane service // init-cluster method. type ClusterJoinToken struct { // Token to join an existing cluster. - Token string + Token string `json:"token"` // Existing server to join - ServerURL string + ServerURL string `json:"server_url"` } type ClusterStatus struct { // The current state of the cluster. - State string + State string `json:"state"` } type ComponentStatus struct { // Indicates if the component is healthy. - Healthy bool + Healthy bool `json:"healthy"` // Error message from any errors that occurred during the health check. - Error *string + Error *string `json:"error,omitempty"` // Additional details about the component. - Details map[string]any + Details map[string]any `json:"details,omitempty"` } // CreateDatabaseRequest is the payload type of the control-plane service // create-database method. type CreateDatabaseRequest struct { // Unique identifier for the database. - ID *Identifier + ID *Identifier `json:"id,omitempty"` // Unique identifier for the database's owner. - TenantID *Identifier + TenantID *Identifier `json:"tenant_id,omitempty"` // The specification for the database. - Spec *DatabaseSpec + Spec *DatabaseSpec `json:"spec"` } // CreateDatabaseResponse is the result type of the control-plane service // create-database method. type CreateDatabaseResponse struct { // The task that will create this database. - Task *Task + Task *Task `json:"task"` // The database being created. - Database *Database + Database *Database `json:"database"` } // Database is the result type of the control-plane service get-database method. type Database struct { // Unique identifier for the database. - ID Identifier + ID Identifier `json:"id"` // Unique identifier for the database's owner. - TenantID *Identifier + TenantID *Identifier `json:"tenant_id,omitempty"` // The time that the database was created. - CreatedAt string + CreatedAt string `json:"created_at"` // The time that the database was last updated. - UpdatedAt string + UpdatedAt string `json:"updated_at"` // Current state of the database. - State string + State string `json:"state"` // All of the instances in the database. - Instances []*Instance + Instances []*Instance `json:"instances,omitempty"` // Service instances running alongside this database. - ServiceInstances []*ServiceInstance + ServiceInstances []*ServiceInstance `json:"service_instances,omitempty"` // The user-provided specification for the database. - Spec *DatabaseSpec + Spec *DatabaseSpec `json:"spec,omitempty"` } type DatabaseNodeSpec struct { // The name of the database node. - Name string + Name string `json:"name"` // The IDs of the hosts that should run this node. When multiple hosts are // specified, one host will chosen as a primary, and the others will be read // replicas. - HostIds []Identifier + HostIds []Identifier `json:"host_ids"` // The Postgres version for this node in 'major.minor' format. Overrides the // Postgres version set in the DatabaseSpec. - PostgresVersion *string + PostgresVersion *string `json:"postgres_version,omitempty"` // The port used by the Postgres database for this node. Overrides the Postgres // port set in the DatabaseSpec. - Port *int + Port *int `json:"port,omitempty"` // The number of CPUs to allocate for the database on this node and to use for // tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 // millicpus. Cannot allocate units smaller than 1m. Defaults to the number of // available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs // than are available on the host. Whether this limit is enforced depends on // the orchestrator. - Cpus *string + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for the database on // this node and to use for tuning Postgres. Defaults to the total available // memory on the host. Whether this limit is enforced depends on the // orchestrator. - Memory *string + Memory *string `json:"memory,omitempty"` // Additional postgresql.conf settings for this particular node. Will be merged // with the settings provided by control-plane. - PostgresqlConf map[string]any + PostgresqlConf map[string]any `json:"postgresql_conf,omitempty"` // The backup configuration for this node. Overrides the backup configuration // set in the DatabaseSpec. - BackupConfig *BackupConfigSpec + BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"` // The restore configuration for this node. Overrides the restore configuration // set in the DatabaseSpec. - RestoreConfig *RestoreConfigSpec + RestoreConfig *RestoreConfigSpec `json:"restore_config,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOpts + OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"` // The name of the source node to use for sync. This is typically the node // (like 'n1') from which the data will be copied to initialize this new node. - SourceNode *string + SourceNode *string `json:"source_node,omitempty"` } type DatabaseSpec struct { // The name of the Postgres database. - DatabaseName string + DatabaseName string `json:"database_name"` // The Postgres version in 'major.minor' format. - PostgresVersion *string + PostgresVersion *string `json:"postgres_version,omitempty"` // The major version of the Spock extension. - SpockVersion *string + SpockVersion *string `json:"spock_version,omitempty"` // The port used by the Postgres database. If the port is 0, each instance will // be assigned a random port. If the port is unspecified, the database will not // be exposed on any port, dependent on orchestrator support for that feature. - Port *int + Port *int `json:"port,omitempty"` // The number of CPUs to allocate for the database and to use for tuning // Postgres. Defaults to the number of available CPUs on the host. Can include // an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced // depends on the orchestrator. - Cpus *string + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for the database and // to use for tuning Postgres. Defaults to the total available memory on the // host. Whether this limit is enforced depends on the orchestrator. - Memory *string + Memory *string `json:"memory,omitempty"` // The Spock nodes for this database. - Nodes []*DatabaseNodeSpec + Nodes []*DatabaseNodeSpec `json:"nodes"` // The users to create for this database. - DatabaseUsers []*DatabaseUserSpec + DatabaseUsers []*DatabaseUserSpec `json:"database_users,omitempty"` // Service instances to run alongside the database (e.g., MCP servers). - Services []*ServiceSpec + Services []*ServiceSpec `json:"services,omitempty"` // The backup configuration for this database. - BackupConfig *BackupConfigSpec + BackupConfig *BackupConfigSpec `json:"backup_config,omitempty"` // The restore configuration for this database. - RestoreConfig *RestoreConfigSpec + RestoreConfig *RestoreConfigSpec `json:"restore_config,omitempty"` // Additional postgresql.conf settings. Will be merged with the settings // provided by control-plane. - PostgresqlConf map[string]any + PostgresqlConf map[string]any `json:"postgresql_conf,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOpts + OrchestratorOpts *OrchestratorOpts `json:"orchestrator_opts,omitempty"` } type DatabaseSummary struct { // Unique identifier for the database. - ID Identifier + ID Identifier `json:"id"` // Unique identifier for the database's owner. - TenantID *Identifier + TenantID *Identifier `json:"tenant_id,omitempty"` // The time that the database was created. - CreatedAt string + CreatedAt string `json:"created_at"` // The time that the database was last updated. - UpdatedAt string + UpdatedAt string `json:"updated_at"` // Current state of the database. - State string + State string `json:"state"` // All of the instances in the database. - Instances []*Instance + Instances []*Instance `json:"instances,omitempty"` } type DatabaseUserSpec struct { // The username for this database user. - Username string + Username string `json:"username"` // The password for this database user. This field will be excluded from the // response of all endpoints. It can also be omitted from update requests to // keep the current value. - Password *string + Password *string `json:"password,omitempty"` // If true, this user will be granted database ownership. - DbOwner *bool + DbOwner *bool `json:"db_owner,omitempty"` // The attributes to assign to this database user. - Attributes []string + Attributes []string `json:"attributes,omitempty"` // The roles to assign to this database user. - Roles []string + Roles []string `json:"roles,omitempty"` } // DeleteDatabasePayload is the payload type of the control-plane service @@ -443,56 +443,56 @@ type DeleteDatabasePayload struct { // delete-database method. type DeleteDatabaseResponse struct { // The task that will delete this database. - Task *Task + Task *Task `json:"task"` } type EtcdClusterMember struct { // The name of the Etcd cluster member. - Name string + Name string `json:"name"` // The Etcd peer endpoint for this cluster member. - PeerUrls []string + PeerUrls []string `json:"peer_urls"` // The Etcd client endpoint for this cluster member. - ClientUrls []string + ClientUrls []string `json:"client_urls"` } // Describes an additional Docker network to attach the container to. type ExtraNetworkSpec struct { // The name or ID of the network to connect to. - ID string + ID string `json:"id"` // Optional network-scoped aliases for the container. - Aliases []string + Aliases []string `json:"aliases,omitempty"` // Optional driver options for the network connection. - DriverOpts map[string]string + DriverOpts map[string]string `json:"driver_opts,omitempty"` } // Extra volumes to mount from the host to the database container. type ExtraVolumesSpec struct { // The host path for the volume. - HostPath string + HostPath string `json:"host_path"` // The path inside the container where the volume will be mounted. - DestinationPath string + DestinationPath string `json:"destination_path"` } // FailoverDatabaseNodeRequest is the payload type of the control-plane service // failover-database-node method. type FailoverDatabaseNodeRequest struct { // ID of the database to perform the failover for. - DatabaseID Identifier + DatabaseID Identifier `json:"database_id"` // Name of the node to initiate the failover from. - NodeName string + NodeName string `json:"node_name"` // Optional instance_id of the replica to promote. If omitted, a candidate will // be selected. - CandidateInstanceID *string + CandidateInstanceID *string `json:"candidate_instance_id,omitempty"` // If true, skip the health validations that prevent running failover on a // healthy cluster. - SkipValidation bool + SkipValidation bool `json:"skip_validation,omitempty"` } // FailoverDatabaseNodeResponse is the result type of the control-plane service // failover-database-node method. type FailoverDatabaseNodeResponse struct { // The task that will perform the failover. - Task *Task + Task *Task `json:"task"` } // GetDatabasePayload is the payload type of the control-plane service @@ -556,56 +556,56 @@ type GetHostTaskPayload struct { // Health check result for a service instance. type HealthCheckResult struct { // The health status. - Status string + Status string `json:"status"` // Optional message about the health status. - Message *string + Message *string `json:"message,omitempty"` // The time this health check was performed. - CheckedAt string + CheckedAt string `json:"checked_at"` } // Host is the result type of the control-plane service get-host method. type Host struct { // Unique identifier for the host. - ID Identifier + ID Identifier `json:"id"` // The orchestrator used by this host. - Orchestrator string + Orchestrator string `json:"orchestrator"` // The data directory for the host. - DataDir string + DataDir string `json:"data_dir"` // The cohort that this host belongs to. - Cohort *HostCohort + Cohort *HostCohort `json:"cohort,omitempty"` // The hostname of this host. - Hostname string + Hostname string `json:"hostname"` // The IPv4 address of this host. - Ipv4Address string + Ipv4Address string `json:"ipv4_address"` // The number of CPUs on this host. - Cpus *int + Cpus *int `json:"cpus,omitempty"` // The amount of memory available on this host. - Memory *string + Memory *string `json:"memory,omitempty"` // Current status of the host. - Status *HostStatus + Status *HostStatus `json:"status"` // The default PgEdge version for this host. - DefaultPgedgeVersion *PgEdgeVersion + DefaultPgedgeVersion *PgEdgeVersion `json:"default_pgedge_version,omitempty"` // The PgEdge versions supported by this host. - SupportedPgedgeVersions []*PgEdgeVersion + SupportedPgedgeVersions []*PgEdgeVersion `json:"supported_pgedge_versions,omitempty"` // The etcd mode for this host. - EtcdMode *string + EtcdMode *string `json:"etcd_mode,omitempty"` } type HostCohort struct { // The type of cohort that the host belongs to. - Type string + Type string `json:"type"` // The member ID of the host within the cohort. - MemberID string + MemberID string `json:"member_id"` // Indicates if the host is a control node in the cohort. - ControlAvailable bool + ControlAvailable bool `json:"control_available"` } type HostStatus struct { - State string + State string `json:"state"` // The last time the host status was updated. - UpdatedAt string + UpdatedAt string `json:"updated_at"` // The status of each component of the host. - Components map[string]*ComponentStatus + Components map[string]*ComponentStatus `json:"components"` } // A user-specified identifier. Must be 1-63 characters, contain only @@ -617,74 +617,74 @@ type Identifier string // init-cluster method. type InitClusterRequest struct { // Optional id for the cluster, omit for default generated id - ClusterID *Identifier + ClusterID *Identifier `json:"cluster_id,omitempty"` } // An instance of pgEdge Postgres running on a host. type Instance struct { // Unique identifier for the instance. - ID string + ID string `json:"id"` // The ID of the host this instance is running on. - HostID string + HostID string `json:"host_id"` // The Spock node name for this instance. - NodeName string + NodeName string `json:"node_name"` // The time that the instance was created. - CreatedAt string + CreatedAt string `json:"created_at"` // The time that the instance was last modified. - UpdatedAt string + UpdatedAt string `json:"updated_at"` // The time that the instance status information was last updated. - StatusUpdatedAt *string - State string + StatusUpdatedAt *string `json:"status_updated_at,omitempty"` + State string `json:"state"` // Connection information for the instance. - ConnectionInfo *InstanceConnectionInfo + ConnectionInfo *InstanceConnectionInfo `json:"connection_info,omitempty"` // Postgres status information for the instance. - Postgres *InstancePostgresStatus + Postgres *InstancePostgresStatus `json:"postgres,omitempty"` // Spock status information for the instance. - Spock *InstanceSpockStatus + Spock *InstanceSpockStatus `json:"spock,omitempty"` // An error message if the instance is in an error state. - Error *string + Error *string `json:"error,omitempty"` } // Connection information for a pgEdge instance. type InstanceConnectionInfo struct { // The hostname of the host that's running this instance. - Hostname *string + Hostname *string `json:"hostname,omitempty"` // The IPv4 address of the host that's running this instance. - Ipv4Address *string + Ipv4Address *string `json:"ipv4_address,omitempty"` // The host port that Postgres is listening on for this instance. - Port *int + Port *int `json:"port,omitempty"` } // Postgres status information for a pgEdge instance. type InstancePostgresStatus struct { // The version of Postgres for this instance. - Version *string - PatroniState *string - Role *string + Version *string `json:"version,omitempty"` + PatroniState *string `json:"patroni_state,omitempty"` + Role *string `json:"role,omitempty"` // True if this instance has a pending restart from a configuration change. - PendingRestart *bool + PendingRestart *bool `json:"pending_restart,omitempty"` // True if Patroni is paused for this instance. - PatroniPaused *bool + PatroniPaused *bool `json:"patroni_paused,omitempty"` } // Spock status information for a pgEdge instance. type InstanceSpockStatus struct { // The current spock.readonly setting. - ReadOnly *string + ReadOnly *string `json:"read_only,omitempty"` // The version of Spock for this instance. - Version *string + Version *string `json:"version,omitempty"` // Status information for this instance's Spock subscriptions. - Subscriptions []*InstanceSubscription + Subscriptions []*InstanceSubscription `json:"subscriptions,omitempty"` } // Status information for a Spock subscription. type InstanceSubscription struct { // The Spock node name of the provider for this subscription. - ProviderNode string + ProviderNode string `json:"provider_node"` // The name of the subscription. - Name string + Name string `json:"name"` // The current status of the subscription. - Status string + Status string `json:"status"` } // ListDatabaseTasksPayload is the payload type of the control-plane service @@ -704,14 +704,14 @@ type ListDatabaseTasksPayload struct { // list-database-tasks method. type ListDatabaseTasksResponse struct { // The tasks for the given database. - Tasks []*Task + Tasks []*Task `json:"tasks"` } // ListDatabasesResponse is the result type of the control-plane service // list-databases method. type ListDatabasesResponse struct { // The databases managed by this cluster. - Databases []*DatabaseSummary + Databases []*DatabaseSummary `json:"databases"` } // ListHostTasksPayload is the payload type of the control-plane service @@ -731,14 +731,14 @@ type ListHostTasksPayload struct { // list-host-tasks method. type ListHostTasksResponse struct { // The tasks for the given host. - Tasks []*Task + Tasks []*Task `json:"tasks"` } // ListHostsResponse is the result type of the control-plane service list-hosts // method. type ListHostsResponse struct { // List of hosts in the cluster - Hosts []*Host + Hosts []*Host `json:"hosts"` } // ListTasksPayload is the payload type of the control-plane service list-tasks @@ -760,30 +760,30 @@ type ListTasksPayload struct { // method. type ListTasksResponse struct { // The tasks for the given entity. - Tasks []*Task + Tasks []*Task `json:"tasks"` } // Options specific to the selected orchestrator. type OrchestratorOpts struct { // Swarm-specific configuration. - Swarm *SwarmOpts + Swarm *SwarmOpts `json:"swarm,omitempty"` } type PgEdgeVersion struct { // The Postgres major and minor version. - PostgresVersion string + PostgresVersion string `json:"postgres_version"` // The Spock major version. - SpockVersion string + SpockVersion string `json:"spock_version"` } // Port mapping information for a service instance. type PortMapping struct { // The name of the port (e.g., 'http', 'web-client'). - Name string + Name string `json:"name"` // The port number inside the container. - ContainerPort *int + ContainerPort *int `json:"container_port,omitempty"` // The port number on the host (if port-forwarded). - HostPort *int + HostPort *int `json:"host_port,omitempty"` } // RemoveHostPayload is the payload type of the control-plane service @@ -800,9 +800,9 @@ type RemoveHostPayload struct { // remove-host method. type RemoveHostResponse struct { // The task that tracks the overall host removal operation. - Task *Task + Task *Task `json:"task"` // The tasks that will update databases affected by the host removal. - UpdateDatabaseTasks []*Task + UpdateDatabaseTasks []*Task `json:"update_database_tasks"` } // RestartInstancePayload is the payload type of the control-plane service @@ -819,22 +819,22 @@ type RestartInstancePayload struct { // Returns a task representing the restart operation. type RestartInstanceResponse struct { // Task representing the restart operation - Task *Task + Task *Task `json:"task"` } type RestoreConfigSpec struct { // The ID of the database to restore this database from. - SourceDatabaseID Identifier + SourceDatabaseID Identifier `json:"source_database_id"` // The name of the node to restore this database from. - SourceNodeName string + SourceNodeName string `json:"source_node_name"` // The name of the database in this repository. The database will be renamed to // the database_name in the DatabaseSpec after it's restored. - SourceDatabaseName string + SourceDatabaseName string `json:"source_database_name"` // The repository to restore this database from. - Repository *RestoreRepositorySpec + Repository *RestoreRepositorySpec `json:"repository"` // Additional options to use when restoring this database. If omitted, the // database will be restored to the latest point in the given repository. - RestoreOptions map[string]string + RestoreOptions map[string]string `json:"restore_options,omitempty"` } // RestoreDatabasePayload is the payload type of the control-plane service @@ -849,132 +849,132 @@ type RestoreDatabasePayload struct { type RestoreDatabaseRequest struct { // Configuration for the restore process. - RestoreConfig *RestoreConfigSpec + RestoreConfig *RestoreConfigSpec `json:"restore_config"` // The nodes to restore. Defaults to all nodes if empty or unspecified. - TargetNodes []string + TargetNodes []string `json:"target_nodes,omitempty"` } // RestoreDatabaseResponse is the result type of the control-plane service // restore-database method. type RestoreDatabaseResponse struct { // The task that will restore this database. - Task *Task + Task *Task `json:"task"` // The tasks that will restore each database node. - NodeTasks []*Task + NodeTasks []*Task `json:"node_tasks"` // The database being restored. - Database *Database + Database *Database `json:"database"` } type RestoreRepositorySpec struct { // The unique identifier of this repository. - ID *Identifier + ID *Identifier `json:"id,omitempty"` // The type of this repository. - Type string + Type string `json:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string + S3Bucket *string `json:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = // 's3'. - S3Region *string + S3Region *string `json:"s3_region,omitempty"` // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string + S3Endpoint *string `json:"s3_endpoint,omitempty"` // An optional AWS access key ID to use for this repository. If not provided, // pgbackrest will use the default credential provider chain. - S3Key *string + S3Key *string `json:"s3_key,omitempty"` // The corresponding secret for the AWS access key ID in s3_key. - S3KeySecret *string + S3KeySecret *string `json:"s3_key_secret,omitempty"` // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string + GcsBucket *string `json:"gcs_bucket,omitempty"` // The optional GCS endpoint for this repository. Only applies when type = // 'gcs'. - GcsEndpoint *string + GcsEndpoint *string `json:"gcs_endpoint,omitempty"` // Optional base64-encoded private key data. If omitted, pgbackrest will use // the service account attached to the instance profile. - GcsKey *string + GcsKey *string `json:"gcs_key,omitempty"` // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string + AzureAccount *string `json:"azure_account,omitempty"` // The Azure container name for this repository. Only applies when type = // 'azure'. - AzureContainer *string + AzureContainer *string `json:"azure_container,omitempty"` // The optional Azure endpoint for this repository. Only applies when type = // 'azure'. - AzureEndpoint *string + AzureEndpoint *string `json:"azure_endpoint,omitempty"` // An optional Azure storage account access key to use for this repository. If // not provided, pgbackrest will use the VM's managed identity. - AzureKey *string + AzureKey *string `json:"azure_key,omitempty"` // The base path within the repository to store backups. Required for type = // 'posix' and 'cifs'. - BasePath *string + BasePath *string `json:"base_path,omitempty"` // Additional options to apply to this repository. - CustomOptions map[string]string + CustomOptions map[string]string `json:"custom_options,omitempty"` } // A service instance running on a host alongside the database. type ServiceInstance struct { // Unique identifier for the service instance. - ServiceInstanceID string + ServiceInstanceID string `json:"service_instance_id"` // The service ID from the DatabaseSpec. - ServiceID string + ServiceID string `json:"service_id"` // The ID of the database this service belongs to. - DatabaseID Identifier + DatabaseID Identifier `json:"database_id"` // The ID of the host this service instance is running on. - HostID string + HostID string `json:"host_id"` // Current state of the service instance. - State string + State string `json:"state"` // Runtime status information for the service instance. - Status *ServiceInstanceStatus + Status *ServiceInstanceStatus `json:"status,omitempty"` // The time that the service instance was created. - CreatedAt string + CreatedAt string `json:"created_at"` // The time that the service instance was last updated. - UpdatedAt string + UpdatedAt string `json:"updated_at"` // An error message if the service instance is in an error state. - Error *string + Error *string `json:"error,omitempty"` } // Runtime status information for a service instance. type ServiceInstanceStatus struct { // The Docker container ID. - ContainerID *string + ContainerID *string `json:"container_id,omitempty"` // The container image version currently running. - ImageVersion *string + ImageVersion *string `json:"image_version,omitempty"` // The hostname of the service instance. - Hostname *string + Hostname *string `json:"hostname,omitempty"` // The IPv4 address of the service instance. - Ipv4Address *string + Ipv4Address *string `json:"ipv4_address,omitempty"` // Port mappings for this service instance. - Ports []*PortMapping + Ports []*PortMapping `json:"ports,omitempty"` // Most recent health check result. - HealthCheck *HealthCheckResult + HealthCheck *HealthCheckResult `json:"health_check,omitempty"` // The time of the last health check attempt. - LastHealthAt *string + LastHealthAt *string `json:"last_health_at,omitempty"` // Whether the service is ready to accept requests. - ServiceReady *bool + ServiceReady *bool `json:"service_ready,omitempty"` } type ServiceSpec struct { // The unique identifier for this service. - ServiceID Identifier + ServiceID Identifier `json:"service_id"` // The type of service to run. - ServiceType string + ServiceType string `json:"service_type"` // The version of the service in semver format (e.g., '1.0.0') or the literal // 'latest'. - Version string + Version string `json:"version"` // The IDs of the hosts that should run this service. One service instance will // be created per host. - HostIds []Identifier + HostIds []Identifier `json:"host_ids"` // The port to publish the service on the host. If 0, Docker assigns a random // port. If unspecified, no port is published and the service is not accessible // from outside the Docker network. - Port *int + Port *int `json:"port,omitempty"` // Service-specific configuration. For MCP services, this includes // llm_provider, llm_model, and provider-specific API keys. - Config map[string]any + Config map[string]any `json:"config"` // The number of CPUs to allocate for this service. It can include the SI // suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if // unspecified. - Cpus *string + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for this service. // Defaults to container defaults if unspecified. - Memory *string + Memory *string `json:"memory,omitempty"` } // StartInstancePayload is the payload type of the control-plane service @@ -991,7 +991,7 @@ type StartInstancePayload struct { // Returns a task representing the start operation. type StartInstanceResponse struct { // Task representing the start operation - Task *Task + Task *Task `json:"task"` } // StopInstancePayload is the payload type of the control-plane service @@ -1008,19 +1008,19 @@ type StopInstancePayload struct { // Returns a task representing the stop operation. type StopInstanceResponse struct { // Task representing the stop operation - Task *Task + Task *Task `json:"task"` } // Docker Swarm-specific options. type SwarmOpts struct { // A list of extra volumes to mount. Each entry defines a host and container // path. - ExtraVolumes []*ExtraVolumesSpec + ExtraVolumes []*ExtraVolumesSpec `json:"extra_volumes,omitempty"` // A list of additional Docker Swarm networks to attach containers in this // database to. - ExtraNetworks []*ExtraNetworkSpec + ExtraNetworks []*ExtraNetworkSpec `json:"extra_networks,omitempty"` // Arbitrary labels to apply to the Docker Swarm service - ExtraLabels map[string]string + ExtraLabels map[string]string `json:"extra_labels,omitempty"` } // SwitchoverDatabaseNodePayload is the payload type of the control-plane @@ -1041,66 +1041,66 @@ type SwitchoverDatabaseNodePayload struct { // service switchover-database-node method. type SwitchoverDatabaseNodeResponse struct { // The task that will perform the switchover. - Task *Task + Task *Task `json:"task"` } // Task is the result type of the control-plane service get-database-task // method. type Task struct { // The parent task ID of the task. - ParentID *string + ParentID *string `json:"parent_id,omitempty"` // The scope of the task (database or host). - Scope string + Scope string `json:"scope"` // The entity ID (database_id or host_id) that this task belongs to. - EntityID string + EntityID string `json:"entity_id"` // The database ID of the task. - DatabaseID *string + DatabaseID *string `json:"database_id,omitempty"` // The name of the node that the task is operating on. - NodeName *string + NodeName *string `json:"node_name,omitempty"` // The ID of the instance that the task is operating on. - InstanceID *string + InstanceID *string `json:"instance_id,omitempty"` // The ID of the host that the task is running on. - HostID *string + HostID *string `json:"host_id,omitempty"` // The unique ID of the task. - TaskID string + TaskID string `json:"task_id"` // The time when the task was created. - CreatedAt string + CreatedAt string `json:"created_at"` // The time when the task was completed. - CompletedAt *string + CompletedAt *string `json:"completed_at,omitempty"` // The type of the task. - Type string + Type string `json:"type"` // The status of the task. - Status string + Status string `json:"status"` // The error message if the task failed. - Error *string + Error *string `json:"error,omitempty"` } // TaskLog is the result type of the control-plane service // get-database-task-log method. type TaskLog struct { // The scope of the task (database or host). - Scope string + Scope string `json:"scope"` // The entity ID (database_id or host_id) that this task log belongs to. - EntityID string + EntityID string `json:"entity_id"` // The database ID of the task log. Deprecated: use entity_id instead. - DatabaseID *string + DatabaseID *string `json:"database_id,omitempty"` // The unique ID of the task log. - TaskID string + TaskID string `json:"task_id"` // The status of the task. - TaskStatus string + TaskStatus string `json:"task_status"` // The ID of the last entry in the task log. - LastEntryID *string + LastEntryID *string `json:"last_entry_id,omitempty"` // Entries in the task log. - Entries []*TaskLogEntry + Entries []*TaskLogEntry `json:"entries"` } type TaskLogEntry struct { // The timestamp of the log entry. - Timestamp string + Timestamp string `json:"timestamp"` // The log message. - Message string + Message string `json:"message"` // Additional fields for the log entry. - Fields map[string]any + Fields map[string]any `json:"fields,omitempty"` } // UpdateDatabasePayload is the payload type of the control-plane service @@ -1118,31 +1118,31 @@ type UpdateDatabasePayload struct { type UpdateDatabaseRequest struct { // Unique identifier for the database's owner. - TenantID *Identifier + TenantID *Identifier `json:"tenant_id,omitempty"` // The specification for the database. - Spec *DatabaseSpec + Spec *DatabaseSpec `json:"spec"` } // UpdateDatabaseResponse is the result type of the control-plane service // update-database method. type UpdateDatabaseResponse struct { // The task that will update this database. - Task *Task + Task *Task `json:"task"` // The database being updated. - Database *Database + Database *Database `json:"database"` } // VersionInfo is the result type of the control-plane service get-version // method. type VersionInfo struct { // The version of the API server. - Version string + Version string `json:"version"` // The VCS revision of the API server. - Revision string + Revision string `json:"revision"` // The timestamp associated with the revision. - RevisionTime string + RevisionTime string `json:"revision_time"` // The CPU architecture of the API server. - Arch string + Arch string `json:"arch"` } // Error returns an error description. diff --git a/api/apiv1/gen/http/control_plane/client/types.go b/api/apiv1/gen/http/control_plane/client/types.go index c682e69a..cf1cdeaa 100644 --- a/api/apiv1/gen/http/control_plane/client/types.go +++ b/api/apiv1/gen/http/control_plane/client/types.go @@ -18,55 +18,55 @@ import ( // "join-cluster" endpoint HTTP request body. type JoinClusterRequestBody struct { // Token to join an existing cluster. - Token string `form:"token" json:"token" xml:"token"` + Token string `json:"token"` // Existing server to join - ServerURL string `form:"server_url" json:"server_url" xml:"server_url"` + ServerURL string `json:"server_url"` } // GetJoinOptionsRequestBody is the type of the "control-plane" service // "get-join-options" endpoint HTTP request body. type GetJoinOptionsRequestBody struct { // Token to join the cluster. - Token string `form:"token" json:"token" xml:"token"` + Token string `json:"token"` // The unique identifier for the host that's joining the cluster. - HostID string `form:"host_id" json:"host_id" xml:"host_id"` + HostID string `json:"host_id"` // The hostname of the host that's joining the cluster. - Hostname string `form:"hostname" json:"hostname" xml:"hostname"` + Hostname string `json:"hostname"` // The IPv4 address of the host that's joining the cluster. - Ipv4Address string `form:"ipv4_address" json:"ipv4_address" xml:"ipv4_address"` + Ipv4Address string `json:"ipv4_address"` // True if the joining member is configured to run an embedded an etcd server. - EmbeddedEtcdEnabled bool `form:"embedded_etcd_enabled" json:"embedded_etcd_enabled" xml:"embedded_etcd_enabled"` + EmbeddedEtcdEnabled bool `json:"embedded_etcd_enabled"` } // CreateDatabaseRequestBody is the type of the "control-plane" service // "create-database" endpoint HTTP request body. type CreateDatabaseRequestBody struct { // Unique identifier for the database. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id,omitempty"` // Unique identifier for the database's owner. - TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` + TenantID *string `json:"tenant_id,omitempty"` // The specification for the database. - Spec *DatabaseSpecRequestBody `form:"spec" json:"spec" xml:"spec"` + Spec *DatabaseSpecRequestBody `json:"spec"` } // UpdateDatabaseRequestBody is the type of the "control-plane" service // "update-database" endpoint HTTP request body. type UpdateDatabaseRequestBody struct { // Unique identifier for the database's owner. - TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` + TenantID *string `json:"tenant_id,omitempty"` // The specification for the database. - Spec *DatabaseSpecRequestBodyRequestBody `form:"spec" json:"spec" xml:"spec"` + Spec *DatabaseSpecRequestBodyRequestBody `json:"spec"` } // BackupDatabaseNodeRequestBody is the type of the "control-plane" service // "backup-database-node" endpoint HTTP request body. type BackupDatabaseNodeRequestBody struct { // The type of backup. - Type string `form:"type" json:"type" xml:"type"` + Type string `json:"type"` // Annotations for the backup. - Annotations map[string]string `form:"annotations,omitempty" json:"annotations,omitempty" xml:"annotations,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` // Options for the backup. - BackupOptions map[string]string `form:"backup_options,omitempty" json:"backup_options,omitempty" xml:"backup_options,omitempty"` + BackupOptions map[string]string `json:"backup_options,omitempty"` } // SwitchoverDatabaseNodeRequestBody is the type of the "control-plane" service @@ -84,373 +84,373 @@ type SwitchoverDatabaseNodeRequestBody struct { type FailoverDatabaseNodeRequestBody struct { // Optional instance_id of the replica to promote. If omitted, a candidate will // be selected. - CandidateInstanceID *string `form:"candidate_instance_id,omitempty" json:"candidate_instance_id,omitempty" xml:"candidate_instance_id,omitempty"` + CandidateInstanceID *string `json:"candidate_instance_id,omitempty"` // If true, skip the health validations that prevent running failover on a // healthy cluster. - SkipValidation bool `form:"skip_validation" json:"skip_validation" xml:"skip_validation"` + SkipValidation bool `json:"skip_validation,omitempty"` } // RestoreDatabaseRequestBody is the type of the "control-plane" service // "restore-database" endpoint HTTP request body. type RestoreDatabaseRequestBody struct { // Configuration for the restore process. - RestoreConfig *RestoreConfigSpecRequestBodyRequestBody `form:"restore_config" json:"restore_config" xml:"restore_config"` + RestoreConfig *RestoreConfigSpecRequestBodyRequestBody `json:"restore_config"` // The nodes to restore. Defaults to all nodes if empty or unspecified. - TargetNodes []string `form:"target_nodes,omitempty" json:"target_nodes,omitempty" xml:"target_nodes,omitempty"` + TargetNodes []string `json:"target_nodes,omitempty"` } // InitClusterResponseBody is the type of the "control-plane" service // "init-cluster" endpoint HTTP response body. type InitClusterResponseBody struct { // Token to join an existing cluster. - Token *string `form:"token,omitempty" json:"token,omitempty" xml:"token,omitempty"` + Token *string `json:"token"` // Existing server to join - ServerURL *string `form:"server_url,omitempty" json:"server_url,omitempty" xml:"server_url,omitempty"` + ServerURL *string `json:"server_url"` } // GetJoinTokenResponseBody is the type of the "control-plane" service // "get-join-token" endpoint HTTP response body. type GetJoinTokenResponseBody struct { // Token to join an existing cluster. - Token *string `form:"token,omitempty" json:"token,omitempty" xml:"token,omitempty"` + Token *string `json:"token"` // Existing server to join - ServerURL *string `form:"server_url,omitempty" json:"server_url,omitempty" xml:"server_url,omitempty"` + ServerURL *string `json:"server_url"` } // GetJoinOptionsResponseBody is the type of the "control-plane" service // "get-join-options" endpoint HTTP response body. type GetJoinOptionsResponseBody struct { // Connection information for the etcd cluster leader - Leader *EtcdClusterMemberResponseBody `form:"leader,omitempty" json:"leader,omitempty" xml:"leader,omitempty"` + Leader *EtcdClusterMemberResponseBody `json:"leader"` // Credentials for the new host joining the cluster. - Credentials *ClusterCredentialsResponseBody `form:"credentials,omitempty" json:"credentials,omitempty" xml:"credentials,omitempty"` + Credentials *ClusterCredentialsResponseBody `json:"credentials"` } // GetClusterResponseBody is the type of the "control-plane" service // "get-cluster" endpoint HTTP response body. type GetClusterResponseBody struct { // Unique identifier for the cluster. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id"` // Current status of the cluster. - Status *ClusterStatusResponseBody `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` + Status *ClusterStatusResponseBody `json:"status"` // All of the hosts in the cluster. - Hosts []*HostResponseBody `form:"hosts,omitempty" json:"hosts,omitempty" xml:"hosts,omitempty"` + Hosts []*HostResponseBody `json:"hosts"` } // ListHostsResponseBody is the type of the "control-plane" service // "list-hosts" endpoint HTTP response body. type ListHostsResponseBody struct { // List of hosts in the cluster - Hosts []*HostResponseBody `form:"hosts,omitempty" json:"hosts,omitempty" xml:"hosts,omitempty"` + Hosts []*HostResponseBody `json:"hosts"` } // GetHostResponseBody is the type of the "control-plane" service "get-host" // endpoint HTTP response body. type GetHostResponseBody struct { // Unique identifier for the host. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id"` // The orchestrator used by this host. - Orchestrator *string `form:"orchestrator,omitempty" json:"orchestrator,omitempty" xml:"orchestrator,omitempty"` + Orchestrator *string `json:"orchestrator"` // The data directory for the host. - DataDir *string `form:"data_dir,omitempty" json:"data_dir,omitempty" xml:"data_dir,omitempty"` + DataDir *string `json:"data_dir"` // The cohort that this host belongs to. - Cohort *HostCohortResponseBody `form:"cohort,omitempty" json:"cohort,omitempty" xml:"cohort,omitempty"` + Cohort *HostCohortResponseBody `json:"cohort,omitempty"` // The hostname of this host. - Hostname *string `form:"hostname,omitempty" json:"hostname,omitempty" xml:"hostname,omitempty"` + Hostname *string `json:"hostname"` // The IPv4 address of this host. - Ipv4Address *string `form:"ipv4_address,omitempty" json:"ipv4_address,omitempty" xml:"ipv4_address,omitempty"` + Ipv4Address *string `json:"ipv4_address"` // The number of CPUs on this host. - Cpus *int `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *int `json:"cpus,omitempty"` // The amount of memory available on this host. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // Current status of the host. - Status *HostStatusResponseBody `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` + Status *HostStatusResponseBody `json:"status"` // The default PgEdge version for this host. - DefaultPgedgeVersion *PgEdgeVersionResponseBody `form:"default_pgedge_version,omitempty" json:"default_pgedge_version,omitempty" xml:"default_pgedge_version,omitempty"` + DefaultPgedgeVersion *PgEdgeVersionResponseBody `json:"default_pgedge_version,omitempty"` // The PgEdge versions supported by this host. - SupportedPgedgeVersions []*PgEdgeVersionResponseBody `form:"supported_pgedge_versions,omitempty" json:"supported_pgedge_versions,omitempty" xml:"supported_pgedge_versions,omitempty"` + SupportedPgedgeVersions []*PgEdgeVersionResponseBody `json:"supported_pgedge_versions,omitempty"` // The etcd mode for this host. - EtcdMode *string `form:"etcd_mode,omitempty" json:"etcd_mode,omitempty" xml:"etcd_mode,omitempty"` + EtcdMode *string `json:"etcd_mode,omitempty"` } // RemoveHostResponseBody is the type of the "control-plane" service // "remove-host" endpoint HTTP response body. type RemoveHostResponseBody struct { // The task that tracks the overall host removal operation. - Task *TaskResponseBody `form:"task,omitempty" json:"task,omitempty" xml:"task,omitempty"` + Task *TaskResponseBody `json:"task"` // The tasks that will update databases affected by the host removal. - UpdateDatabaseTasks []*TaskResponseBody `form:"update_database_tasks,omitempty" json:"update_database_tasks,omitempty" xml:"update_database_tasks,omitempty"` + UpdateDatabaseTasks []*TaskResponseBody `json:"update_database_tasks"` } // ListDatabasesResponseBody is the type of the "control-plane" service // "list-databases" endpoint HTTP response body. type ListDatabasesResponseBody struct { // The databases managed by this cluster. - Databases []*DatabaseSummaryResponseBody `form:"databases,omitempty" json:"databases,omitempty" xml:"databases,omitempty"` + Databases []*DatabaseSummaryResponseBody `json:"databases"` } // CreateDatabaseResponseBody is the type of the "control-plane" service // "create-database" endpoint HTTP response body. type CreateDatabaseResponseBody struct { // The task that will create this database. - Task *TaskResponseBody `form:"task,omitempty" json:"task,omitempty" xml:"task,omitempty"` + Task *TaskResponseBody `json:"task"` // The database being created. - Database *DatabaseResponseBody `form:"database,omitempty" json:"database,omitempty" xml:"database,omitempty"` + Database *DatabaseResponseBody `json:"database"` } // GetDatabaseResponseBody is the type of the "control-plane" service // "get-database" endpoint HTTP response body. type GetDatabaseResponseBody struct { // Unique identifier for the database. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id"` // Unique identifier for the database's owner. - TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` + TenantID *string `json:"tenant_id,omitempty"` // The time that the database was created. - CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` + CreatedAt *string `json:"created_at"` // The time that the database was last updated. - UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` + UpdatedAt *string `json:"updated_at"` // Current state of the database. - State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` + State *string `json:"state"` // All of the instances in the database. - Instances []*InstanceResponseBody `form:"instances,omitempty" json:"instances,omitempty" xml:"instances,omitempty"` + Instances []*InstanceResponseBody `json:"instances,omitempty"` // Service instances running alongside this database. - ServiceInstances []*ServiceInstanceResponseBody `form:"service_instances,omitempty" json:"service_instances,omitempty" xml:"service_instances,omitempty"` + ServiceInstances []*ServiceInstanceResponseBody `json:"service_instances,omitempty"` // The user-provided specification for the database. - Spec *DatabaseSpecResponseBody `form:"spec,omitempty" json:"spec,omitempty" xml:"spec,omitempty"` + Spec *DatabaseSpecResponseBody `json:"spec,omitempty"` } // UpdateDatabaseResponseBody is the type of the "control-plane" service // "update-database" endpoint HTTP response body. type UpdateDatabaseResponseBody struct { // The task that will update this database. - Task *TaskResponseBody `form:"task,omitempty" json:"task,omitempty" xml:"task,omitempty"` + Task *TaskResponseBody `json:"task"` // The database being updated. - Database *DatabaseResponseBody `form:"database,omitempty" json:"database,omitempty" xml:"database,omitempty"` + Database *DatabaseResponseBody `json:"database"` } // DeleteDatabaseResponseBody is the type of the "control-plane" service // "delete-database" endpoint HTTP response body. type DeleteDatabaseResponseBody struct { // The task that will delete this database. - Task *TaskResponseBody `form:"task,omitempty" json:"task,omitempty" xml:"task,omitempty"` + Task *TaskResponseBody `json:"task"` } // BackupDatabaseNodeResponseBody is the type of the "control-plane" service // "backup-database-node" endpoint HTTP response body. type BackupDatabaseNodeResponseBody struct { // The task that will backup this database node. - Task *TaskResponseBody `form:"task,omitempty" json:"task,omitempty" xml:"task,omitempty"` + Task *TaskResponseBody `json:"task"` } // SwitchoverDatabaseNodeResponseBody is the type of the "control-plane" // service "switchover-database-node" endpoint HTTP response body. type SwitchoverDatabaseNodeResponseBody struct { // The task that will perform the switchover. - Task *TaskResponseBody `form:"task,omitempty" json:"task,omitempty" xml:"task,omitempty"` + Task *TaskResponseBody `json:"task"` } // FailoverDatabaseNodeResponseBody is the type of the "control-plane" service // "failover-database-node" endpoint HTTP response body. type FailoverDatabaseNodeResponseBody struct { // The task that will perform the failover. - Task *TaskResponseBody `form:"task,omitempty" json:"task,omitempty" xml:"task,omitempty"` + Task *TaskResponseBody `json:"task"` } // ListDatabaseTasksResponseBody is the type of the "control-plane" service // "list-database-tasks" endpoint HTTP response body. type ListDatabaseTasksResponseBody struct { // The tasks for the given database. - Tasks []*TaskResponseBody `form:"tasks,omitempty" json:"tasks,omitempty" xml:"tasks,omitempty"` + Tasks []*TaskResponseBody `json:"tasks"` } // GetDatabaseTaskResponseBody is the type of the "control-plane" service // "get-database-task" endpoint HTTP response body. type GetDatabaseTaskResponseBody struct { // The parent task ID of the task. - ParentID *string `form:"parent_id,omitempty" json:"parent_id,omitempty" xml:"parent_id,omitempty"` + ParentID *string `json:"parent_id,omitempty"` // The scope of the task (database or host). - Scope *string `form:"scope,omitempty" json:"scope,omitempty" xml:"scope,omitempty"` + Scope *string `json:"scope"` // The entity ID (database_id or host_id) that this task belongs to. - EntityID *string `form:"entity_id,omitempty" json:"entity_id,omitempty" xml:"entity_id,omitempty"` + EntityID *string `json:"entity_id"` // The database ID of the task. - DatabaseID *string `form:"database_id,omitempty" json:"database_id,omitempty" xml:"database_id,omitempty"` + DatabaseID *string `json:"database_id,omitempty"` // The name of the node that the task is operating on. - NodeName *string `form:"node_name,omitempty" json:"node_name,omitempty" xml:"node_name,omitempty"` + NodeName *string `json:"node_name,omitempty"` // The ID of the instance that the task is operating on. - InstanceID *string `form:"instance_id,omitempty" json:"instance_id,omitempty" xml:"instance_id,omitempty"` + InstanceID *string `json:"instance_id,omitempty"` // The ID of the host that the task is running on. - HostID *string `form:"host_id,omitempty" json:"host_id,omitempty" xml:"host_id,omitempty"` + HostID *string `json:"host_id,omitempty"` // The unique ID of the task. - TaskID *string `form:"task_id,omitempty" json:"task_id,omitempty" xml:"task_id,omitempty"` + TaskID *string `json:"task_id"` // The time when the task was created. - CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` + CreatedAt *string `json:"created_at"` // The time when the task was completed. - CompletedAt *string `form:"completed_at,omitempty" json:"completed_at,omitempty" xml:"completed_at,omitempty"` + CompletedAt *string `json:"completed_at,omitempty"` // The type of the task. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type *string `json:"type"` // The status of the task. - Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` + Status *string `json:"status"` // The error message if the task failed. - Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` + Error *string `json:"error,omitempty"` } // GetDatabaseTaskLogResponseBody is the type of the "control-plane" service // "get-database-task-log" endpoint HTTP response body. type GetDatabaseTaskLogResponseBody struct { // The scope of the task (database or host). - Scope *string `form:"scope,omitempty" json:"scope,omitempty" xml:"scope,omitempty"` + Scope *string `json:"scope"` // The entity ID (database_id or host_id) that this task log belongs to. - EntityID *string `form:"entity_id,omitempty" json:"entity_id,omitempty" xml:"entity_id,omitempty"` + EntityID *string `json:"entity_id"` // The database ID of the task log. Deprecated: use entity_id instead. - DatabaseID *string `form:"database_id,omitempty" json:"database_id,omitempty" xml:"database_id,omitempty"` + DatabaseID *string `json:"database_id,omitempty"` // The unique ID of the task log. - TaskID *string `form:"task_id,omitempty" json:"task_id,omitempty" xml:"task_id,omitempty"` + TaskID *string `json:"task_id"` // The status of the task. - TaskStatus *string `form:"task_status,omitempty" json:"task_status,omitempty" xml:"task_status,omitempty"` + TaskStatus *string `json:"task_status"` // The ID of the last entry in the task log. - LastEntryID *string `form:"last_entry_id,omitempty" json:"last_entry_id,omitempty" xml:"last_entry_id,omitempty"` + LastEntryID *string `json:"last_entry_id,omitempty"` // Entries in the task log. - Entries []*TaskLogEntryResponseBody `form:"entries,omitempty" json:"entries,omitempty" xml:"entries,omitempty"` + Entries []*TaskLogEntryResponseBody `json:"entries"` } // ListHostTasksResponseBody is the type of the "control-plane" service // "list-host-tasks" endpoint HTTP response body. type ListHostTasksResponseBody struct { // The tasks for the given host. - Tasks []*TaskResponseBody `form:"tasks,omitempty" json:"tasks,omitempty" xml:"tasks,omitempty"` + Tasks []*TaskResponseBody `json:"tasks"` } // GetHostTaskResponseBody is the type of the "control-plane" service // "get-host-task" endpoint HTTP response body. type GetHostTaskResponseBody struct { // The parent task ID of the task. - ParentID *string `form:"parent_id,omitempty" json:"parent_id,omitempty" xml:"parent_id,omitempty"` + ParentID *string `json:"parent_id,omitempty"` // The scope of the task (database or host). - Scope *string `form:"scope,omitempty" json:"scope,omitempty" xml:"scope,omitempty"` + Scope *string `json:"scope"` // The entity ID (database_id or host_id) that this task belongs to. - EntityID *string `form:"entity_id,omitempty" json:"entity_id,omitempty" xml:"entity_id,omitempty"` + EntityID *string `json:"entity_id"` // The database ID of the task. - DatabaseID *string `form:"database_id,omitempty" json:"database_id,omitempty" xml:"database_id,omitempty"` + DatabaseID *string `json:"database_id,omitempty"` // The name of the node that the task is operating on. - NodeName *string `form:"node_name,omitempty" json:"node_name,omitempty" xml:"node_name,omitempty"` + NodeName *string `json:"node_name,omitempty"` // The ID of the instance that the task is operating on. - InstanceID *string `form:"instance_id,omitempty" json:"instance_id,omitempty" xml:"instance_id,omitempty"` + InstanceID *string `json:"instance_id,omitempty"` // The ID of the host that the task is running on. - HostID *string `form:"host_id,omitempty" json:"host_id,omitempty" xml:"host_id,omitempty"` + HostID *string `json:"host_id,omitempty"` // The unique ID of the task. - TaskID *string `form:"task_id,omitempty" json:"task_id,omitempty" xml:"task_id,omitempty"` + TaskID *string `json:"task_id"` // The time when the task was created. - CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` + CreatedAt *string `json:"created_at"` // The time when the task was completed. - CompletedAt *string `form:"completed_at,omitempty" json:"completed_at,omitempty" xml:"completed_at,omitempty"` + CompletedAt *string `json:"completed_at,omitempty"` // The type of the task. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type *string `json:"type"` // The status of the task. - Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` + Status *string `json:"status"` // The error message if the task failed. - Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` + Error *string `json:"error,omitempty"` } // GetHostTaskLogResponseBody is the type of the "control-plane" service // "get-host-task-log" endpoint HTTP response body. type GetHostTaskLogResponseBody struct { // The scope of the task (database or host). - Scope *string `form:"scope,omitempty" json:"scope,omitempty" xml:"scope,omitempty"` + Scope *string `json:"scope"` // The entity ID (database_id or host_id) that this task log belongs to. - EntityID *string `form:"entity_id,omitempty" json:"entity_id,omitempty" xml:"entity_id,omitempty"` + EntityID *string `json:"entity_id"` // The database ID of the task log. Deprecated: use entity_id instead. - DatabaseID *string `form:"database_id,omitempty" json:"database_id,omitempty" xml:"database_id,omitempty"` + DatabaseID *string `json:"database_id,omitempty"` // The unique ID of the task log. - TaskID *string `form:"task_id,omitempty" json:"task_id,omitempty" xml:"task_id,omitempty"` + TaskID *string `json:"task_id"` // The status of the task. - TaskStatus *string `form:"task_status,omitempty" json:"task_status,omitempty" xml:"task_status,omitempty"` + TaskStatus *string `json:"task_status"` // The ID of the last entry in the task log. - LastEntryID *string `form:"last_entry_id,omitempty" json:"last_entry_id,omitempty" xml:"last_entry_id,omitempty"` + LastEntryID *string `json:"last_entry_id,omitempty"` // Entries in the task log. - Entries []*TaskLogEntryResponseBody `form:"entries,omitempty" json:"entries,omitempty" xml:"entries,omitempty"` + Entries []*TaskLogEntryResponseBody `json:"entries"` } // ListTasksResponseBody is the type of the "control-plane" service // "list-tasks" endpoint HTTP response body. type ListTasksResponseBody struct { // The tasks for the given entity. - Tasks []*TaskResponseBody `form:"tasks,omitempty" json:"tasks,omitempty" xml:"tasks,omitempty"` + Tasks []*TaskResponseBody `json:"tasks"` } // RestoreDatabaseResponseBody is the type of the "control-plane" service // "restore-database" endpoint HTTP response body. type RestoreDatabaseResponseBody struct { // The task that will restore this database. - Task *TaskResponseBody `form:"task,omitempty" json:"task,omitempty" xml:"task,omitempty"` + Task *TaskResponseBody `json:"task"` // The tasks that will restore each database node. - NodeTasks []*TaskResponseBody `form:"node_tasks,omitempty" json:"node_tasks,omitempty" xml:"node_tasks,omitempty"` + NodeTasks []*TaskResponseBody `json:"node_tasks"` // The database being restored. - Database *DatabaseResponseBody `form:"database,omitempty" json:"database,omitempty" xml:"database,omitempty"` + Database *DatabaseResponseBody `json:"database"` } // GetVersionResponseBody is the type of the "control-plane" service // "get-version" endpoint HTTP response body. type GetVersionResponseBody struct { // The version of the API server. - Version *string `form:"version,omitempty" json:"version,omitempty" xml:"version,omitempty"` + Version *string `json:"version"` // The VCS revision of the API server. - Revision *string `form:"revision,omitempty" json:"revision,omitempty" xml:"revision,omitempty"` + Revision *string `json:"revision"` // The timestamp associated with the revision. - RevisionTime *string `form:"revision_time,omitempty" json:"revision_time,omitempty" xml:"revision_time,omitempty"` + RevisionTime *string `json:"revision_time"` // The CPU architecture of the API server. - Arch *string `form:"arch,omitempty" json:"arch,omitempty" xml:"arch,omitempty"` + Arch *string `json:"arch"` } // RestartInstanceResponseBody is the type of the "control-plane" service // "restart-instance" endpoint HTTP response body. type RestartInstanceResponseBody struct { // Task representing the restart operation - Task *TaskResponseBody `form:"task,omitempty" json:"task,omitempty" xml:"task,omitempty"` + Task *TaskResponseBody `json:"task"` } // StopInstanceResponseBody is the type of the "control-plane" service // "stop-instance" endpoint HTTP response body. type StopInstanceResponseBody struct { // Task representing the stop operation - Task *TaskResponseBody `form:"task,omitempty" json:"task,omitempty" xml:"task,omitempty"` + Task *TaskResponseBody `json:"task"` } // StartInstanceResponseBody is the type of the "control-plane" service // "start-instance" endpoint HTTP response body. type StartInstanceResponseBody struct { // Task representing the start operation - Task *TaskResponseBody `form:"task,omitempty" json:"task,omitempty" xml:"task,omitempty"` + Task *TaskResponseBody `json:"task"` } // CancelDatabaseTaskResponseBody is the type of the "control-plane" service // "cancel-database-task" endpoint HTTP response body. type CancelDatabaseTaskResponseBody struct { // The parent task ID of the task. - ParentID *string `form:"parent_id,omitempty" json:"parent_id,omitempty" xml:"parent_id,omitempty"` + ParentID *string `json:"parent_id,omitempty"` // The scope of the task (database or host). - Scope *string `form:"scope,omitempty" json:"scope,omitempty" xml:"scope,omitempty"` + Scope *string `json:"scope"` // The entity ID (database_id or host_id) that this task belongs to. - EntityID *string `form:"entity_id,omitempty" json:"entity_id,omitempty" xml:"entity_id,omitempty"` + EntityID *string `json:"entity_id"` // The database ID of the task. - DatabaseID *string `form:"database_id,omitempty" json:"database_id,omitempty" xml:"database_id,omitempty"` + DatabaseID *string `json:"database_id,omitempty"` // The name of the node that the task is operating on. - NodeName *string `form:"node_name,omitempty" json:"node_name,omitempty" xml:"node_name,omitempty"` + NodeName *string `json:"node_name,omitempty"` // The ID of the instance that the task is operating on. - InstanceID *string `form:"instance_id,omitempty" json:"instance_id,omitempty" xml:"instance_id,omitempty"` + InstanceID *string `json:"instance_id,omitempty"` // The ID of the host that the task is running on. - HostID *string `form:"host_id,omitempty" json:"host_id,omitempty" xml:"host_id,omitempty"` + HostID *string `json:"host_id,omitempty"` // The unique ID of the task. - TaskID *string `form:"task_id,omitempty" json:"task_id,omitempty" xml:"task_id,omitempty"` + TaskID *string `json:"task_id"` // The time when the task was created. - CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` + CreatedAt *string `json:"created_at"` // The time when the task was completed. - CompletedAt *string `form:"completed_at,omitempty" json:"completed_at,omitempty" xml:"completed_at,omitempty"` + CompletedAt *string `json:"completed_at,omitempty"` // The type of the task. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type *string `json:"type"` // The status of the task. - Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` + Status *string `json:"status"` // The error message if the task failed. - Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` + Error *string `json:"error,omitempty"` } // InitClusterClusterAlreadyInitializedResponseBody is the type of the @@ -458,9 +458,9 @@ type CancelDatabaseTaskResponseBody struct { // "cluster_already_initialized" error. type InitClusterClusterAlreadyInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // InitClusterOperationNotSupportedResponseBody is the type of the @@ -468,9 +468,9 @@ type InitClusterClusterAlreadyInitializedResponseBody struct { // "operation_not_supported" error. type InitClusterOperationNotSupportedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // InitClusterServerErrorResponseBody is the type of the "control-plane" @@ -478,9 +478,9 @@ type InitClusterOperationNotSupportedResponseBody struct { // error. type InitClusterServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // JoinClusterClusterAlreadyInitializedResponseBody is the type of the @@ -488,9 +488,9 @@ type InitClusterServerErrorResponseBody struct { // "cluster_already_initialized" error. type JoinClusterClusterAlreadyInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // JoinClusterInvalidJoinTokenResponseBody is the type of the "control-plane" @@ -498,9 +498,9 @@ type JoinClusterClusterAlreadyInitializedResponseBody struct { // "invalid_join_token" error. type JoinClusterInvalidJoinTokenResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // JoinClusterInvalidInputResponseBody is the type of the "control-plane" @@ -508,9 +508,9 @@ type JoinClusterInvalidJoinTokenResponseBody struct { // error. type JoinClusterInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // JoinClusterServerErrorResponseBody is the type of the "control-plane" @@ -518,9 +518,9 @@ type JoinClusterInvalidInputResponseBody struct { // error. type JoinClusterServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetJoinTokenClusterNotInitializedResponseBody is the type of the @@ -528,9 +528,9 @@ type JoinClusterServerErrorResponseBody struct { // "cluster_not_initialized" error. type GetJoinTokenClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetJoinTokenServerErrorResponseBody is the type of the "control-plane" @@ -538,9 +538,9 @@ type GetJoinTokenClusterNotInitializedResponseBody struct { // error. type GetJoinTokenServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetJoinOptionsClusterNotInitializedResponseBody is the type of the @@ -548,9 +548,9 @@ type GetJoinTokenServerErrorResponseBody struct { // the "cluster_not_initialized" error. type GetJoinOptionsClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetJoinOptionsInvalidJoinTokenResponseBody is the type of the @@ -558,9 +558,9 @@ type GetJoinOptionsClusterNotInitializedResponseBody struct { // the "invalid_join_token" error. type GetJoinOptionsInvalidJoinTokenResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetJoinOptionsInvalidInputResponseBody is the type of the "control-plane" @@ -568,9 +568,9 @@ type GetJoinOptionsInvalidJoinTokenResponseBody struct { // "invalid_input" error. type GetJoinOptionsInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetJoinOptionsServerErrorResponseBody is the type of the "control-plane" @@ -578,9 +578,9 @@ type GetJoinOptionsInvalidInputResponseBody struct { // "server_error" error. type GetJoinOptionsServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetClusterClusterNotInitializedResponseBody is the type of the @@ -588,18 +588,18 @@ type GetJoinOptionsServerErrorResponseBody struct { // "cluster_not_initialized" error. type GetClusterClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetClusterServerErrorResponseBody is the type of the "control-plane" service // "get-cluster" endpoint HTTP response body for the "server_error" error. type GetClusterServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // ListHostsClusterNotInitializedResponseBody is the type of the @@ -607,18 +607,18 @@ type GetClusterServerErrorResponseBody struct { // "cluster_not_initialized" error. type ListHostsClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // ListHostsServerErrorResponseBody is the type of the "control-plane" service // "list-hosts" endpoint HTTP response body for the "server_error" error. type ListHostsServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetHostClusterNotInitializedResponseBody is the type of the "control-plane" @@ -626,36 +626,36 @@ type ListHostsServerErrorResponseBody struct { // "cluster_not_initialized" error. type GetHostClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetHostInvalidInputResponseBody is the type of the "control-plane" service // "get-host" endpoint HTTP response body for the "invalid_input" error. type GetHostInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetHostNotFoundResponseBody is the type of the "control-plane" service // "get-host" endpoint HTTP response body for the "not_found" error. type GetHostNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetHostServerErrorResponseBody is the type of the "control-plane" service // "get-host" endpoint HTTP response body for the "server_error" error. type GetHostServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // RemoveHostClusterNotInitializedResponseBody is the type of the @@ -663,9 +663,9 @@ type GetHostServerErrorResponseBody struct { // "cluster_not_initialized" error. type RemoveHostClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // RemoveHostInvalidInputResponseBody is the type of the "control-plane" @@ -673,27 +673,27 @@ type RemoveHostClusterNotInitializedResponseBody struct { // error. type RemoveHostInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // RemoveHostNotFoundResponseBody is the type of the "control-plane" service // "remove-host" endpoint HTTP response body for the "not_found" error. type RemoveHostNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // RemoveHostServerErrorResponseBody is the type of the "control-plane" service // "remove-host" endpoint HTTP response body for the "server_error" error. type RemoveHostServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // ListDatabasesClusterNotInitializedResponseBody is the type of the @@ -701,9 +701,9 @@ type RemoveHostServerErrorResponseBody struct { // "cluster_not_initialized" error. type ListDatabasesClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // ListDatabasesServerErrorResponseBody is the type of the "control-plane" @@ -711,9 +711,9 @@ type ListDatabasesClusterNotInitializedResponseBody struct { // error. type ListDatabasesServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // CreateDatabaseDatabaseAlreadyExistsResponseBody is the type of the @@ -721,9 +721,9 @@ type ListDatabasesServerErrorResponseBody struct { // the "database_already_exists" error. type CreateDatabaseDatabaseAlreadyExistsResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // CreateDatabaseClusterNotInitializedResponseBody is the type of the @@ -731,9 +731,9 @@ type CreateDatabaseDatabaseAlreadyExistsResponseBody struct { // the "cluster_not_initialized" error. type CreateDatabaseClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // CreateDatabaseOperationAlreadyInProgressResponseBody is the type of the @@ -741,9 +741,9 @@ type CreateDatabaseClusterNotInitializedResponseBody struct { // the "operation_already_in_progress" error. type CreateDatabaseOperationAlreadyInProgressResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // CreateDatabaseInvalidInputResponseBody is the type of the "control-plane" @@ -751,9 +751,9 @@ type CreateDatabaseOperationAlreadyInProgressResponseBody struct { // "invalid_input" error. type CreateDatabaseInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // CreateDatabaseServerErrorResponseBody is the type of the "control-plane" @@ -761,9 +761,9 @@ type CreateDatabaseInvalidInputResponseBody struct { // error. type CreateDatabaseServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetDatabaseClusterNotInitializedResponseBody is the type of the @@ -771,9 +771,9 @@ type CreateDatabaseServerErrorResponseBody struct { // "cluster_not_initialized" error. type GetDatabaseClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetDatabaseInvalidInputResponseBody is the type of the "control-plane" @@ -781,18 +781,18 @@ type GetDatabaseClusterNotInitializedResponseBody struct { // error. type GetDatabaseInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetDatabaseNotFoundResponseBody is the type of the "control-plane" service // "get-database" endpoint HTTP response body for the "not_found" error. type GetDatabaseNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetDatabaseServerErrorResponseBody is the type of the "control-plane" @@ -800,9 +800,9 @@ type GetDatabaseNotFoundResponseBody struct { // error. type GetDatabaseServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // UpdateDatabaseClusterNotInitializedResponseBody is the type of the @@ -810,9 +810,9 @@ type GetDatabaseServerErrorResponseBody struct { // the "cluster_not_initialized" error. type UpdateDatabaseClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // UpdateDatabaseDatabaseNotModifiableResponseBody is the type of the @@ -820,9 +820,9 @@ type UpdateDatabaseClusterNotInitializedResponseBody struct { // the "database_not_modifiable" error. type UpdateDatabaseDatabaseNotModifiableResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // UpdateDatabaseOperationAlreadyInProgressResponseBody is the type of the @@ -830,9 +830,9 @@ type UpdateDatabaseDatabaseNotModifiableResponseBody struct { // the "operation_already_in_progress" error. type UpdateDatabaseOperationAlreadyInProgressResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // UpdateDatabaseInvalidInputResponseBody is the type of the "control-plane" @@ -840,9 +840,9 @@ type UpdateDatabaseOperationAlreadyInProgressResponseBody struct { // "invalid_input" error. type UpdateDatabaseInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // UpdateDatabaseNotFoundResponseBody is the type of the "control-plane" @@ -850,9 +850,9 @@ type UpdateDatabaseInvalidInputResponseBody struct { // error. type UpdateDatabaseNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // UpdateDatabaseServerErrorResponseBody is the type of the "control-plane" @@ -860,9 +860,9 @@ type UpdateDatabaseNotFoundResponseBody struct { // error. type UpdateDatabaseServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // DeleteDatabaseClusterNotInitializedResponseBody is the type of the @@ -870,9 +870,9 @@ type UpdateDatabaseServerErrorResponseBody struct { // the "cluster_not_initialized" error. type DeleteDatabaseClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // DeleteDatabaseDatabaseNotModifiableResponseBody is the type of the @@ -880,9 +880,9 @@ type DeleteDatabaseClusterNotInitializedResponseBody struct { // the "database_not_modifiable" error. type DeleteDatabaseDatabaseNotModifiableResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // DeleteDatabaseOperationAlreadyInProgressResponseBody is the type of the @@ -890,9 +890,9 @@ type DeleteDatabaseDatabaseNotModifiableResponseBody struct { // the "operation_already_in_progress" error. type DeleteDatabaseOperationAlreadyInProgressResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // DeleteDatabaseInvalidInputResponseBody is the type of the "control-plane" @@ -900,9 +900,9 @@ type DeleteDatabaseOperationAlreadyInProgressResponseBody struct { // "invalid_input" error. type DeleteDatabaseInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // DeleteDatabaseNotFoundResponseBody is the type of the "control-plane" @@ -910,9 +910,9 @@ type DeleteDatabaseInvalidInputResponseBody struct { // error. type DeleteDatabaseNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // DeleteDatabaseServerErrorResponseBody is the type of the "control-plane" @@ -920,9 +920,9 @@ type DeleteDatabaseNotFoundResponseBody struct { // error. type DeleteDatabaseServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // BackupDatabaseNodeClusterNotInitializedResponseBody is the type of the @@ -930,9 +930,9 @@ type DeleteDatabaseServerErrorResponseBody struct { // for the "cluster_not_initialized" error. type BackupDatabaseNodeClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // BackupDatabaseNodeDatabaseNotModifiableResponseBody is the type of the @@ -940,9 +940,9 @@ type BackupDatabaseNodeClusterNotInitializedResponseBody struct { // for the "database_not_modifiable" error. type BackupDatabaseNodeDatabaseNotModifiableResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // BackupDatabaseNodeOperationAlreadyInProgressResponseBody is the type of the @@ -950,9 +950,9 @@ type BackupDatabaseNodeDatabaseNotModifiableResponseBody struct { // for the "operation_already_in_progress" error. type BackupDatabaseNodeOperationAlreadyInProgressResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // BackupDatabaseNodeInvalidInputResponseBody is the type of the @@ -960,9 +960,9 @@ type BackupDatabaseNodeOperationAlreadyInProgressResponseBody struct { // for the "invalid_input" error. type BackupDatabaseNodeInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // BackupDatabaseNodeNotFoundResponseBody is the type of the "control-plane" @@ -970,9 +970,9 @@ type BackupDatabaseNodeInvalidInputResponseBody struct { // "not_found" error. type BackupDatabaseNodeNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // BackupDatabaseNodeServerErrorResponseBody is the type of the "control-plane" @@ -980,9 +980,9 @@ type BackupDatabaseNodeNotFoundResponseBody struct { // "server_error" error. type BackupDatabaseNodeServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // SwitchoverDatabaseNodeClusterNotInitializedResponseBody is the type of the @@ -990,9 +990,9 @@ type BackupDatabaseNodeServerErrorResponseBody struct { // body for the "cluster_not_initialized" error. type SwitchoverDatabaseNodeClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // SwitchoverDatabaseNodeDatabaseNotModifiableResponseBody is the type of the @@ -1000,9 +1000,9 @@ type SwitchoverDatabaseNodeClusterNotInitializedResponseBody struct { // body for the "database_not_modifiable" error. type SwitchoverDatabaseNodeDatabaseNotModifiableResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // SwitchoverDatabaseNodeOperationAlreadyInProgressResponseBody is the type of @@ -1010,9 +1010,9 @@ type SwitchoverDatabaseNodeDatabaseNotModifiableResponseBody struct { // response body for the "operation_already_in_progress" error. type SwitchoverDatabaseNodeOperationAlreadyInProgressResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // SwitchoverDatabaseNodeInvalidInputResponseBody is the type of the @@ -1020,9 +1020,9 @@ type SwitchoverDatabaseNodeOperationAlreadyInProgressResponseBody struct { // body for the "invalid_input" error. type SwitchoverDatabaseNodeInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // SwitchoverDatabaseNodeNotFoundResponseBody is the type of the @@ -1030,9 +1030,9 @@ type SwitchoverDatabaseNodeInvalidInputResponseBody struct { // body for the "not_found" error. type SwitchoverDatabaseNodeNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // SwitchoverDatabaseNodeServerErrorResponseBody is the type of the @@ -1040,9 +1040,9 @@ type SwitchoverDatabaseNodeNotFoundResponseBody struct { // body for the "server_error" error. type SwitchoverDatabaseNodeServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // FailoverDatabaseNodeClusterNotInitializedResponseBody is the type of the @@ -1050,9 +1050,9 @@ type SwitchoverDatabaseNodeServerErrorResponseBody struct { // for the "cluster_not_initialized" error. type FailoverDatabaseNodeClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // FailoverDatabaseNodeDatabaseNotModifiableResponseBody is the type of the @@ -1060,9 +1060,9 @@ type FailoverDatabaseNodeClusterNotInitializedResponseBody struct { // for the "database_not_modifiable" error. type FailoverDatabaseNodeDatabaseNotModifiableResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // FailoverDatabaseNodeOperationAlreadyInProgressResponseBody is the type of @@ -1070,9 +1070,9 @@ type FailoverDatabaseNodeDatabaseNotModifiableResponseBody struct { // body for the "operation_already_in_progress" error. type FailoverDatabaseNodeOperationAlreadyInProgressResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // FailoverDatabaseNodeInvalidInputResponseBody is the type of the @@ -1080,9 +1080,9 @@ type FailoverDatabaseNodeOperationAlreadyInProgressResponseBody struct { // for the "invalid_input" error. type FailoverDatabaseNodeInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // FailoverDatabaseNodeNotFoundResponseBody is the type of the "control-plane" @@ -1090,9 +1090,9 @@ type FailoverDatabaseNodeInvalidInputResponseBody struct { // "not_found" error. type FailoverDatabaseNodeNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // FailoverDatabaseNodeServerErrorResponseBody is the type of the @@ -1100,9 +1100,9 @@ type FailoverDatabaseNodeNotFoundResponseBody struct { // for the "server_error" error. type FailoverDatabaseNodeServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // ListDatabaseTasksClusterNotInitializedResponseBody is the type of the @@ -1110,9 +1110,9 @@ type FailoverDatabaseNodeServerErrorResponseBody struct { // for the "cluster_not_initialized" error. type ListDatabaseTasksClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // ListDatabaseTasksInvalidInputResponseBody is the type of the "control-plane" @@ -1120,9 +1120,9 @@ type ListDatabaseTasksClusterNotInitializedResponseBody struct { // "invalid_input" error. type ListDatabaseTasksInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // ListDatabaseTasksNotFoundResponseBody is the type of the "control-plane" @@ -1130,9 +1130,9 @@ type ListDatabaseTasksInvalidInputResponseBody struct { // "not_found" error. type ListDatabaseTasksNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // ListDatabaseTasksServerErrorResponseBody is the type of the "control-plane" @@ -1140,9 +1140,9 @@ type ListDatabaseTasksNotFoundResponseBody struct { // "server_error" error. type ListDatabaseTasksServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetDatabaseTaskClusterNotInitializedResponseBody is the type of the @@ -1150,9 +1150,9 @@ type ListDatabaseTasksServerErrorResponseBody struct { // the "cluster_not_initialized" error. type GetDatabaseTaskClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetDatabaseTaskInvalidInputResponseBody is the type of the "control-plane" @@ -1160,9 +1160,9 @@ type GetDatabaseTaskClusterNotInitializedResponseBody struct { // "invalid_input" error. type GetDatabaseTaskInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetDatabaseTaskNotFoundResponseBody is the type of the "control-plane" @@ -1170,9 +1170,9 @@ type GetDatabaseTaskInvalidInputResponseBody struct { // error. type GetDatabaseTaskNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetDatabaseTaskServerErrorResponseBody is the type of the "control-plane" @@ -1180,9 +1180,9 @@ type GetDatabaseTaskNotFoundResponseBody struct { // "server_error" error. type GetDatabaseTaskServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetDatabaseTaskLogClusterNotInitializedResponseBody is the type of the @@ -1190,9 +1190,9 @@ type GetDatabaseTaskServerErrorResponseBody struct { // for the "cluster_not_initialized" error. type GetDatabaseTaskLogClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetDatabaseTaskLogInvalidInputResponseBody is the type of the @@ -1200,9 +1200,9 @@ type GetDatabaseTaskLogClusterNotInitializedResponseBody struct { // for the "invalid_input" error. type GetDatabaseTaskLogInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetDatabaseTaskLogNotFoundResponseBody is the type of the "control-plane" @@ -1210,9 +1210,9 @@ type GetDatabaseTaskLogInvalidInputResponseBody struct { // "not_found" error. type GetDatabaseTaskLogNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetDatabaseTaskLogServerErrorResponseBody is the type of the "control-plane" @@ -1220,9 +1220,9 @@ type GetDatabaseTaskLogNotFoundResponseBody struct { // "server_error" error. type GetDatabaseTaskLogServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // ListHostTasksClusterNotInitializedResponseBody is the type of the @@ -1230,9 +1230,9 @@ type GetDatabaseTaskLogServerErrorResponseBody struct { // the "cluster_not_initialized" error. type ListHostTasksClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // ListHostTasksInvalidInputResponseBody is the type of the "control-plane" @@ -1240,18 +1240,18 @@ type ListHostTasksClusterNotInitializedResponseBody struct { // "invalid_input" error. type ListHostTasksInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // ListHostTasksNotFoundResponseBody is the type of the "control-plane" service // "list-host-tasks" endpoint HTTP response body for the "not_found" error. type ListHostTasksNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // ListHostTasksServerErrorResponseBody is the type of the "control-plane" @@ -1259,9 +1259,9 @@ type ListHostTasksNotFoundResponseBody struct { // error. type ListHostTasksServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetHostTaskClusterNotInitializedResponseBody is the type of the @@ -1269,9 +1269,9 @@ type ListHostTasksServerErrorResponseBody struct { // "cluster_not_initialized" error. type GetHostTaskClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetHostTaskInvalidInputResponseBody is the type of the "control-plane" @@ -1279,18 +1279,18 @@ type GetHostTaskClusterNotInitializedResponseBody struct { // error. type GetHostTaskInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetHostTaskNotFoundResponseBody is the type of the "control-plane" service // "get-host-task" endpoint HTTP response body for the "not_found" error. type GetHostTaskNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetHostTaskServerErrorResponseBody is the type of the "control-plane" @@ -1298,9 +1298,9 @@ type GetHostTaskNotFoundResponseBody struct { // error. type GetHostTaskServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetHostTaskLogClusterNotInitializedResponseBody is the type of the @@ -1308,9 +1308,9 @@ type GetHostTaskServerErrorResponseBody struct { // the "cluster_not_initialized" error. type GetHostTaskLogClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetHostTaskLogInvalidInputResponseBody is the type of the "control-plane" @@ -1318,9 +1318,9 @@ type GetHostTaskLogClusterNotInitializedResponseBody struct { // "invalid_input" error. type GetHostTaskLogInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetHostTaskLogNotFoundResponseBody is the type of the "control-plane" @@ -1328,9 +1328,9 @@ type GetHostTaskLogInvalidInputResponseBody struct { // error. type GetHostTaskLogNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetHostTaskLogServerErrorResponseBody is the type of the "control-plane" @@ -1338,9 +1338,9 @@ type GetHostTaskLogNotFoundResponseBody struct { // "server_error" error. type GetHostTaskLogServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // ListTasksClusterNotInitializedResponseBody is the type of the @@ -1348,27 +1348,27 @@ type GetHostTaskLogServerErrorResponseBody struct { // "cluster_not_initialized" error. type ListTasksClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // ListTasksInvalidInputResponseBody is the type of the "control-plane" service // "list-tasks" endpoint HTTP response body for the "invalid_input" error. type ListTasksInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // ListTasksServerErrorResponseBody is the type of the "control-plane" service // "list-tasks" endpoint HTTP response body for the "server_error" error. type ListTasksServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // RestoreDatabaseClusterNotInitializedResponseBody is the type of the @@ -1376,9 +1376,9 @@ type ListTasksServerErrorResponseBody struct { // the "cluster_not_initialized" error. type RestoreDatabaseClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // RestoreDatabaseDatabaseNotModifiableResponseBody is the type of the @@ -1386,9 +1386,9 @@ type RestoreDatabaseClusterNotInitializedResponseBody struct { // the "database_not_modifiable" error. type RestoreDatabaseDatabaseNotModifiableResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // RestoreDatabaseOperationAlreadyInProgressResponseBody is the type of the @@ -1396,9 +1396,9 @@ type RestoreDatabaseDatabaseNotModifiableResponseBody struct { // the "operation_already_in_progress" error. type RestoreDatabaseOperationAlreadyInProgressResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // RestoreDatabaseInvalidInputResponseBody is the type of the "control-plane" @@ -1406,9 +1406,9 @@ type RestoreDatabaseOperationAlreadyInProgressResponseBody struct { // "invalid_input" error. type RestoreDatabaseInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // RestoreDatabaseNotFoundResponseBody is the type of the "control-plane" @@ -1416,9 +1416,9 @@ type RestoreDatabaseInvalidInputResponseBody struct { // error. type RestoreDatabaseNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // RestoreDatabaseServerErrorResponseBody is the type of the "control-plane" @@ -1426,18 +1426,18 @@ type RestoreDatabaseNotFoundResponseBody struct { // "server_error" error. type RestoreDatabaseServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // GetVersionServerErrorResponseBody is the type of the "control-plane" service // "get-version" endpoint HTTP response body for the "server_error" error. type GetVersionServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // RestartInstanceClusterNotInitializedResponseBody is the type of the @@ -1445,9 +1445,9 @@ type GetVersionServerErrorResponseBody struct { // the "cluster_not_initialized" error. type RestartInstanceClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // RestartInstanceInvalidInputResponseBody is the type of the "control-plane" @@ -1455,9 +1455,9 @@ type RestartInstanceClusterNotInitializedResponseBody struct { // "invalid_input" error. type RestartInstanceInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // RestartInstanceNotFoundResponseBody is the type of the "control-plane" @@ -1465,9 +1465,9 @@ type RestartInstanceInvalidInputResponseBody struct { // error. type RestartInstanceNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // RestartInstanceServerErrorResponseBody is the type of the "control-plane" @@ -1475,9 +1475,9 @@ type RestartInstanceNotFoundResponseBody struct { // "server_error" error. type RestartInstanceServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // StopInstanceClusterNotInitializedResponseBody is the type of the @@ -1485,9 +1485,9 @@ type RestartInstanceServerErrorResponseBody struct { // "cluster_not_initialized" error. type StopInstanceClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // StopInstanceInvalidInputResponseBody is the type of the "control-plane" @@ -1495,18 +1495,18 @@ type StopInstanceClusterNotInitializedResponseBody struct { // error. type StopInstanceInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // StopInstanceNotFoundResponseBody is the type of the "control-plane" service // "stop-instance" endpoint HTTP response body for the "not_found" error. type StopInstanceNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // StopInstanceServerErrorResponseBody is the type of the "control-plane" @@ -1514,9 +1514,9 @@ type StopInstanceNotFoundResponseBody struct { // error. type StopInstanceServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // StartInstanceClusterNotInitializedResponseBody is the type of the @@ -1524,9 +1524,9 @@ type StopInstanceServerErrorResponseBody struct { // "cluster_not_initialized" error. type StartInstanceClusterNotInitializedResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // StartInstanceInvalidInputResponseBody is the type of the "control-plane" @@ -1534,18 +1534,18 @@ type StartInstanceClusterNotInitializedResponseBody struct { // error. type StartInstanceInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // StartInstanceNotFoundResponseBody is the type of the "control-plane" service // "start-instance" endpoint HTTP response body for the "not_found" error. type StartInstanceNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // StartInstanceServerErrorResponseBody is the type of the "control-plane" @@ -1553,9 +1553,9 @@ type StartInstanceNotFoundResponseBody struct { // error. type StartInstanceServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // CancelDatabaseTaskNotFoundResponseBody is the type of the "control-plane" @@ -1563,9 +1563,9 @@ type StartInstanceServerErrorResponseBody struct { // "not_found" error. type CancelDatabaseTaskNotFoundResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // CancelDatabaseTaskInvalidInputResponseBody is the type of the @@ -1573,9 +1573,9 @@ type CancelDatabaseTaskNotFoundResponseBody struct { // for the "invalid_input" error. type CancelDatabaseTaskInvalidInputResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // CancelDatabaseTaskServerErrorResponseBody is the type of the "control-plane" @@ -1583,1130 +1583,1130 @@ type CancelDatabaseTaskInvalidInputResponseBody struct { // "server_error" error. type CancelDatabaseTaskServerErrorResponseBody struct { // The name of the error. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The error message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` } // EtcdClusterMemberResponseBody is used to define fields on response body // types. type EtcdClusterMemberResponseBody struct { // The name of the Etcd cluster member. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The Etcd peer endpoint for this cluster member. - PeerUrls []string `form:"peer_urls,omitempty" json:"peer_urls,omitempty" xml:"peer_urls,omitempty"` + PeerUrls []string `json:"peer_urls"` // The Etcd client endpoint for this cluster member. - ClientUrls []string `form:"client_urls,omitempty" json:"client_urls,omitempty" xml:"client_urls,omitempty"` + ClientUrls []string `json:"client_urls"` } // ClusterCredentialsResponseBody is used to define fields on response body // types. type ClusterCredentialsResponseBody struct { // The Etcd username for the new host. - Username *string `form:"username,omitempty" json:"username,omitempty" xml:"username,omitempty"` + Username *string `json:"username"` // The Etcd password for the new host. - Password *string `form:"password,omitempty" json:"password,omitempty" xml:"password,omitempty"` + Password *string `json:"password"` // The base64-encoded CA certificate for the cluster. - CaCert *string `form:"ca_cert,omitempty" json:"ca_cert,omitempty" xml:"ca_cert,omitempty"` + CaCert *string `json:"ca_cert"` // The base64-encoded etcd client certificate for the new cluster member. - ClientCert *string `form:"client_cert,omitempty" json:"client_cert,omitempty" xml:"client_cert,omitempty"` + ClientCert *string `json:"client_cert"` // The base64-encoded etcd client key for the new cluster member. - ClientKey *string `form:"client_key,omitempty" json:"client_key,omitempty" xml:"client_key,omitempty"` + ClientKey *string `json:"client_key"` // The base64-encoded etcd server certificate for the new cluster member. - ServerCert *string `form:"server_cert,omitempty" json:"server_cert,omitempty" xml:"server_cert,omitempty"` + ServerCert *string `json:"server_cert"` // The base64-encoded etcd server key for the new cluster member. - ServerKey *string `form:"server_key,omitempty" json:"server_key,omitempty" xml:"server_key,omitempty"` + ServerKey *string `json:"server_key"` } // ClusterStatusResponseBody is used to define fields on response body types. type ClusterStatusResponseBody struct { // The current state of the cluster. - State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` + State *string `json:"state"` } // HostResponseBody is used to define fields on response body types. type HostResponseBody struct { // Unique identifier for the host. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id"` // The orchestrator used by this host. - Orchestrator *string `form:"orchestrator,omitempty" json:"orchestrator,omitempty" xml:"orchestrator,omitempty"` + Orchestrator *string `json:"orchestrator"` // The data directory for the host. - DataDir *string `form:"data_dir,omitempty" json:"data_dir,omitempty" xml:"data_dir,omitempty"` + DataDir *string `json:"data_dir"` // The cohort that this host belongs to. - Cohort *HostCohortResponseBody `form:"cohort,omitempty" json:"cohort,omitempty" xml:"cohort,omitempty"` + Cohort *HostCohortResponseBody `json:"cohort,omitempty"` // The hostname of this host. - Hostname *string `form:"hostname,omitempty" json:"hostname,omitempty" xml:"hostname,omitempty"` + Hostname *string `json:"hostname"` // The IPv4 address of this host. - Ipv4Address *string `form:"ipv4_address,omitempty" json:"ipv4_address,omitempty" xml:"ipv4_address,omitempty"` + Ipv4Address *string `json:"ipv4_address"` // The number of CPUs on this host. - Cpus *int `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *int `json:"cpus,omitempty"` // The amount of memory available on this host. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // Current status of the host. - Status *HostStatusResponseBody `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` + Status *HostStatusResponseBody `json:"status"` // The default PgEdge version for this host. - DefaultPgedgeVersion *PgEdgeVersionResponseBody `form:"default_pgedge_version,omitempty" json:"default_pgedge_version,omitempty" xml:"default_pgedge_version,omitempty"` + DefaultPgedgeVersion *PgEdgeVersionResponseBody `json:"default_pgedge_version,omitempty"` // The PgEdge versions supported by this host. - SupportedPgedgeVersions []*PgEdgeVersionResponseBody `form:"supported_pgedge_versions,omitempty" json:"supported_pgedge_versions,omitempty" xml:"supported_pgedge_versions,omitempty"` + SupportedPgedgeVersions []*PgEdgeVersionResponseBody `json:"supported_pgedge_versions,omitempty"` // The etcd mode for this host. - EtcdMode *string `form:"etcd_mode,omitempty" json:"etcd_mode,omitempty" xml:"etcd_mode,omitempty"` + EtcdMode *string `json:"etcd_mode,omitempty"` } // HostCohortResponseBody is used to define fields on response body types. type HostCohortResponseBody struct { // The type of cohort that the host belongs to. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type *string `json:"type"` // The member ID of the host within the cohort. - MemberID *string `form:"member_id,omitempty" json:"member_id,omitempty" xml:"member_id,omitempty"` + MemberID *string `json:"member_id"` // Indicates if the host is a control node in the cohort. - ControlAvailable *bool `form:"control_available,omitempty" json:"control_available,omitempty" xml:"control_available,omitempty"` + ControlAvailable *bool `json:"control_available"` } // HostStatusResponseBody is used to define fields on response body types. type HostStatusResponseBody struct { - State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` + State *string `json:"state"` // The last time the host status was updated. - UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` + UpdatedAt *string `json:"updated_at"` // The status of each component of the host. - Components map[string]*ComponentStatusResponseBody `form:"components,omitempty" json:"components,omitempty" xml:"components,omitempty"` + Components map[string]*ComponentStatusResponseBody `json:"components"` } // ComponentStatusResponseBody is used to define fields on response body types. type ComponentStatusResponseBody struct { // Indicates if the component is healthy. - Healthy *bool `form:"healthy,omitempty" json:"healthy,omitempty" xml:"healthy,omitempty"` + Healthy *bool `json:"healthy"` // Error message from any errors that occurred during the health check. - Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` + Error *string `json:"error,omitempty"` // Additional details about the component. - Details map[string]any `form:"details,omitempty" json:"details,omitempty" xml:"details,omitempty"` + Details map[string]any `json:"details,omitempty"` } // PgEdgeVersionResponseBody is used to define fields on response body types. type PgEdgeVersionResponseBody struct { // The Postgres major and minor version. - PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` + PostgresVersion *string `json:"postgres_version"` // The Spock major version. - SpockVersion *string `form:"spock_version,omitempty" json:"spock_version,omitempty" xml:"spock_version,omitempty"` + SpockVersion *string `json:"spock_version"` } // TaskResponseBody is used to define fields on response body types. type TaskResponseBody struct { // The parent task ID of the task. - ParentID *string `form:"parent_id,omitempty" json:"parent_id,omitempty" xml:"parent_id,omitempty"` + ParentID *string `json:"parent_id,omitempty"` // The scope of the task (database or host). - Scope *string `form:"scope,omitempty" json:"scope,omitempty" xml:"scope,omitempty"` + Scope *string `json:"scope"` // The entity ID (database_id or host_id) that this task belongs to. - EntityID *string `form:"entity_id,omitempty" json:"entity_id,omitempty" xml:"entity_id,omitempty"` + EntityID *string `json:"entity_id"` // The database ID of the task. - DatabaseID *string `form:"database_id,omitempty" json:"database_id,omitempty" xml:"database_id,omitempty"` + DatabaseID *string `json:"database_id,omitempty"` // The name of the node that the task is operating on. - NodeName *string `form:"node_name,omitempty" json:"node_name,omitempty" xml:"node_name,omitempty"` + NodeName *string `json:"node_name,omitempty"` // The ID of the instance that the task is operating on. - InstanceID *string `form:"instance_id,omitempty" json:"instance_id,omitempty" xml:"instance_id,omitempty"` + InstanceID *string `json:"instance_id,omitempty"` // The ID of the host that the task is running on. - HostID *string `form:"host_id,omitempty" json:"host_id,omitempty" xml:"host_id,omitempty"` + HostID *string `json:"host_id,omitempty"` // The unique ID of the task. - TaskID *string `form:"task_id,omitempty" json:"task_id,omitempty" xml:"task_id,omitempty"` + TaskID *string `json:"task_id"` // The time when the task was created. - CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` + CreatedAt *string `json:"created_at"` // The time when the task was completed. - CompletedAt *string `form:"completed_at,omitempty" json:"completed_at,omitempty" xml:"completed_at,omitempty"` + CompletedAt *string `json:"completed_at,omitempty"` // The type of the task. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type *string `json:"type"` // The status of the task. - Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` + Status *string `json:"status"` // The error message if the task failed. - Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` + Error *string `json:"error,omitempty"` } // DatabaseSummaryResponseBody is used to define fields on response body types. type DatabaseSummaryResponseBody struct { // Unique identifier for the database. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id"` // Unique identifier for the database's owner. - TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` + TenantID *string `json:"tenant_id,omitempty"` // The time that the database was created. - CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` + CreatedAt *string `json:"created_at"` // The time that the database was last updated. - UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` + UpdatedAt *string `json:"updated_at"` // Current state of the database. - State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` + State *string `json:"state"` // All of the instances in the database. - Instances []*InstanceResponseBody `form:"instances,omitempty" json:"instances,omitempty" xml:"instances,omitempty"` + Instances []*InstanceResponseBody `json:"instances,omitempty"` } // InstanceResponseBody is used to define fields on response body types. type InstanceResponseBody struct { // Unique identifier for the instance. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id"` // The ID of the host this instance is running on. - HostID *string `form:"host_id,omitempty" json:"host_id,omitempty" xml:"host_id,omitempty"` + HostID *string `json:"host_id"` // The Spock node name for this instance. - NodeName *string `form:"node_name,omitempty" json:"node_name,omitempty" xml:"node_name,omitempty"` + NodeName *string `json:"node_name"` // The time that the instance was created. - CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` + CreatedAt *string `json:"created_at"` // The time that the instance was last modified. - UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` + UpdatedAt *string `json:"updated_at"` // The time that the instance status information was last updated. - StatusUpdatedAt *string `form:"status_updated_at,omitempty" json:"status_updated_at,omitempty" xml:"status_updated_at,omitempty"` - State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` + StatusUpdatedAt *string `json:"status_updated_at,omitempty"` + State *string `json:"state"` // Connection information for the instance. - ConnectionInfo *InstanceConnectionInfoResponseBody `form:"connection_info,omitempty" json:"connection_info,omitempty" xml:"connection_info,omitempty"` + ConnectionInfo *InstanceConnectionInfoResponseBody `json:"connection_info,omitempty"` // Postgres status information for the instance. - Postgres *InstancePostgresStatusResponseBody `form:"postgres,omitempty" json:"postgres,omitempty" xml:"postgres,omitempty"` + Postgres *InstancePostgresStatusResponseBody `json:"postgres,omitempty"` // Spock status information for the instance. - Spock *InstanceSpockStatusResponseBody `form:"spock,omitempty" json:"spock,omitempty" xml:"spock,omitempty"` + Spock *InstanceSpockStatusResponseBody `json:"spock,omitempty"` // An error message if the instance is in an error state. - Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` + Error *string `json:"error,omitempty"` } // InstanceConnectionInfoResponseBody is used to define fields on response body // types. type InstanceConnectionInfoResponseBody struct { // The hostname of the host that's running this instance. - Hostname *string `form:"hostname,omitempty" json:"hostname,omitempty" xml:"hostname,omitempty"` + Hostname *string `json:"hostname,omitempty"` // The IPv4 address of the host that's running this instance. - Ipv4Address *string `form:"ipv4_address,omitempty" json:"ipv4_address,omitempty" xml:"ipv4_address,omitempty"` + Ipv4Address *string `json:"ipv4_address,omitempty"` // The host port that Postgres is listening on for this instance. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` } // InstancePostgresStatusResponseBody is used to define fields on response body // types. type InstancePostgresStatusResponseBody struct { // The version of Postgres for this instance. - Version *string `form:"version,omitempty" json:"version,omitempty" xml:"version,omitempty"` - PatroniState *string `form:"patroni_state,omitempty" json:"patroni_state,omitempty" xml:"patroni_state,omitempty"` - Role *string `form:"role,omitempty" json:"role,omitempty" xml:"role,omitempty"` + Version *string `json:"version,omitempty"` + PatroniState *string `json:"patroni_state,omitempty"` + Role *string `json:"role,omitempty"` // True if this instance has a pending restart from a configuration change. - PendingRestart *bool `form:"pending_restart,omitempty" json:"pending_restart,omitempty" xml:"pending_restart,omitempty"` + PendingRestart *bool `json:"pending_restart,omitempty"` // True if Patroni is paused for this instance. - PatroniPaused *bool `form:"patroni_paused,omitempty" json:"patroni_paused,omitempty" xml:"patroni_paused,omitempty"` + PatroniPaused *bool `json:"patroni_paused,omitempty"` } // InstanceSpockStatusResponseBody is used to define fields on response body // types. type InstanceSpockStatusResponseBody struct { // The current spock.readonly setting. - ReadOnly *string `form:"read_only,omitempty" json:"read_only,omitempty" xml:"read_only,omitempty"` + ReadOnly *string `json:"read_only,omitempty"` // The version of Spock for this instance. - Version *string `form:"version,omitempty" json:"version,omitempty" xml:"version,omitempty"` + Version *string `json:"version,omitempty"` // Status information for this instance's Spock subscriptions. - Subscriptions []*InstanceSubscriptionResponseBody `form:"subscriptions,omitempty" json:"subscriptions,omitempty" xml:"subscriptions,omitempty"` + Subscriptions []*InstanceSubscriptionResponseBody `json:"subscriptions,omitempty"` } // InstanceSubscriptionResponseBody is used to define fields on response body // types. type InstanceSubscriptionResponseBody struct { // The Spock node name of the provider for this subscription. - ProviderNode *string `form:"provider_node,omitempty" json:"provider_node,omitempty" xml:"provider_node,omitempty"` + ProviderNode *string `json:"provider_node"` // The name of the subscription. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The current status of the subscription. - Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` + Status *string `json:"status"` } // DatabaseSpecRequestBody is used to define fields on request body types. type DatabaseSpecRequestBody struct { // The name of the Postgres database. - DatabaseName string `form:"database_name" json:"database_name" xml:"database_name"` + DatabaseName string `json:"database_name"` // The Postgres version in 'major.minor' format. - PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` + PostgresVersion *string `json:"postgres_version,omitempty"` // The major version of the Spock extension. - SpockVersion *string `form:"spock_version,omitempty" json:"spock_version,omitempty" xml:"spock_version,omitempty"` + SpockVersion *string `json:"spock_version,omitempty"` // The port used by the Postgres database. If the port is 0, each instance will // be assigned a random port. If the port is unspecified, the database will not // be exposed on any port, dependent on orchestrator support for that feature. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // The number of CPUs to allocate for the database and to use for tuning // Postgres. Defaults to the number of available CPUs on the host. Can include // an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced // depends on the orchestrator. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for the database and // to use for tuning Postgres. Defaults to the total available memory on the // host. Whether this limit is enforced depends on the orchestrator. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // The Spock nodes for this database. - Nodes []*DatabaseNodeSpecRequestBody `form:"nodes" json:"nodes" xml:"nodes"` + Nodes []*DatabaseNodeSpecRequestBody `json:"nodes"` // The users to create for this database. - DatabaseUsers []*DatabaseUserSpecRequestBody `form:"database_users,omitempty" json:"database_users,omitempty" xml:"database_users,omitempty"` + DatabaseUsers []*DatabaseUserSpecRequestBody `json:"database_users,omitempty"` // Service instances to run alongside the database (e.g., MCP servers). - Services []*ServiceSpecRequestBody `form:"services,omitempty" json:"services,omitempty" xml:"services,omitempty"` + Services []*ServiceSpecRequestBody `json:"services,omitempty"` // The backup configuration for this database. - BackupConfig *BackupConfigSpecRequestBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecRequestBody `json:"backup_config,omitempty"` // The restore configuration for this database. - RestoreConfig *RestoreConfigSpecRequestBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecRequestBody `json:"restore_config,omitempty"` // Additional postgresql.conf settings. Will be merged with the settings // provided by control-plane. - PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` + PostgresqlConf map[string]any `json:"postgresql_conf,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsRequestBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsRequestBody `json:"orchestrator_opts,omitempty"` } // DatabaseNodeSpecRequestBody is used to define fields on request body types. type DatabaseNodeSpecRequestBody struct { // The name of the database node. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The IDs of the hosts that should run this node. When multiple hosts are // specified, one host will chosen as a primary, and the others will be read // replicas. - HostIds []string `form:"host_ids" json:"host_ids" xml:"host_ids"` + HostIds []string `json:"host_ids"` // The Postgres version for this node in 'major.minor' format. Overrides the // Postgres version set in the DatabaseSpec. - PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` + PostgresVersion *string `json:"postgres_version,omitempty"` // The port used by the Postgres database for this node. Overrides the Postgres // port set in the DatabaseSpec. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // The number of CPUs to allocate for the database on this node and to use for // tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 // millicpus. Cannot allocate units smaller than 1m. Defaults to the number of // available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs // than are available on the host. Whether this limit is enforced depends on // the orchestrator. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for the database on // this node and to use for tuning Postgres. Defaults to the total available // memory on the host. Whether this limit is enforced depends on the // orchestrator. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // Additional postgresql.conf settings for this particular node. Will be merged // with the settings provided by control-plane. - PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` + PostgresqlConf map[string]any `json:"postgresql_conf,omitempty"` // The backup configuration for this node. Overrides the backup configuration // set in the DatabaseSpec. - BackupConfig *BackupConfigSpecRequestBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecRequestBody `json:"backup_config,omitempty"` // The restore configuration for this node. Overrides the restore configuration // set in the DatabaseSpec. - RestoreConfig *RestoreConfigSpecRequestBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecRequestBody `json:"restore_config,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsRequestBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsRequestBody `json:"orchestrator_opts,omitempty"` // The name of the source node to use for sync. This is typically the node // (like 'n1') from which the data will be copied to initialize this new node. - SourceNode *string `form:"source_node,omitempty" json:"source_node,omitempty" xml:"source_node,omitempty"` + SourceNode *string `json:"source_node,omitempty"` } // BackupConfigSpecRequestBody is used to define fields on request body types. type BackupConfigSpecRequestBody struct { // The repositories for this backup configuration. - Repositories []*BackupRepositorySpecRequestBody `form:"repositories" json:"repositories" xml:"repositories"` + Repositories []*BackupRepositorySpecRequestBody `json:"repositories"` // The schedules for this backup configuration. - Schedules []*BackupScheduleSpecRequestBody `form:"schedules,omitempty" json:"schedules,omitempty" xml:"schedules,omitempty"` + Schedules []*BackupScheduleSpecRequestBody `json:"schedules,omitempty"` } // BackupRepositorySpecRequestBody is used to define fields on request body // types. type BackupRepositorySpecRequestBody struct { // The unique identifier of this repository. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id,omitempty"` // The type of this repository. - Type string `form:"type" json:"type" xml:"type"` + Type string `json:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` + S3Bucket *string `json:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = // 's3'. - S3Region *string `form:"s3_region,omitempty" json:"s3_region,omitempty" xml:"s3_region,omitempty"` + S3Region *string `json:"s3_region,omitempty"` // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string `form:"s3_endpoint,omitempty" json:"s3_endpoint,omitempty" xml:"s3_endpoint,omitempty"` + S3Endpoint *string `json:"s3_endpoint,omitempty"` // An optional AWS access key ID to use for this repository. If not provided, // pgbackrest will use the default credential provider chain. This field will // be excluded from the response of all endpoints. It can also be omitted from // update requests to keep the current value. - S3Key *string `form:"s3_key,omitempty" json:"s3_key,omitempty" xml:"s3_key,omitempty"` + S3Key *string `json:"s3_key,omitempty"` // The corresponding secret for the AWS access key ID in s3_key. This field // will be excluded from the response of all endpoints. It can also be omitted // from update requests to keep the current value. - S3KeySecret *string `form:"s3_key_secret,omitempty" json:"s3_key_secret,omitempty" xml:"s3_key_secret,omitempty"` + S3KeySecret *string `json:"s3_key_secret,omitempty"` // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string `form:"gcs_bucket,omitempty" json:"gcs_bucket,omitempty" xml:"gcs_bucket,omitempty"` + GcsBucket *string `json:"gcs_bucket,omitempty"` // The optional GCS endpoint for this repository. Only applies when type = // 'gcs'. - GcsEndpoint *string `form:"gcs_endpoint,omitempty" json:"gcs_endpoint,omitempty" xml:"gcs_endpoint,omitempty"` + GcsEndpoint *string `json:"gcs_endpoint,omitempty"` // Optional base64-encoded private key data. If omitted, pgbackrest will use // the service account attached to the instance profile. This field will be // excluded from the response of all endpoints. It can also be omitted from // update requests to keep the current value. - GcsKey *string `form:"gcs_key,omitempty" json:"gcs_key,omitempty" xml:"gcs_key,omitempty"` + GcsKey *string `json:"gcs_key,omitempty"` // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string `form:"azure_account,omitempty" json:"azure_account,omitempty" xml:"azure_account,omitempty"` + AzureAccount *string `json:"azure_account,omitempty"` // The Azure container name for this repository. Only applies when type = // 'azure'. - AzureContainer *string `form:"azure_container,omitempty" json:"azure_container,omitempty" xml:"azure_container,omitempty"` + AzureContainer *string `json:"azure_container,omitempty"` // The optional Azure endpoint for this repository. Only applies when type = // 'azure'. - AzureEndpoint *string `form:"azure_endpoint,omitempty" json:"azure_endpoint,omitempty" xml:"azure_endpoint,omitempty"` + AzureEndpoint *string `json:"azure_endpoint,omitempty"` // The Azure storage account access key to use for this repository. This field // will be excluded from the response of all endpoints. It can also be omitted // from update requests to keep the current value. - AzureKey *string `form:"azure_key,omitempty" json:"azure_key,omitempty" xml:"azure_key,omitempty"` + AzureKey *string `json:"azure_key,omitempty"` // The count of full backups to retain or the time to retain full backups. - RetentionFull *int `form:"retention_full,omitempty" json:"retention_full,omitempty" xml:"retention_full,omitempty"` + RetentionFull *int `json:"retention_full,omitempty"` // The type of measure used for retention_full. - RetentionFullType *string `form:"retention_full_type,omitempty" json:"retention_full_type,omitempty" xml:"retention_full_type,omitempty"` + RetentionFullType *string `json:"retention_full_type,omitempty"` // The base path within the repository to store backups. Required for type = // 'posix' and 'cifs'. - BasePath *string `form:"base_path,omitempty" json:"base_path,omitempty" xml:"base_path,omitempty"` + BasePath *string `json:"base_path,omitempty"` // Additional options to apply to this repository. - CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` + CustomOptions map[string]string `json:"custom_options,omitempty"` } // BackupScheduleSpecRequestBody is used to define fields on request body types. type BackupScheduleSpecRequestBody struct { // The unique identifier for this backup schedule. - ID string `form:"id" json:"id" xml:"id"` + ID string `json:"id"` // The type of backup to take on this schedule. - Type string `form:"type" json:"type" xml:"type"` + Type string `json:"type"` // The cron expression for this schedule. - CronExpression string `form:"cron_expression" json:"cron_expression" xml:"cron_expression"` + CronExpression string `json:"cron_expression"` } // RestoreConfigSpecRequestBody is used to define fields on request body types. type RestoreConfigSpecRequestBody struct { // The ID of the database to restore this database from. - SourceDatabaseID string `form:"source_database_id" json:"source_database_id" xml:"source_database_id"` + SourceDatabaseID string `json:"source_database_id"` // The name of the node to restore this database from. - SourceNodeName string `form:"source_node_name" json:"source_node_name" xml:"source_node_name"` + SourceNodeName string `json:"source_node_name"` // The name of the database in this repository. The database will be renamed to // the database_name in the DatabaseSpec after it's restored. - SourceDatabaseName string `form:"source_database_name" json:"source_database_name" xml:"source_database_name"` + SourceDatabaseName string `json:"source_database_name"` // The repository to restore this database from. - Repository *RestoreRepositorySpecRequestBody `form:"repository" json:"repository" xml:"repository"` + Repository *RestoreRepositorySpecRequestBody `json:"repository"` // Additional options to use when restoring this database. If omitted, the // database will be restored to the latest point in the given repository. - RestoreOptions map[string]string `form:"restore_options,omitempty" json:"restore_options,omitempty" xml:"restore_options,omitempty"` + RestoreOptions map[string]string `json:"restore_options,omitempty"` } // RestoreRepositorySpecRequestBody is used to define fields on request body // types. type RestoreRepositorySpecRequestBody struct { // The unique identifier of this repository. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id,omitempty"` // The type of this repository. - Type string `form:"type" json:"type" xml:"type"` + Type string `json:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` + S3Bucket *string `json:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = // 's3'. - S3Region *string `form:"s3_region,omitempty" json:"s3_region,omitempty" xml:"s3_region,omitempty"` + S3Region *string `json:"s3_region,omitempty"` // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string `form:"s3_endpoint,omitempty" json:"s3_endpoint,omitempty" xml:"s3_endpoint,omitempty"` + S3Endpoint *string `json:"s3_endpoint,omitempty"` // An optional AWS access key ID to use for this repository. If not provided, // pgbackrest will use the default credential provider chain. - S3Key *string `form:"s3_key,omitempty" json:"s3_key,omitempty" xml:"s3_key,omitempty"` + S3Key *string `json:"s3_key,omitempty"` // The corresponding secret for the AWS access key ID in s3_key. - S3KeySecret *string `form:"s3_key_secret,omitempty" json:"s3_key_secret,omitempty" xml:"s3_key_secret,omitempty"` + S3KeySecret *string `json:"s3_key_secret,omitempty"` // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string `form:"gcs_bucket,omitempty" json:"gcs_bucket,omitempty" xml:"gcs_bucket,omitempty"` + GcsBucket *string `json:"gcs_bucket,omitempty"` // The optional GCS endpoint for this repository. Only applies when type = // 'gcs'. - GcsEndpoint *string `form:"gcs_endpoint,omitempty" json:"gcs_endpoint,omitempty" xml:"gcs_endpoint,omitempty"` + GcsEndpoint *string `json:"gcs_endpoint,omitempty"` // Optional base64-encoded private key data. If omitted, pgbackrest will use // the service account attached to the instance profile. - GcsKey *string `form:"gcs_key,omitempty" json:"gcs_key,omitempty" xml:"gcs_key,omitempty"` + GcsKey *string `json:"gcs_key,omitempty"` // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string `form:"azure_account,omitempty" json:"azure_account,omitempty" xml:"azure_account,omitempty"` + AzureAccount *string `json:"azure_account,omitempty"` // The Azure container name for this repository. Only applies when type = // 'azure'. - AzureContainer *string `form:"azure_container,omitempty" json:"azure_container,omitempty" xml:"azure_container,omitempty"` + AzureContainer *string `json:"azure_container,omitempty"` // The optional Azure endpoint for this repository. Only applies when type = // 'azure'. - AzureEndpoint *string `form:"azure_endpoint,omitempty" json:"azure_endpoint,omitempty" xml:"azure_endpoint,omitempty"` + AzureEndpoint *string `json:"azure_endpoint,omitempty"` // An optional Azure storage account access key to use for this repository. If // not provided, pgbackrest will use the VM's managed identity. - AzureKey *string `form:"azure_key,omitempty" json:"azure_key,omitempty" xml:"azure_key,omitempty"` + AzureKey *string `json:"azure_key,omitempty"` // The base path within the repository to store backups. Required for type = // 'posix' and 'cifs'. - BasePath *string `form:"base_path,omitempty" json:"base_path,omitempty" xml:"base_path,omitempty"` + BasePath *string `json:"base_path,omitempty"` // Additional options to apply to this repository. - CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` + CustomOptions map[string]string `json:"custom_options,omitempty"` } // OrchestratorOptsRequestBody is used to define fields on request body types. type OrchestratorOptsRequestBody struct { // Swarm-specific configuration. - Swarm *SwarmOptsRequestBody `form:"swarm,omitempty" json:"swarm,omitempty" xml:"swarm,omitempty"` + Swarm *SwarmOptsRequestBody `json:"swarm,omitempty"` } // SwarmOptsRequestBody is used to define fields on request body types. type SwarmOptsRequestBody struct { // A list of extra volumes to mount. Each entry defines a host and container // path. - ExtraVolumes []*ExtraVolumesSpecRequestBody `form:"extra_volumes,omitempty" json:"extra_volumes,omitempty" xml:"extra_volumes,omitempty"` + ExtraVolumes []*ExtraVolumesSpecRequestBody `json:"extra_volumes,omitempty"` // A list of additional Docker Swarm networks to attach containers in this // database to. - ExtraNetworks []*ExtraNetworkSpecRequestBody `form:"extra_networks,omitempty" json:"extra_networks,omitempty" xml:"extra_networks,omitempty"` + ExtraNetworks []*ExtraNetworkSpecRequestBody `json:"extra_networks,omitempty"` // Arbitrary labels to apply to the Docker Swarm service - ExtraLabels map[string]string `form:"extra_labels,omitempty" json:"extra_labels,omitempty" xml:"extra_labels,omitempty"` + ExtraLabels map[string]string `json:"extra_labels,omitempty"` } // ExtraVolumesSpecRequestBody is used to define fields on request body types. type ExtraVolumesSpecRequestBody struct { // The host path for the volume. - HostPath string `form:"host_path" json:"host_path" xml:"host_path"` + HostPath string `json:"host_path"` // The path inside the container where the volume will be mounted. - DestinationPath string `form:"destination_path" json:"destination_path" xml:"destination_path"` + DestinationPath string `json:"destination_path"` } // ExtraNetworkSpecRequestBody is used to define fields on request body types. type ExtraNetworkSpecRequestBody struct { // The name or ID of the network to connect to. - ID string `form:"id" json:"id" xml:"id"` + ID string `json:"id"` // Optional network-scoped aliases for the container. - Aliases []string `form:"aliases,omitempty" json:"aliases,omitempty" xml:"aliases,omitempty"` + Aliases []string `json:"aliases,omitempty"` // Optional driver options for the network connection. - DriverOpts map[string]string `form:"driver_opts,omitempty" json:"driver_opts,omitempty" xml:"driver_opts,omitempty"` + DriverOpts map[string]string `json:"driver_opts,omitempty"` } // DatabaseUserSpecRequestBody is used to define fields on request body types. type DatabaseUserSpecRequestBody struct { // The username for this database user. - Username string `form:"username" json:"username" xml:"username"` + Username string `json:"username"` // The password for this database user. This field will be excluded from the // response of all endpoints. It can also be omitted from update requests to // keep the current value. - Password *string `form:"password,omitempty" json:"password,omitempty" xml:"password,omitempty"` + Password *string `json:"password,omitempty"` // If true, this user will be granted database ownership. - DbOwner *bool `form:"db_owner,omitempty" json:"db_owner,omitempty" xml:"db_owner,omitempty"` + DbOwner *bool `json:"db_owner,omitempty"` // The attributes to assign to this database user. - Attributes []string `form:"attributes,omitempty" json:"attributes,omitempty" xml:"attributes,omitempty"` + Attributes []string `json:"attributes,omitempty"` // The roles to assign to this database user. - Roles []string `form:"roles,omitempty" json:"roles,omitempty" xml:"roles,omitempty"` + Roles []string `json:"roles,omitempty"` } // ServiceSpecRequestBody is used to define fields on request body types. type ServiceSpecRequestBody struct { // The unique identifier for this service. - ServiceID string `form:"service_id" json:"service_id" xml:"service_id"` + ServiceID string `json:"service_id"` // The type of service to run. - ServiceType string `form:"service_type" json:"service_type" xml:"service_type"` + ServiceType string `json:"service_type"` // The version of the service in semver format (e.g., '1.0.0') or the literal // 'latest'. - Version string `form:"version" json:"version" xml:"version"` + Version string `json:"version"` // The IDs of the hosts that should run this service. One service instance will // be created per host. - HostIds []string `form:"host_ids" json:"host_ids" xml:"host_ids"` + HostIds []string `json:"host_ids"` // The port to publish the service on the host. If 0, Docker assigns a random // port. If unspecified, no port is published and the service is not accessible // from outside the Docker network. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // Service-specific configuration. For MCP services, this includes // llm_provider, llm_model, and provider-specific API keys. - Config map[string]any `form:"config" json:"config" xml:"config"` + Config map[string]any `json:"config"` // The number of CPUs to allocate for this service. It can include the SI // suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if // unspecified. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for this service. // Defaults to container defaults if unspecified. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` } // DatabaseResponseBody is used to define fields on response body types. type DatabaseResponseBody struct { // Unique identifier for the database. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id"` // Unique identifier for the database's owner. - TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` + TenantID *string `json:"tenant_id,omitempty"` // The time that the database was created. - CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` + CreatedAt *string `json:"created_at"` // The time that the database was last updated. - UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` + UpdatedAt *string `json:"updated_at"` // Current state of the database. - State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` + State *string `json:"state"` // All of the instances in the database. - Instances []*InstanceResponseBody `form:"instances,omitempty" json:"instances,omitempty" xml:"instances,omitempty"` + Instances []*InstanceResponseBody `json:"instances,omitempty"` // Service instances running alongside this database. - ServiceInstances []*ServiceInstanceResponseBody `form:"service_instances,omitempty" json:"service_instances,omitempty" xml:"service_instances,omitempty"` + ServiceInstances []*ServiceInstanceResponseBody `json:"service_instances,omitempty"` // The user-provided specification for the database. - Spec *DatabaseSpecResponseBody `form:"spec,omitempty" json:"spec,omitempty" xml:"spec,omitempty"` + Spec *DatabaseSpecResponseBody `json:"spec,omitempty"` } // ServiceInstanceResponseBody is used to define fields on response body types. type ServiceInstanceResponseBody struct { // Unique identifier for the service instance. - ServiceInstanceID *string `form:"service_instance_id,omitempty" json:"service_instance_id,omitempty" xml:"service_instance_id,omitempty"` + ServiceInstanceID *string `json:"service_instance_id"` // The service ID from the DatabaseSpec. - ServiceID *string `form:"service_id,omitempty" json:"service_id,omitempty" xml:"service_id,omitempty"` + ServiceID *string `json:"service_id"` // The ID of the database this service belongs to. - DatabaseID *string `form:"database_id,omitempty" json:"database_id,omitempty" xml:"database_id,omitempty"` + DatabaseID *string `json:"database_id"` // The ID of the host this service instance is running on. - HostID *string `form:"host_id,omitempty" json:"host_id,omitempty" xml:"host_id,omitempty"` + HostID *string `json:"host_id"` // Current state of the service instance. - State *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"` + State *string `json:"state"` // Runtime status information for the service instance. - Status *ServiceInstanceStatusResponseBody `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` + Status *ServiceInstanceStatusResponseBody `json:"status,omitempty"` // The time that the service instance was created. - CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"` + CreatedAt *string `json:"created_at"` // The time that the service instance was last updated. - UpdatedAt *string `form:"updated_at,omitempty" json:"updated_at,omitempty" xml:"updated_at,omitempty"` + UpdatedAt *string `json:"updated_at"` // An error message if the service instance is in an error state. - Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` + Error *string `json:"error,omitempty"` } // ServiceInstanceStatusResponseBody is used to define fields on response body // types. type ServiceInstanceStatusResponseBody struct { // The Docker container ID. - ContainerID *string `form:"container_id,omitempty" json:"container_id,omitempty" xml:"container_id,omitempty"` + ContainerID *string `json:"container_id,omitempty"` // The container image version currently running. - ImageVersion *string `form:"image_version,omitempty" json:"image_version,omitempty" xml:"image_version,omitempty"` + ImageVersion *string `json:"image_version,omitempty"` // The hostname of the service instance. - Hostname *string `form:"hostname,omitempty" json:"hostname,omitempty" xml:"hostname,omitempty"` + Hostname *string `json:"hostname,omitempty"` // The IPv4 address of the service instance. - Ipv4Address *string `form:"ipv4_address,omitempty" json:"ipv4_address,omitempty" xml:"ipv4_address,omitempty"` + Ipv4Address *string `json:"ipv4_address,omitempty"` // Port mappings for this service instance. - Ports []*PortMappingResponseBody `form:"ports,omitempty" json:"ports,omitempty" xml:"ports,omitempty"` + Ports []*PortMappingResponseBody `json:"ports,omitempty"` // Most recent health check result. - HealthCheck *HealthCheckResultResponseBody `form:"health_check,omitempty" json:"health_check,omitempty" xml:"health_check,omitempty"` + HealthCheck *HealthCheckResultResponseBody `json:"health_check,omitempty"` // The time of the last health check attempt. - LastHealthAt *string `form:"last_health_at,omitempty" json:"last_health_at,omitempty" xml:"last_health_at,omitempty"` + LastHealthAt *string `json:"last_health_at,omitempty"` // Whether the service is ready to accept requests. - ServiceReady *bool `form:"service_ready,omitempty" json:"service_ready,omitempty" xml:"service_ready,omitempty"` + ServiceReady *bool `json:"service_ready,omitempty"` } // PortMappingResponseBody is used to define fields on response body types. type PortMappingResponseBody struct { // The name of the port (e.g., 'http', 'web-client'). - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The port number inside the container. - ContainerPort *int `form:"container_port,omitempty" json:"container_port,omitempty" xml:"container_port,omitempty"` + ContainerPort *int `json:"container_port,omitempty"` // The port number on the host (if port-forwarded). - HostPort *int `form:"host_port,omitempty" json:"host_port,omitempty" xml:"host_port,omitempty"` + HostPort *int `json:"host_port,omitempty"` } // HealthCheckResultResponseBody is used to define fields on response body // types. type HealthCheckResultResponseBody struct { // The health status. - Status *string `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` + Status *string `json:"status"` // Optional message about the health status. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message,omitempty"` // The time this health check was performed. - CheckedAt *string `form:"checked_at,omitempty" json:"checked_at,omitempty" xml:"checked_at,omitempty"` + CheckedAt *string `json:"checked_at"` } // DatabaseSpecResponseBody is used to define fields on response body types. type DatabaseSpecResponseBody struct { // The name of the Postgres database. - DatabaseName *string `form:"database_name,omitempty" json:"database_name,omitempty" xml:"database_name,omitempty"` + DatabaseName *string `json:"database_name"` // The Postgres version in 'major.minor' format. - PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` + PostgresVersion *string `json:"postgres_version,omitempty"` // The major version of the Spock extension. - SpockVersion *string `form:"spock_version,omitempty" json:"spock_version,omitempty" xml:"spock_version,omitempty"` + SpockVersion *string `json:"spock_version,omitempty"` // The port used by the Postgres database. If the port is 0, each instance will // be assigned a random port. If the port is unspecified, the database will not // be exposed on any port, dependent on orchestrator support for that feature. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // The number of CPUs to allocate for the database and to use for tuning // Postgres. Defaults to the number of available CPUs on the host. Can include // an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced // depends on the orchestrator. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for the database and // to use for tuning Postgres. Defaults to the total available memory on the // host. Whether this limit is enforced depends on the orchestrator. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // The Spock nodes for this database. - Nodes []*DatabaseNodeSpecResponseBody `form:"nodes,omitempty" json:"nodes,omitempty" xml:"nodes,omitempty"` + Nodes []*DatabaseNodeSpecResponseBody `json:"nodes"` // The users to create for this database. - DatabaseUsers []*DatabaseUserSpecResponseBody `form:"database_users,omitempty" json:"database_users,omitempty" xml:"database_users,omitempty"` + DatabaseUsers []*DatabaseUserSpecResponseBody `json:"database_users,omitempty"` // Service instances to run alongside the database (e.g., MCP servers). - Services []*ServiceSpecResponseBody `form:"services,omitempty" json:"services,omitempty" xml:"services,omitempty"` + Services []*ServiceSpecResponseBody `json:"services,omitempty"` // The backup configuration for this database. - BackupConfig *BackupConfigSpecResponseBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecResponseBody `json:"backup_config,omitempty"` // The restore configuration for this database. - RestoreConfig *RestoreConfigSpecResponseBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecResponseBody `json:"restore_config,omitempty"` // Additional postgresql.conf settings. Will be merged with the settings // provided by control-plane. - PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` + PostgresqlConf map[string]any `json:"postgresql_conf,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsResponseBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsResponseBody `json:"orchestrator_opts,omitempty"` } // DatabaseNodeSpecResponseBody is used to define fields on response body types. type DatabaseNodeSpecResponseBody struct { // The name of the database node. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The IDs of the hosts that should run this node. When multiple hosts are // specified, one host will chosen as a primary, and the others will be read // replicas. - HostIds []string `form:"host_ids,omitempty" json:"host_ids,omitempty" xml:"host_ids,omitempty"` + HostIds []string `json:"host_ids"` // The Postgres version for this node in 'major.minor' format. Overrides the // Postgres version set in the DatabaseSpec. - PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` + PostgresVersion *string `json:"postgres_version,omitempty"` // The port used by the Postgres database for this node. Overrides the Postgres // port set in the DatabaseSpec. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // The number of CPUs to allocate for the database on this node and to use for // tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 // millicpus. Cannot allocate units smaller than 1m. Defaults to the number of // available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs // than are available on the host. Whether this limit is enforced depends on // the orchestrator. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for the database on // this node and to use for tuning Postgres. Defaults to the total available // memory on the host. Whether this limit is enforced depends on the // orchestrator. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // Additional postgresql.conf settings for this particular node. Will be merged // with the settings provided by control-plane. - PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` + PostgresqlConf map[string]any `json:"postgresql_conf,omitempty"` // The backup configuration for this node. Overrides the backup configuration // set in the DatabaseSpec. - BackupConfig *BackupConfigSpecResponseBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecResponseBody `json:"backup_config,omitempty"` // The restore configuration for this node. Overrides the restore configuration // set in the DatabaseSpec. - RestoreConfig *RestoreConfigSpecResponseBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecResponseBody `json:"restore_config,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsResponseBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsResponseBody `json:"orchestrator_opts,omitempty"` // The name of the source node to use for sync. This is typically the node // (like 'n1') from which the data will be copied to initialize this new node. - SourceNode *string `form:"source_node,omitempty" json:"source_node,omitempty" xml:"source_node,omitempty"` + SourceNode *string `json:"source_node,omitempty"` } // BackupConfigSpecResponseBody is used to define fields on response body types. type BackupConfigSpecResponseBody struct { // The repositories for this backup configuration. - Repositories []*BackupRepositorySpecResponseBody `form:"repositories,omitempty" json:"repositories,omitempty" xml:"repositories,omitempty"` + Repositories []*BackupRepositorySpecResponseBody `json:"repositories"` // The schedules for this backup configuration. - Schedules []*BackupScheduleSpecResponseBody `form:"schedules,omitempty" json:"schedules,omitempty" xml:"schedules,omitempty"` + Schedules []*BackupScheduleSpecResponseBody `json:"schedules,omitempty"` } // BackupRepositorySpecResponseBody is used to define fields on response body // types. type BackupRepositorySpecResponseBody struct { // The unique identifier of this repository. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id,omitempty"` // The type of this repository. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type *string `json:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` + S3Bucket *string `json:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = // 's3'. - S3Region *string `form:"s3_region,omitempty" json:"s3_region,omitempty" xml:"s3_region,omitempty"` + S3Region *string `json:"s3_region,omitempty"` // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string `form:"s3_endpoint,omitempty" json:"s3_endpoint,omitempty" xml:"s3_endpoint,omitempty"` + S3Endpoint *string `json:"s3_endpoint,omitempty"` // An optional AWS access key ID to use for this repository. If not provided, // pgbackrest will use the default credential provider chain. This field will // be excluded from the response of all endpoints. It can also be omitted from // update requests to keep the current value. - S3Key *string `form:"s3_key,omitempty" json:"s3_key,omitempty" xml:"s3_key,omitempty"` + S3Key *string `json:"s3_key,omitempty"` // The corresponding secret for the AWS access key ID in s3_key. This field // will be excluded from the response of all endpoints. It can also be omitted // from update requests to keep the current value. - S3KeySecret *string `form:"s3_key_secret,omitempty" json:"s3_key_secret,omitempty" xml:"s3_key_secret,omitempty"` + S3KeySecret *string `json:"s3_key_secret,omitempty"` // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string `form:"gcs_bucket,omitempty" json:"gcs_bucket,omitempty" xml:"gcs_bucket,omitempty"` + GcsBucket *string `json:"gcs_bucket,omitempty"` // The optional GCS endpoint for this repository. Only applies when type = // 'gcs'. - GcsEndpoint *string `form:"gcs_endpoint,omitempty" json:"gcs_endpoint,omitempty" xml:"gcs_endpoint,omitempty"` + GcsEndpoint *string `json:"gcs_endpoint,omitempty"` // Optional base64-encoded private key data. If omitted, pgbackrest will use // the service account attached to the instance profile. This field will be // excluded from the response of all endpoints. It can also be omitted from // update requests to keep the current value. - GcsKey *string `form:"gcs_key,omitempty" json:"gcs_key,omitempty" xml:"gcs_key,omitempty"` + GcsKey *string `json:"gcs_key,omitempty"` // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string `form:"azure_account,omitempty" json:"azure_account,omitempty" xml:"azure_account,omitempty"` + AzureAccount *string `json:"azure_account,omitempty"` // The Azure container name for this repository. Only applies when type = // 'azure'. - AzureContainer *string `form:"azure_container,omitempty" json:"azure_container,omitempty" xml:"azure_container,omitempty"` + AzureContainer *string `json:"azure_container,omitempty"` // The optional Azure endpoint for this repository. Only applies when type = // 'azure'. - AzureEndpoint *string `form:"azure_endpoint,omitempty" json:"azure_endpoint,omitempty" xml:"azure_endpoint,omitempty"` + AzureEndpoint *string `json:"azure_endpoint,omitempty"` // The Azure storage account access key to use for this repository. This field // will be excluded from the response of all endpoints. It can also be omitted // from update requests to keep the current value. - AzureKey *string `form:"azure_key,omitempty" json:"azure_key,omitempty" xml:"azure_key,omitempty"` + AzureKey *string `json:"azure_key,omitempty"` // The count of full backups to retain or the time to retain full backups. - RetentionFull *int `form:"retention_full,omitempty" json:"retention_full,omitempty" xml:"retention_full,omitempty"` + RetentionFull *int `json:"retention_full,omitempty"` // The type of measure used for retention_full. - RetentionFullType *string `form:"retention_full_type,omitempty" json:"retention_full_type,omitempty" xml:"retention_full_type,omitempty"` + RetentionFullType *string `json:"retention_full_type,omitempty"` // The base path within the repository to store backups. Required for type = // 'posix' and 'cifs'. - BasePath *string `form:"base_path,omitempty" json:"base_path,omitempty" xml:"base_path,omitempty"` + BasePath *string `json:"base_path,omitempty"` // Additional options to apply to this repository. - CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` + CustomOptions map[string]string `json:"custom_options,omitempty"` } // BackupScheduleSpecResponseBody is used to define fields on response body // types. type BackupScheduleSpecResponseBody struct { // The unique identifier for this backup schedule. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id"` // The type of backup to take on this schedule. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type *string `json:"type"` // The cron expression for this schedule. - CronExpression *string `form:"cron_expression,omitempty" json:"cron_expression,omitempty" xml:"cron_expression,omitempty"` + CronExpression *string `json:"cron_expression"` } // RestoreConfigSpecResponseBody is used to define fields on response body // types. type RestoreConfigSpecResponseBody struct { // The ID of the database to restore this database from. - SourceDatabaseID *string `form:"source_database_id,omitempty" json:"source_database_id,omitempty" xml:"source_database_id,omitempty"` + SourceDatabaseID *string `json:"source_database_id"` // The name of the node to restore this database from. - SourceNodeName *string `form:"source_node_name,omitempty" json:"source_node_name,omitempty" xml:"source_node_name,omitempty"` + SourceNodeName *string `json:"source_node_name"` // The name of the database in this repository. The database will be renamed to // the database_name in the DatabaseSpec after it's restored. - SourceDatabaseName *string `form:"source_database_name,omitempty" json:"source_database_name,omitempty" xml:"source_database_name,omitempty"` + SourceDatabaseName *string `json:"source_database_name"` // The repository to restore this database from. - Repository *RestoreRepositorySpecResponseBody `form:"repository,omitempty" json:"repository,omitempty" xml:"repository,omitempty"` + Repository *RestoreRepositorySpecResponseBody `json:"repository"` // Additional options to use when restoring this database. If omitted, the // database will be restored to the latest point in the given repository. - RestoreOptions map[string]string `form:"restore_options,omitempty" json:"restore_options,omitempty" xml:"restore_options,omitempty"` + RestoreOptions map[string]string `json:"restore_options,omitempty"` } // RestoreRepositorySpecResponseBody is used to define fields on response body // types. type RestoreRepositorySpecResponseBody struct { // The unique identifier of this repository. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id,omitempty"` // The type of this repository. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type *string `json:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` + S3Bucket *string `json:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = // 's3'. - S3Region *string `form:"s3_region,omitempty" json:"s3_region,omitempty" xml:"s3_region,omitempty"` + S3Region *string `json:"s3_region,omitempty"` // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string `form:"s3_endpoint,omitempty" json:"s3_endpoint,omitempty" xml:"s3_endpoint,omitempty"` + S3Endpoint *string `json:"s3_endpoint,omitempty"` // An optional AWS access key ID to use for this repository. If not provided, // pgbackrest will use the default credential provider chain. - S3Key *string `form:"s3_key,omitempty" json:"s3_key,omitempty" xml:"s3_key,omitempty"` + S3Key *string `json:"s3_key,omitempty"` // The corresponding secret for the AWS access key ID in s3_key. - S3KeySecret *string `form:"s3_key_secret,omitempty" json:"s3_key_secret,omitempty" xml:"s3_key_secret,omitempty"` + S3KeySecret *string `json:"s3_key_secret,omitempty"` // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string `form:"gcs_bucket,omitempty" json:"gcs_bucket,omitempty" xml:"gcs_bucket,omitempty"` + GcsBucket *string `json:"gcs_bucket,omitempty"` // The optional GCS endpoint for this repository. Only applies when type = // 'gcs'. - GcsEndpoint *string `form:"gcs_endpoint,omitempty" json:"gcs_endpoint,omitempty" xml:"gcs_endpoint,omitempty"` + GcsEndpoint *string `json:"gcs_endpoint,omitempty"` // Optional base64-encoded private key data. If omitted, pgbackrest will use // the service account attached to the instance profile. - GcsKey *string `form:"gcs_key,omitempty" json:"gcs_key,omitempty" xml:"gcs_key,omitempty"` + GcsKey *string `json:"gcs_key,omitempty"` // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string `form:"azure_account,omitempty" json:"azure_account,omitempty" xml:"azure_account,omitempty"` + AzureAccount *string `json:"azure_account,omitempty"` // The Azure container name for this repository. Only applies when type = // 'azure'. - AzureContainer *string `form:"azure_container,omitempty" json:"azure_container,omitempty" xml:"azure_container,omitempty"` + AzureContainer *string `json:"azure_container,omitempty"` // The optional Azure endpoint for this repository. Only applies when type = // 'azure'. - AzureEndpoint *string `form:"azure_endpoint,omitempty" json:"azure_endpoint,omitempty" xml:"azure_endpoint,omitempty"` + AzureEndpoint *string `json:"azure_endpoint,omitempty"` // An optional Azure storage account access key to use for this repository. If // not provided, pgbackrest will use the VM's managed identity. - AzureKey *string `form:"azure_key,omitempty" json:"azure_key,omitempty" xml:"azure_key,omitempty"` + AzureKey *string `json:"azure_key,omitempty"` // The base path within the repository to store backups. Required for type = // 'posix' and 'cifs'. - BasePath *string `form:"base_path,omitempty" json:"base_path,omitempty" xml:"base_path,omitempty"` + BasePath *string `json:"base_path,omitempty"` // Additional options to apply to this repository. - CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` + CustomOptions map[string]string `json:"custom_options,omitempty"` } // OrchestratorOptsResponseBody is used to define fields on response body types. type OrchestratorOptsResponseBody struct { // Swarm-specific configuration. - Swarm *SwarmOptsResponseBody `form:"swarm,omitempty" json:"swarm,omitempty" xml:"swarm,omitempty"` + Swarm *SwarmOptsResponseBody `json:"swarm,omitempty"` } // SwarmOptsResponseBody is used to define fields on response body types. type SwarmOptsResponseBody struct { // A list of extra volumes to mount. Each entry defines a host and container // path. - ExtraVolumes []*ExtraVolumesSpecResponseBody `form:"extra_volumes,omitempty" json:"extra_volumes,omitempty" xml:"extra_volumes,omitempty"` + ExtraVolumes []*ExtraVolumesSpecResponseBody `json:"extra_volumes,omitempty"` // A list of additional Docker Swarm networks to attach containers in this // database to. - ExtraNetworks []*ExtraNetworkSpecResponseBody `form:"extra_networks,omitempty" json:"extra_networks,omitempty" xml:"extra_networks,omitempty"` + ExtraNetworks []*ExtraNetworkSpecResponseBody `json:"extra_networks,omitempty"` // Arbitrary labels to apply to the Docker Swarm service - ExtraLabels map[string]string `form:"extra_labels,omitempty" json:"extra_labels,omitempty" xml:"extra_labels,omitempty"` + ExtraLabels map[string]string `json:"extra_labels,omitempty"` } // ExtraVolumesSpecResponseBody is used to define fields on response body types. type ExtraVolumesSpecResponseBody struct { // The host path for the volume. - HostPath *string `form:"host_path,omitempty" json:"host_path,omitempty" xml:"host_path,omitempty"` + HostPath *string `json:"host_path"` // The path inside the container where the volume will be mounted. - DestinationPath *string `form:"destination_path,omitempty" json:"destination_path,omitempty" xml:"destination_path,omitempty"` + DestinationPath *string `json:"destination_path"` } // ExtraNetworkSpecResponseBody is used to define fields on response body types. type ExtraNetworkSpecResponseBody struct { // The name or ID of the network to connect to. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id"` // Optional network-scoped aliases for the container. - Aliases []string `form:"aliases,omitempty" json:"aliases,omitempty" xml:"aliases,omitempty"` + Aliases []string `json:"aliases,omitempty"` // Optional driver options for the network connection. - DriverOpts map[string]string `form:"driver_opts,omitempty" json:"driver_opts,omitempty" xml:"driver_opts,omitempty"` + DriverOpts map[string]string `json:"driver_opts,omitempty"` } // DatabaseUserSpecResponseBody is used to define fields on response body types. type DatabaseUserSpecResponseBody struct { // The username for this database user. - Username *string `form:"username,omitempty" json:"username,omitempty" xml:"username,omitempty"` + Username *string `json:"username"` // The password for this database user. This field will be excluded from the // response of all endpoints. It can also be omitted from update requests to // keep the current value. - Password *string `form:"password,omitempty" json:"password,omitempty" xml:"password,omitempty"` + Password *string `json:"password,omitempty"` // If true, this user will be granted database ownership. - DbOwner *bool `form:"db_owner,omitempty" json:"db_owner,omitempty" xml:"db_owner,omitempty"` + DbOwner *bool `json:"db_owner,omitempty"` // The attributes to assign to this database user. - Attributes []string `form:"attributes,omitempty" json:"attributes,omitempty" xml:"attributes,omitempty"` + Attributes []string `json:"attributes,omitempty"` // The roles to assign to this database user. - Roles []string `form:"roles,omitempty" json:"roles,omitempty" xml:"roles,omitempty"` + Roles []string `json:"roles,omitempty"` } // ServiceSpecResponseBody is used to define fields on response body types. type ServiceSpecResponseBody struct { // The unique identifier for this service. - ServiceID *string `form:"service_id,omitempty" json:"service_id,omitempty" xml:"service_id,omitempty"` + ServiceID *string `json:"service_id"` // The type of service to run. - ServiceType *string `form:"service_type,omitempty" json:"service_type,omitempty" xml:"service_type,omitempty"` + ServiceType *string `json:"service_type"` // The version of the service in semver format (e.g., '1.0.0') or the literal // 'latest'. - Version *string `form:"version,omitempty" json:"version,omitempty" xml:"version,omitempty"` + Version *string `json:"version"` // The IDs of the hosts that should run this service. One service instance will // be created per host. - HostIds []string `form:"host_ids,omitempty" json:"host_ids,omitempty" xml:"host_ids,omitempty"` + HostIds []string `json:"host_ids"` // The port to publish the service on the host. If 0, Docker assigns a random // port. If unspecified, no port is published and the service is not accessible // from outside the Docker network. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // Service-specific configuration. For MCP services, this includes // llm_provider, llm_model, and provider-specific API keys. - Config map[string]any `form:"config,omitempty" json:"config,omitempty" xml:"config,omitempty"` + Config map[string]any `json:"config"` // The number of CPUs to allocate for this service. It can include the SI // suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if // unspecified. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for this service. // Defaults to container defaults if unspecified. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` } // DatabaseSpecRequestBodyRequestBody is used to define fields on request body // types. type DatabaseSpecRequestBodyRequestBody struct { // The name of the Postgres database. - DatabaseName string `form:"database_name" json:"database_name" xml:"database_name"` + DatabaseName string `json:"database_name"` // The Postgres version in 'major.minor' format. - PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` + PostgresVersion *string `json:"postgres_version,omitempty"` // The major version of the Spock extension. - SpockVersion *string `form:"spock_version,omitempty" json:"spock_version,omitempty" xml:"spock_version,omitempty"` + SpockVersion *string `json:"spock_version,omitempty"` // The port used by the Postgres database. If the port is 0, each instance will // be assigned a random port. If the port is unspecified, the database will not // be exposed on any port, dependent on orchestrator support for that feature. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // The number of CPUs to allocate for the database and to use for tuning // Postgres. Defaults to the number of available CPUs on the host. Can include // an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced // depends on the orchestrator. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for the database and // to use for tuning Postgres. Defaults to the total available memory on the // host. Whether this limit is enforced depends on the orchestrator. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // The Spock nodes for this database. - Nodes []*DatabaseNodeSpecRequestBodyRequestBody `form:"nodes" json:"nodes" xml:"nodes"` + Nodes []*DatabaseNodeSpecRequestBodyRequestBody `json:"nodes"` // The users to create for this database. - DatabaseUsers []*DatabaseUserSpecRequestBodyRequestBody `form:"database_users,omitempty" json:"database_users,omitempty" xml:"database_users,omitempty"` + DatabaseUsers []*DatabaseUserSpecRequestBodyRequestBody `json:"database_users,omitempty"` // Service instances to run alongside the database (e.g., MCP servers). - Services []*ServiceSpecRequestBodyRequestBody `form:"services,omitempty" json:"services,omitempty" xml:"services,omitempty"` + Services []*ServiceSpecRequestBodyRequestBody `json:"services,omitempty"` // The backup configuration for this database. - BackupConfig *BackupConfigSpecRequestBodyRequestBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecRequestBodyRequestBody `json:"backup_config,omitempty"` // The restore configuration for this database. - RestoreConfig *RestoreConfigSpecRequestBodyRequestBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecRequestBodyRequestBody `json:"restore_config,omitempty"` // Additional postgresql.conf settings. Will be merged with the settings // provided by control-plane. - PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` + PostgresqlConf map[string]any `json:"postgresql_conf,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsRequestBodyRequestBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsRequestBodyRequestBody `json:"orchestrator_opts,omitempty"` } // DatabaseNodeSpecRequestBodyRequestBody is used to define fields on request // body types. type DatabaseNodeSpecRequestBodyRequestBody struct { // The name of the database node. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The IDs of the hosts that should run this node. When multiple hosts are // specified, one host will chosen as a primary, and the others will be read // replicas. - HostIds []string `form:"host_ids" json:"host_ids" xml:"host_ids"` + HostIds []string `json:"host_ids"` // The Postgres version for this node in 'major.minor' format. Overrides the // Postgres version set in the DatabaseSpec. - PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` + PostgresVersion *string `json:"postgres_version,omitempty"` // The port used by the Postgres database for this node. Overrides the Postgres // port set in the DatabaseSpec. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // The number of CPUs to allocate for the database on this node and to use for // tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 // millicpus. Cannot allocate units smaller than 1m. Defaults to the number of // available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs // than are available on the host. Whether this limit is enforced depends on // the orchestrator. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for the database on // this node and to use for tuning Postgres. Defaults to the total available // memory on the host. Whether this limit is enforced depends on the // orchestrator. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // Additional postgresql.conf settings for this particular node. Will be merged // with the settings provided by control-plane. - PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` + PostgresqlConf map[string]any `json:"postgresql_conf,omitempty"` // The backup configuration for this node. Overrides the backup configuration // set in the DatabaseSpec. - BackupConfig *BackupConfigSpecRequestBodyRequestBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecRequestBodyRequestBody `json:"backup_config,omitempty"` // The restore configuration for this node. Overrides the restore configuration // set in the DatabaseSpec. - RestoreConfig *RestoreConfigSpecRequestBodyRequestBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecRequestBodyRequestBody `json:"restore_config,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsRequestBodyRequestBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsRequestBodyRequestBody `json:"orchestrator_opts,omitempty"` // The name of the source node to use for sync. This is typically the node // (like 'n1') from which the data will be copied to initialize this new node. - SourceNode *string `form:"source_node,omitempty" json:"source_node,omitempty" xml:"source_node,omitempty"` + SourceNode *string `json:"source_node,omitempty"` } // BackupConfigSpecRequestBodyRequestBody is used to define fields on request // body types. type BackupConfigSpecRequestBodyRequestBody struct { // The repositories for this backup configuration. - Repositories []*BackupRepositorySpecRequestBodyRequestBody `form:"repositories" json:"repositories" xml:"repositories"` + Repositories []*BackupRepositorySpecRequestBodyRequestBody `json:"repositories"` // The schedules for this backup configuration. - Schedules []*BackupScheduleSpecRequestBodyRequestBody `form:"schedules,omitempty" json:"schedules,omitempty" xml:"schedules,omitempty"` + Schedules []*BackupScheduleSpecRequestBodyRequestBody `json:"schedules,omitempty"` } // BackupRepositorySpecRequestBodyRequestBody is used to define fields on // request body types. type BackupRepositorySpecRequestBodyRequestBody struct { // The unique identifier of this repository. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id,omitempty"` // The type of this repository. - Type string `form:"type" json:"type" xml:"type"` + Type string `json:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` + S3Bucket *string `json:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = // 's3'. - S3Region *string `form:"s3_region,omitempty" json:"s3_region,omitempty" xml:"s3_region,omitempty"` + S3Region *string `json:"s3_region,omitempty"` // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string `form:"s3_endpoint,omitempty" json:"s3_endpoint,omitempty" xml:"s3_endpoint,omitempty"` + S3Endpoint *string `json:"s3_endpoint,omitempty"` // An optional AWS access key ID to use for this repository. If not provided, // pgbackrest will use the default credential provider chain. This field will // be excluded from the response of all endpoints. It can also be omitted from // update requests to keep the current value. - S3Key *string `form:"s3_key,omitempty" json:"s3_key,omitempty" xml:"s3_key,omitempty"` + S3Key *string `json:"s3_key,omitempty"` // The corresponding secret for the AWS access key ID in s3_key. This field // will be excluded from the response of all endpoints. It can also be omitted // from update requests to keep the current value. - S3KeySecret *string `form:"s3_key_secret,omitempty" json:"s3_key_secret,omitempty" xml:"s3_key_secret,omitempty"` + S3KeySecret *string `json:"s3_key_secret,omitempty"` // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string `form:"gcs_bucket,omitempty" json:"gcs_bucket,omitempty" xml:"gcs_bucket,omitempty"` + GcsBucket *string `json:"gcs_bucket,omitempty"` // The optional GCS endpoint for this repository. Only applies when type = // 'gcs'. - GcsEndpoint *string `form:"gcs_endpoint,omitempty" json:"gcs_endpoint,omitempty" xml:"gcs_endpoint,omitempty"` + GcsEndpoint *string `json:"gcs_endpoint,omitempty"` // Optional base64-encoded private key data. If omitted, pgbackrest will use // the service account attached to the instance profile. This field will be // excluded from the response of all endpoints. It can also be omitted from // update requests to keep the current value. - GcsKey *string `form:"gcs_key,omitempty" json:"gcs_key,omitempty" xml:"gcs_key,omitempty"` + GcsKey *string `json:"gcs_key,omitempty"` // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string `form:"azure_account,omitempty" json:"azure_account,omitempty" xml:"azure_account,omitempty"` + AzureAccount *string `json:"azure_account,omitempty"` // The Azure container name for this repository. Only applies when type = // 'azure'. - AzureContainer *string `form:"azure_container,omitempty" json:"azure_container,omitempty" xml:"azure_container,omitempty"` + AzureContainer *string `json:"azure_container,omitempty"` // The optional Azure endpoint for this repository. Only applies when type = // 'azure'. - AzureEndpoint *string `form:"azure_endpoint,omitempty" json:"azure_endpoint,omitempty" xml:"azure_endpoint,omitempty"` + AzureEndpoint *string `json:"azure_endpoint,omitempty"` // The Azure storage account access key to use for this repository. This field // will be excluded from the response of all endpoints. It can also be omitted // from update requests to keep the current value. - AzureKey *string `form:"azure_key,omitempty" json:"azure_key,omitempty" xml:"azure_key,omitempty"` + AzureKey *string `json:"azure_key,omitempty"` // The count of full backups to retain or the time to retain full backups. - RetentionFull *int `form:"retention_full,omitempty" json:"retention_full,omitempty" xml:"retention_full,omitempty"` + RetentionFull *int `json:"retention_full,omitempty"` // The type of measure used for retention_full. - RetentionFullType *string `form:"retention_full_type,omitempty" json:"retention_full_type,omitempty" xml:"retention_full_type,omitempty"` + RetentionFullType *string `json:"retention_full_type,omitempty"` // The base path within the repository to store backups. Required for type = // 'posix' and 'cifs'. - BasePath *string `form:"base_path,omitempty" json:"base_path,omitempty" xml:"base_path,omitempty"` + BasePath *string `json:"base_path,omitempty"` // Additional options to apply to this repository. - CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` + CustomOptions map[string]string `json:"custom_options,omitempty"` } // BackupScheduleSpecRequestBodyRequestBody is used to define fields on request // body types. type BackupScheduleSpecRequestBodyRequestBody struct { // The unique identifier for this backup schedule. - ID string `form:"id" json:"id" xml:"id"` + ID string `json:"id"` // The type of backup to take on this schedule. - Type string `form:"type" json:"type" xml:"type"` + Type string `json:"type"` // The cron expression for this schedule. - CronExpression string `form:"cron_expression" json:"cron_expression" xml:"cron_expression"` + CronExpression string `json:"cron_expression"` } // RestoreConfigSpecRequestBodyRequestBody is used to define fields on request // body types. type RestoreConfigSpecRequestBodyRequestBody struct { // The ID of the database to restore this database from. - SourceDatabaseID string `form:"source_database_id" json:"source_database_id" xml:"source_database_id"` + SourceDatabaseID string `json:"source_database_id"` // The name of the node to restore this database from. - SourceNodeName string `form:"source_node_name" json:"source_node_name" xml:"source_node_name"` + SourceNodeName string `json:"source_node_name"` // The name of the database in this repository. The database will be renamed to // the database_name in the DatabaseSpec after it's restored. - SourceDatabaseName string `form:"source_database_name" json:"source_database_name" xml:"source_database_name"` + SourceDatabaseName string `json:"source_database_name"` // The repository to restore this database from. - Repository *RestoreRepositorySpecRequestBodyRequestBody `form:"repository" json:"repository" xml:"repository"` + Repository *RestoreRepositorySpecRequestBodyRequestBody `json:"repository"` // Additional options to use when restoring this database. If omitted, the // database will be restored to the latest point in the given repository. - RestoreOptions map[string]string `form:"restore_options,omitempty" json:"restore_options,omitempty" xml:"restore_options,omitempty"` + RestoreOptions map[string]string `json:"restore_options,omitempty"` } // RestoreRepositorySpecRequestBodyRequestBody is used to define fields on // request body types. type RestoreRepositorySpecRequestBodyRequestBody struct { // The unique identifier of this repository. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id,omitempty"` // The type of this repository. - Type string `form:"type" json:"type" xml:"type"` + Type string `json:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` + S3Bucket *string `json:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = // 's3'. - S3Region *string `form:"s3_region,omitempty" json:"s3_region,omitempty" xml:"s3_region,omitempty"` + S3Region *string `json:"s3_region,omitempty"` // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string `form:"s3_endpoint,omitempty" json:"s3_endpoint,omitempty" xml:"s3_endpoint,omitempty"` + S3Endpoint *string `json:"s3_endpoint,omitempty"` // An optional AWS access key ID to use for this repository. If not provided, // pgbackrest will use the default credential provider chain. - S3Key *string `form:"s3_key,omitempty" json:"s3_key,omitempty" xml:"s3_key,omitempty"` + S3Key *string `json:"s3_key,omitempty"` // The corresponding secret for the AWS access key ID in s3_key. - S3KeySecret *string `form:"s3_key_secret,omitempty" json:"s3_key_secret,omitempty" xml:"s3_key_secret,omitempty"` + S3KeySecret *string `json:"s3_key_secret,omitempty"` // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string `form:"gcs_bucket,omitempty" json:"gcs_bucket,omitempty" xml:"gcs_bucket,omitempty"` + GcsBucket *string `json:"gcs_bucket,omitempty"` // The optional GCS endpoint for this repository. Only applies when type = // 'gcs'. - GcsEndpoint *string `form:"gcs_endpoint,omitempty" json:"gcs_endpoint,omitempty" xml:"gcs_endpoint,omitempty"` + GcsEndpoint *string `json:"gcs_endpoint,omitempty"` // Optional base64-encoded private key data. If omitted, pgbackrest will use // the service account attached to the instance profile. - GcsKey *string `form:"gcs_key,omitempty" json:"gcs_key,omitempty" xml:"gcs_key,omitempty"` + GcsKey *string `json:"gcs_key,omitempty"` // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string `form:"azure_account,omitempty" json:"azure_account,omitempty" xml:"azure_account,omitempty"` + AzureAccount *string `json:"azure_account,omitempty"` // The Azure container name for this repository. Only applies when type = // 'azure'. - AzureContainer *string `form:"azure_container,omitempty" json:"azure_container,omitempty" xml:"azure_container,omitempty"` + AzureContainer *string `json:"azure_container,omitempty"` // The optional Azure endpoint for this repository. Only applies when type = // 'azure'. - AzureEndpoint *string `form:"azure_endpoint,omitempty" json:"azure_endpoint,omitempty" xml:"azure_endpoint,omitempty"` + AzureEndpoint *string `json:"azure_endpoint,omitempty"` // An optional Azure storage account access key to use for this repository. If // not provided, pgbackrest will use the VM's managed identity. - AzureKey *string `form:"azure_key,omitempty" json:"azure_key,omitempty" xml:"azure_key,omitempty"` + AzureKey *string `json:"azure_key,omitempty"` // The base path within the repository to store backups. Required for type = // 'posix' and 'cifs'. - BasePath *string `form:"base_path,omitempty" json:"base_path,omitempty" xml:"base_path,omitempty"` + BasePath *string `json:"base_path,omitempty"` // Additional options to apply to this repository. - CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` + CustomOptions map[string]string `json:"custom_options,omitempty"` } // OrchestratorOptsRequestBodyRequestBody is used to define fields on request // body types. type OrchestratorOptsRequestBodyRequestBody struct { // Swarm-specific configuration. - Swarm *SwarmOptsRequestBodyRequestBody `form:"swarm,omitempty" json:"swarm,omitempty" xml:"swarm,omitempty"` + Swarm *SwarmOptsRequestBodyRequestBody `json:"swarm,omitempty"` } // SwarmOptsRequestBodyRequestBody is used to define fields on request body @@ -2714,88 +2714,88 @@ type OrchestratorOptsRequestBodyRequestBody struct { type SwarmOptsRequestBodyRequestBody struct { // A list of extra volumes to mount. Each entry defines a host and container // path. - ExtraVolumes []*ExtraVolumesSpecRequestBodyRequestBody `form:"extra_volumes,omitempty" json:"extra_volumes,omitempty" xml:"extra_volumes,omitempty"` + ExtraVolumes []*ExtraVolumesSpecRequestBodyRequestBody `json:"extra_volumes,omitempty"` // A list of additional Docker Swarm networks to attach containers in this // database to. - ExtraNetworks []*ExtraNetworkSpecRequestBodyRequestBody `form:"extra_networks,omitempty" json:"extra_networks,omitempty" xml:"extra_networks,omitempty"` + ExtraNetworks []*ExtraNetworkSpecRequestBodyRequestBody `json:"extra_networks,omitempty"` // Arbitrary labels to apply to the Docker Swarm service - ExtraLabels map[string]string `form:"extra_labels,omitempty" json:"extra_labels,omitempty" xml:"extra_labels,omitempty"` + ExtraLabels map[string]string `json:"extra_labels,omitempty"` } // ExtraVolumesSpecRequestBodyRequestBody is used to define fields on request // body types. type ExtraVolumesSpecRequestBodyRequestBody struct { // The host path for the volume. - HostPath string `form:"host_path" json:"host_path" xml:"host_path"` + HostPath string `json:"host_path"` // The path inside the container where the volume will be mounted. - DestinationPath string `form:"destination_path" json:"destination_path" xml:"destination_path"` + DestinationPath string `json:"destination_path"` } // ExtraNetworkSpecRequestBodyRequestBody is used to define fields on request // body types. type ExtraNetworkSpecRequestBodyRequestBody struct { // The name or ID of the network to connect to. - ID string `form:"id" json:"id" xml:"id"` + ID string `json:"id"` // Optional network-scoped aliases for the container. - Aliases []string `form:"aliases,omitempty" json:"aliases,omitempty" xml:"aliases,omitempty"` + Aliases []string `json:"aliases,omitempty"` // Optional driver options for the network connection. - DriverOpts map[string]string `form:"driver_opts,omitempty" json:"driver_opts,omitempty" xml:"driver_opts,omitempty"` + DriverOpts map[string]string `json:"driver_opts,omitempty"` } // DatabaseUserSpecRequestBodyRequestBody is used to define fields on request // body types. type DatabaseUserSpecRequestBodyRequestBody struct { // The username for this database user. - Username string `form:"username" json:"username" xml:"username"` + Username string `json:"username"` // The password for this database user. This field will be excluded from the // response of all endpoints. It can also be omitted from update requests to // keep the current value. - Password *string `form:"password,omitempty" json:"password,omitempty" xml:"password,omitempty"` + Password *string `json:"password,omitempty"` // If true, this user will be granted database ownership. - DbOwner *bool `form:"db_owner,omitempty" json:"db_owner,omitempty" xml:"db_owner,omitempty"` + DbOwner *bool `json:"db_owner,omitempty"` // The attributes to assign to this database user. - Attributes []string `form:"attributes,omitempty" json:"attributes,omitempty" xml:"attributes,omitempty"` + Attributes []string `json:"attributes,omitempty"` // The roles to assign to this database user. - Roles []string `form:"roles,omitempty" json:"roles,omitempty" xml:"roles,omitempty"` + Roles []string `json:"roles,omitempty"` } // ServiceSpecRequestBodyRequestBody is used to define fields on request body // types. type ServiceSpecRequestBodyRequestBody struct { // The unique identifier for this service. - ServiceID string `form:"service_id" json:"service_id" xml:"service_id"` + ServiceID string `json:"service_id"` // The type of service to run. - ServiceType string `form:"service_type" json:"service_type" xml:"service_type"` + ServiceType string `json:"service_type"` // The version of the service in semver format (e.g., '1.0.0') or the literal // 'latest'. - Version string `form:"version" json:"version" xml:"version"` + Version string `json:"version"` // The IDs of the hosts that should run this service. One service instance will // be created per host. - HostIds []string `form:"host_ids" json:"host_ids" xml:"host_ids"` + HostIds []string `json:"host_ids"` // The port to publish the service on the host. If 0, Docker assigns a random // port. If unspecified, no port is published and the service is not accessible // from outside the Docker network. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // Service-specific configuration. For MCP services, this includes // llm_provider, llm_model, and provider-specific API keys. - Config map[string]any `form:"config" json:"config" xml:"config"` + Config map[string]any `json:"config"` // The number of CPUs to allocate for this service. It can include the SI // suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if // unspecified. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for this service. // Defaults to container defaults if unspecified. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` } // TaskLogEntryResponseBody is used to define fields on response body types. type TaskLogEntryResponseBody struct { // The timestamp of the log entry. - Timestamp *string `form:"timestamp,omitempty" json:"timestamp,omitempty" xml:"timestamp,omitempty"` + Timestamp *string `json:"timestamp"` // The log message. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message"` // Additional fields for the log entry. - Fields map[string]any `form:"fields,omitempty" json:"fields,omitempty" xml:"fields,omitempty"` + Fields map[string]any `json:"fields,omitempty"` } // NewJoinClusterRequestBody builds the HTTP request body from the payload of diff --git a/api/apiv1/gen/http/control_plane/server/types.go b/api/apiv1/gen/http/control_plane/server/types.go index 7bc3e5aa..8998fe9c 100644 --- a/api/apiv1/gen/http/control_plane/server/types.go +++ b/api/apiv1/gen/http/control_plane/server/types.go @@ -18,55 +18,55 @@ import ( // "join-cluster" endpoint HTTP request body. type JoinClusterRequestBody struct { // Token to join an existing cluster. - Token *string `form:"token,omitempty" json:"token,omitempty" xml:"token,omitempty"` + Token *string `json:"token"` // Existing server to join - ServerURL *string `form:"server_url,omitempty" json:"server_url,omitempty" xml:"server_url,omitempty"` + ServerURL *string `json:"server_url"` } // GetJoinOptionsRequestBody is the type of the "control-plane" service // "get-join-options" endpoint HTTP request body. type GetJoinOptionsRequestBody struct { // Token to join the cluster. - Token *string `form:"token,omitempty" json:"token,omitempty" xml:"token,omitempty"` + Token *string `json:"token"` // The unique identifier for the host that's joining the cluster. - HostID *string `form:"host_id,omitempty" json:"host_id,omitempty" xml:"host_id,omitempty"` + HostID *string `json:"host_id"` // The hostname of the host that's joining the cluster. - Hostname *string `form:"hostname,omitempty" json:"hostname,omitempty" xml:"hostname,omitempty"` + Hostname *string `json:"hostname"` // The IPv4 address of the host that's joining the cluster. - Ipv4Address *string `form:"ipv4_address,omitempty" json:"ipv4_address,omitempty" xml:"ipv4_address,omitempty"` + Ipv4Address *string `json:"ipv4_address"` // True if the joining member is configured to run an embedded an etcd server. - EmbeddedEtcdEnabled *bool `form:"embedded_etcd_enabled,omitempty" json:"embedded_etcd_enabled,omitempty" xml:"embedded_etcd_enabled,omitempty"` + EmbeddedEtcdEnabled *bool `json:"embedded_etcd_enabled"` } // CreateDatabaseRequestBody is the type of the "control-plane" service // "create-database" endpoint HTTP request body. type CreateDatabaseRequestBody struct { // Unique identifier for the database. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id,omitempty"` // Unique identifier for the database's owner. - TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` + TenantID *string `json:"tenant_id,omitempty"` // The specification for the database. - Spec *DatabaseSpecRequestBody `form:"spec,omitempty" json:"spec,omitempty" xml:"spec,omitempty"` + Spec *DatabaseSpecRequestBody `json:"spec"` } // UpdateDatabaseRequestBody is the type of the "control-plane" service // "update-database" endpoint HTTP request body. type UpdateDatabaseRequestBody struct { // Unique identifier for the database's owner. - TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` + TenantID *string `json:"tenant_id,omitempty"` // The specification for the database. - Spec *DatabaseSpecRequestBodyRequestBody `form:"spec,omitempty" json:"spec,omitempty" xml:"spec,omitempty"` + Spec *DatabaseSpecRequestBodyRequestBody `json:"spec"` } // BackupDatabaseNodeRequestBody is the type of the "control-plane" service // "backup-database-node" endpoint HTTP request body. type BackupDatabaseNodeRequestBody struct { // The type of backup. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type *string `json:"type"` // Annotations for the backup. - Annotations map[string]string `form:"annotations,omitempty" json:"annotations,omitempty" xml:"annotations,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` // Options for the backup. - BackupOptions map[string]string `form:"backup_options,omitempty" json:"backup_options,omitempty" xml:"backup_options,omitempty"` + BackupOptions map[string]string `json:"backup_options,omitempty"` } // SwitchoverDatabaseNodeRequestBody is the type of the "control-plane" service @@ -84,373 +84,373 @@ type SwitchoverDatabaseNodeRequestBody struct { type FailoverDatabaseNodeRequestBody struct { // Optional instance_id of the replica to promote. If omitted, a candidate will // be selected. - CandidateInstanceID *string `form:"candidate_instance_id,omitempty" json:"candidate_instance_id,omitempty" xml:"candidate_instance_id,omitempty"` + CandidateInstanceID *string `json:"candidate_instance_id,omitempty"` // If true, skip the health validations that prevent running failover on a // healthy cluster. - SkipValidation *bool `form:"skip_validation,omitempty" json:"skip_validation,omitempty" xml:"skip_validation,omitempty"` + SkipValidation *bool `json:"skip_validation,omitempty"` } // RestoreDatabaseRequestBody is the type of the "control-plane" service // "restore-database" endpoint HTTP request body. type RestoreDatabaseRequestBody struct { // Configuration for the restore process. - RestoreConfig *RestoreConfigSpecRequestBodyRequestBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecRequestBodyRequestBody `json:"restore_config"` // The nodes to restore. Defaults to all nodes if empty or unspecified. - TargetNodes []string `form:"target_nodes,omitempty" json:"target_nodes,omitempty" xml:"target_nodes,omitempty"` + TargetNodes []string `json:"target_nodes,omitempty"` } // InitClusterResponseBody is the type of the "control-plane" service // "init-cluster" endpoint HTTP response body. type InitClusterResponseBody struct { // Token to join an existing cluster. - Token string `form:"token" json:"token" xml:"token"` + Token string `json:"token"` // Existing server to join - ServerURL string `form:"server_url" json:"server_url" xml:"server_url"` + ServerURL string `json:"server_url"` } // GetJoinTokenResponseBody is the type of the "control-plane" service // "get-join-token" endpoint HTTP response body. type GetJoinTokenResponseBody struct { // Token to join an existing cluster. - Token string `form:"token" json:"token" xml:"token"` + Token string `json:"token"` // Existing server to join - ServerURL string `form:"server_url" json:"server_url" xml:"server_url"` + ServerURL string `json:"server_url"` } // GetJoinOptionsResponseBody is the type of the "control-plane" service // "get-join-options" endpoint HTTP response body. type GetJoinOptionsResponseBody struct { // Connection information for the etcd cluster leader - Leader *EtcdClusterMemberResponseBody `form:"leader" json:"leader" xml:"leader"` + Leader *EtcdClusterMemberResponseBody `json:"leader"` // Credentials for the new host joining the cluster. - Credentials *ClusterCredentialsResponseBody `form:"credentials" json:"credentials" xml:"credentials"` + Credentials *ClusterCredentialsResponseBody `json:"credentials"` } // GetClusterResponseBody is the type of the "control-plane" service // "get-cluster" endpoint HTTP response body. type GetClusterResponseBody struct { // Unique identifier for the cluster. - ID string `form:"id" json:"id" xml:"id"` + ID string `json:"id"` // Current status of the cluster. - Status *ClusterStatusResponseBody `form:"status" json:"status" xml:"status"` + Status *ClusterStatusResponseBody `json:"status"` // All of the hosts in the cluster. - Hosts []*HostResponseBody `form:"hosts" json:"hosts" xml:"hosts"` + Hosts []*HostResponseBody `json:"hosts"` } // ListHostsResponseBody is the type of the "control-plane" service // "list-hosts" endpoint HTTP response body. type ListHostsResponseBody struct { // List of hosts in the cluster - Hosts []*HostResponseBody `form:"hosts" json:"hosts" xml:"hosts"` + Hosts []*HostResponseBody `json:"hosts"` } // GetHostResponseBody is the type of the "control-plane" service "get-host" // endpoint HTTP response body. type GetHostResponseBody struct { // Unique identifier for the host. - ID string `form:"id" json:"id" xml:"id"` + ID string `json:"id"` // The orchestrator used by this host. - Orchestrator string `form:"orchestrator" json:"orchestrator" xml:"orchestrator"` + Orchestrator string `json:"orchestrator"` // The data directory for the host. - DataDir string `form:"data_dir" json:"data_dir" xml:"data_dir"` + DataDir string `json:"data_dir"` // The cohort that this host belongs to. - Cohort *HostCohortResponseBody `form:"cohort,omitempty" json:"cohort,omitempty" xml:"cohort,omitempty"` + Cohort *HostCohortResponseBody `json:"cohort,omitempty"` // The hostname of this host. - Hostname string `form:"hostname" json:"hostname" xml:"hostname"` + Hostname string `json:"hostname"` // The IPv4 address of this host. - Ipv4Address string `form:"ipv4_address" json:"ipv4_address" xml:"ipv4_address"` + Ipv4Address string `json:"ipv4_address"` // The number of CPUs on this host. - Cpus *int `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *int `json:"cpus,omitempty"` // The amount of memory available on this host. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // Current status of the host. - Status *HostStatusResponseBody `form:"status" json:"status" xml:"status"` + Status *HostStatusResponseBody `json:"status"` // The default PgEdge version for this host. - DefaultPgedgeVersion *PgEdgeVersionResponseBody `form:"default_pgedge_version,omitempty" json:"default_pgedge_version,omitempty" xml:"default_pgedge_version,omitempty"` + DefaultPgedgeVersion *PgEdgeVersionResponseBody `json:"default_pgedge_version,omitempty"` // The PgEdge versions supported by this host. - SupportedPgedgeVersions []*PgEdgeVersionResponseBody `form:"supported_pgedge_versions,omitempty" json:"supported_pgedge_versions,omitempty" xml:"supported_pgedge_versions,omitempty"` + SupportedPgedgeVersions []*PgEdgeVersionResponseBody `json:"supported_pgedge_versions,omitempty"` // The etcd mode for this host. - EtcdMode *string `form:"etcd_mode,omitempty" json:"etcd_mode,omitempty" xml:"etcd_mode,omitempty"` + EtcdMode *string `json:"etcd_mode,omitempty"` } // RemoveHostResponseBody is the type of the "control-plane" service // "remove-host" endpoint HTTP response body. type RemoveHostResponseBody struct { // The task that tracks the overall host removal operation. - Task *TaskResponseBody `form:"task" json:"task" xml:"task"` + Task *TaskResponseBody `json:"task"` // The tasks that will update databases affected by the host removal. - UpdateDatabaseTasks []*TaskResponseBody `form:"update_database_tasks" json:"update_database_tasks" xml:"update_database_tasks"` + UpdateDatabaseTasks []*TaskResponseBody `json:"update_database_tasks"` } // ListDatabasesResponseBody is the type of the "control-plane" service // "list-databases" endpoint HTTP response body. type ListDatabasesResponseBody struct { // The databases managed by this cluster. - Databases []*DatabaseSummaryResponseBody `form:"databases" json:"databases" xml:"databases"` + Databases []*DatabaseSummaryResponseBody `json:"databases"` } // CreateDatabaseResponseBody is the type of the "control-plane" service // "create-database" endpoint HTTP response body. type CreateDatabaseResponseBody struct { // The task that will create this database. - Task *TaskResponseBody `form:"task" json:"task" xml:"task"` + Task *TaskResponseBody `json:"task"` // The database being created. - Database *DatabaseResponseBody `form:"database" json:"database" xml:"database"` + Database *DatabaseResponseBody `json:"database"` } // GetDatabaseResponseBody is the type of the "control-plane" service // "get-database" endpoint HTTP response body. type GetDatabaseResponseBody struct { // Unique identifier for the database. - ID string `form:"id" json:"id" xml:"id"` + ID string `json:"id"` // Unique identifier for the database's owner. - TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` + TenantID *string `json:"tenant_id,omitempty"` // The time that the database was created. - CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` + CreatedAt string `json:"created_at"` // The time that the database was last updated. - UpdatedAt string `form:"updated_at" json:"updated_at" xml:"updated_at"` + UpdatedAt string `json:"updated_at"` // Current state of the database. - State string `form:"state" json:"state" xml:"state"` + State string `json:"state"` // All of the instances in the database. - Instances []*InstanceResponseBody `form:"instances,omitempty" json:"instances,omitempty" xml:"instances,omitempty"` + Instances []*InstanceResponseBody `json:"instances,omitempty"` // Service instances running alongside this database. - ServiceInstances []*ServiceInstanceResponseBody `form:"service_instances,omitempty" json:"service_instances,omitempty" xml:"service_instances,omitempty"` + ServiceInstances []*ServiceInstanceResponseBody `json:"service_instances,omitempty"` // The user-provided specification for the database. - Spec *DatabaseSpecResponseBody `form:"spec,omitempty" json:"spec,omitempty" xml:"spec,omitempty"` + Spec *DatabaseSpecResponseBody `json:"spec,omitempty"` } // UpdateDatabaseResponseBody is the type of the "control-plane" service // "update-database" endpoint HTTP response body. type UpdateDatabaseResponseBody struct { // The task that will update this database. - Task *TaskResponseBody `form:"task" json:"task" xml:"task"` + Task *TaskResponseBody `json:"task"` // The database being updated. - Database *DatabaseResponseBody `form:"database" json:"database" xml:"database"` + Database *DatabaseResponseBody `json:"database"` } // DeleteDatabaseResponseBody is the type of the "control-plane" service // "delete-database" endpoint HTTP response body. type DeleteDatabaseResponseBody struct { // The task that will delete this database. - Task *TaskResponseBody `form:"task" json:"task" xml:"task"` + Task *TaskResponseBody `json:"task"` } // BackupDatabaseNodeResponseBody is the type of the "control-plane" service // "backup-database-node" endpoint HTTP response body. type BackupDatabaseNodeResponseBody struct { // The task that will backup this database node. - Task *TaskResponseBody `form:"task" json:"task" xml:"task"` + Task *TaskResponseBody `json:"task"` } // SwitchoverDatabaseNodeResponseBody is the type of the "control-plane" // service "switchover-database-node" endpoint HTTP response body. type SwitchoverDatabaseNodeResponseBody struct { // The task that will perform the switchover. - Task *TaskResponseBody `form:"task" json:"task" xml:"task"` + Task *TaskResponseBody `json:"task"` } // FailoverDatabaseNodeResponseBody is the type of the "control-plane" service // "failover-database-node" endpoint HTTP response body. type FailoverDatabaseNodeResponseBody struct { // The task that will perform the failover. - Task *TaskResponseBody `form:"task" json:"task" xml:"task"` + Task *TaskResponseBody `json:"task"` } // ListDatabaseTasksResponseBody is the type of the "control-plane" service // "list-database-tasks" endpoint HTTP response body. type ListDatabaseTasksResponseBody struct { // The tasks for the given database. - Tasks []*TaskResponseBody `form:"tasks" json:"tasks" xml:"tasks"` + Tasks []*TaskResponseBody `json:"tasks"` } // GetDatabaseTaskResponseBody is the type of the "control-plane" service // "get-database-task" endpoint HTTP response body. type GetDatabaseTaskResponseBody struct { // The parent task ID of the task. - ParentID *string `form:"parent_id,omitempty" json:"parent_id,omitempty" xml:"parent_id,omitempty"` + ParentID *string `json:"parent_id,omitempty"` // The scope of the task (database or host). - Scope string `form:"scope" json:"scope" xml:"scope"` + Scope string `json:"scope"` // The entity ID (database_id or host_id) that this task belongs to. - EntityID string `form:"entity_id" json:"entity_id" xml:"entity_id"` + EntityID string `json:"entity_id"` // The database ID of the task. - DatabaseID *string `form:"database_id,omitempty" json:"database_id,omitempty" xml:"database_id,omitempty"` + DatabaseID *string `json:"database_id,omitempty"` // The name of the node that the task is operating on. - NodeName *string `form:"node_name,omitempty" json:"node_name,omitempty" xml:"node_name,omitempty"` + NodeName *string `json:"node_name,omitempty"` // The ID of the instance that the task is operating on. - InstanceID *string `form:"instance_id,omitempty" json:"instance_id,omitempty" xml:"instance_id,omitempty"` + InstanceID *string `json:"instance_id,omitempty"` // The ID of the host that the task is running on. - HostID *string `form:"host_id,omitempty" json:"host_id,omitempty" xml:"host_id,omitempty"` + HostID *string `json:"host_id,omitempty"` // The unique ID of the task. - TaskID string `form:"task_id" json:"task_id" xml:"task_id"` + TaskID string `json:"task_id"` // The time when the task was created. - CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` + CreatedAt string `json:"created_at"` // The time when the task was completed. - CompletedAt *string `form:"completed_at,omitempty" json:"completed_at,omitempty" xml:"completed_at,omitempty"` + CompletedAt *string `json:"completed_at,omitempty"` // The type of the task. - Type string `form:"type" json:"type" xml:"type"` + Type string `json:"type"` // The status of the task. - Status string `form:"status" json:"status" xml:"status"` + Status string `json:"status"` // The error message if the task failed. - Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` + Error *string `json:"error,omitempty"` } // GetDatabaseTaskLogResponseBody is the type of the "control-plane" service // "get-database-task-log" endpoint HTTP response body. type GetDatabaseTaskLogResponseBody struct { // The scope of the task (database or host). - Scope string `form:"scope" json:"scope" xml:"scope"` + Scope string `json:"scope"` // The entity ID (database_id or host_id) that this task log belongs to. - EntityID string `form:"entity_id" json:"entity_id" xml:"entity_id"` + EntityID string `json:"entity_id"` // The database ID of the task log. Deprecated: use entity_id instead. - DatabaseID *string `form:"database_id,omitempty" json:"database_id,omitempty" xml:"database_id,omitempty"` + DatabaseID *string `json:"database_id,omitempty"` // The unique ID of the task log. - TaskID string `form:"task_id" json:"task_id" xml:"task_id"` + TaskID string `json:"task_id"` // The status of the task. - TaskStatus string `form:"task_status" json:"task_status" xml:"task_status"` + TaskStatus string `json:"task_status"` // The ID of the last entry in the task log. - LastEntryID *string `form:"last_entry_id,omitempty" json:"last_entry_id,omitempty" xml:"last_entry_id,omitempty"` + LastEntryID *string `json:"last_entry_id,omitempty"` // Entries in the task log. - Entries []*TaskLogEntryResponseBody `form:"entries" json:"entries" xml:"entries"` + Entries []*TaskLogEntryResponseBody `json:"entries"` } // ListHostTasksResponseBody is the type of the "control-plane" service // "list-host-tasks" endpoint HTTP response body. type ListHostTasksResponseBody struct { // The tasks for the given host. - Tasks []*TaskResponseBody `form:"tasks" json:"tasks" xml:"tasks"` + Tasks []*TaskResponseBody `json:"tasks"` } // GetHostTaskResponseBody is the type of the "control-plane" service // "get-host-task" endpoint HTTP response body. type GetHostTaskResponseBody struct { // The parent task ID of the task. - ParentID *string `form:"parent_id,omitempty" json:"parent_id,omitempty" xml:"parent_id,omitempty"` + ParentID *string `json:"parent_id,omitempty"` // The scope of the task (database or host). - Scope string `form:"scope" json:"scope" xml:"scope"` + Scope string `json:"scope"` // The entity ID (database_id or host_id) that this task belongs to. - EntityID string `form:"entity_id" json:"entity_id" xml:"entity_id"` + EntityID string `json:"entity_id"` // The database ID of the task. - DatabaseID *string `form:"database_id,omitempty" json:"database_id,omitempty" xml:"database_id,omitempty"` + DatabaseID *string `json:"database_id,omitempty"` // The name of the node that the task is operating on. - NodeName *string `form:"node_name,omitempty" json:"node_name,omitempty" xml:"node_name,omitempty"` + NodeName *string `json:"node_name,omitempty"` // The ID of the instance that the task is operating on. - InstanceID *string `form:"instance_id,omitempty" json:"instance_id,omitempty" xml:"instance_id,omitempty"` + InstanceID *string `json:"instance_id,omitempty"` // The ID of the host that the task is running on. - HostID *string `form:"host_id,omitempty" json:"host_id,omitempty" xml:"host_id,omitempty"` + HostID *string `json:"host_id,omitempty"` // The unique ID of the task. - TaskID string `form:"task_id" json:"task_id" xml:"task_id"` + TaskID string `json:"task_id"` // The time when the task was created. - CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` + CreatedAt string `json:"created_at"` // The time when the task was completed. - CompletedAt *string `form:"completed_at,omitempty" json:"completed_at,omitempty" xml:"completed_at,omitempty"` + CompletedAt *string `json:"completed_at,omitempty"` // The type of the task. - Type string `form:"type" json:"type" xml:"type"` + Type string `json:"type"` // The status of the task. - Status string `form:"status" json:"status" xml:"status"` + Status string `json:"status"` // The error message if the task failed. - Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` + Error *string `json:"error,omitempty"` } // GetHostTaskLogResponseBody is the type of the "control-plane" service // "get-host-task-log" endpoint HTTP response body. type GetHostTaskLogResponseBody struct { // The scope of the task (database or host). - Scope string `form:"scope" json:"scope" xml:"scope"` + Scope string `json:"scope"` // The entity ID (database_id or host_id) that this task log belongs to. - EntityID string `form:"entity_id" json:"entity_id" xml:"entity_id"` + EntityID string `json:"entity_id"` // The database ID of the task log. Deprecated: use entity_id instead. - DatabaseID *string `form:"database_id,omitempty" json:"database_id,omitempty" xml:"database_id,omitempty"` + DatabaseID *string `json:"database_id,omitempty"` // The unique ID of the task log. - TaskID string `form:"task_id" json:"task_id" xml:"task_id"` + TaskID string `json:"task_id"` // The status of the task. - TaskStatus string `form:"task_status" json:"task_status" xml:"task_status"` + TaskStatus string `json:"task_status"` // The ID of the last entry in the task log. - LastEntryID *string `form:"last_entry_id,omitempty" json:"last_entry_id,omitempty" xml:"last_entry_id,omitempty"` + LastEntryID *string `json:"last_entry_id,omitempty"` // Entries in the task log. - Entries []*TaskLogEntryResponseBody `form:"entries" json:"entries" xml:"entries"` + Entries []*TaskLogEntryResponseBody `json:"entries"` } // ListTasksResponseBody is the type of the "control-plane" service // "list-tasks" endpoint HTTP response body. type ListTasksResponseBody struct { // The tasks for the given entity. - Tasks []*TaskResponseBody `form:"tasks" json:"tasks" xml:"tasks"` + Tasks []*TaskResponseBody `json:"tasks"` } // RestoreDatabaseResponseBody is the type of the "control-plane" service // "restore-database" endpoint HTTP response body. type RestoreDatabaseResponseBody struct { // The task that will restore this database. - Task *TaskResponseBody `form:"task" json:"task" xml:"task"` + Task *TaskResponseBody `json:"task"` // The tasks that will restore each database node. - NodeTasks []*TaskResponseBody `form:"node_tasks" json:"node_tasks" xml:"node_tasks"` + NodeTasks []*TaskResponseBody `json:"node_tasks"` // The database being restored. - Database *DatabaseResponseBody `form:"database" json:"database" xml:"database"` + Database *DatabaseResponseBody `json:"database"` } // GetVersionResponseBody is the type of the "control-plane" service // "get-version" endpoint HTTP response body. type GetVersionResponseBody struct { // The version of the API server. - Version string `form:"version" json:"version" xml:"version"` + Version string `json:"version"` // The VCS revision of the API server. - Revision string `form:"revision" json:"revision" xml:"revision"` + Revision string `json:"revision"` // The timestamp associated with the revision. - RevisionTime string `form:"revision_time" json:"revision_time" xml:"revision_time"` + RevisionTime string `json:"revision_time"` // The CPU architecture of the API server. - Arch string `form:"arch" json:"arch" xml:"arch"` + Arch string `json:"arch"` } // RestartInstanceResponseBody is the type of the "control-plane" service // "restart-instance" endpoint HTTP response body. type RestartInstanceResponseBody struct { // Task representing the restart operation - Task *TaskResponseBody `form:"task" json:"task" xml:"task"` + Task *TaskResponseBody `json:"task"` } // StopInstanceResponseBody is the type of the "control-plane" service // "stop-instance" endpoint HTTP response body. type StopInstanceResponseBody struct { // Task representing the stop operation - Task *TaskResponseBody `form:"task" json:"task" xml:"task"` + Task *TaskResponseBody `json:"task"` } // StartInstanceResponseBody is the type of the "control-plane" service // "start-instance" endpoint HTTP response body. type StartInstanceResponseBody struct { // Task representing the start operation - Task *TaskResponseBody `form:"task" json:"task" xml:"task"` + Task *TaskResponseBody `json:"task"` } // CancelDatabaseTaskResponseBody is the type of the "control-plane" service // "cancel-database-task" endpoint HTTP response body. type CancelDatabaseTaskResponseBody struct { // The parent task ID of the task. - ParentID *string `form:"parent_id,omitempty" json:"parent_id,omitempty" xml:"parent_id,omitempty"` + ParentID *string `json:"parent_id,omitempty"` // The scope of the task (database or host). - Scope string `form:"scope" json:"scope" xml:"scope"` + Scope string `json:"scope"` // The entity ID (database_id or host_id) that this task belongs to. - EntityID string `form:"entity_id" json:"entity_id" xml:"entity_id"` + EntityID string `json:"entity_id"` // The database ID of the task. - DatabaseID *string `form:"database_id,omitempty" json:"database_id,omitempty" xml:"database_id,omitempty"` + DatabaseID *string `json:"database_id,omitempty"` // The name of the node that the task is operating on. - NodeName *string `form:"node_name,omitempty" json:"node_name,omitempty" xml:"node_name,omitempty"` + NodeName *string `json:"node_name,omitempty"` // The ID of the instance that the task is operating on. - InstanceID *string `form:"instance_id,omitempty" json:"instance_id,omitempty" xml:"instance_id,omitempty"` + InstanceID *string `json:"instance_id,omitempty"` // The ID of the host that the task is running on. - HostID *string `form:"host_id,omitempty" json:"host_id,omitempty" xml:"host_id,omitempty"` + HostID *string `json:"host_id,omitempty"` // The unique ID of the task. - TaskID string `form:"task_id" json:"task_id" xml:"task_id"` + TaskID string `json:"task_id"` // The time when the task was created. - CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` + CreatedAt string `json:"created_at"` // The time when the task was completed. - CompletedAt *string `form:"completed_at,omitempty" json:"completed_at,omitempty" xml:"completed_at,omitempty"` + CompletedAt *string `json:"completed_at,omitempty"` // The type of the task. - Type string `form:"type" json:"type" xml:"type"` + Type string `json:"type"` // The status of the task. - Status string `form:"status" json:"status" xml:"status"` + Status string `json:"status"` // The error message if the task failed. - Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` + Error *string `json:"error,omitempty"` } // InitClusterClusterAlreadyInitializedResponseBody is the type of the @@ -458,9 +458,9 @@ type CancelDatabaseTaskResponseBody struct { // "cluster_already_initialized" error. type InitClusterClusterAlreadyInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // InitClusterOperationNotSupportedResponseBody is the type of the @@ -468,9 +468,9 @@ type InitClusterClusterAlreadyInitializedResponseBody struct { // "operation_not_supported" error. type InitClusterOperationNotSupportedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // InitClusterServerErrorResponseBody is the type of the "control-plane" @@ -478,9 +478,9 @@ type InitClusterOperationNotSupportedResponseBody struct { // error. type InitClusterServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // JoinClusterClusterAlreadyInitializedResponseBody is the type of the @@ -488,9 +488,9 @@ type InitClusterServerErrorResponseBody struct { // "cluster_already_initialized" error. type JoinClusterClusterAlreadyInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // JoinClusterInvalidJoinTokenResponseBody is the type of the "control-plane" @@ -498,9 +498,9 @@ type JoinClusterClusterAlreadyInitializedResponseBody struct { // "invalid_join_token" error. type JoinClusterInvalidJoinTokenResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // JoinClusterInvalidInputResponseBody is the type of the "control-plane" @@ -508,9 +508,9 @@ type JoinClusterInvalidJoinTokenResponseBody struct { // error. type JoinClusterInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // JoinClusterServerErrorResponseBody is the type of the "control-plane" @@ -518,9 +518,9 @@ type JoinClusterInvalidInputResponseBody struct { // error. type JoinClusterServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetJoinTokenClusterNotInitializedResponseBody is the type of the @@ -528,9 +528,9 @@ type JoinClusterServerErrorResponseBody struct { // "cluster_not_initialized" error. type GetJoinTokenClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetJoinTokenServerErrorResponseBody is the type of the "control-plane" @@ -538,9 +538,9 @@ type GetJoinTokenClusterNotInitializedResponseBody struct { // error. type GetJoinTokenServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetJoinOptionsClusterNotInitializedResponseBody is the type of the @@ -548,9 +548,9 @@ type GetJoinTokenServerErrorResponseBody struct { // the "cluster_not_initialized" error. type GetJoinOptionsClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetJoinOptionsInvalidJoinTokenResponseBody is the type of the @@ -558,9 +558,9 @@ type GetJoinOptionsClusterNotInitializedResponseBody struct { // the "invalid_join_token" error. type GetJoinOptionsInvalidJoinTokenResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetJoinOptionsInvalidInputResponseBody is the type of the "control-plane" @@ -568,9 +568,9 @@ type GetJoinOptionsInvalidJoinTokenResponseBody struct { // "invalid_input" error. type GetJoinOptionsInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetJoinOptionsServerErrorResponseBody is the type of the "control-plane" @@ -578,9 +578,9 @@ type GetJoinOptionsInvalidInputResponseBody struct { // "server_error" error. type GetJoinOptionsServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetClusterClusterNotInitializedResponseBody is the type of the @@ -588,18 +588,18 @@ type GetJoinOptionsServerErrorResponseBody struct { // "cluster_not_initialized" error. type GetClusterClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetClusterServerErrorResponseBody is the type of the "control-plane" service // "get-cluster" endpoint HTTP response body for the "server_error" error. type GetClusterServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // ListHostsClusterNotInitializedResponseBody is the type of the @@ -607,18 +607,18 @@ type GetClusterServerErrorResponseBody struct { // "cluster_not_initialized" error. type ListHostsClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // ListHostsServerErrorResponseBody is the type of the "control-plane" service // "list-hosts" endpoint HTTP response body for the "server_error" error. type ListHostsServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetHostClusterNotInitializedResponseBody is the type of the "control-plane" @@ -626,36 +626,36 @@ type ListHostsServerErrorResponseBody struct { // "cluster_not_initialized" error. type GetHostClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetHostInvalidInputResponseBody is the type of the "control-plane" service // "get-host" endpoint HTTP response body for the "invalid_input" error. type GetHostInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetHostNotFoundResponseBody is the type of the "control-plane" service // "get-host" endpoint HTTP response body for the "not_found" error. type GetHostNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetHostServerErrorResponseBody is the type of the "control-plane" service // "get-host" endpoint HTTP response body for the "server_error" error. type GetHostServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // RemoveHostClusterNotInitializedResponseBody is the type of the @@ -663,9 +663,9 @@ type GetHostServerErrorResponseBody struct { // "cluster_not_initialized" error. type RemoveHostClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // RemoveHostInvalidInputResponseBody is the type of the "control-plane" @@ -673,27 +673,27 @@ type RemoveHostClusterNotInitializedResponseBody struct { // error. type RemoveHostInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // RemoveHostNotFoundResponseBody is the type of the "control-plane" service // "remove-host" endpoint HTTP response body for the "not_found" error. type RemoveHostNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // RemoveHostServerErrorResponseBody is the type of the "control-plane" service // "remove-host" endpoint HTTP response body for the "server_error" error. type RemoveHostServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // ListDatabasesClusterNotInitializedResponseBody is the type of the @@ -701,9 +701,9 @@ type RemoveHostServerErrorResponseBody struct { // "cluster_not_initialized" error. type ListDatabasesClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // ListDatabasesServerErrorResponseBody is the type of the "control-plane" @@ -711,9 +711,9 @@ type ListDatabasesClusterNotInitializedResponseBody struct { // error. type ListDatabasesServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // CreateDatabaseDatabaseAlreadyExistsResponseBody is the type of the @@ -721,9 +721,9 @@ type ListDatabasesServerErrorResponseBody struct { // the "database_already_exists" error. type CreateDatabaseDatabaseAlreadyExistsResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // CreateDatabaseClusterNotInitializedResponseBody is the type of the @@ -731,9 +731,9 @@ type CreateDatabaseDatabaseAlreadyExistsResponseBody struct { // the "cluster_not_initialized" error. type CreateDatabaseClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // CreateDatabaseOperationAlreadyInProgressResponseBody is the type of the @@ -741,9 +741,9 @@ type CreateDatabaseClusterNotInitializedResponseBody struct { // the "operation_already_in_progress" error. type CreateDatabaseOperationAlreadyInProgressResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // CreateDatabaseInvalidInputResponseBody is the type of the "control-plane" @@ -751,9 +751,9 @@ type CreateDatabaseOperationAlreadyInProgressResponseBody struct { // "invalid_input" error. type CreateDatabaseInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // CreateDatabaseServerErrorResponseBody is the type of the "control-plane" @@ -761,9 +761,9 @@ type CreateDatabaseInvalidInputResponseBody struct { // error. type CreateDatabaseServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetDatabaseClusterNotInitializedResponseBody is the type of the @@ -771,9 +771,9 @@ type CreateDatabaseServerErrorResponseBody struct { // "cluster_not_initialized" error. type GetDatabaseClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetDatabaseInvalidInputResponseBody is the type of the "control-plane" @@ -781,18 +781,18 @@ type GetDatabaseClusterNotInitializedResponseBody struct { // error. type GetDatabaseInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetDatabaseNotFoundResponseBody is the type of the "control-plane" service // "get-database" endpoint HTTP response body for the "not_found" error. type GetDatabaseNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetDatabaseServerErrorResponseBody is the type of the "control-plane" @@ -800,9 +800,9 @@ type GetDatabaseNotFoundResponseBody struct { // error. type GetDatabaseServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // UpdateDatabaseClusterNotInitializedResponseBody is the type of the @@ -810,9 +810,9 @@ type GetDatabaseServerErrorResponseBody struct { // the "cluster_not_initialized" error. type UpdateDatabaseClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // UpdateDatabaseDatabaseNotModifiableResponseBody is the type of the @@ -820,9 +820,9 @@ type UpdateDatabaseClusterNotInitializedResponseBody struct { // the "database_not_modifiable" error. type UpdateDatabaseDatabaseNotModifiableResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // UpdateDatabaseOperationAlreadyInProgressResponseBody is the type of the @@ -830,9 +830,9 @@ type UpdateDatabaseDatabaseNotModifiableResponseBody struct { // the "operation_already_in_progress" error. type UpdateDatabaseOperationAlreadyInProgressResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // UpdateDatabaseInvalidInputResponseBody is the type of the "control-plane" @@ -840,9 +840,9 @@ type UpdateDatabaseOperationAlreadyInProgressResponseBody struct { // "invalid_input" error. type UpdateDatabaseInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // UpdateDatabaseNotFoundResponseBody is the type of the "control-plane" @@ -850,9 +850,9 @@ type UpdateDatabaseInvalidInputResponseBody struct { // error. type UpdateDatabaseNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // UpdateDatabaseServerErrorResponseBody is the type of the "control-plane" @@ -860,9 +860,9 @@ type UpdateDatabaseNotFoundResponseBody struct { // error. type UpdateDatabaseServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // DeleteDatabaseClusterNotInitializedResponseBody is the type of the @@ -870,9 +870,9 @@ type UpdateDatabaseServerErrorResponseBody struct { // the "cluster_not_initialized" error. type DeleteDatabaseClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // DeleteDatabaseDatabaseNotModifiableResponseBody is the type of the @@ -880,9 +880,9 @@ type DeleteDatabaseClusterNotInitializedResponseBody struct { // the "database_not_modifiable" error. type DeleteDatabaseDatabaseNotModifiableResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // DeleteDatabaseOperationAlreadyInProgressResponseBody is the type of the @@ -890,9 +890,9 @@ type DeleteDatabaseDatabaseNotModifiableResponseBody struct { // the "operation_already_in_progress" error. type DeleteDatabaseOperationAlreadyInProgressResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // DeleteDatabaseInvalidInputResponseBody is the type of the "control-plane" @@ -900,9 +900,9 @@ type DeleteDatabaseOperationAlreadyInProgressResponseBody struct { // "invalid_input" error. type DeleteDatabaseInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // DeleteDatabaseNotFoundResponseBody is the type of the "control-plane" @@ -910,9 +910,9 @@ type DeleteDatabaseInvalidInputResponseBody struct { // error. type DeleteDatabaseNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // DeleteDatabaseServerErrorResponseBody is the type of the "control-plane" @@ -920,9 +920,9 @@ type DeleteDatabaseNotFoundResponseBody struct { // error. type DeleteDatabaseServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // BackupDatabaseNodeClusterNotInitializedResponseBody is the type of the @@ -930,9 +930,9 @@ type DeleteDatabaseServerErrorResponseBody struct { // for the "cluster_not_initialized" error. type BackupDatabaseNodeClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // BackupDatabaseNodeDatabaseNotModifiableResponseBody is the type of the @@ -940,9 +940,9 @@ type BackupDatabaseNodeClusterNotInitializedResponseBody struct { // for the "database_not_modifiable" error. type BackupDatabaseNodeDatabaseNotModifiableResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // BackupDatabaseNodeOperationAlreadyInProgressResponseBody is the type of the @@ -950,9 +950,9 @@ type BackupDatabaseNodeDatabaseNotModifiableResponseBody struct { // for the "operation_already_in_progress" error. type BackupDatabaseNodeOperationAlreadyInProgressResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // BackupDatabaseNodeInvalidInputResponseBody is the type of the @@ -960,9 +960,9 @@ type BackupDatabaseNodeOperationAlreadyInProgressResponseBody struct { // for the "invalid_input" error. type BackupDatabaseNodeInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // BackupDatabaseNodeNotFoundResponseBody is the type of the "control-plane" @@ -970,9 +970,9 @@ type BackupDatabaseNodeInvalidInputResponseBody struct { // "not_found" error. type BackupDatabaseNodeNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // BackupDatabaseNodeServerErrorResponseBody is the type of the "control-plane" @@ -980,9 +980,9 @@ type BackupDatabaseNodeNotFoundResponseBody struct { // "server_error" error. type BackupDatabaseNodeServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // SwitchoverDatabaseNodeClusterNotInitializedResponseBody is the type of the @@ -990,9 +990,9 @@ type BackupDatabaseNodeServerErrorResponseBody struct { // body for the "cluster_not_initialized" error. type SwitchoverDatabaseNodeClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // SwitchoverDatabaseNodeDatabaseNotModifiableResponseBody is the type of the @@ -1000,9 +1000,9 @@ type SwitchoverDatabaseNodeClusterNotInitializedResponseBody struct { // body for the "database_not_modifiable" error. type SwitchoverDatabaseNodeDatabaseNotModifiableResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // SwitchoverDatabaseNodeOperationAlreadyInProgressResponseBody is the type of @@ -1010,9 +1010,9 @@ type SwitchoverDatabaseNodeDatabaseNotModifiableResponseBody struct { // response body for the "operation_already_in_progress" error. type SwitchoverDatabaseNodeOperationAlreadyInProgressResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // SwitchoverDatabaseNodeInvalidInputResponseBody is the type of the @@ -1020,9 +1020,9 @@ type SwitchoverDatabaseNodeOperationAlreadyInProgressResponseBody struct { // body for the "invalid_input" error. type SwitchoverDatabaseNodeInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // SwitchoverDatabaseNodeNotFoundResponseBody is the type of the @@ -1030,9 +1030,9 @@ type SwitchoverDatabaseNodeInvalidInputResponseBody struct { // body for the "not_found" error. type SwitchoverDatabaseNodeNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // SwitchoverDatabaseNodeServerErrorResponseBody is the type of the @@ -1040,9 +1040,9 @@ type SwitchoverDatabaseNodeNotFoundResponseBody struct { // body for the "server_error" error. type SwitchoverDatabaseNodeServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // FailoverDatabaseNodeClusterNotInitializedResponseBody is the type of the @@ -1050,9 +1050,9 @@ type SwitchoverDatabaseNodeServerErrorResponseBody struct { // for the "cluster_not_initialized" error. type FailoverDatabaseNodeClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // FailoverDatabaseNodeDatabaseNotModifiableResponseBody is the type of the @@ -1060,9 +1060,9 @@ type FailoverDatabaseNodeClusterNotInitializedResponseBody struct { // for the "database_not_modifiable" error. type FailoverDatabaseNodeDatabaseNotModifiableResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // FailoverDatabaseNodeOperationAlreadyInProgressResponseBody is the type of @@ -1070,9 +1070,9 @@ type FailoverDatabaseNodeDatabaseNotModifiableResponseBody struct { // body for the "operation_already_in_progress" error. type FailoverDatabaseNodeOperationAlreadyInProgressResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // FailoverDatabaseNodeInvalidInputResponseBody is the type of the @@ -1080,9 +1080,9 @@ type FailoverDatabaseNodeOperationAlreadyInProgressResponseBody struct { // for the "invalid_input" error. type FailoverDatabaseNodeInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // FailoverDatabaseNodeNotFoundResponseBody is the type of the "control-plane" @@ -1090,9 +1090,9 @@ type FailoverDatabaseNodeInvalidInputResponseBody struct { // "not_found" error. type FailoverDatabaseNodeNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // FailoverDatabaseNodeServerErrorResponseBody is the type of the @@ -1100,9 +1100,9 @@ type FailoverDatabaseNodeNotFoundResponseBody struct { // for the "server_error" error. type FailoverDatabaseNodeServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // ListDatabaseTasksClusterNotInitializedResponseBody is the type of the @@ -1110,9 +1110,9 @@ type FailoverDatabaseNodeServerErrorResponseBody struct { // for the "cluster_not_initialized" error. type ListDatabaseTasksClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // ListDatabaseTasksInvalidInputResponseBody is the type of the "control-plane" @@ -1120,9 +1120,9 @@ type ListDatabaseTasksClusterNotInitializedResponseBody struct { // "invalid_input" error. type ListDatabaseTasksInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // ListDatabaseTasksNotFoundResponseBody is the type of the "control-plane" @@ -1130,9 +1130,9 @@ type ListDatabaseTasksInvalidInputResponseBody struct { // "not_found" error. type ListDatabaseTasksNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // ListDatabaseTasksServerErrorResponseBody is the type of the "control-plane" @@ -1140,9 +1140,9 @@ type ListDatabaseTasksNotFoundResponseBody struct { // "server_error" error. type ListDatabaseTasksServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetDatabaseTaskClusterNotInitializedResponseBody is the type of the @@ -1150,9 +1150,9 @@ type ListDatabaseTasksServerErrorResponseBody struct { // the "cluster_not_initialized" error. type GetDatabaseTaskClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetDatabaseTaskInvalidInputResponseBody is the type of the "control-plane" @@ -1160,9 +1160,9 @@ type GetDatabaseTaskClusterNotInitializedResponseBody struct { // "invalid_input" error. type GetDatabaseTaskInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetDatabaseTaskNotFoundResponseBody is the type of the "control-plane" @@ -1170,9 +1170,9 @@ type GetDatabaseTaskInvalidInputResponseBody struct { // error. type GetDatabaseTaskNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetDatabaseTaskServerErrorResponseBody is the type of the "control-plane" @@ -1180,9 +1180,9 @@ type GetDatabaseTaskNotFoundResponseBody struct { // "server_error" error. type GetDatabaseTaskServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetDatabaseTaskLogClusterNotInitializedResponseBody is the type of the @@ -1190,9 +1190,9 @@ type GetDatabaseTaskServerErrorResponseBody struct { // for the "cluster_not_initialized" error. type GetDatabaseTaskLogClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetDatabaseTaskLogInvalidInputResponseBody is the type of the @@ -1200,9 +1200,9 @@ type GetDatabaseTaskLogClusterNotInitializedResponseBody struct { // for the "invalid_input" error. type GetDatabaseTaskLogInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetDatabaseTaskLogNotFoundResponseBody is the type of the "control-plane" @@ -1210,9 +1210,9 @@ type GetDatabaseTaskLogInvalidInputResponseBody struct { // "not_found" error. type GetDatabaseTaskLogNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetDatabaseTaskLogServerErrorResponseBody is the type of the "control-plane" @@ -1220,9 +1220,9 @@ type GetDatabaseTaskLogNotFoundResponseBody struct { // "server_error" error. type GetDatabaseTaskLogServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // ListHostTasksClusterNotInitializedResponseBody is the type of the @@ -1230,9 +1230,9 @@ type GetDatabaseTaskLogServerErrorResponseBody struct { // the "cluster_not_initialized" error. type ListHostTasksClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // ListHostTasksInvalidInputResponseBody is the type of the "control-plane" @@ -1240,18 +1240,18 @@ type ListHostTasksClusterNotInitializedResponseBody struct { // "invalid_input" error. type ListHostTasksInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // ListHostTasksNotFoundResponseBody is the type of the "control-plane" service // "list-host-tasks" endpoint HTTP response body for the "not_found" error. type ListHostTasksNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // ListHostTasksServerErrorResponseBody is the type of the "control-plane" @@ -1259,9 +1259,9 @@ type ListHostTasksNotFoundResponseBody struct { // error. type ListHostTasksServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetHostTaskClusterNotInitializedResponseBody is the type of the @@ -1269,9 +1269,9 @@ type ListHostTasksServerErrorResponseBody struct { // "cluster_not_initialized" error. type GetHostTaskClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetHostTaskInvalidInputResponseBody is the type of the "control-plane" @@ -1279,18 +1279,18 @@ type GetHostTaskClusterNotInitializedResponseBody struct { // error. type GetHostTaskInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetHostTaskNotFoundResponseBody is the type of the "control-plane" service // "get-host-task" endpoint HTTP response body for the "not_found" error. type GetHostTaskNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetHostTaskServerErrorResponseBody is the type of the "control-plane" @@ -1298,9 +1298,9 @@ type GetHostTaskNotFoundResponseBody struct { // error. type GetHostTaskServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetHostTaskLogClusterNotInitializedResponseBody is the type of the @@ -1308,9 +1308,9 @@ type GetHostTaskServerErrorResponseBody struct { // the "cluster_not_initialized" error. type GetHostTaskLogClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetHostTaskLogInvalidInputResponseBody is the type of the "control-plane" @@ -1318,9 +1318,9 @@ type GetHostTaskLogClusterNotInitializedResponseBody struct { // "invalid_input" error. type GetHostTaskLogInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetHostTaskLogNotFoundResponseBody is the type of the "control-plane" @@ -1328,9 +1328,9 @@ type GetHostTaskLogInvalidInputResponseBody struct { // error. type GetHostTaskLogNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetHostTaskLogServerErrorResponseBody is the type of the "control-plane" @@ -1338,9 +1338,9 @@ type GetHostTaskLogNotFoundResponseBody struct { // "server_error" error. type GetHostTaskLogServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // ListTasksClusterNotInitializedResponseBody is the type of the @@ -1348,27 +1348,27 @@ type GetHostTaskLogServerErrorResponseBody struct { // "cluster_not_initialized" error. type ListTasksClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // ListTasksInvalidInputResponseBody is the type of the "control-plane" service // "list-tasks" endpoint HTTP response body for the "invalid_input" error. type ListTasksInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // ListTasksServerErrorResponseBody is the type of the "control-plane" service // "list-tasks" endpoint HTTP response body for the "server_error" error. type ListTasksServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // RestoreDatabaseClusterNotInitializedResponseBody is the type of the @@ -1376,9 +1376,9 @@ type ListTasksServerErrorResponseBody struct { // the "cluster_not_initialized" error. type RestoreDatabaseClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // RestoreDatabaseDatabaseNotModifiableResponseBody is the type of the @@ -1386,9 +1386,9 @@ type RestoreDatabaseClusterNotInitializedResponseBody struct { // the "database_not_modifiable" error. type RestoreDatabaseDatabaseNotModifiableResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // RestoreDatabaseOperationAlreadyInProgressResponseBody is the type of the @@ -1396,9 +1396,9 @@ type RestoreDatabaseDatabaseNotModifiableResponseBody struct { // the "operation_already_in_progress" error. type RestoreDatabaseOperationAlreadyInProgressResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // RestoreDatabaseInvalidInputResponseBody is the type of the "control-plane" @@ -1406,9 +1406,9 @@ type RestoreDatabaseOperationAlreadyInProgressResponseBody struct { // "invalid_input" error. type RestoreDatabaseInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // RestoreDatabaseNotFoundResponseBody is the type of the "control-plane" @@ -1416,9 +1416,9 @@ type RestoreDatabaseInvalidInputResponseBody struct { // error. type RestoreDatabaseNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // RestoreDatabaseServerErrorResponseBody is the type of the "control-plane" @@ -1426,18 +1426,18 @@ type RestoreDatabaseNotFoundResponseBody struct { // "server_error" error. type RestoreDatabaseServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // GetVersionServerErrorResponseBody is the type of the "control-plane" service // "get-version" endpoint HTTP response body for the "server_error" error. type GetVersionServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // RestartInstanceClusterNotInitializedResponseBody is the type of the @@ -1445,9 +1445,9 @@ type GetVersionServerErrorResponseBody struct { // the "cluster_not_initialized" error. type RestartInstanceClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // RestartInstanceInvalidInputResponseBody is the type of the "control-plane" @@ -1455,9 +1455,9 @@ type RestartInstanceClusterNotInitializedResponseBody struct { // "invalid_input" error. type RestartInstanceInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // RestartInstanceNotFoundResponseBody is the type of the "control-plane" @@ -1465,9 +1465,9 @@ type RestartInstanceInvalidInputResponseBody struct { // error. type RestartInstanceNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // RestartInstanceServerErrorResponseBody is the type of the "control-plane" @@ -1475,9 +1475,9 @@ type RestartInstanceNotFoundResponseBody struct { // "server_error" error. type RestartInstanceServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // StopInstanceClusterNotInitializedResponseBody is the type of the @@ -1485,9 +1485,9 @@ type RestartInstanceServerErrorResponseBody struct { // "cluster_not_initialized" error. type StopInstanceClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // StopInstanceInvalidInputResponseBody is the type of the "control-plane" @@ -1495,18 +1495,18 @@ type StopInstanceClusterNotInitializedResponseBody struct { // error. type StopInstanceInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // StopInstanceNotFoundResponseBody is the type of the "control-plane" service // "stop-instance" endpoint HTTP response body for the "not_found" error. type StopInstanceNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // StopInstanceServerErrorResponseBody is the type of the "control-plane" @@ -1514,9 +1514,9 @@ type StopInstanceNotFoundResponseBody struct { // error. type StopInstanceServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // StartInstanceClusterNotInitializedResponseBody is the type of the @@ -1524,9 +1524,9 @@ type StopInstanceServerErrorResponseBody struct { // "cluster_not_initialized" error. type StartInstanceClusterNotInitializedResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // StartInstanceInvalidInputResponseBody is the type of the "control-plane" @@ -1534,18 +1534,18 @@ type StartInstanceClusterNotInitializedResponseBody struct { // error. type StartInstanceInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // StartInstanceNotFoundResponseBody is the type of the "control-plane" service // "start-instance" endpoint HTTP response body for the "not_found" error. type StartInstanceNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // StartInstanceServerErrorResponseBody is the type of the "control-plane" @@ -1553,9 +1553,9 @@ type StartInstanceNotFoundResponseBody struct { // error. type StartInstanceServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // CancelDatabaseTaskNotFoundResponseBody is the type of the "control-plane" @@ -1563,9 +1563,9 @@ type StartInstanceServerErrorResponseBody struct { // "not_found" error. type CancelDatabaseTaskNotFoundResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // CancelDatabaseTaskInvalidInputResponseBody is the type of the @@ -1573,9 +1573,9 @@ type CancelDatabaseTaskNotFoundResponseBody struct { // for the "invalid_input" error. type CancelDatabaseTaskInvalidInputResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // CancelDatabaseTaskServerErrorResponseBody is the type of the "control-plane" @@ -1583,1140 +1583,1140 @@ type CancelDatabaseTaskInvalidInputResponseBody struct { // "server_error" error. type CancelDatabaseTaskServerErrorResponseBody struct { // The name of the error. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The error message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` } // EtcdClusterMemberResponseBody is used to define fields on response body // types. type EtcdClusterMemberResponseBody struct { // The name of the Etcd cluster member. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The Etcd peer endpoint for this cluster member. - PeerUrls []string `form:"peer_urls" json:"peer_urls" xml:"peer_urls"` + PeerUrls []string `json:"peer_urls"` // The Etcd client endpoint for this cluster member. - ClientUrls []string `form:"client_urls" json:"client_urls" xml:"client_urls"` + ClientUrls []string `json:"client_urls"` } // ClusterCredentialsResponseBody is used to define fields on response body // types. type ClusterCredentialsResponseBody struct { // The Etcd username for the new host. - Username string `form:"username" json:"username" xml:"username"` + Username string `json:"username"` // The Etcd password for the new host. - Password string `form:"password" json:"password" xml:"password"` + Password string `json:"password"` // The base64-encoded CA certificate for the cluster. - CaCert string `form:"ca_cert" json:"ca_cert" xml:"ca_cert"` + CaCert string `json:"ca_cert"` // The base64-encoded etcd client certificate for the new cluster member. - ClientCert string `form:"client_cert" json:"client_cert" xml:"client_cert"` + ClientCert string `json:"client_cert"` // The base64-encoded etcd client key for the new cluster member. - ClientKey string `form:"client_key" json:"client_key" xml:"client_key"` + ClientKey string `json:"client_key"` // The base64-encoded etcd server certificate for the new cluster member. - ServerCert string `form:"server_cert" json:"server_cert" xml:"server_cert"` + ServerCert string `json:"server_cert"` // The base64-encoded etcd server key for the new cluster member. - ServerKey string `form:"server_key" json:"server_key" xml:"server_key"` + ServerKey string `json:"server_key"` } // ClusterStatusResponseBody is used to define fields on response body types. type ClusterStatusResponseBody struct { // The current state of the cluster. - State string `form:"state" json:"state" xml:"state"` + State string `json:"state"` } // HostResponseBody is used to define fields on response body types. type HostResponseBody struct { // Unique identifier for the host. - ID string `form:"id" json:"id" xml:"id"` + ID string `json:"id"` // The orchestrator used by this host. - Orchestrator string `form:"orchestrator" json:"orchestrator" xml:"orchestrator"` + Orchestrator string `json:"orchestrator"` // The data directory for the host. - DataDir string `form:"data_dir" json:"data_dir" xml:"data_dir"` + DataDir string `json:"data_dir"` // The cohort that this host belongs to. - Cohort *HostCohortResponseBody `form:"cohort,omitempty" json:"cohort,omitempty" xml:"cohort,omitempty"` + Cohort *HostCohortResponseBody `json:"cohort,omitempty"` // The hostname of this host. - Hostname string `form:"hostname" json:"hostname" xml:"hostname"` + Hostname string `json:"hostname"` // The IPv4 address of this host. - Ipv4Address string `form:"ipv4_address" json:"ipv4_address" xml:"ipv4_address"` + Ipv4Address string `json:"ipv4_address"` // The number of CPUs on this host. - Cpus *int `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *int `json:"cpus,omitempty"` // The amount of memory available on this host. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // Current status of the host. - Status *HostStatusResponseBody `form:"status" json:"status" xml:"status"` + Status *HostStatusResponseBody `json:"status"` // The default PgEdge version for this host. - DefaultPgedgeVersion *PgEdgeVersionResponseBody `form:"default_pgedge_version,omitempty" json:"default_pgedge_version,omitempty" xml:"default_pgedge_version,omitempty"` + DefaultPgedgeVersion *PgEdgeVersionResponseBody `json:"default_pgedge_version,omitempty"` // The PgEdge versions supported by this host. - SupportedPgedgeVersions []*PgEdgeVersionResponseBody `form:"supported_pgedge_versions,omitempty" json:"supported_pgedge_versions,omitempty" xml:"supported_pgedge_versions,omitempty"` + SupportedPgedgeVersions []*PgEdgeVersionResponseBody `json:"supported_pgedge_versions,omitempty"` // The etcd mode for this host. - EtcdMode *string `form:"etcd_mode,omitempty" json:"etcd_mode,omitempty" xml:"etcd_mode,omitempty"` + EtcdMode *string `json:"etcd_mode,omitempty"` } // HostCohortResponseBody is used to define fields on response body types. type HostCohortResponseBody struct { // The type of cohort that the host belongs to. - Type string `form:"type" json:"type" xml:"type"` + Type string `json:"type"` // The member ID of the host within the cohort. - MemberID string `form:"member_id" json:"member_id" xml:"member_id"` + MemberID string `json:"member_id"` // Indicates if the host is a control node in the cohort. - ControlAvailable bool `form:"control_available" json:"control_available" xml:"control_available"` + ControlAvailable bool `json:"control_available"` } // HostStatusResponseBody is used to define fields on response body types. type HostStatusResponseBody struct { - State string `form:"state" json:"state" xml:"state"` + State string `json:"state"` // The last time the host status was updated. - UpdatedAt string `form:"updated_at" json:"updated_at" xml:"updated_at"` + UpdatedAt string `json:"updated_at"` // The status of each component of the host. - Components map[string]*ComponentStatusResponseBody `form:"components" json:"components" xml:"components"` + Components map[string]*ComponentStatusResponseBody `json:"components"` } // ComponentStatusResponseBody is used to define fields on response body types. type ComponentStatusResponseBody struct { // Indicates if the component is healthy. - Healthy bool `form:"healthy" json:"healthy" xml:"healthy"` + Healthy bool `json:"healthy"` // Error message from any errors that occurred during the health check. - Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` + Error *string `json:"error,omitempty"` // Additional details about the component. - Details map[string]any `form:"details,omitempty" json:"details,omitempty" xml:"details,omitempty"` + Details map[string]any `json:"details,omitempty"` } // PgEdgeVersionResponseBody is used to define fields on response body types. type PgEdgeVersionResponseBody struct { // The Postgres major and minor version. - PostgresVersion string `form:"postgres_version" json:"postgres_version" xml:"postgres_version"` + PostgresVersion string `json:"postgres_version"` // The Spock major version. - SpockVersion string `form:"spock_version" json:"spock_version" xml:"spock_version"` + SpockVersion string `json:"spock_version"` } // TaskResponseBody is used to define fields on response body types. type TaskResponseBody struct { // The parent task ID of the task. - ParentID *string `form:"parent_id,omitempty" json:"parent_id,omitempty" xml:"parent_id,omitempty"` + ParentID *string `json:"parent_id,omitempty"` // The scope of the task (database or host). - Scope string `form:"scope" json:"scope" xml:"scope"` + Scope string `json:"scope"` // The entity ID (database_id or host_id) that this task belongs to. - EntityID string `form:"entity_id" json:"entity_id" xml:"entity_id"` + EntityID string `json:"entity_id"` // The database ID of the task. - DatabaseID *string `form:"database_id,omitempty" json:"database_id,omitempty" xml:"database_id,omitempty"` + DatabaseID *string `json:"database_id,omitempty"` // The name of the node that the task is operating on. - NodeName *string `form:"node_name,omitempty" json:"node_name,omitempty" xml:"node_name,omitempty"` + NodeName *string `json:"node_name,omitempty"` // The ID of the instance that the task is operating on. - InstanceID *string `form:"instance_id,omitempty" json:"instance_id,omitempty" xml:"instance_id,omitempty"` + InstanceID *string `json:"instance_id,omitempty"` // The ID of the host that the task is running on. - HostID *string `form:"host_id,omitempty" json:"host_id,omitempty" xml:"host_id,omitempty"` + HostID *string `json:"host_id,omitempty"` // The unique ID of the task. - TaskID string `form:"task_id" json:"task_id" xml:"task_id"` + TaskID string `json:"task_id"` // The time when the task was created. - CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` + CreatedAt string `json:"created_at"` // The time when the task was completed. - CompletedAt *string `form:"completed_at,omitempty" json:"completed_at,omitempty" xml:"completed_at,omitempty"` + CompletedAt *string `json:"completed_at,omitempty"` // The type of the task. - Type string `form:"type" json:"type" xml:"type"` + Type string `json:"type"` // The status of the task. - Status string `form:"status" json:"status" xml:"status"` + Status string `json:"status"` // The error message if the task failed. - Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` + Error *string `json:"error,omitempty"` } // DatabaseSummaryResponseBody is used to define fields on response body types. type DatabaseSummaryResponseBody struct { // Unique identifier for the database. - ID string `form:"id" json:"id" xml:"id"` + ID string `json:"id"` // Unique identifier for the database's owner. - TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` + TenantID *string `json:"tenant_id,omitempty"` // The time that the database was created. - CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` + CreatedAt string `json:"created_at"` // The time that the database was last updated. - UpdatedAt string `form:"updated_at" json:"updated_at" xml:"updated_at"` + UpdatedAt string `json:"updated_at"` // Current state of the database. - State string `form:"state" json:"state" xml:"state"` + State string `json:"state"` // All of the instances in the database. - Instances []*InstanceResponseBody `form:"instances,omitempty" json:"instances,omitempty" xml:"instances,omitempty"` + Instances []*InstanceResponseBody `json:"instances,omitempty"` } // InstanceResponseBody is used to define fields on response body types. type InstanceResponseBody struct { // Unique identifier for the instance. - ID string `form:"id" json:"id" xml:"id"` + ID string `json:"id"` // The ID of the host this instance is running on. - HostID string `form:"host_id" json:"host_id" xml:"host_id"` + HostID string `json:"host_id"` // The Spock node name for this instance. - NodeName string `form:"node_name" json:"node_name" xml:"node_name"` + NodeName string `json:"node_name"` // The time that the instance was created. - CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` + CreatedAt string `json:"created_at"` // The time that the instance was last modified. - UpdatedAt string `form:"updated_at" json:"updated_at" xml:"updated_at"` + UpdatedAt string `json:"updated_at"` // The time that the instance status information was last updated. - StatusUpdatedAt *string `form:"status_updated_at,omitempty" json:"status_updated_at,omitempty" xml:"status_updated_at,omitempty"` - State string `form:"state" json:"state" xml:"state"` + StatusUpdatedAt *string `json:"status_updated_at,omitempty"` + State string `json:"state"` // Connection information for the instance. - ConnectionInfo *InstanceConnectionInfoResponseBody `form:"connection_info,omitempty" json:"connection_info,omitempty" xml:"connection_info,omitempty"` + ConnectionInfo *InstanceConnectionInfoResponseBody `json:"connection_info,omitempty"` // Postgres status information for the instance. - Postgres *InstancePostgresStatusResponseBody `form:"postgres,omitempty" json:"postgres,omitempty" xml:"postgres,omitempty"` + Postgres *InstancePostgresStatusResponseBody `json:"postgres,omitempty"` // Spock status information for the instance. - Spock *InstanceSpockStatusResponseBody `form:"spock,omitempty" json:"spock,omitempty" xml:"spock,omitempty"` + Spock *InstanceSpockStatusResponseBody `json:"spock,omitempty"` // An error message if the instance is in an error state. - Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` + Error *string `json:"error,omitempty"` } // InstanceConnectionInfoResponseBody is used to define fields on response body // types. type InstanceConnectionInfoResponseBody struct { // The hostname of the host that's running this instance. - Hostname *string `form:"hostname,omitempty" json:"hostname,omitempty" xml:"hostname,omitempty"` + Hostname *string `json:"hostname,omitempty"` // The IPv4 address of the host that's running this instance. - Ipv4Address *string `form:"ipv4_address,omitempty" json:"ipv4_address,omitempty" xml:"ipv4_address,omitempty"` + Ipv4Address *string `json:"ipv4_address,omitempty"` // The host port that Postgres is listening on for this instance. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` } // InstancePostgresStatusResponseBody is used to define fields on response body // types. type InstancePostgresStatusResponseBody struct { // The version of Postgres for this instance. - Version *string `form:"version,omitempty" json:"version,omitempty" xml:"version,omitempty"` - PatroniState *string `form:"patroni_state,omitempty" json:"patroni_state,omitempty" xml:"patroni_state,omitempty"` - Role *string `form:"role,omitempty" json:"role,omitempty" xml:"role,omitempty"` + Version *string `json:"version,omitempty"` + PatroniState *string `json:"patroni_state,omitempty"` + Role *string `json:"role,omitempty"` // True if this instance has a pending restart from a configuration change. - PendingRestart *bool `form:"pending_restart,omitempty" json:"pending_restart,omitempty" xml:"pending_restart,omitempty"` + PendingRestart *bool `json:"pending_restart,omitempty"` // True if Patroni is paused for this instance. - PatroniPaused *bool `form:"patroni_paused,omitempty" json:"patroni_paused,omitempty" xml:"patroni_paused,omitempty"` + PatroniPaused *bool `json:"patroni_paused,omitempty"` } // InstanceSpockStatusResponseBody is used to define fields on response body // types. type InstanceSpockStatusResponseBody struct { // The current spock.readonly setting. - ReadOnly *string `form:"read_only,omitempty" json:"read_only,omitempty" xml:"read_only,omitempty"` + ReadOnly *string `json:"read_only,omitempty"` // The version of Spock for this instance. - Version *string `form:"version,omitempty" json:"version,omitempty" xml:"version,omitempty"` + Version *string `json:"version,omitempty"` // Status information for this instance's Spock subscriptions. - Subscriptions []*InstanceSubscriptionResponseBody `form:"subscriptions,omitempty" json:"subscriptions,omitempty" xml:"subscriptions,omitempty"` + Subscriptions []*InstanceSubscriptionResponseBody `json:"subscriptions,omitempty"` } // InstanceSubscriptionResponseBody is used to define fields on response body // types. type InstanceSubscriptionResponseBody struct { // The Spock node name of the provider for this subscription. - ProviderNode string `form:"provider_node" json:"provider_node" xml:"provider_node"` + ProviderNode string `json:"provider_node"` // The name of the subscription. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The current status of the subscription. - Status string `form:"status" json:"status" xml:"status"` + Status string `json:"status"` } // DatabaseResponseBody is used to define fields on response body types. type DatabaseResponseBody struct { // Unique identifier for the database. - ID string `form:"id" json:"id" xml:"id"` + ID string `json:"id"` // Unique identifier for the database's owner. - TenantID *string `form:"tenant_id,omitempty" json:"tenant_id,omitempty" xml:"tenant_id,omitempty"` + TenantID *string `json:"tenant_id,omitempty"` // The time that the database was created. - CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` + CreatedAt string `json:"created_at"` // The time that the database was last updated. - UpdatedAt string `form:"updated_at" json:"updated_at" xml:"updated_at"` + UpdatedAt string `json:"updated_at"` // Current state of the database. - State string `form:"state" json:"state" xml:"state"` + State string `json:"state"` // All of the instances in the database. - Instances []*InstanceResponseBody `form:"instances,omitempty" json:"instances,omitempty" xml:"instances,omitempty"` + Instances []*InstanceResponseBody `json:"instances,omitempty"` // Service instances running alongside this database. - ServiceInstances []*ServiceInstanceResponseBody `form:"service_instances,omitempty" json:"service_instances,omitempty" xml:"service_instances,omitempty"` + ServiceInstances []*ServiceInstanceResponseBody `json:"service_instances,omitempty"` // The user-provided specification for the database. - Spec *DatabaseSpecResponseBody `form:"spec,omitempty" json:"spec,omitempty" xml:"spec,omitempty"` + Spec *DatabaseSpecResponseBody `json:"spec,omitempty"` } // ServiceInstanceResponseBody is used to define fields on response body types. type ServiceInstanceResponseBody struct { // Unique identifier for the service instance. - ServiceInstanceID string `form:"service_instance_id" json:"service_instance_id" xml:"service_instance_id"` + ServiceInstanceID string `json:"service_instance_id"` // The service ID from the DatabaseSpec. - ServiceID string `form:"service_id" json:"service_id" xml:"service_id"` + ServiceID string `json:"service_id"` // The ID of the database this service belongs to. - DatabaseID string `form:"database_id" json:"database_id" xml:"database_id"` + DatabaseID string `json:"database_id"` // The ID of the host this service instance is running on. - HostID string `form:"host_id" json:"host_id" xml:"host_id"` + HostID string `json:"host_id"` // Current state of the service instance. - State string `form:"state" json:"state" xml:"state"` + State string `json:"state"` // Runtime status information for the service instance. - Status *ServiceInstanceStatusResponseBody `form:"status,omitempty" json:"status,omitempty" xml:"status,omitempty"` + Status *ServiceInstanceStatusResponseBody `json:"status,omitempty"` // The time that the service instance was created. - CreatedAt string `form:"created_at" json:"created_at" xml:"created_at"` + CreatedAt string `json:"created_at"` // The time that the service instance was last updated. - UpdatedAt string `form:"updated_at" json:"updated_at" xml:"updated_at"` + UpdatedAt string `json:"updated_at"` // An error message if the service instance is in an error state. - Error *string `form:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"` + Error *string `json:"error,omitempty"` } // ServiceInstanceStatusResponseBody is used to define fields on response body // types. type ServiceInstanceStatusResponseBody struct { // The Docker container ID. - ContainerID *string `form:"container_id,omitempty" json:"container_id,omitempty" xml:"container_id,omitempty"` + ContainerID *string `json:"container_id,omitempty"` // The container image version currently running. - ImageVersion *string `form:"image_version,omitempty" json:"image_version,omitempty" xml:"image_version,omitempty"` + ImageVersion *string `json:"image_version,omitempty"` // The hostname of the service instance. - Hostname *string `form:"hostname,omitempty" json:"hostname,omitempty" xml:"hostname,omitempty"` + Hostname *string `json:"hostname,omitempty"` // The IPv4 address of the service instance. - Ipv4Address *string `form:"ipv4_address,omitempty" json:"ipv4_address,omitempty" xml:"ipv4_address,omitempty"` + Ipv4Address *string `json:"ipv4_address,omitempty"` // Port mappings for this service instance. - Ports []*PortMappingResponseBody `form:"ports,omitempty" json:"ports,omitempty" xml:"ports,omitempty"` + Ports []*PortMappingResponseBody `json:"ports,omitempty"` // Most recent health check result. - HealthCheck *HealthCheckResultResponseBody `form:"health_check,omitempty" json:"health_check,omitempty" xml:"health_check,omitempty"` + HealthCheck *HealthCheckResultResponseBody `json:"health_check,omitempty"` // The time of the last health check attempt. - LastHealthAt *string `form:"last_health_at,omitempty" json:"last_health_at,omitempty" xml:"last_health_at,omitempty"` + LastHealthAt *string `json:"last_health_at,omitempty"` // Whether the service is ready to accept requests. - ServiceReady *bool `form:"service_ready,omitempty" json:"service_ready,omitempty" xml:"service_ready,omitempty"` + ServiceReady *bool `json:"service_ready,omitempty"` } // PortMappingResponseBody is used to define fields on response body types. type PortMappingResponseBody struct { // The name of the port (e.g., 'http', 'web-client'). - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The port number inside the container. - ContainerPort *int `form:"container_port,omitempty" json:"container_port,omitempty" xml:"container_port,omitempty"` + ContainerPort *int `json:"container_port,omitempty"` // The port number on the host (if port-forwarded). - HostPort *int `form:"host_port,omitempty" json:"host_port,omitempty" xml:"host_port,omitempty"` + HostPort *int `json:"host_port,omitempty"` } // HealthCheckResultResponseBody is used to define fields on response body // types. type HealthCheckResultResponseBody struct { // The health status. - Status string `form:"status" json:"status" xml:"status"` + Status string `json:"status"` // Optional message about the health status. - Message *string `form:"message,omitempty" json:"message,omitempty" xml:"message,omitempty"` + Message *string `json:"message,omitempty"` // The time this health check was performed. - CheckedAt string `form:"checked_at" json:"checked_at" xml:"checked_at"` + CheckedAt string `json:"checked_at"` } // DatabaseSpecResponseBody is used to define fields on response body types. type DatabaseSpecResponseBody struct { // The name of the Postgres database. - DatabaseName string `form:"database_name" json:"database_name" xml:"database_name"` + DatabaseName string `json:"database_name"` // The Postgres version in 'major.minor' format. - PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` + PostgresVersion *string `json:"postgres_version,omitempty"` // The major version of the Spock extension. - SpockVersion *string `form:"spock_version,omitempty" json:"spock_version,omitempty" xml:"spock_version,omitempty"` + SpockVersion *string `json:"spock_version,omitempty"` // The port used by the Postgres database. If the port is 0, each instance will // be assigned a random port. If the port is unspecified, the database will not // be exposed on any port, dependent on orchestrator support for that feature. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // The number of CPUs to allocate for the database and to use for tuning // Postgres. Defaults to the number of available CPUs on the host. Can include // an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced // depends on the orchestrator. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for the database and // to use for tuning Postgres. Defaults to the total available memory on the // host. Whether this limit is enforced depends on the orchestrator. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // The Spock nodes for this database. - Nodes []*DatabaseNodeSpecResponseBody `form:"nodes" json:"nodes" xml:"nodes"` + Nodes []*DatabaseNodeSpecResponseBody `json:"nodes"` // The users to create for this database. - DatabaseUsers []*DatabaseUserSpecResponseBody `form:"database_users,omitempty" json:"database_users,omitempty" xml:"database_users,omitempty"` + DatabaseUsers []*DatabaseUserSpecResponseBody `json:"database_users,omitempty"` // Service instances to run alongside the database (e.g., MCP servers). - Services []*ServiceSpecResponseBody `form:"services,omitempty" json:"services,omitempty" xml:"services,omitempty"` + Services []*ServiceSpecResponseBody `json:"services,omitempty"` // The backup configuration for this database. - BackupConfig *BackupConfigSpecResponseBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecResponseBody `json:"backup_config,omitempty"` // The restore configuration for this database. - RestoreConfig *RestoreConfigSpecResponseBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecResponseBody `json:"restore_config,omitempty"` // Additional postgresql.conf settings. Will be merged with the settings // provided by control-plane. - PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` + PostgresqlConf map[string]any `json:"postgresql_conf,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsResponseBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsResponseBody `json:"orchestrator_opts,omitempty"` } // DatabaseNodeSpecResponseBody is used to define fields on response body types. type DatabaseNodeSpecResponseBody struct { // The name of the database node. - Name string `form:"name" json:"name" xml:"name"` + Name string `json:"name"` // The IDs of the hosts that should run this node. When multiple hosts are // specified, one host will chosen as a primary, and the others will be read // replicas. - HostIds []string `form:"host_ids" json:"host_ids" xml:"host_ids"` + HostIds []string `json:"host_ids"` // The Postgres version for this node in 'major.minor' format. Overrides the // Postgres version set in the DatabaseSpec. - PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` + PostgresVersion *string `json:"postgres_version,omitempty"` // The port used by the Postgres database for this node. Overrides the Postgres // port set in the DatabaseSpec. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // The number of CPUs to allocate for the database on this node and to use for // tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 // millicpus. Cannot allocate units smaller than 1m. Defaults to the number of // available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs // than are available on the host. Whether this limit is enforced depends on // the orchestrator. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for the database on // this node and to use for tuning Postgres. Defaults to the total available // memory on the host. Whether this limit is enforced depends on the // orchestrator. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // Additional postgresql.conf settings for this particular node. Will be merged // with the settings provided by control-plane. - PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` + PostgresqlConf map[string]any `json:"postgresql_conf,omitempty"` // The backup configuration for this node. Overrides the backup configuration // set in the DatabaseSpec. - BackupConfig *BackupConfigSpecResponseBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecResponseBody `json:"backup_config,omitempty"` // The restore configuration for this node. Overrides the restore configuration // set in the DatabaseSpec. - RestoreConfig *RestoreConfigSpecResponseBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecResponseBody `json:"restore_config,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsResponseBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsResponseBody `json:"orchestrator_opts,omitempty"` // The name of the source node to use for sync. This is typically the node // (like 'n1') from which the data will be copied to initialize this new node. - SourceNode *string `form:"source_node,omitempty" json:"source_node,omitempty" xml:"source_node,omitempty"` + SourceNode *string `json:"source_node,omitempty"` } // BackupConfigSpecResponseBody is used to define fields on response body types. type BackupConfigSpecResponseBody struct { // The repositories for this backup configuration. - Repositories []*BackupRepositorySpecResponseBody `form:"repositories" json:"repositories" xml:"repositories"` + Repositories []*BackupRepositorySpecResponseBody `json:"repositories"` // The schedules for this backup configuration. - Schedules []*BackupScheduleSpecResponseBody `form:"schedules,omitempty" json:"schedules,omitempty" xml:"schedules,omitempty"` + Schedules []*BackupScheduleSpecResponseBody `json:"schedules,omitempty"` } // BackupRepositorySpecResponseBody is used to define fields on response body // types. type BackupRepositorySpecResponseBody struct { // The unique identifier of this repository. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id,omitempty"` // The type of this repository. - Type string `form:"type" json:"type" xml:"type"` + Type string `json:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` + S3Bucket *string `json:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = // 's3'. - S3Region *string `form:"s3_region,omitempty" json:"s3_region,omitempty" xml:"s3_region,omitempty"` + S3Region *string `json:"s3_region,omitempty"` // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string `form:"s3_endpoint,omitempty" json:"s3_endpoint,omitempty" xml:"s3_endpoint,omitempty"` + S3Endpoint *string `json:"s3_endpoint,omitempty"` // An optional AWS access key ID to use for this repository. If not provided, // pgbackrest will use the default credential provider chain. This field will // be excluded from the response of all endpoints. It can also be omitted from // update requests to keep the current value. - S3Key *string `form:"s3_key,omitempty" json:"s3_key,omitempty" xml:"s3_key,omitempty"` + S3Key *string `json:"s3_key,omitempty"` // The corresponding secret for the AWS access key ID in s3_key. This field // will be excluded from the response of all endpoints. It can also be omitted // from update requests to keep the current value. - S3KeySecret *string `form:"s3_key_secret,omitempty" json:"s3_key_secret,omitempty" xml:"s3_key_secret,omitempty"` + S3KeySecret *string `json:"s3_key_secret,omitempty"` // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string `form:"gcs_bucket,omitempty" json:"gcs_bucket,omitempty" xml:"gcs_bucket,omitempty"` + GcsBucket *string `json:"gcs_bucket,omitempty"` // The optional GCS endpoint for this repository. Only applies when type = // 'gcs'. - GcsEndpoint *string `form:"gcs_endpoint,omitempty" json:"gcs_endpoint,omitempty" xml:"gcs_endpoint,omitempty"` + GcsEndpoint *string `json:"gcs_endpoint,omitempty"` // Optional base64-encoded private key data. If omitted, pgbackrest will use // the service account attached to the instance profile. This field will be // excluded from the response of all endpoints. It can also be omitted from // update requests to keep the current value. - GcsKey *string `form:"gcs_key,omitempty" json:"gcs_key,omitempty" xml:"gcs_key,omitempty"` + GcsKey *string `json:"gcs_key,omitempty"` // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string `form:"azure_account,omitempty" json:"azure_account,omitempty" xml:"azure_account,omitempty"` + AzureAccount *string `json:"azure_account,omitempty"` // The Azure container name for this repository. Only applies when type = // 'azure'. - AzureContainer *string `form:"azure_container,omitempty" json:"azure_container,omitempty" xml:"azure_container,omitempty"` + AzureContainer *string `json:"azure_container,omitempty"` // The optional Azure endpoint for this repository. Only applies when type = // 'azure'. - AzureEndpoint *string `form:"azure_endpoint,omitempty" json:"azure_endpoint,omitempty" xml:"azure_endpoint,omitempty"` + AzureEndpoint *string `json:"azure_endpoint,omitempty"` // The Azure storage account access key to use for this repository. This field // will be excluded from the response of all endpoints. It can also be omitted // from update requests to keep the current value. - AzureKey *string `form:"azure_key,omitempty" json:"azure_key,omitempty" xml:"azure_key,omitempty"` + AzureKey *string `json:"azure_key,omitempty"` // The count of full backups to retain or the time to retain full backups. - RetentionFull *int `form:"retention_full,omitempty" json:"retention_full,omitempty" xml:"retention_full,omitempty"` + RetentionFull *int `json:"retention_full,omitempty"` // The type of measure used for retention_full. - RetentionFullType *string `form:"retention_full_type,omitempty" json:"retention_full_type,omitempty" xml:"retention_full_type,omitempty"` + RetentionFullType *string `json:"retention_full_type,omitempty"` // The base path within the repository to store backups. Required for type = // 'posix' and 'cifs'. - BasePath *string `form:"base_path,omitempty" json:"base_path,omitempty" xml:"base_path,omitempty"` + BasePath *string `json:"base_path,omitempty"` // Additional options to apply to this repository. - CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` + CustomOptions map[string]string `json:"custom_options,omitempty"` } // BackupScheduleSpecResponseBody is used to define fields on response body // types. type BackupScheduleSpecResponseBody struct { // The unique identifier for this backup schedule. - ID string `form:"id" json:"id" xml:"id"` + ID string `json:"id"` // The type of backup to take on this schedule. - Type string `form:"type" json:"type" xml:"type"` + Type string `json:"type"` // The cron expression for this schedule. - CronExpression string `form:"cron_expression" json:"cron_expression" xml:"cron_expression"` + CronExpression string `json:"cron_expression"` } // RestoreConfigSpecResponseBody is used to define fields on response body // types. type RestoreConfigSpecResponseBody struct { // The ID of the database to restore this database from. - SourceDatabaseID string `form:"source_database_id" json:"source_database_id" xml:"source_database_id"` + SourceDatabaseID string `json:"source_database_id"` // The name of the node to restore this database from. - SourceNodeName string `form:"source_node_name" json:"source_node_name" xml:"source_node_name"` + SourceNodeName string `json:"source_node_name"` // The name of the database in this repository. The database will be renamed to // the database_name in the DatabaseSpec after it's restored. - SourceDatabaseName string `form:"source_database_name" json:"source_database_name" xml:"source_database_name"` + SourceDatabaseName string `json:"source_database_name"` // The repository to restore this database from. - Repository *RestoreRepositorySpecResponseBody `form:"repository" json:"repository" xml:"repository"` + Repository *RestoreRepositorySpecResponseBody `json:"repository"` // Additional options to use when restoring this database. If omitted, the // database will be restored to the latest point in the given repository. - RestoreOptions map[string]string `form:"restore_options,omitempty" json:"restore_options,omitempty" xml:"restore_options,omitempty"` + RestoreOptions map[string]string `json:"restore_options,omitempty"` } // RestoreRepositorySpecResponseBody is used to define fields on response body // types. type RestoreRepositorySpecResponseBody struct { // The unique identifier of this repository. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id,omitempty"` // The type of this repository. - Type string `form:"type" json:"type" xml:"type"` + Type string `json:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` + S3Bucket *string `json:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = // 's3'. - S3Region *string `form:"s3_region,omitempty" json:"s3_region,omitempty" xml:"s3_region,omitempty"` + S3Region *string `json:"s3_region,omitempty"` // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string `form:"s3_endpoint,omitempty" json:"s3_endpoint,omitempty" xml:"s3_endpoint,omitempty"` + S3Endpoint *string `json:"s3_endpoint,omitempty"` // An optional AWS access key ID to use for this repository. If not provided, // pgbackrest will use the default credential provider chain. - S3Key *string `form:"s3_key,omitempty" json:"s3_key,omitempty" xml:"s3_key,omitempty"` + S3Key *string `json:"s3_key,omitempty"` // The corresponding secret for the AWS access key ID in s3_key. - S3KeySecret *string `form:"s3_key_secret,omitempty" json:"s3_key_secret,omitempty" xml:"s3_key_secret,omitempty"` + S3KeySecret *string `json:"s3_key_secret,omitempty"` // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string `form:"gcs_bucket,omitempty" json:"gcs_bucket,omitempty" xml:"gcs_bucket,omitempty"` + GcsBucket *string `json:"gcs_bucket,omitempty"` // The optional GCS endpoint for this repository. Only applies when type = // 'gcs'. - GcsEndpoint *string `form:"gcs_endpoint,omitempty" json:"gcs_endpoint,omitempty" xml:"gcs_endpoint,omitempty"` + GcsEndpoint *string `json:"gcs_endpoint,omitempty"` // Optional base64-encoded private key data. If omitted, pgbackrest will use // the service account attached to the instance profile. - GcsKey *string `form:"gcs_key,omitempty" json:"gcs_key,omitempty" xml:"gcs_key,omitempty"` + GcsKey *string `json:"gcs_key,omitempty"` // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string `form:"azure_account,omitempty" json:"azure_account,omitempty" xml:"azure_account,omitempty"` + AzureAccount *string `json:"azure_account,omitempty"` // The Azure container name for this repository. Only applies when type = // 'azure'. - AzureContainer *string `form:"azure_container,omitempty" json:"azure_container,omitempty" xml:"azure_container,omitempty"` + AzureContainer *string `json:"azure_container,omitempty"` // The optional Azure endpoint for this repository. Only applies when type = // 'azure'. - AzureEndpoint *string `form:"azure_endpoint,omitempty" json:"azure_endpoint,omitempty" xml:"azure_endpoint,omitempty"` + AzureEndpoint *string `json:"azure_endpoint,omitempty"` // An optional Azure storage account access key to use for this repository. If // not provided, pgbackrest will use the VM's managed identity. - AzureKey *string `form:"azure_key,omitempty" json:"azure_key,omitempty" xml:"azure_key,omitempty"` + AzureKey *string `json:"azure_key,omitempty"` // The base path within the repository to store backups. Required for type = // 'posix' and 'cifs'. - BasePath *string `form:"base_path,omitempty" json:"base_path,omitempty" xml:"base_path,omitempty"` + BasePath *string `json:"base_path,omitempty"` // Additional options to apply to this repository. - CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` + CustomOptions map[string]string `json:"custom_options,omitempty"` } // OrchestratorOptsResponseBody is used to define fields on response body types. type OrchestratorOptsResponseBody struct { // Swarm-specific configuration. - Swarm *SwarmOptsResponseBody `form:"swarm,omitempty" json:"swarm,omitempty" xml:"swarm,omitempty"` + Swarm *SwarmOptsResponseBody `json:"swarm,omitempty"` } // SwarmOptsResponseBody is used to define fields on response body types. type SwarmOptsResponseBody struct { // A list of extra volumes to mount. Each entry defines a host and container // path. - ExtraVolumes []*ExtraVolumesSpecResponseBody `form:"extra_volumes,omitempty" json:"extra_volumes,omitempty" xml:"extra_volumes,omitempty"` + ExtraVolumes []*ExtraVolumesSpecResponseBody `json:"extra_volumes,omitempty"` // A list of additional Docker Swarm networks to attach containers in this // database to. - ExtraNetworks []*ExtraNetworkSpecResponseBody `form:"extra_networks,omitempty" json:"extra_networks,omitempty" xml:"extra_networks,omitempty"` + ExtraNetworks []*ExtraNetworkSpecResponseBody `json:"extra_networks,omitempty"` // Arbitrary labels to apply to the Docker Swarm service - ExtraLabels map[string]string `form:"extra_labels,omitempty" json:"extra_labels,omitempty" xml:"extra_labels,omitempty"` + ExtraLabels map[string]string `json:"extra_labels,omitempty"` } // ExtraVolumesSpecResponseBody is used to define fields on response body types. type ExtraVolumesSpecResponseBody struct { // The host path for the volume. - HostPath string `form:"host_path" json:"host_path" xml:"host_path"` + HostPath string `json:"host_path"` // The path inside the container where the volume will be mounted. - DestinationPath string `form:"destination_path" json:"destination_path" xml:"destination_path"` + DestinationPath string `json:"destination_path"` } // ExtraNetworkSpecResponseBody is used to define fields on response body types. type ExtraNetworkSpecResponseBody struct { // The name or ID of the network to connect to. - ID string `form:"id" json:"id" xml:"id"` + ID string `json:"id"` // Optional network-scoped aliases for the container. - Aliases []string `form:"aliases,omitempty" json:"aliases,omitempty" xml:"aliases,omitempty"` + Aliases []string `json:"aliases,omitempty"` // Optional driver options for the network connection. - DriverOpts map[string]string `form:"driver_opts,omitempty" json:"driver_opts,omitempty" xml:"driver_opts,omitempty"` + DriverOpts map[string]string `json:"driver_opts,omitempty"` } // DatabaseUserSpecResponseBody is used to define fields on response body types. type DatabaseUserSpecResponseBody struct { // The username for this database user. - Username string `form:"username" json:"username" xml:"username"` + Username string `json:"username"` // The password for this database user. This field will be excluded from the // response of all endpoints. It can also be omitted from update requests to // keep the current value. - Password *string `form:"password,omitempty" json:"password,omitempty" xml:"password,omitempty"` + Password *string `json:"password,omitempty"` // If true, this user will be granted database ownership. - DbOwner *bool `form:"db_owner,omitempty" json:"db_owner,omitempty" xml:"db_owner,omitempty"` + DbOwner *bool `json:"db_owner,omitempty"` // The attributes to assign to this database user. - Attributes []string `form:"attributes,omitempty" json:"attributes,omitempty" xml:"attributes,omitempty"` + Attributes []string `json:"attributes,omitempty"` // The roles to assign to this database user. - Roles []string `form:"roles,omitempty" json:"roles,omitempty" xml:"roles,omitempty"` + Roles []string `json:"roles,omitempty"` } // ServiceSpecResponseBody is used to define fields on response body types. type ServiceSpecResponseBody struct { // The unique identifier for this service. - ServiceID string `form:"service_id" json:"service_id" xml:"service_id"` + ServiceID string `json:"service_id"` // The type of service to run. - ServiceType string `form:"service_type" json:"service_type" xml:"service_type"` + ServiceType string `json:"service_type"` // The version of the service in semver format (e.g., '1.0.0') or the literal // 'latest'. - Version string `form:"version" json:"version" xml:"version"` + Version string `json:"version"` // The IDs of the hosts that should run this service. One service instance will // be created per host. - HostIds []string `form:"host_ids" json:"host_ids" xml:"host_ids"` + HostIds []string `json:"host_ids"` // The port to publish the service on the host. If 0, Docker assigns a random // port. If unspecified, no port is published and the service is not accessible // from outside the Docker network. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // Service-specific configuration. For MCP services, this includes // llm_provider, llm_model, and provider-specific API keys. - Config map[string]any `form:"config" json:"config" xml:"config"` + Config map[string]any `json:"config"` // The number of CPUs to allocate for this service. It can include the SI // suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if // unspecified. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for this service. // Defaults to container defaults if unspecified. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` } // TaskLogEntryResponseBody is used to define fields on response body types. type TaskLogEntryResponseBody struct { // The timestamp of the log entry. - Timestamp string `form:"timestamp" json:"timestamp" xml:"timestamp"` + Timestamp string `json:"timestamp"` // The log message. - Message string `form:"message" json:"message" xml:"message"` + Message string `json:"message"` // Additional fields for the log entry. - Fields map[string]any `form:"fields,omitempty" json:"fields,omitempty" xml:"fields,omitempty"` + Fields map[string]any `json:"fields,omitempty"` } // DatabaseSpecRequestBody is used to define fields on request body types. type DatabaseSpecRequestBody struct { // The name of the Postgres database. - DatabaseName *string `form:"database_name,omitempty" json:"database_name,omitempty" xml:"database_name,omitempty"` + DatabaseName *string `json:"database_name"` // The Postgres version in 'major.minor' format. - PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` + PostgresVersion *string `json:"postgres_version,omitempty"` // The major version of the Spock extension. - SpockVersion *string `form:"spock_version,omitempty" json:"spock_version,omitempty" xml:"spock_version,omitempty"` + SpockVersion *string `json:"spock_version,omitempty"` // The port used by the Postgres database. If the port is 0, each instance will // be assigned a random port. If the port is unspecified, the database will not // be exposed on any port, dependent on orchestrator support for that feature. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // The number of CPUs to allocate for the database and to use for tuning // Postgres. Defaults to the number of available CPUs on the host. Can include // an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced // depends on the orchestrator. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for the database and // to use for tuning Postgres. Defaults to the total available memory on the // host. Whether this limit is enforced depends on the orchestrator. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // The Spock nodes for this database. - Nodes []*DatabaseNodeSpecRequestBody `form:"nodes,omitempty" json:"nodes,omitempty" xml:"nodes,omitempty"` + Nodes []*DatabaseNodeSpecRequestBody `json:"nodes"` // The users to create for this database. - DatabaseUsers []*DatabaseUserSpecRequestBody `form:"database_users,omitempty" json:"database_users,omitempty" xml:"database_users,omitempty"` + DatabaseUsers []*DatabaseUserSpecRequestBody `json:"database_users,omitempty"` // Service instances to run alongside the database (e.g., MCP servers). - Services []*ServiceSpecRequestBody `form:"services,omitempty" json:"services,omitempty" xml:"services,omitempty"` + Services []*ServiceSpecRequestBody `json:"services,omitempty"` // The backup configuration for this database. - BackupConfig *BackupConfigSpecRequestBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecRequestBody `json:"backup_config,omitempty"` // The restore configuration for this database. - RestoreConfig *RestoreConfigSpecRequestBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecRequestBody `json:"restore_config,omitempty"` // Additional postgresql.conf settings. Will be merged with the settings // provided by control-plane. - PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` + PostgresqlConf map[string]any `json:"postgresql_conf,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsRequestBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsRequestBody `json:"orchestrator_opts,omitempty"` } // DatabaseNodeSpecRequestBody is used to define fields on request body types. type DatabaseNodeSpecRequestBody struct { // The name of the database node. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The IDs of the hosts that should run this node. When multiple hosts are // specified, one host will chosen as a primary, and the others will be read // replicas. - HostIds []string `form:"host_ids,omitempty" json:"host_ids,omitempty" xml:"host_ids,omitempty"` + HostIds []string `json:"host_ids"` // The Postgres version for this node in 'major.minor' format. Overrides the // Postgres version set in the DatabaseSpec. - PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` + PostgresVersion *string `json:"postgres_version,omitempty"` // The port used by the Postgres database for this node. Overrides the Postgres // port set in the DatabaseSpec. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // The number of CPUs to allocate for the database on this node and to use for // tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 // millicpus. Cannot allocate units smaller than 1m. Defaults to the number of // available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs // than are available on the host. Whether this limit is enforced depends on // the orchestrator. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for the database on // this node and to use for tuning Postgres. Defaults to the total available // memory on the host. Whether this limit is enforced depends on the // orchestrator. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // Additional postgresql.conf settings for this particular node. Will be merged // with the settings provided by control-plane. - PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` + PostgresqlConf map[string]any `json:"postgresql_conf,omitempty"` // The backup configuration for this node. Overrides the backup configuration // set in the DatabaseSpec. - BackupConfig *BackupConfigSpecRequestBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecRequestBody `json:"backup_config,omitempty"` // The restore configuration for this node. Overrides the restore configuration // set in the DatabaseSpec. - RestoreConfig *RestoreConfigSpecRequestBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecRequestBody `json:"restore_config,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsRequestBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsRequestBody `json:"orchestrator_opts,omitempty"` // The name of the source node to use for sync. This is typically the node // (like 'n1') from which the data will be copied to initialize this new node. - SourceNode *string `form:"source_node,omitempty" json:"source_node,omitempty" xml:"source_node,omitempty"` + SourceNode *string `json:"source_node,omitempty"` } // BackupConfigSpecRequestBody is used to define fields on request body types. type BackupConfigSpecRequestBody struct { // The repositories for this backup configuration. - Repositories []*BackupRepositorySpecRequestBody `form:"repositories,omitempty" json:"repositories,omitempty" xml:"repositories,omitempty"` + Repositories []*BackupRepositorySpecRequestBody `json:"repositories"` // The schedules for this backup configuration. - Schedules []*BackupScheduleSpecRequestBody `form:"schedules,omitempty" json:"schedules,omitempty" xml:"schedules,omitempty"` + Schedules []*BackupScheduleSpecRequestBody `json:"schedules,omitempty"` } // BackupRepositorySpecRequestBody is used to define fields on request body // types. type BackupRepositorySpecRequestBody struct { // The unique identifier of this repository. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id,omitempty"` // The type of this repository. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type *string `json:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` + S3Bucket *string `json:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = // 's3'. - S3Region *string `form:"s3_region,omitempty" json:"s3_region,omitempty" xml:"s3_region,omitempty"` + S3Region *string `json:"s3_region,omitempty"` // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string `form:"s3_endpoint,omitempty" json:"s3_endpoint,omitempty" xml:"s3_endpoint,omitempty"` + S3Endpoint *string `json:"s3_endpoint,omitempty"` // An optional AWS access key ID to use for this repository. If not provided, // pgbackrest will use the default credential provider chain. This field will // be excluded from the response of all endpoints. It can also be omitted from // update requests to keep the current value. - S3Key *string `form:"s3_key,omitempty" json:"s3_key,omitempty" xml:"s3_key,omitempty"` + S3Key *string `json:"s3_key,omitempty"` // The corresponding secret for the AWS access key ID in s3_key. This field // will be excluded from the response of all endpoints. It can also be omitted // from update requests to keep the current value. - S3KeySecret *string `form:"s3_key_secret,omitempty" json:"s3_key_secret,omitempty" xml:"s3_key_secret,omitempty"` + S3KeySecret *string `json:"s3_key_secret,omitempty"` // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string `form:"gcs_bucket,omitempty" json:"gcs_bucket,omitempty" xml:"gcs_bucket,omitempty"` + GcsBucket *string `json:"gcs_bucket,omitempty"` // The optional GCS endpoint for this repository. Only applies when type = // 'gcs'. - GcsEndpoint *string `form:"gcs_endpoint,omitempty" json:"gcs_endpoint,omitempty" xml:"gcs_endpoint,omitempty"` + GcsEndpoint *string `json:"gcs_endpoint,omitempty"` // Optional base64-encoded private key data. If omitted, pgbackrest will use // the service account attached to the instance profile. This field will be // excluded from the response of all endpoints. It can also be omitted from // update requests to keep the current value. - GcsKey *string `form:"gcs_key,omitempty" json:"gcs_key,omitempty" xml:"gcs_key,omitempty"` + GcsKey *string `json:"gcs_key,omitempty"` // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string `form:"azure_account,omitempty" json:"azure_account,omitempty" xml:"azure_account,omitempty"` + AzureAccount *string `json:"azure_account,omitempty"` // The Azure container name for this repository. Only applies when type = // 'azure'. - AzureContainer *string `form:"azure_container,omitempty" json:"azure_container,omitempty" xml:"azure_container,omitempty"` + AzureContainer *string `json:"azure_container,omitempty"` // The optional Azure endpoint for this repository. Only applies when type = // 'azure'. - AzureEndpoint *string `form:"azure_endpoint,omitempty" json:"azure_endpoint,omitempty" xml:"azure_endpoint,omitempty"` + AzureEndpoint *string `json:"azure_endpoint,omitempty"` // The Azure storage account access key to use for this repository. This field // will be excluded from the response of all endpoints. It can also be omitted // from update requests to keep the current value. - AzureKey *string `form:"azure_key,omitempty" json:"azure_key,omitempty" xml:"azure_key,omitempty"` + AzureKey *string `json:"azure_key,omitempty"` // The count of full backups to retain or the time to retain full backups. - RetentionFull *int `form:"retention_full,omitempty" json:"retention_full,omitempty" xml:"retention_full,omitempty"` + RetentionFull *int `json:"retention_full,omitempty"` // The type of measure used for retention_full. - RetentionFullType *string `form:"retention_full_type,omitempty" json:"retention_full_type,omitempty" xml:"retention_full_type,omitempty"` + RetentionFullType *string `json:"retention_full_type,omitempty"` // The base path within the repository to store backups. Required for type = // 'posix' and 'cifs'. - BasePath *string `form:"base_path,omitempty" json:"base_path,omitempty" xml:"base_path,omitempty"` + BasePath *string `json:"base_path,omitempty"` // Additional options to apply to this repository. - CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` + CustomOptions map[string]string `json:"custom_options,omitempty"` } // BackupScheduleSpecRequestBody is used to define fields on request body types. type BackupScheduleSpecRequestBody struct { // The unique identifier for this backup schedule. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id"` // The type of backup to take on this schedule. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type *string `json:"type"` // The cron expression for this schedule. - CronExpression *string `form:"cron_expression,omitempty" json:"cron_expression,omitempty" xml:"cron_expression,omitempty"` + CronExpression *string `json:"cron_expression"` } // RestoreConfigSpecRequestBody is used to define fields on request body types. type RestoreConfigSpecRequestBody struct { // The ID of the database to restore this database from. - SourceDatabaseID *string `form:"source_database_id,omitempty" json:"source_database_id,omitempty" xml:"source_database_id,omitempty"` + SourceDatabaseID *string `json:"source_database_id"` // The name of the node to restore this database from. - SourceNodeName *string `form:"source_node_name,omitempty" json:"source_node_name,omitempty" xml:"source_node_name,omitempty"` + SourceNodeName *string `json:"source_node_name"` // The name of the database in this repository. The database will be renamed to // the database_name in the DatabaseSpec after it's restored. - SourceDatabaseName *string `form:"source_database_name,omitempty" json:"source_database_name,omitempty" xml:"source_database_name,omitempty"` + SourceDatabaseName *string `json:"source_database_name"` // The repository to restore this database from. - Repository *RestoreRepositorySpecRequestBody `form:"repository,omitempty" json:"repository,omitempty" xml:"repository,omitempty"` + Repository *RestoreRepositorySpecRequestBody `json:"repository"` // Additional options to use when restoring this database. If omitted, the // database will be restored to the latest point in the given repository. - RestoreOptions map[string]string `form:"restore_options,omitempty" json:"restore_options,omitempty" xml:"restore_options,omitempty"` + RestoreOptions map[string]string `json:"restore_options,omitempty"` } // RestoreRepositorySpecRequestBody is used to define fields on request body // types. type RestoreRepositorySpecRequestBody struct { // The unique identifier of this repository. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id,omitempty"` // The type of this repository. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type *string `json:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` + S3Bucket *string `json:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = // 's3'. - S3Region *string `form:"s3_region,omitempty" json:"s3_region,omitempty" xml:"s3_region,omitempty"` + S3Region *string `json:"s3_region,omitempty"` // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string `form:"s3_endpoint,omitempty" json:"s3_endpoint,omitempty" xml:"s3_endpoint,omitempty"` + S3Endpoint *string `json:"s3_endpoint,omitempty"` // An optional AWS access key ID to use for this repository. If not provided, // pgbackrest will use the default credential provider chain. - S3Key *string `form:"s3_key,omitempty" json:"s3_key,omitempty" xml:"s3_key,omitempty"` + S3Key *string `json:"s3_key,omitempty"` // The corresponding secret for the AWS access key ID in s3_key. - S3KeySecret *string `form:"s3_key_secret,omitempty" json:"s3_key_secret,omitempty" xml:"s3_key_secret,omitempty"` + S3KeySecret *string `json:"s3_key_secret,omitempty"` // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string `form:"gcs_bucket,omitempty" json:"gcs_bucket,omitempty" xml:"gcs_bucket,omitempty"` + GcsBucket *string `json:"gcs_bucket,omitempty"` // The optional GCS endpoint for this repository. Only applies when type = // 'gcs'. - GcsEndpoint *string `form:"gcs_endpoint,omitempty" json:"gcs_endpoint,omitempty" xml:"gcs_endpoint,omitempty"` + GcsEndpoint *string `json:"gcs_endpoint,omitempty"` // Optional base64-encoded private key data. If omitted, pgbackrest will use // the service account attached to the instance profile. - GcsKey *string `form:"gcs_key,omitempty" json:"gcs_key,omitempty" xml:"gcs_key,omitempty"` + GcsKey *string `json:"gcs_key,omitempty"` // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string `form:"azure_account,omitempty" json:"azure_account,omitempty" xml:"azure_account,omitempty"` + AzureAccount *string `json:"azure_account,omitempty"` // The Azure container name for this repository. Only applies when type = // 'azure'. - AzureContainer *string `form:"azure_container,omitempty" json:"azure_container,omitempty" xml:"azure_container,omitempty"` + AzureContainer *string `json:"azure_container,omitempty"` // The optional Azure endpoint for this repository. Only applies when type = // 'azure'. - AzureEndpoint *string `form:"azure_endpoint,omitempty" json:"azure_endpoint,omitempty" xml:"azure_endpoint,omitempty"` + AzureEndpoint *string `json:"azure_endpoint,omitempty"` // An optional Azure storage account access key to use for this repository. If // not provided, pgbackrest will use the VM's managed identity. - AzureKey *string `form:"azure_key,omitempty" json:"azure_key,omitempty" xml:"azure_key,omitempty"` + AzureKey *string `json:"azure_key,omitempty"` // The base path within the repository to store backups. Required for type = // 'posix' and 'cifs'. - BasePath *string `form:"base_path,omitempty" json:"base_path,omitempty" xml:"base_path,omitempty"` + BasePath *string `json:"base_path,omitempty"` // Additional options to apply to this repository. - CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` + CustomOptions map[string]string `json:"custom_options,omitempty"` } // OrchestratorOptsRequestBody is used to define fields on request body types. type OrchestratorOptsRequestBody struct { // Swarm-specific configuration. - Swarm *SwarmOptsRequestBody `form:"swarm,omitempty" json:"swarm,omitempty" xml:"swarm,omitempty"` + Swarm *SwarmOptsRequestBody `json:"swarm,omitempty"` } // SwarmOptsRequestBody is used to define fields on request body types. type SwarmOptsRequestBody struct { // A list of extra volumes to mount. Each entry defines a host and container // path. - ExtraVolumes []*ExtraVolumesSpecRequestBody `form:"extra_volumes,omitempty" json:"extra_volumes,omitempty" xml:"extra_volumes,omitempty"` + ExtraVolumes []*ExtraVolumesSpecRequestBody `json:"extra_volumes,omitempty"` // A list of additional Docker Swarm networks to attach containers in this // database to. - ExtraNetworks []*ExtraNetworkSpecRequestBody `form:"extra_networks,omitempty" json:"extra_networks,omitempty" xml:"extra_networks,omitempty"` + ExtraNetworks []*ExtraNetworkSpecRequestBody `json:"extra_networks,omitempty"` // Arbitrary labels to apply to the Docker Swarm service - ExtraLabels map[string]string `form:"extra_labels,omitempty" json:"extra_labels,omitempty" xml:"extra_labels,omitempty"` + ExtraLabels map[string]string `json:"extra_labels,omitempty"` } // ExtraVolumesSpecRequestBody is used to define fields on request body types. type ExtraVolumesSpecRequestBody struct { // The host path for the volume. - HostPath *string `form:"host_path,omitempty" json:"host_path,omitempty" xml:"host_path,omitempty"` + HostPath *string `json:"host_path"` // The path inside the container where the volume will be mounted. - DestinationPath *string `form:"destination_path,omitempty" json:"destination_path,omitempty" xml:"destination_path,omitempty"` + DestinationPath *string `json:"destination_path"` } // ExtraNetworkSpecRequestBody is used to define fields on request body types. type ExtraNetworkSpecRequestBody struct { // The name or ID of the network to connect to. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id"` // Optional network-scoped aliases for the container. - Aliases []string `form:"aliases,omitempty" json:"aliases,omitempty" xml:"aliases,omitempty"` + Aliases []string `json:"aliases,omitempty"` // Optional driver options for the network connection. - DriverOpts map[string]string `form:"driver_opts,omitempty" json:"driver_opts,omitempty" xml:"driver_opts,omitempty"` + DriverOpts map[string]string `json:"driver_opts,omitempty"` } // DatabaseUserSpecRequestBody is used to define fields on request body types. type DatabaseUserSpecRequestBody struct { // The username for this database user. - Username *string `form:"username,omitempty" json:"username,omitempty" xml:"username,omitempty"` + Username *string `json:"username"` // The password for this database user. This field will be excluded from the // response of all endpoints. It can also be omitted from update requests to // keep the current value. - Password *string `form:"password,omitempty" json:"password,omitempty" xml:"password,omitempty"` + Password *string `json:"password,omitempty"` // If true, this user will be granted database ownership. - DbOwner *bool `form:"db_owner,omitempty" json:"db_owner,omitempty" xml:"db_owner,omitempty"` + DbOwner *bool `json:"db_owner,omitempty"` // The attributes to assign to this database user. - Attributes []string `form:"attributes,omitempty" json:"attributes,omitempty" xml:"attributes,omitempty"` + Attributes []string `json:"attributes,omitempty"` // The roles to assign to this database user. - Roles []string `form:"roles,omitempty" json:"roles,omitempty" xml:"roles,omitempty"` + Roles []string `json:"roles,omitempty"` } // ServiceSpecRequestBody is used to define fields on request body types. type ServiceSpecRequestBody struct { // The unique identifier for this service. - ServiceID *string `form:"service_id,omitempty" json:"service_id,omitempty" xml:"service_id,omitempty"` + ServiceID *string `json:"service_id"` // The type of service to run. - ServiceType *string `form:"service_type,omitempty" json:"service_type,omitempty" xml:"service_type,omitempty"` + ServiceType *string `json:"service_type"` // The version of the service in semver format (e.g., '1.0.0') or the literal // 'latest'. - Version *string `form:"version,omitempty" json:"version,omitempty" xml:"version,omitempty"` + Version *string `json:"version"` // The IDs of the hosts that should run this service. One service instance will // be created per host. - HostIds []string `form:"host_ids,omitempty" json:"host_ids,omitempty" xml:"host_ids,omitempty"` + HostIds []string `json:"host_ids"` // The port to publish the service on the host. If 0, Docker assigns a random // port. If unspecified, no port is published and the service is not accessible // from outside the Docker network. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // Service-specific configuration. For MCP services, this includes // llm_provider, llm_model, and provider-specific API keys. - Config map[string]any `form:"config,omitempty" json:"config,omitempty" xml:"config,omitempty"` + Config map[string]any `json:"config"` // The number of CPUs to allocate for this service. It can include the SI // suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if // unspecified. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for this service. // Defaults to container defaults if unspecified. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` } // DatabaseSpecRequestBodyRequestBody is used to define fields on request body // types. type DatabaseSpecRequestBodyRequestBody struct { // The name of the Postgres database. - DatabaseName *string `form:"database_name,omitempty" json:"database_name,omitempty" xml:"database_name,omitempty"` + DatabaseName *string `json:"database_name"` // The Postgres version in 'major.minor' format. - PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` + PostgresVersion *string `json:"postgres_version,omitempty"` // The major version of the Spock extension. - SpockVersion *string `form:"spock_version,omitempty" json:"spock_version,omitempty" xml:"spock_version,omitempty"` + SpockVersion *string `json:"spock_version,omitempty"` // The port used by the Postgres database. If the port is 0, each instance will // be assigned a random port. If the port is unspecified, the database will not // be exposed on any port, dependent on orchestrator support for that feature. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // The number of CPUs to allocate for the database and to use for tuning // Postgres. Defaults to the number of available CPUs on the host. Can include // an SI suffix, e.g. '500m' for 500 millicpus. Whether this limit is enforced // depends on the orchestrator. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for the database and // to use for tuning Postgres. Defaults to the total available memory on the // host. Whether this limit is enforced depends on the orchestrator. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // The Spock nodes for this database. - Nodes []*DatabaseNodeSpecRequestBodyRequestBody `form:"nodes,omitempty" json:"nodes,omitempty" xml:"nodes,omitempty"` + Nodes []*DatabaseNodeSpecRequestBodyRequestBody `json:"nodes"` // The users to create for this database. - DatabaseUsers []*DatabaseUserSpecRequestBodyRequestBody `form:"database_users,omitempty" json:"database_users,omitempty" xml:"database_users,omitempty"` + DatabaseUsers []*DatabaseUserSpecRequestBodyRequestBody `json:"database_users,omitempty"` // Service instances to run alongside the database (e.g., MCP servers). - Services []*ServiceSpecRequestBodyRequestBody `form:"services,omitempty" json:"services,omitempty" xml:"services,omitempty"` + Services []*ServiceSpecRequestBodyRequestBody `json:"services,omitempty"` // The backup configuration for this database. - BackupConfig *BackupConfigSpecRequestBodyRequestBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecRequestBodyRequestBody `json:"backup_config,omitempty"` // The restore configuration for this database. - RestoreConfig *RestoreConfigSpecRequestBodyRequestBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecRequestBodyRequestBody `json:"restore_config,omitempty"` // Additional postgresql.conf settings. Will be merged with the settings // provided by control-plane. - PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` + PostgresqlConf map[string]any `json:"postgresql_conf,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsRequestBodyRequestBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsRequestBodyRequestBody `json:"orchestrator_opts,omitempty"` } // DatabaseNodeSpecRequestBodyRequestBody is used to define fields on request // body types. type DatabaseNodeSpecRequestBodyRequestBody struct { // The name of the database node. - Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` + Name *string `json:"name"` // The IDs of the hosts that should run this node. When multiple hosts are // specified, one host will chosen as a primary, and the others will be read // replicas. - HostIds []string `form:"host_ids,omitempty" json:"host_ids,omitempty" xml:"host_ids,omitempty"` + HostIds []string `json:"host_ids"` // The Postgres version for this node in 'major.minor' format. Overrides the // Postgres version set in the DatabaseSpec. - PostgresVersion *string `form:"postgres_version,omitempty" json:"postgres_version,omitempty" xml:"postgres_version,omitempty"` + PostgresVersion *string `json:"postgres_version,omitempty"` // The port used by the Postgres database for this node. Overrides the Postgres // port set in the DatabaseSpec. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // The number of CPUs to allocate for the database on this node and to use for // tuning Postgres. It can include the SI suffix 'm', e.g. '500m' for 500 // millicpus. Cannot allocate units smaller than 1m. Defaults to the number of // available CPUs on the host if 0 or unspecified. Cannot allocate more CPUs // than are available on the host. Whether this limit is enforced depends on // the orchestrator. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for the database on // this node and to use for tuning Postgres. Defaults to the total available // memory on the host. Whether this limit is enforced depends on the // orchestrator. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` // Additional postgresql.conf settings for this particular node. Will be merged // with the settings provided by control-plane. - PostgresqlConf map[string]any `form:"postgresql_conf,omitempty" json:"postgresql_conf,omitempty" xml:"postgresql_conf,omitempty"` + PostgresqlConf map[string]any `json:"postgresql_conf,omitempty"` // The backup configuration for this node. Overrides the backup configuration // set in the DatabaseSpec. - BackupConfig *BackupConfigSpecRequestBodyRequestBody `form:"backup_config,omitempty" json:"backup_config,omitempty" xml:"backup_config,omitempty"` + BackupConfig *BackupConfigSpecRequestBodyRequestBody `json:"backup_config,omitempty"` // The restore configuration for this node. Overrides the restore configuration // set in the DatabaseSpec. - RestoreConfig *RestoreConfigSpecRequestBodyRequestBody `form:"restore_config,omitempty" json:"restore_config,omitempty" xml:"restore_config,omitempty"` + RestoreConfig *RestoreConfigSpecRequestBodyRequestBody `json:"restore_config,omitempty"` // Orchestrator-specific configuration options. - OrchestratorOpts *OrchestratorOptsRequestBodyRequestBody `form:"orchestrator_opts,omitempty" json:"orchestrator_opts,omitempty" xml:"orchestrator_opts,omitempty"` + OrchestratorOpts *OrchestratorOptsRequestBodyRequestBody `json:"orchestrator_opts,omitempty"` // The name of the source node to use for sync. This is typically the node // (like 'n1') from which the data will be copied to initialize this new node. - SourceNode *string `form:"source_node,omitempty" json:"source_node,omitempty" xml:"source_node,omitempty"` + SourceNode *string `json:"source_node,omitempty"` } // BackupConfigSpecRequestBodyRequestBody is used to define fields on request // body types. type BackupConfigSpecRequestBodyRequestBody struct { // The repositories for this backup configuration. - Repositories []*BackupRepositorySpecRequestBodyRequestBody `form:"repositories,omitempty" json:"repositories,omitempty" xml:"repositories,omitempty"` + Repositories []*BackupRepositorySpecRequestBodyRequestBody `json:"repositories"` // The schedules for this backup configuration. - Schedules []*BackupScheduleSpecRequestBodyRequestBody `form:"schedules,omitempty" json:"schedules,omitempty" xml:"schedules,omitempty"` + Schedules []*BackupScheduleSpecRequestBodyRequestBody `json:"schedules,omitempty"` } // BackupRepositorySpecRequestBodyRequestBody is used to define fields on // request body types. type BackupRepositorySpecRequestBodyRequestBody struct { // The unique identifier of this repository. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id,omitempty"` // The type of this repository. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type *string `json:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` + S3Bucket *string `json:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = // 's3'. - S3Region *string `form:"s3_region,omitempty" json:"s3_region,omitempty" xml:"s3_region,omitempty"` + S3Region *string `json:"s3_region,omitempty"` // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string `form:"s3_endpoint,omitempty" json:"s3_endpoint,omitempty" xml:"s3_endpoint,omitempty"` + S3Endpoint *string `json:"s3_endpoint,omitempty"` // An optional AWS access key ID to use for this repository. If not provided, // pgbackrest will use the default credential provider chain. This field will // be excluded from the response of all endpoints. It can also be omitted from // update requests to keep the current value. - S3Key *string `form:"s3_key,omitempty" json:"s3_key,omitempty" xml:"s3_key,omitempty"` + S3Key *string `json:"s3_key,omitempty"` // The corresponding secret for the AWS access key ID in s3_key. This field // will be excluded from the response of all endpoints. It can also be omitted // from update requests to keep the current value. - S3KeySecret *string `form:"s3_key_secret,omitempty" json:"s3_key_secret,omitempty" xml:"s3_key_secret,omitempty"` + S3KeySecret *string `json:"s3_key_secret,omitempty"` // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string `form:"gcs_bucket,omitempty" json:"gcs_bucket,omitempty" xml:"gcs_bucket,omitempty"` + GcsBucket *string `json:"gcs_bucket,omitempty"` // The optional GCS endpoint for this repository. Only applies when type = // 'gcs'. - GcsEndpoint *string `form:"gcs_endpoint,omitempty" json:"gcs_endpoint,omitempty" xml:"gcs_endpoint,omitempty"` + GcsEndpoint *string `json:"gcs_endpoint,omitempty"` // Optional base64-encoded private key data. If omitted, pgbackrest will use // the service account attached to the instance profile. This field will be // excluded from the response of all endpoints. It can also be omitted from // update requests to keep the current value. - GcsKey *string `form:"gcs_key,omitempty" json:"gcs_key,omitempty" xml:"gcs_key,omitempty"` + GcsKey *string `json:"gcs_key,omitempty"` // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string `form:"azure_account,omitempty" json:"azure_account,omitempty" xml:"azure_account,omitempty"` + AzureAccount *string `json:"azure_account,omitempty"` // The Azure container name for this repository. Only applies when type = // 'azure'. - AzureContainer *string `form:"azure_container,omitempty" json:"azure_container,omitempty" xml:"azure_container,omitempty"` + AzureContainer *string `json:"azure_container,omitempty"` // The optional Azure endpoint for this repository. Only applies when type = // 'azure'. - AzureEndpoint *string `form:"azure_endpoint,omitempty" json:"azure_endpoint,omitempty" xml:"azure_endpoint,omitempty"` + AzureEndpoint *string `json:"azure_endpoint,omitempty"` // The Azure storage account access key to use for this repository. This field // will be excluded from the response of all endpoints. It can also be omitted // from update requests to keep the current value. - AzureKey *string `form:"azure_key,omitempty" json:"azure_key,omitempty" xml:"azure_key,omitempty"` + AzureKey *string `json:"azure_key,omitempty"` // The count of full backups to retain or the time to retain full backups. - RetentionFull *int `form:"retention_full,omitempty" json:"retention_full,omitempty" xml:"retention_full,omitempty"` + RetentionFull *int `json:"retention_full,omitempty"` // The type of measure used for retention_full. - RetentionFullType *string `form:"retention_full_type,omitempty" json:"retention_full_type,omitempty" xml:"retention_full_type,omitempty"` + RetentionFullType *string `json:"retention_full_type,omitempty"` // The base path within the repository to store backups. Required for type = // 'posix' and 'cifs'. - BasePath *string `form:"base_path,omitempty" json:"base_path,omitempty" xml:"base_path,omitempty"` + BasePath *string `json:"base_path,omitempty"` // Additional options to apply to this repository. - CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` + CustomOptions map[string]string `json:"custom_options,omitempty"` } // BackupScheduleSpecRequestBodyRequestBody is used to define fields on request // body types. type BackupScheduleSpecRequestBodyRequestBody struct { // The unique identifier for this backup schedule. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id"` // The type of backup to take on this schedule. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type *string `json:"type"` // The cron expression for this schedule. - CronExpression *string `form:"cron_expression,omitempty" json:"cron_expression,omitempty" xml:"cron_expression,omitempty"` + CronExpression *string `json:"cron_expression"` } // RestoreConfigSpecRequestBodyRequestBody is used to define fields on request // body types. type RestoreConfigSpecRequestBodyRequestBody struct { // The ID of the database to restore this database from. - SourceDatabaseID *string `form:"source_database_id,omitempty" json:"source_database_id,omitempty" xml:"source_database_id,omitempty"` + SourceDatabaseID *string `json:"source_database_id"` // The name of the node to restore this database from. - SourceNodeName *string `form:"source_node_name,omitempty" json:"source_node_name,omitempty" xml:"source_node_name,omitempty"` + SourceNodeName *string `json:"source_node_name"` // The name of the database in this repository. The database will be renamed to // the database_name in the DatabaseSpec after it's restored. - SourceDatabaseName *string `form:"source_database_name,omitempty" json:"source_database_name,omitempty" xml:"source_database_name,omitempty"` + SourceDatabaseName *string `json:"source_database_name"` // The repository to restore this database from. - Repository *RestoreRepositorySpecRequestBodyRequestBody `form:"repository,omitempty" json:"repository,omitempty" xml:"repository,omitempty"` + Repository *RestoreRepositorySpecRequestBodyRequestBody `json:"repository"` // Additional options to use when restoring this database. If omitted, the // database will be restored to the latest point in the given repository. - RestoreOptions map[string]string `form:"restore_options,omitempty" json:"restore_options,omitempty" xml:"restore_options,omitempty"` + RestoreOptions map[string]string `json:"restore_options,omitempty"` } // RestoreRepositorySpecRequestBodyRequestBody is used to define fields on // request body types. type RestoreRepositorySpecRequestBodyRequestBody struct { // The unique identifier of this repository. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id,omitempty"` // The type of this repository. - Type *string `form:"type,omitempty" json:"type,omitempty" xml:"type,omitempty"` + Type *string `json:"type"` // The S3 bucket name for this repository. Only applies when type = 's3'. - S3Bucket *string `form:"s3_bucket,omitempty" json:"s3_bucket,omitempty" xml:"s3_bucket,omitempty"` + S3Bucket *string `json:"s3_bucket,omitempty"` // The region of the S3 bucket for this repository. Only applies when type = // 's3'. - S3Region *string `form:"s3_region,omitempty" json:"s3_region,omitempty" xml:"s3_region,omitempty"` + S3Region *string `json:"s3_region,omitempty"` // The optional S3 endpoint for this repository. Only applies when type = 's3'. - S3Endpoint *string `form:"s3_endpoint,omitempty" json:"s3_endpoint,omitempty" xml:"s3_endpoint,omitempty"` + S3Endpoint *string `json:"s3_endpoint,omitempty"` // An optional AWS access key ID to use for this repository. If not provided, // pgbackrest will use the default credential provider chain. - S3Key *string `form:"s3_key,omitempty" json:"s3_key,omitempty" xml:"s3_key,omitempty"` + S3Key *string `json:"s3_key,omitempty"` // The corresponding secret for the AWS access key ID in s3_key. - S3KeySecret *string `form:"s3_key_secret,omitempty" json:"s3_key_secret,omitempty" xml:"s3_key_secret,omitempty"` + S3KeySecret *string `json:"s3_key_secret,omitempty"` // The GCS bucket name for this repository. Only applies when type = 'gcs'. - GcsBucket *string `form:"gcs_bucket,omitempty" json:"gcs_bucket,omitempty" xml:"gcs_bucket,omitempty"` + GcsBucket *string `json:"gcs_bucket,omitempty"` // The optional GCS endpoint for this repository. Only applies when type = // 'gcs'. - GcsEndpoint *string `form:"gcs_endpoint,omitempty" json:"gcs_endpoint,omitempty" xml:"gcs_endpoint,omitempty"` + GcsEndpoint *string `json:"gcs_endpoint,omitempty"` // Optional base64-encoded private key data. If omitted, pgbackrest will use // the service account attached to the instance profile. - GcsKey *string `form:"gcs_key,omitempty" json:"gcs_key,omitempty" xml:"gcs_key,omitempty"` + GcsKey *string `json:"gcs_key,omitempty"` // The Azure account name for this repository. Only applies when type = 'azure'. - AzureAccount *string `form:"azure_account,omitempty" json:"azure_account,omitempty" xml:"azure_account,omitempty"` + AzureAccount *string `json:"azure_account,omitempty"` // The Azure container name for this repository. Only applies when type = // 'azure'. - AzureContainer *string `form:"azure_container,omitempty" json:"azure_container,omitempty" xml:"azure_container,omitempty"` + AzureContainer *string `json:"azure_container,omitempty"` // The optional Azure endpoint for this repository. Only applies when type = // 'azure'. - AzureEndpoint *string `form:"azure_endpoint,omitempty" json:"azure_endpoint,omitempty" xml:"azure_endpoint,omitempty"` + AzureEndpoint *string `json:"azure_endpoint,omitempty"` // An optional Azure storage account access key to use for this repository. If // not provided, pgbackrest will use the VM's managed identity. - AzureKey *string `form:"azure_key,omitempty" json:"azure_key,omitempty" xml:"azure_key,omitempty"` + AzureKey *string `json:"azure_key,omitempty"` // The base path within the repository to store backups. Required for type = // 'posix' and 'cifs'. - BasePath *string `form:"base_path,omitempty" json:"base_path,omitempty" xml:"base_path,omitempty"` + BasePath *string `json:"base_path,omitempty"` // Additional options to apply to this repository. - CustomOptions map[string]string `form:"custom_options,omitempty" json:"custom_options,omitempty" xml:"custom_options,omitempty"` + CustomOptions map[string]string `json:"custom_options,omitempty"` } // OrchestratorOptsRequestBodyRequestBody is used to define fields on request // body types. type OrchestratorOptsRequestBodyRequestBody struct { // Swarm-specific configuration. - Swarm *SwarmOptsRequestBodyRequestBody `form:"swarm,omitempty" json:"swarm,omitempty" xml:"swarm,omitempty"` + Swarm *SwarmOptsRequestBodyRequestBody `json:"swarm,omitempty"` } // SwarmOptsRequestBodyRequestBody is used to define fields on request body @@ -2724,78 +2724,78 @@ type OrchestratorOptsRequestBodyRequestBody struct { type SwarmOptsRequestBodyRequestBody struct { // A list of extra volumes to mount. Each entry defines a host and container // path. - ExtraVolumes []*ExtraVolumesSpecRequestBodyRequestBody `form:"extra_volumes,omitempty" json:"extra_volumes,omitempty" xml:"extra_volumes,omitempty"` + ExtraVolumes []*ExtraVolumesSpecRequestBodyRequestBody `json:"extra_volumes,omitempty"` // A list of additional Docker Swarm networks to attach containers in this // database to. - ExtraNetworks []*ExtraNetworkSpecRequestBodyRequestBody `form:"extra_networks,omitempty" json:"extra_networks,omitempty" xml:"extra_networks,omitempty"` + ExtraNetworks []*ExtraNetworkSpecRequestBodyRequestBody `json:"extra_networks,omitempty"` // Arbitrary labels to apply to the Docker Swarm service - ExtraLabels map[string]string `form:"extra_labels,omitempty" json:"extra_labels,omitempty" xml:"extra_labels,omitempty"` + ExtraLabels map[string]string `json:"extra_labels,omitempty"` } // ExtraVolumesSpecRequestBodyRequestBody is used to define fields on request // body types. type ExtraVolumesSpecRequestBodyRequestBody struct { // The host path for the volume. - HostPath *string `form:"host_path,omitempty" json:"host_path,omitempty" xml:"host_path,omitempty"` + HostPath *string `json:"host_path"` // The path inside the container where the volume will be mounted. - DestinationPath *string `form:"destination_path,omitempty" json:"destination_path,omitempty" xml:"destination_path,omitempty"` + DestinationPath *string `json:"destination_path"` } // ExtraNetworkSpecRequestBodyRequestBody is used to define fields on request // body types. type ExtraNetworkSpecRequestBodyRequestBody struct { // The name or ID of the network to connect to. - ID *string `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"` + ID *string `json:"id"` // Optional network-scoped aliases for the container. - Aliases []string `form:"aliases,omitempty" json:"aliases,omitempty" xml:"aliases,omitempty"` + Aliases []string `json:"aliases,omitempty"` // Optional driver options for the network connection. - DriverOpts map[string]string `form:"driver_opts,omitempty" json:"driver_opts,omitempty" xml:"driver_opts,omitempty"` + DriverOpts map[string]string `json:"driver_opts,omitempty"` } // DatabaseUserSpecRequestBodyRequestBody is used to define fields on request // body types. type DatabaseUserSpecRequestBodyRequestBody struct { // The username for this database user. - Username *string `form:"username,omitempty" json:"username,omitempty" xml:"username,omitempty"` + Username *string `json:"username"` // The password for this database user. This field will be excluded from the // response of all endpoints. It can also be omitted from update requests to // keep the current value. - Password *string `form:"password,omitempty" json:"password,omitempty" xml:"password,omitempty"` + Password *string `json:"password,omitempty"` // If true, this user will be granted database ownership. - DbOwner *bool `form:"db_owner,omitempty" json:"db_owner,omitempty" xml:"db_owner,omitempty"` + DbOwner *bool `json:"db_owner,omitempty"` // The attributes to assign to this database user. - Attributes []string `form:"attributes,omitempty" json:"attributes,omitempty" xml:"attributes,omitempty"` + Attributes []string `json:"attributes,omitempty"` // The roles to assign to this database user. - Roles []string `form:"roles,omitempty" json:"roles,omitempty" xml:"roles,omitempty"` + Roles []string `json:"roles,omitempty"` } // ServiceSpecRequestBodyRequestBody is used to define fields on request body // types. type ServiceSpecRequestBodyRequestBody struct { // The unique identifier for this service. - ServiceID *string `form:"service_id,omitempty" json:"service_id,omitempty" xml:"service_id,omitempty"` + ServiceID *string `json:"service_id"` // The type of service to run. - ServiceType *string `form:"service_type,omitempty" json:"service_type,omitempty" xml:"service_type,omitempty"` + ServiceType *string `json:"service_type"` // The version of the service in semver format (e.g., '1.0.0') or the literal // 'latest'. - Version *string `form:"version,omitempty" json:"version,omitempty" xml:"version,omitempty"` + Version *string `json:"version"` // The IDs of the hosts that should run this service. One service instance will // be created per host. - HostIds []string `form:"host_ids,omitempty" json:"host_ids,omitempty" xml:"host_ids,omitempty"` + HostIds []string `json:"host_ids"` // The port to publish the service on the host. If 0, Docker assigns a random // port. If unspecified, no port is published and the service is not accessible // from outside the Docker network. - Port *int `form:"port,omitempty" json:"port,omitempty" xml:"port,omitempty"` + Port *int `json:"port,omitempty"` // Service-specific configuration. For MCP services, this includes // llm_provider, llm_model, and provider-specific API keys. - Config map[string]any `form:"config,omitempty" json:"config,omitempty" xml:"config,omitempty"` + Config map[string]any `json:"config"` // The number of CPUs to allocate for this service. It can include the SI // suffix 'm', e.g. '500m' for 500 millicpus. Defaults to container defaults if // unspecified. - Cpus *string `form:"cpus,omitempty" json:"cpus,omitempty" xml:"cpus,omitempty"` + Cpus *string `json:"cpus,omitempty"` // The amount of memory in SI or IEC notation to allocate for this service. // Defaults to container defaults if unspecified. - Memory *string `form:"memory,omitempty" json:"memory,omitempty" xml:"memory,omitempty"` + Memory *string `json:"memory,omitempty"` } // NewInitClusterResponseBody builds the HTTP response body from the result of diff --git a/api/tags/main.go b/api/tags/main.go new file mode 100644 index 00000000..5e8f5ec2 --- /dev/null +++ b/api/tags/main.go @@ -0,0 +1,280 @@ +/* +This tool modifies the types in our API design files to add JSON struct tags. +We're doing this programmatically because there are many fields to modify and +naming them and keeping them in sync with the required fields is error-prone. + +This main file takes a list of file paths to modify. It will then add +g.Meta("struct:tag:json", "") calls to every +g.Attribute and g.ErrorName call that's part of a g.Type or g.ResultType. If the +field is not listed in the type's g.Required, the struct tag will have +omitempty. +*/ +package main + +import ( + "errors" + "fmt" + "go/ast" + "go/format" + "go/parser" + "go/token" + "log" + "os" + "slices" + "strconv" + "strings" +) + +func main() { + var errs []error + for _, path := range os.Args[1:] { + if err := addTags(path); err != nil { + errs = append(errs, fmt.Errorf("error processing path '%s': %w", path, err)) + } + } + if err := errors.Join(errs...); err != nil { + log.Fatal(err) + } +} + +func addTags(path string) error { + fset := token.NewFileSet() + f, err := parser.ParseFile(fset, path, nil, parser.ParseComments) + if err != nil { + return fmt.Errorf("failed to parse file: %w", err) + } + + var errs []error + ast.Inspect(f, func(n ast.Node) bool { + switch t := n.(type) { + case *ast.CallExpr: + switch { + case selectorMatches(t, "Type"): + errs = append(errs, processType(fset, t)) + case selectorMatches(t, "ResultType"): + errs = append(errs, processResultType(fset, t)) + } + } + return true + }) + if err := errors.Join(errs...); err != nil { + return err + } + + // Write to a string first in case of errors + var buf strings.Builder + err = format.Node(&buf, fset, f) + if err != nil { + return fmt.Errorf("failed to format file: %w", err) + } + + err = os.WriteFile(path, []byte(buf.String()), 0o644) + if err != nil { + return fmt.Errorf("failed to write file '%s': %w", path, err) + } + + return nil +} + +func processResultType(fset *token.FileSet, n *ast.CallExpr) error { + for _, arg := range n.Args { + flit, ok := arg.(*ast.FuncLit) + if !ok { + continue + } + required := extractRequired(flit) + // Do second pass to process attributes + for _, stmt := range flit.Body.List { + attr := extractCall(stmt, "Attributes") + if attr == nil { + continue + } + if err := processAttributes(fset, attr, required); err != nil { + return err + } + } + } + + return nil +} + +func processType(fset *token.FileSet, n *ast.CallExpr) error { + for _, arg := range n.Args { + flit, ok := arg.(*ast.FuncLit) + if !ok { + continue + } + required := extractRequired(flit) + for _, stmt := range flit.Body.List { + attr := extractCall(stmt, "Attribute", "ErrorName") + if attr != nil { + if err := processAttribute(fset, attr, required); err != nil { + return err + } + } + } + } + + return nil +} + +func extractRequired(flit *ast.FuncLit) map[string]bool { + required := map[string]bool{} + // Starting from the end because our convention is to put required fields + // last. + for _, stmt := range slices.Backward(flit.Body.List) { + req := extractCall(stmt, "Required") + if req == nil { + continue + } + for _, arg := range req.Args { + if field := stringVal(arg); field != "" { + required[field] = true + } + } + } + + return required +} + +func processAttributes(fset *token.FileSet, n *ast.CallExpr, required map[string]bool) error { + for _, arg := range n.Args { + flit, ok := arg.(*ast.FuncLit) + if !ok { + continue + } + for _, stmt := range flit.Body.List { + attr := extractCall(stmt, "Attribute", "ErrorName") + if attr != nil { + if err := processAttribute(fset, attr, required); err != nil { + return err + } + } + } + } + + return nil +} + +func processAttribute(fset *token.FileSet, n *ast.CallExpr, required map[string]bool) error { + // first arg is the attribute name + if len(n.Args) == 0 { + return fmt.Errorf("%s: Attribute missing name", fset.Position(n.Pos())) + } + name := stringVal(n.Args[0]) + if name == "" { + return fmt.Errorf("%s: Attribute first argument not string", fset.Position(n.Pos())) + } + + var hasFuncLit bool + + tagLit := stringLit(tagValue(name, required[name])) + + for _, arg := range n.Args[1:] { + flit, ok := arg.(*ast.FuncLit) + if !ok { + continue + } + hasFuncLit = true + var hasJsonMeta bool + for _, stmt := range flit.Body.List { + m := extractCall(stmt, "Meta") + if m == nil { + continue + } + if len(m.Args) == 0 { + continue + } + if metaName := stringVal(m.Args[0]); metaName == "struct:tag:json" { + hasJsonMeta = true + if len(m.Args) < 2 { + m.Args = append(m.Args, tagLit) + } else { + m.Args[1] = tagLit + } + } + } + if !hasJsonMeta { + flit.Body.List = append(flit.Body.List, metaNode(tagLit)) + } + } + + if !hasFuncLit { + return fmt.Errorf("%s: Attribute missing function body", fset.Position(n.Pos())) + } + + return nil +} + +func tagValue(name string, required bool) string { + tag := name + if !required { + tag += ",omitempty" + } + + return tag +} + +func metaNode(tagLit *ast.BasicLit) *ast.ExprStmt { + return &ast.ExprStmt{ + X: &ast.CallExpr{ + Fun: &ast.SelectorExpr{ + X: &ast.Ident{Name: "g"}, + Sel: &ast.Ident{Name: "Meta"}, + }, + Args: []ast.Expr{stringLit("struct:tag:json"), tagLit}, + }, + } +} + +func selectorMatches(call *ast.CallExpr, name string) bool { + sel, ok := call.Fun.(*ast.SelectorExpr) + if !ok { + return false + } + ident, ok := sel.X.(*ast.Ident) + if !ok { + return false + } + return ident.Name == "g" && sel.Sel.Name == name +} + +func extractCall(stmt ast.Stmt, name ...string) *ast.CallExpr { + expr, ok := stmt.(*ast.ExprStmt) + if !ok { + return nil + } + call, ok := expr.X.(*ast.CallExpr) + if !ok { + return nil + } + for _, n := range name { + if selectorMatches(call, n) { + return call + } + } + + return nil +} + +func stringVal(expr ast.Expr) string { + lit, ok := expr.(*ast.BasicLit) + if !ok { + return "" + } + if lit.Kind != token.STRING { + return "" + } + raw, err := strconv.Unquote(lit.Value) + if err != nil { + return "" + } + return raw +} + +func stringLit(value string) *ast.BasicLit { + return &ast.BasicLit{ + Kind: token.STRING, + Value: strconv.Quote(value), + } +} diff --git a/changes/unreleased/Added-20260209-091508.yaml b/changes/unreleased/Added-20260209-091508.yaml new file mode 100644 index 00000000..d110f753 --- /dev/null +++ b/changes/unreleased/Added-20260209-091508.yaml @@ -0,0 +1,3 @@ +kind: Added +body: '`client` package: Added JSON tags to generated `service` structs.' +time: 2026-02-09T09:15:08.154593-05:00 From 75bde393d4ddee20f80333a8f85c97bad85c56a9 Mon Sep 17 00:00:00 2001 From: Jason Lynch Date: Sun, 8 Feb 2026 15:53:05 -0500 Subject: [PATCH 4/5] fix: omit empty error field from instance response We were erroneously including the error field in the instance reponses, even though it was empty, because it was non-nil. This fixes it so that we only set error if it's both non-nil and non-empty. --- server/internal/api/apiv1/convert.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/internal/api/apiv1/convert.go b/server/internal/api/apiv1/convert.go index 36e3a1ea..1f3f32c8 100644 --- a/server/internal/api/apiv1/convert.go +++ b/server/internal/api/apiv1/convert.go @@ -470,7 +470,7 @@ func instanceToAPI(instance *database.Instance) *api.Instance { // An instance error takes precedence over its status error because it // represents a failed modification to the database. - if apiInst.Error == nil && status.Error != nil { + if apiInst.Error == nil && status.Error != nil && *status.Error != "" { apiInst.Error = status.Error } } From 4767cf1bfd2afbac548003222011614e81526654 Mon Sep 17 00:00:00 2001 From: Jason Lynch Date: Mon, 9 Feb 2026 14:11:05 -0500 Subject: [PATCH 5/5] feat: add default responses to openapi specs Some code generator features, such as ogen's "convenient error types" require the `default` response. Including a `default` response is best practice, but Goa doesn't have a built-in way to specify the default response. This commit adds another Goa plugin that modifies the OpenAPI files before they're templated. --- api/apiv1/gen/http/openapi.json | 168 +++++++++ api/apiv1/gen/http/openapi.yaml | 112 ++++++ api/apiv1/gen/http/openapi3.json | 392 ++++++++++++++++++++ api/apiv1/gen/http/openapi3.yaml | 252 +++++++++++++ api/plugins/add_openapi_default_response.go | 116 ++++++ api/plugins/disable_client_validation.go | 4 +- 6 files changed, 1042 insertions(+), 2 deletions(-) create mode 100644 api/plugins/add_openapi_default_response.go diff --git a/api/apiv1/gen/http/openapi.json b/api/apiv1/gen/http/openapi.json index 8b0e5601..dca6daaa 100644 --- a/api/apiv1/gen/http/openapi.json +++ b/api/apiv1/gen/http/openapi.json @@ -56,6 +56,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -120,6 +126,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -192,6 +204,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -237,6 +255,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -281,6 +305,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -347,6 +377,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -423,6 +459,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -522,6 +564,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -601,6 +649,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -697,6 +751,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -785,6 +845,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -873,6 +939,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -970,6 +1042,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -1059,6 +1137,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -1148,6 +1232,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -1239,6 +1329,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -1342,6 +1438,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -1428,6 +1530,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -1503,6 +1611,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -1603,6 +1717,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -1647,6 +1767,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -1725,6 +1851,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -1805,6 +1937,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -1908,6 +2046,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -1994,6 +2138,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -2094,6 +2244,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -2198,6 +2354,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ @@ -2235,6 +2397,12 @@ "message" ] } + }, + "default": { + "description": "Unexpected error response", + "schema": { + "$ref": "#/definitions/APIError" + } } }, "schemes": [ diff --git a/api/apiv1/gen/http/openapi.yaml b/api/apiv1/gen/http/openapi.yaml index 3e69dbea..11d26a5b 100644 --- a/api/apiv1/gen/http/openapi.yaml +++ b/api/apiv1/gen/http/openapi.yaml @@ -43,6 +43,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/cluster/init: @@ -87,6 +91,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/cluster/join: @@ -136,6 +144,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/cluster/join-token: @@ -167,6 +179,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/databases: @@ -197,6 +213,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http post: @@ -242,6 +262,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/databases/{database_id}: @@ -295,6 +319,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http post: @@ -364,6 +392,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http delete: @@ -419,6 +451,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/databases/{database_id}/instances/{instance_id}/restart: @@ -485,6 +521,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/databases/{database_id}/instances/{instance_id}/start-instance: @@ -546,6 +586,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/databases/{database_id}/instances/{instance_id}/stop-instance: @@ -607,6 +651,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/databases/{database_id}/nodes/{node_name}/backups: @@ -674,6 +722,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/databases/{database_id}/nodes/{node_name}/failover: @@ -735,6 +787,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/databases/{database_id}/nodes/{node_name}/switchover: @@ -796,6 +852,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/databases/{database_id}/restore: @@ -859,6 +919,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/databases/{database_id}/tasks: @@ -932,6 +996,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/databases/{database_id}/tasks/{task_id}: @@ -993,6 +1061,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/databases/{database_id}/tasks/{task_id}/cancel: @@ -1046,6 +1118,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/databases/{database_id}/tasks/{task_id}/log: @@ -1117,6 +1193,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/hosts: @@ -1147,6 +1227,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/hosts/{host_id}: @@ -1202,6 +1286,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http delete: @@ -1258,6 +1346,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/hosts/{host_id}/tasks: @@ -1331,6 +1423,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/hosts/{host_id}/tasks/{task_id}: @@ -1392,6 +1488,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/hosts/{host_id}/tasks/{task_id}/logs: @@ -1463,6 +1563,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/tasks: @@ -1537,6 +1641,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http /v1/version: @@ -1563,6 +1671,10 @@ paths: required: - name - message + default: + description: Unexpected error response + schema: + $ref: '#/definitions/APIError' schemes: - http definitions: diff --git a/api/apiv1/gen/http/openapi3.json b/api/apiv1/gen/http/openapi3.json index 1b3c3910..fe364db0 100644 --- a/api/apiv1/gen/http/openapi3.json +++ b/api/apiv1/gen/http/openapi3.json @@ -182,6 +182,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -277,6 +291,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -362,6 +390,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -416,6 +458,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -696,6 +752,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } }, @@ -1202,6 +1272,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -1318,6 +1402,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } }, @@ -1559,6 +1657,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } }, @@ -1972,6 +2084,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -2119,6 +2245,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -2255,6 +2395,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -2391,6 +2545,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -2552,6 +2720,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -2682,6 +2864,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -2812,6 +3008,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -3151,6 +3361,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -3336,6 +3560,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -3453,6 +3691,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -3557,6 +3809,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -3821,6 +4087,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -3997,6 +4277,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -4158,6 +4452,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } }, @@ -4294,6 +4602,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -4448,6 +4770,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -4565,6 +4901,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -4829,6 +5179,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -4996,6 +5360,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } @@ -5038,6 +5416,20 @@ } } } + }, + "default": { + "description": "Unexpected error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError" + }, + "example": { + "message": "A longer description of the error.", + "name": "error_name" + } + } + } } } } diff --git a/api/apiv1/gen/http/openapi3.yaml b/api/apiv1/gen/http/openapi3.yaml index 57fabfde..8e1375ed 100644 --- a/api/apiv1/gen/http/openapi3.yaml +++ b/api/apiv1/gen/http/openapi3.yaml @@ -124,6 +124,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/cluster/init: get: tags: @@ -188,6 +197,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/cluster/join: post: tags: @@ -243,6 +261,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/cluster/join-token: get: tags: @@ -278,6 +305,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/databases: get: tags: @@ -472,6 +508,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name post: tags: - Database @@ -776,6 +821,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/databases/{database_id}: delete: tags: @@ -855,6 +909,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name get: tags: - Database @@ -1018,6 +1081,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name post: tags: - Database @@ -1289,6 +1361,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/databases/{database_id}/instances/{instance_id}/restart: post: tags: @@ -1389,6 +1470,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/databases/{database_id}/instances/{instance_id}/start-instance: post: tags: @@ -1483,6 +1573,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/databases/{database_id}/instances/{instance_id}/stop-instance: post: tags: @@ -1577,6 +1676,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/databases/{database_id}/nodes/{node_name}/backups: post: tags: @@ -1687,6 +1795,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/databases/{database_id}/nodes/{node_name}/failover: post: tags: @@ -1775,6 +1892,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/databases/{database_id}/nodes/{node_name}/switchover: post: tags: @@ -1863,6 +1989,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/databases/{database_id}/restore: post: tags: @@ -2097,6 +2232,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/databases/{database_id}/tasks: get: tags: @@ -2230,6 +2374,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/databases/{database_id}/tasks/{task_id}: get: tags: @@ -2311,6 +2464,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/databases/{database_id}/tasks/{task_id}/cancel: get: tags: @@ -2384,6 +2546,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/databases/{database_id}/tasks/{task_id}/log: get: tags: @@ -2557,6 +2728,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/hosts: get: tags: @@ -2675,6 +2855,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/hosts/{host_id}: delete: tags: @@ -2790,6 +2979,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name get: tags: - Host @@ -2882,6 +3080,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/hosts/{host_id}/tasks: get: tags: @@ -2990,6 +3197,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/hosts/{host_id}/tasks/{task_id}: get: tags: @@ -3071,6 +3287,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/hosts/{host_id}/tasks/{task_id}/logs: get: tags: @@ -3244,6 +3469,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/tasks: get: tags: @@ -3364,6 +3598,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name /v1/version: get: tags: @@ -3392,6 +3635,15 @@ paths: example: message: A longer description of the error. name: error_name + default: + description: Unexpected error response + content: + application/json: + schema: + $ref: '#/components/schemas/APIError' + example: + message: A longer description of the error. + name: error_name components: schemas: APIError: diff --git a/api/plugins/add_openapi_default_response.go b/api/plugins/add_openapi_default_response.go new file mode 100644 index 00000000..1d3f56f7 --- /dev/null +++ b/api/plugins/add_openapi_default_response.go @@ -0,0 +1,116 @@ +package plugins + +import ( + "path/filepath" + + "goa.design/goa/v3/codegen" + "goa.design/goa/v3/eval" + "goa.design/goa/v3/http/codegen/openapi" + openapiv2 "goa.design/goa/v3/http/codegen/openapi/v2" + openapiv3 "goa.design/goa/v3/http/codegen/openapi/v3" +) + +func init() { + codegen.RegisterPlugin("add-openapi-default-responses", "gen", nil, AddOpenAPIDefaultResponses) +} + +func AddOpenAPIDefaultResponses(genpkg string, roots []eval.Root, files []*codegen.File) ([]*codegen.File, error) { + for _, file := range files { + switch filepath.Base(file.Path) { + case "openapi.json", "openapi.yaml": + processOpenAPIv2(file) + case "openapi3.json", "openapi3.yaml": + processOpenAPIv3(file) + } + } + return files, nil +} + +func processOpenAPIv2(file *codegen.File) { + for _, s := range file.Section("openapi") { + spec, ok := s.Data.(*openapiv2.V2) + if !ok { + continue + } + for _, p := range spec.Paths { + path, ok := p.(*openapiv2.Path) + if !ok { + continue + } + addDefaultV2(path.Delete) + addDefaultV2(path.Get) + addDefaultV2(path.Head) + addDefaultV2(path.Options) + addDefaultV2(path.Patch) + addDefaultV2(path.Post) + addDefaultV2(path.Put) + } + } +} + +func addDefaultV2(operation *openapiv2.Operation) { + if operation == nil { + return + } + if _, ok := operation.Responses["default"]; ok { + return + } + if operation.Responses == nil { + operation.Responses = make(map[string]*openapiv2.Response) + } + operation.Responses["default"] = &openapiv2.Response{ + Description: "Unexpected error response", + Schema: &openapi.Schema{ + Ref: "#/definitions/APIError", + }, + } +} + +func processOpenAPIv3(file *codegen.File) { + for _, s := range file.Section("openapi_v3") { + spec, ok := s.Data.(*openapiv3.OpenAPI) + if !ok { + continue + } + for _, path := range spec.Paths { + addDefaultV3(path.Connect) + addDefaultV3(path.Delete) + addDefaultV3(path.Get) + addDefaultV3(path.Head) + addDefaultV3(path.Options) + addDefaultV3(path.Patch) + addDefaultV3(path.Post) + addDefaultV3(path.Put) + addDefaultV3(path.Trace) + } + } +} + +func addDefaultV3(operation *openapiv3.Operation) { + if operation == nil { + return + } + if _, ok := operation.Responses["default"]; ok { + return + } + if operation.Responses == nil { + operation.Responses = make(map[string]*openapiv3.ResponseRef) + } + desc := "Unexpected error response" + operation.Responses["default"] = &openapiv3.ResponseRef{ + Value: &openapiv3.Response{ + Description: &desc, + Content: map[string]*openapiv3.MediaType{ + "application/json": { + Schema: &openapi.Schema{ + Ref: "#/components/schemas/APIError", + }, + Example: map[string]string{ + "message": "A longer description of the error.", + "name": "error_name", + }, + }, + }, + }, + } +} diff --git a/api/plugins/disable_client_validation.go b/api/plugins/disable_client_validation.go index 0a0c0cbf..218bfff4 100644 --- a/api/plugins/disable_client_validation.go +++ b/api/plugins/disable_client_validation.go @@ -8,10 +8,10 @@ import ( ) func init() { - codegen.RegisterPlugin("disable-client-side-response-validation", "gen", nil, Generate) + codegen.RegisterPlugin("disable-client-side-response-validation", "gen", nil, DisableClientValidation) } -func Generate(genpkg string, roots []eval.Root, files []*codegen.File) ([]*codegen.File, error) { +func DisableClientValidation(genpkg string, roots []eval.Root, files []*codegen.File) ([]*codegen.File, error) { for _, file := range files { if strings.HasSuffix(file.Path, "types.go") { for _, s := range file.Section("client-validate") {