{
  "repo": "tidbcloud/tidb-management-service",
  "binary": "nextgen-global-service",
  "binary_path": "nextgen-global-service/cmd/nextgen-global-service/main.go",
  "dependencies": {
    "ClusterService.CreateCluster": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "INSERT",
              "trigger": "Create cluster record",
              "conditions": [
                "Always"
              ],
              "implementation": "clusterRepo.Create()"
            },
            {
              "operation": "INSERT",
              "trigger": "Create TiDB group for cluster",
              "conditions": [
                "Always"
              ],
              "implementation": "tidbGroupRepo.Create()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-server",
          "target_interface": "POST /api/premium/v1/clusters",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "POST /api/premium/v1/clusters",
              "trigger": "Create cluster in regional service",
              "conditions": [
                "Always"
              ],
              "implementation": "regionalServerCli.CreateCluster()"
            }
          ]
        },
        {
          "name": "billing-service",
          "target_interface": "POST /api/v1/billing/tenants/{tenant_id}/billing_action_check",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/billing",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "POST /api/v1/billing/tenants/{tenant_id}/billing_action_check",
              "trigger": "Check billing quota before cluster creation",
              "conditions": [
                "Always"
              ],
              "implementation": "billingClient.BillingActionCheck()"
            }
          ]
        }
      ]
    },
    "ClusterService.DeleteCluster": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "UPDATE",
              "trigger": "Soft delete cluster record",
              "conditions": [
                "Always"
              ],
              "implementation": "clusterRepo.SoftDelete()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-server",
          "target_interface": "DELETE /api/premium/v1/clusters/{clusterId}",
          "operation_type": "http_delete",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "DELETE /api/premium/v1/clusters/{clusterId}",
              "trigger": "Delete cluster in regional service",
              "conditions": [
                "Always"
              ],
              "implementation": "regionalServerCli.DeleteCluster()"
            }
          ]
        }
      ]
    },
    "ClusterService.UpdateCluster": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Get current cluster state",
              "conditions": [
                "Always"
              ],
              "implementation": "clusterRepo.Get()"
            },
            {
              "operation": "UPDATE",
              "trigger": "Update cluster configuration",
              "conditions": [
                "Always"
              ],
              "implementation": "clusterRepo.Update()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-server",
          "target_interface": "PUT /api/premium/v1/clusters/{clusterId}",
          "operation_type": "http_put",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "PUT /api/premium/v1/clusters/{clusterId}",
              "trigger": "Update cluster in regional service",
              "conditions": [
                "Always"
              ],
              "implementation": "regionalServerCli.UpdateCluster()"
            }
          ]
        }
      ]
    },
    "ClusterService.ChangeClusterPasswd": {
      "infrastructure": {},
      "services": [
        {
          "name": "regional-server",
          "target_interface": "POST /dataplane/proxy/clusters/{clusterId}/cluster-agent/tidb{sharedPoolId}/api/v1/clusters/{clusterId}:reset_password",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "POST /dataplane/proxy/clusters/{clusterId}/cluster-agent/tidb{sharedPoolId}/api/v1/clusters/{clusterId}:reset_password",
              "trigger": "Reset cluster root password via cluster agent",
              "conditions": [
                "Always"
              ],
              "implementation": "regionalServerCli.SetPassword()"
            }
          ]
        }
      ]
    },
    "ClusterService.RestoreCluster": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "INSERT",
              "trigger": "Create restore record",
              "conditions": [
                "Always"
              ],
              "implementation": "restoreRepo.Create()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-server",
          "target_interface": "POST /api/premium/v1/sharedPools/{sharedPoolId}/lightweightRestores",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "RestoreType == LIGHTWEIGHT"
          ],
          "operations": [
            {
              "operation": "POST /api/premium/v1/sharedPools/{sharedPoolId}/lightweightRestores",
              "trigger": "Create lightweight restore",
              "conditions": [
                "RestoreType == LIGHTWEIGHT"
              ],
              "implementation": "regionalServerCli.CreateLightweightRestore()"
            }
          ]
        },
        {
          "name": "regional-server",
          "target_interface": "POST /api/premium/v1/sharedPools/{sharedPoolId}/classicRestores",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "RestoreType == CLASSIC"
          ],
          "operations": [
            {
              "operation": "POST /api/premium/v1/sharedPools/{sharedPoolId}/classicRestores",
              "trigger": "Create classic restore",
              "conditions": [
                "RestoreType == CLASSIC"
              ],
              "implementation": "regionalServerCli.CreateClassicRestore()"
            }
          ]
        }
      ]
    },
    "ClusterService.UpdateClusterDualLayerEncryption": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Get current encryption binding",
              "conditions": [
                "Always"
              ],
              "implementation": "encryptionBindingRepo.Get()"
            },
            {
              "operation": "INSERT/UPDATE",
              "trigger": "Update cluster encryption binding",
              "conditions": [
                "Always"
              ],
              "implementation": "encryptionBindingRepo.Upsert()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-server",
          "target_interface": "POST /dataplane-manager/api/v1/dataplanes/{dataplaneId}/keys",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "Cmek != null"
          ],
          "operations": [
            {
              "operation": "POST /dataplane-manager/api/v1/dataplanes/{dataplaneId}/keys",
              "trigger": "Create encryption key in dataplane manager",
              "conditions": [
                "Cmek != null"
              ],
              "implementation": "regionalServerCli.CreateEncryptionKey()"
            }
          ]
        }
      ]
    },
    "BackupService.CreateManualBackup": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "INSERT",
              "trigger": "Create backup record",
              "conditions": [
                "Always"
              ],
              "implementation": "backupRepo.Create()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-server",
          "target_interface": "POST /api/premium/v1/clusters/{clusterId}/manualBackups",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "POST /api/premium/v1/clusters/{clusterId}/manualBackups",
              "trigger": "Create manual backup in regional service",
              "conditions": [
                "Always"
              ],
              "implementation": "regionalServerCli.CreateManualBackup()"
            }
          ]
        }
      ]
    },
    "BackupService.ListBackups": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Query backup records",
              "conditions": [
                "Always"
              ],
              "implementation": "backupRepo.List()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "dataflow-service",
          "target_interface": "BackupInternalService.ListBackups",
          "operation_type": "grpc_unary",
          "target_repo": "tidbcloud/dataflow-service",
          "conditions": [
            "IncludeDataflowBackups"
          ],
          "operations": [
            {
              "operation": "gRPC ListBackups",
              "trigger": "Query dataflow service for backup metadata",
              "conditions": [
                "IncludeDataflowBackups"
              ],
              "implementation": "dataflowCli.ListBackups()"
            }
          ]
        }
      ]
    },
    "ExportService.CreateExport": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "INSERT",
              "trigger": "Create export record",
              "conditions": [
                "Always"
              ],
              "implementation": "exportRepo.Create()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-server",
          "target_interface": "POST /api/premium/v1/clusters/{clusterId}/exports",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "POST /api/premium/v1/clusters/{clusterId}/exports",
              "trigger": "Create export in regional service",
              "conditions": [
                "Always"
              ],
              "implementation": "regionalServerCli.CreateExport()"
            }
          ]
        }
      ]
    },
    "ExportService.CancelExport": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "UPDATE",
              "trigger": "Update export status to cancelled",
              "conditions": [
                "Always"
              ],
              "implementation": "exportRepo.Update()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-server",
          "target_interface": "POST /api/premium/v1/clusters/{clusterId}/exports/{exportId}:cancel",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "POST /api/premium/v1/clusters/{clusterId}/exports/{exportId}:cancel",
              "trigger": "Cancel export in regional service",
              "conditions": [
                "Always"
              ],
              "implementation": "regionalServerCli.CancelExport()"
            }
          ]
        }
      ]
    },
    "DatabaseAuditLogService.UpdateAuditLogSetting": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "INSERT/UPDATE",
              "trigger": "Update audit log setting",
              "conditions": [
                "Always"
              ],
              "implementation": "auditLogSettingRepo.Upsert()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-server",
          "target_interface": "POST /dataplane/proxy/clusters/{clusterId}/cluster-agent/tidb{sharedPoolId}/api/v1/clusters/{clusterId}:update_audit_log_setting",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "ValidateOnly == false"
          ],
          "operations": [
            {
              "operation": "POST /dataplane/proxy/clusters/{clusterId}/cluster-agent/tidb{sharedPoolId}/api/v1/clusters/{clusterId}:update_audit_log_setting",
              "trigger": "Update audit log setting via cluster agent",
              "conditions": [
                "ValidateOnly == false"
              ],
              "implementation": "regionalServerCli.UpdateAuditLogSettingViaAgent()"
            }
          ]
        }
      ]
    },
    "DatabaseAuditLogService.CreateAuditLogFilterRule": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "INSERT",
              "trigger": "Create filter rule",
              "conditions": [
                "Always"
              ],
              "implementation": "filterRuleRepo.Create()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-server",
          "target_interface": "POST /dataplane/proxy/clusters/{clusterId}/cluster-agent/tidb{sharedPoolId}/api/v1/clusters/{clusterId}:create_audit_log_filter_rule",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "ValidateOnly == false"
          ],
          "operations": [
            {
              "operation": "POST /dataplane/proxy/clusters/{clusterId}/cluster-agent/tidb{sharedPoolId}/api/v1/clusters/{clusterId}:create_audit_log_filter_rule",
              "trigger": "Create filter rule via cluster agent",
              "conditions": [
                "ValidateOnly == false"
              ],
              "implementation": "regionalServerCli.CreateAuditLogFilterRuleViaAgent()"
            }
          ]
        }
      ]
    },
    "PrivateLinkConnectionService.CreatePrivateLinkConnection": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "INSERT",
              "trigger": "Create private link connection record",
              "conditions": [
                "Always"
              ],
              "implementation": "privateLinkRepo.Create()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-server",
          "target_interface": "POST /api/premium/v1/clusters/{clusterId}/tidbGroups/{tidbGroupId}/privateLinkServices",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "POST /api/premium/v1/clusters/{clusterId}/tidbGroups/{tidbGroupId}/privateLinkServices",
              "trigger": "Create private link service in regional service",
              "conditions": [
                "Always"
              ],
              "implementation": "regionalServerCli.CreatePrivateLinkService()"
            }
          ]
        }
      ]
    },
    "ResourcePoolService.CreateResourcePool": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "INSERT",
              "trigger": "Create resource pool record",
              "conditions": [
                "Always"
              ],
              "implementation": "resourcePoolRepo.Create()"
            },
            {
              "operation": "INSERT",
              "trigger": "Create resource pool strategy",
              "conditions": [
                "Always"
              ],
              "implementation": "resourcePoolStrategyRepo.Create()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "regional-server",
          "target_interface": "POST /api/premium/v1/sharedPools",
          "operation_type": "http_post",
          "target_repo": "tidbcloud/tidb-management-service",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "POST /api/premium/v1/sharedPools",
              "trigger": "Create shared pool in regional service",
              "conditions": [
                "Always"
              ],
              "implementation": "regionalServerCli.CreateSharedPool()"
            }
          ]
        }
      ]
    },
    "ResourcePoolService.ListOwnerResourcePools": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Query resource pools by owner",
              "conditions": [
                "Always"
              ],
              "implementation": "resourcePoolRepo.ListByOwner()"
            },
            {
              "operation": "SELECT",
              "trigger": "Query resource pool strategies",
              "conditions": [
                "Always"
              ],
              "implementation": "resourcePoolStrategyRepo.ListByOwner()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "o11y-metrics",
          "target_interface": "GET /query_range",
          "operation_type": "http_get",
          "conditions": [
            "IncludeMetrics"
          ],
          "operations": [
            {
              "operation": "GET /query_range (Prometheus)",
              "trigger": "Query resource pool metrics from O11y",
              "conditions": [
                "IncludeMetrics"
              ],
              "implementation": "metricsClient.QueryResourcePoolMetrics()"
            }
          ]
        }
      ]
    },
    "RegionService.RegisterRegion": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "INSERT",
              "trigger": "Register new region",
              "conditions": [
                "Always"
              ],
              "implementation": "regionRepo.Create()"
            }
          ]
        }
      },
      "services": []
    },
    "RcuQuotaService.UpdateRcuQuota": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "INSERT/UPDATE",
              "trigger": "Update RCU quota",
              "conditions": [
                "Always"
              ],
              "implementation": "rcuQuotaRepo.Upsert()"
            }
          ]
        }
      },
      "services": []
    },
    "CustomerManagedEncryptionKeyService.GetCmekAccessIamPrincipal": {
      "infrastructure": {},
      "services": [
        {
          "name": "aws-kms",
          "target_interface": "GetCmekAccessIamPrincipal",
          "operation_type": "aws_api",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "AWS KMS GetKeyPolicy",
              "trigger": "Get IAM principal from KMS key policy",
              "conditions": [
                "Always"
              ],
              "implementation": "awskmscli.GetCmekAccessIamPrincipal()"
            }
          ]
        }
      ]
    },
    "NextgenGlobalLifecycle.Startup": {
      "infrastructure": {
        "pprof": {
          "conditions": [
            "Always in serve mode"
          ],
          "operations": [
            {
              "operation": "REGISTER",
              "trigger": "Expose pprof handlers on the TiInf Gin engine",
              "conditions": [
                "Always"
              ],
              "implementation": "pprof.Register(inf.GinEngine())"
            },
            {
              "operation": "START",
              "trigger": "Enable autopprof runtime sampling",
              "conditions": [
                "autopprof.Start succeeds or unsupported platform is ignored"
              ],
              "implementation": "autopprof.Start(autopprof.DefaultOption)"
            }
          ]
        }
      },
      "services": []
    },
    "NextgenGlobalLifecycle.SetupGRPCServer": {
      "infrastructure": {},
      "services": []
    },
    "NextgenGlobalLifecycle.StartDynamicConfig": {
      "infrastructure": {},
      "services": []
    },
    "NextgenGlobalLifecycle.RunDBMigrate": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Only when --grpc-server-only is false"
          ],
          "operations": [
            {
              "operation": "MIGRATE",
              "trigger": "Apply DB migrations before worker and workflow startup",
              "conditions": [
                "!grpcServerOnlyMode"
              ],
              "implementation": "dbMigrate() -> migrate.RunDBMigrate"
            }
          ]
        }
      },
      "services": []
    },
    "NextgenGlobalLifecycle.StartEventbus": {
      "infrastructure": {
        "kafka": {
          "conditions": [
            "Only when --grpc-server-only is false"
          ],
          "operations": [
            {
              "operation": "RUN EVENTBUS",
              "trigger": "Start eventbus and WAL watcher",
              "conditions": [
                "!grpcServerOnlyMode"
              ],
              "implementation": "startEventbus() -> eb.Run(); watcher.Start()"
            }
          ]
        }
      },
      "services": []
    },
    "NextgenGlobalLifecycle.StartWorker": {
      "infrastructure": {},
      "services": []
    },
    "NextgenGlobalLifecycle.RunWorkflow": {
      "infrastructure": {},
      "services": []
    },
    "ClusterService.ListClusters": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load nextgen cluster rows that match the incoming cluster/org/region/provider/state filters",
              "conditions": [
                "Always"
              ],
              "implementation": "List() -> clusterRepo.Query()"
            },
            {
              "operation": "SELECT",
              "trigger": "Load region rows for the returned clusters before regional fan-out",
              "conditions": [
                "When the cluster query returns at least one cluster"
              ],
              "implementation": "fullClusterInfo() -> regionRepo.ListRegions()"
            },
            {
              "operation": "SELECT",
              "trigger": "Load TiDB-group rows for each returned cluster before resolving runtime endpoints",
              "conditions": [
                "Per returned cluster"
              ],
              "implementation": "fullClusterInfo() -> tidbgroupRepo.Query()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "cluster-service-ng",
          "target_interface": "TiDBClusterService.GetTiDBGroup",
          "target_repo": "tidbcloud/cluster-service-ng",
          "operation_type": "grpc_unary",
          "conditions": [
            "Per returned TiDB group on non-deleted clusters"
          ],
          "operations": [
            {
              "operation": "gRPC GetTiDBGroup",
              "trigger": "Resolve SQL endpoint, shared-pool ID, version, and dataplane metadata for each returned cluster",
              "conditions": [
                "Per returned TiDB group on non-deleted clusters"
              ],
              "implementation": "fullClusterInfo() -> regionalCli.GetTidbGroup()"
            }
          ]
        }
      ]
    },
    "ClusterService.GetCluster": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the target nextgen cluster row by cluster ID",
              "conditions": [
                "Always"
              ],
              "implementation": "Get() -> clusterRepo.Get()"
            },
            {
              "operation": "SELECT",
              "trigger": "Load the owning region row before regional fan-out and endpoint enrichment",
              "conditions": [
                "Cluster exists"
              ],
              "implementation": "fullClusterInfo() -> regionRepo.ListRegions()"
            },
            {
              "operation": "SELECT",
              "trigger": "Load TiDB-group rows for the target cluster before resolving runtime endpoints",
              "conditions": [
                "Cluster exists"
              ],
              "implementation": "fullClusterInfo() -> tidbgroupRepo.Query()"
            }
          ]
        }
      },
      "services": [
        {
          "name": "cluster-service-ng",
          "target_interface": "TiDBClusterService.GetTiDBGroup",
          "target_repo": "tidbcloud/cluster-service-ng",
          "operation_type": "grpc_unary",
          "conditions": [
            "Per returned TiDB group on non-deleted clusters"
          ],
          "operations": [
            {
              "operation": "gRPC GetTiDBGroup",
              "trigger": "Resolve SQL endpoint, shared-pool ID, version, and dataplane metadata for the target cluster",
              "conditions": [
                "Per returned TiDB group on non-deleted clusters"
              ],
              "implementation": "fullClusterInfo() -> regionalCli.GetTidbGroup()"
            }
          ]
        }
      ]
    },
    "ClusterService.DeleteClusterBackup": {
      "infrastructure": {},
      "services": []
    },
    "ClusterService.ListClusterBackups": {
      "infrastructure": {},
      "services": []
    },
    "ClusterService.TestClassicBackupAccess": {
      "infrastructure": {},
      "services": []
    },
    "ClusterService.RestoreStatus": {
      "infrastructure": {},
      "services": []
    },
    "ClusterService.StopRestoreCluster": {
      "infrastructure": {},
      "services": []
    },
    "ClusterService.GetBackupSetting": {
      "infrastructure": {},
      "services": []
    },
    "ClusterService.UpdateBackupSetting": {
      "infrastructure": {},
      "services": []
    },
    "ClusterService.GetProviderRole": {
      "infrastructure": {},
      "services": []
    },
    "ClusterService.GetCaCertificateDownloadUrl": {
      "infrastructure": {},
      "services": []
    },
    "ClusterService.UpdateClusterProject": {
      "infrastructure": {},
      "services": []
    },
    "ClusterService.GetClusterEncryptionStatus": {
      "infrastructure": {},
      "services": []
    },
    "BackupService.DeleteBackup": {
      "infrastructure": {},
      "services": []
    },
    "BackupService.ListNotCleanupBackupSettings": {
      "infrastructure": {},
      "services": []
    },
    "BackupService.BatchUpdateBackupSettingNames": {
      "infrastructure": {},
      "services": []
    },
    "BackupService.ListBackupPolicies": {
      "infrastructure": {},
      "services": []
    },
    "CustomerManagedEncryptionKeyService.VerifyCmekAccessIamPrincipal": {
      "infrastructure": {},
      "services": []
    },
    "CustomerManagedEncryptionKeyService.GetCustomerManagedEncryptionKey": {
      "infrastructure": {},
      "services": []
    },
    "CustomerManagedEncryptionKeyService.GetCustomerManagedEncryptionKeyByClusterId": {
      "infrastructure": {},
      "services": []
    },
    "CustomerManagedEncryptionKeyService.ListCustomerManagedEncryptionKeys": {
      "infrastructure": {},
      "services": []
    },
    "ExportService.ListExports": {
      "infrastructure": {},
      "services": []
    },
    "ExportService.GetExport": {
      "infrastructure": {},
      "services": []
    },
    "ExportService.DeleteExport": {
      "infrastructure": {},
      "services": []
    },
    "DatabaseAuditLogService.GetAuditLogSetting": {
      "infrastructure": {},
      "services": []
    },
    "DatabaseAuditLogService.ListAuditLogFilterRules": {
      "infrastructure": {},
      "services": []
    },
    "DatabaseAuditLogService.DeleteAuditLogFilterRule": {
      "infrastructure": {},
      "services": []
    },
    "DatabaseAuditLogService.UpdateAuditLogFilterRule": {
      "infrastructure": {},
      "services": []
    },
    "LogRedactionPolicyService.GetLogRedactionPolicy": {
      "infrastructure": {},
      "services": []
    },
    "LogRedactionPolicyService.UpdateLogRedactionPolicy": {
      "infrastructure": {},
      "services": []
    },
    "PrivateLinkConnectionService.ListPrivateLinkServices": {
      "infrastructure": {},
      "services": []
    },
    "PrivateLinkConnectionService.DeletePrivateLinkConnection": {
      "infrastructure": {},
      "services": []
    },
    "PrivateLinkConnectionService.GetPrivateLinkConnection": {
      "infrastructure": {},
      "services": []
    },
    "PrivateLinkConnectionService.ListPrivateLinkConnections": {
      "infrastructure": {},
      "services": []
    },
    "PublicConnectionSettingService.GetPublicConnectionSetting": {
      "infrastructure": {},
      "services": []
    },
    "PublicConnectionSettingService.UpdatePublicConnectionSetting": {
      "infrastructure": {},
      "services": []
    },
    "RcuQuotaService.GetRcuQuota": {
      "infrastructure": {},
      "services": []
    },
    "RcuQuotaService.ListOrgRcuQuotas": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load the org RCU quota row for each supported service plan",
              "conditions": [
                "Once for Premium and once for BYOC"
              ],
              "implementation": "ListOrgRcuQuotas() -> rcuQuotaRepo.Load() -> ReadDB.Where(tenant_id, service_plan).First()"
            }
          ]
        }
      },
      "services": []
    },
    "RegionService.GetRegionByLogicalName": {
      "infrastructure": {},
      "services": []
    },
    "RegionService.ListRegions": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load matching nextgen region rows with provider, tenant visibility, and ops-audit-log preloads",
              "conditions": [
                "Always"
              ],
              "implementation": "ListRegions() -> regionRepo.ListRegions() -> ReadDB(Model Region).InnerJoins(Provider).Preload(RegionTenants).Preload(RegionOpsAuditLogSetting).Find()"
            }
          ]
        }
      },
      "services": []
    },
    "RegionService.ListCloudProviders": {
      "infrastructure": {
        "mysql": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "SELECT",
              "trigger": "Load cloud-provider rows for the requested service plan and optional state/provider filters",
              "conditions": [
                "Always"
              ],
              "implementation": "ListCloudProviders() -> regionRepo.ListCloudProviders() -> ReadDB(Model Provider).Find()"
            },
            {
              "operation": "SELECT",
              "trigger": "Load visible regions for each returned provider before attaching them to the cloud-provider response",
              "conditions": [
                "Once per returned cloud provider"
              ],
              "implementation": "regionRepo.ListCloudProviders() -> ListRegions() -> ReadDB(Model Region).InnerJoins(Provider).Preload(RegionTenants).Preload(RegionOpsAuditLogSetting).Find()"
            }
          ]
        }
      },
      "services": []
    },
    "RegionService.RegisterCloudProvider": {
      "infrastructure": {},
      "services": []
    },
    "RegionService.UpdateRegion": {
      "infrastructure": {},
      "services": []
    },
    "RegionService.DeleteRegion": {
      "infrastructure": {},
      "services": []
    },
    "RegionService.GetRegionByClusterId": {
      "infrastructure": {},
      "services": []
    },
    "RegionService.SelectRegionByOrgId": {
      "infrastructure": {},
      "services": []
    },
    "RegionService.UpdateRegionOpsAuditLogSetting": {
      "infrastructure": {},
      "services": []
    },
    "RegionService.RegisterRegionProviderIdentity": {
      "infrastructure": {},
      "services": []
    },
    "RegionService.ListRegionProviderIdentities": {
      "infrastructure": {},
      "services": []
    },
    "RegionService.ListRegionCapacities": {
      "infrastructure": {},
      "services": []
    },
    "ResourcePoolService.ListResourcePools": {
      "infrastructure": {},
      "services": []
    },
    "ResourcePoolService.GetResourcePool": {
      "infrastructure": {},
      "services": []
    },
    "ResourcePoolService.UpdateResourcePoolName": {
      "infrastructure": {},
      "services": []
    },
    "ResourcePoolService.UpdateResourcePoolInstanceLimit": {
      "infrastructure": {},
      "services": []
    },
    "ResourcePoolService.DeleteResourcePool": {
      "infrastructure": {},
      "services": []
    },
    "ResourcePoolService.UpdateOrgDefaultResourcePool": {
      "infrastructure": {},
      "services": []
    }
  },
  "notes": [
    "NextGen global service manages Premium and BYOC cluster types",
    "Uses HTTP/REST to communicate with regional services (not gRPC)",
    "Cluster operations are proxied to regional services based on cluster region",
    "Supports customer-managed encryption keys (CMEK) with AWS KMS integration",
    "73 gRPC methods across 11 services",
    "Uses workflow engine (FastFlow) for complex multi-step operations",
    "Worker processes run on pod-0 only (StatefulSet leader)",
    "Emits events to Kafka for audit logging via WAL watcher",
    "Lifecycle coverage now includes dynamic config, eventbus, worker, and workflow startup paths that depend on startup flags and config."
  ]
}
