{
  "swagger": "2.0",
  "info": {
    "title": "TiDB Cloud One Console API",
    "description": "TiDB Cloud One Console API.",
    "version": "v1beta2"
  },
  "tags": [
    {
      "name": "TiDBService"
    },
    {
      "name": "RegionService"
    }
  ],
  "basePath": "/v1beta2",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/tidbs": {
      "get": {
        "operationId": "TiDBService_ListTidbs",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/bffcluster_managementv1beta2ListTidbsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "servicePlans",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Starter",
                "Essential",
                "Premium",
                "BYOC",
                "Dedicated",
                "Premium_Reserved",
                "Essential_V2"
              ]
            },
            "collectionFormat": "multi"
          },
          {
            "name": "tidbIds",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "cloudProviders",
            "description": " - aws: Amazon Web Services.\n - gcp: Google Cloud Platform.\n - azure: Microsoft Azure.\n - alicloud: Alibaba Cloud.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "aws",
                "gcp",
                "azure",
                "alicloud"
              ]
            },
            "collectionFormat": "multi"
          },
          {
            "name": "regionIds",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "projectIds",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "viewMode",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "BASIC",
              "MINI"
            ]
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "engineTypes",
            "description": "If specified, only TiDBs of the given engine types are returned.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "MYSQL_COMPATIBLE",
                "POSTGRESQL_COMPATIBLE"
              ]
            },
            "collectionFormat": "multi"
          },
          {
            "name": "globalMetaOnly",
            "description": "When true, for Dedicated clusters only, skip Regional Server enrichment in\nListClusters (global-layer metadata only). Ignored when view_mode is MINI.\nIgnored for Serverless and NextGen service plans.\nDefault false preserves the current FullView list item shape.",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pageToken",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          }
        ],
        "tags": [
          "TiDBService"
        ]
      }
    },
    "/tidbs/{tidbId}": {
      "get": {
        "operationId": "TiDBService_GetTidb",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/bffcluster_managementv1beta2Tidb"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "globalMetaOnly",
            "description": "When true, for Dedicated clusters only, skip Regional Server enrichment and\nreturn global-layer metadata only (no endpoints, scaling progress, etc.).\nIgnored for Serverless and NextGen service plans.\nDefault false preserves the current FullView response shape.",
            "in": "query",
            "required": false,
            "type": "boolean"
          }
        ],
        "tags": [
          "TiDBService"
        ]
      }
    },
    "/tidbs:inventory": {
      "get": {
        "operationId": "TiDBService_GetClusterInventory",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2GetClusterInventoryResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "tags": [
          "TiDBService"
        ]
      }
    },
    "/tidbs/{tidbId}:bindTags": {
      "post": {
        "operationId": "TiDBService_BindTags",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/bffcluster_managementv1beta2BindTagsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1beta2TiDBServiceBindTagsBody"
            }
          }
        ],
        "tags": [
          "TiDBService"
        ]
      }
    },
    "/tidbs/{tidbId}:unbindTags": {
      "post": {
        "operationId": "TiDBService_UnbindTags",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/bffcluster_managementv1beta2UnbindTagsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1beta2TiDBServiceUnbindTagsBody"
            }
          }
        ],
        "tags": [
          "TiDBService"
        ]
      }
    },
    "/tidbs/{tidbId}:move": {
      "post": {
        "summary": "Move a tidb to another project",
        "operationId": "TiDBService_MoveTiDB",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2MoveTiDBResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "description": "tidb_id is the ID of the TiDB to move.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/TiDBServiceMoveTiDBBody"
            }
          }
        ],
        "tags": [
          "TiDBService"
        ]
      }
    },
    "/tidbs:batchMove": {
      "post": {
        "summary": "Batch move tidbs to another project",
        "operationId": "TiDBService_BatchMoveTiDBs",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2BatchMoveTiDBsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "description": "BatchMoveTiDBsRequest moves multiple Starter/Essential TiDBs from one project to another.\nMax 1000 tidbs per request.",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1beta2BatchMoveTiDBsRequest"
            }
          }
        ],
        "tags": [
          "TiDBService"
        ]
      }
    },
    "/project-migration": {
      "get": {
        "operationId": "TiDBService_GetProjectMigrationTask",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2ProjectMigrationTask"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "tags": [
          "TiDBService"
        ]
      }
    },
    "/project-migration:approve": {
      "post": {
        "operationId": "TiDBService_ApproveProjectMigrationTask",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2ApproveProjectMigrationTaskResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1beta2ApproveProjectMigrationTaskRequest"
            }
          }
        ],
        "tags": [
          "TiDBService"
        ]
      }
    },
    "/regions": {
      "get": {
        "summary": "List all regions",
        "operationId": "RegionService_ListRegions",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/bffcluster_managementv1beta2ListRegionsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "cloudProviders",
            "description": " - aws: Amazon Web Services.\n - gcp: Google Cloud Platform.\n - azure: Microsoft Azure.\n - alicloud: Alibaba Cloud.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "aws",
                "gcp",
                "azure",
                "alicloud"
              ]
            },
            "collectionFormat": "multi"
          },
          {
            "name": "servicePlans",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Starter",
                "Essential",
                "Premium",
                "BYOC",
                "Dedicated",
                "Premium_Reserved",
                "Essential_V2"
              ]
            },
            "collectionFormat": "multi"
          },
          {
            "name": "viewMode",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "SERVICE_PLAN_GROUP",
              "FLAT"
            ]
          }
        ],
        "tags": [
          "RegionService"
        ]
      }
    },
    "/regions:listCloudProviders": {
      "get": {
        "summary": "List all cloud providers",
        "operationId": "RegionService_ListCloudProviders",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/bffcluster_managementv1beta2ListCloudProvidersResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "cloudProviders",
            "description": " - aws: Amazon Web Services.\n - gcp: Google Cloud Platform.\n - azure: Microsoft Azure.\n - alicloud: Alibaba Cloud.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "aws",
                "gcp",
                "azure",
                "alicloud"
              ]
            },
            "collectionFormat": "multi"
          },
          {
            "name": "servicePlans",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Starter",
                "Essential",
                "Premium",
                "BYOC",
                "Dedicated",
                "Premium_Reserved",
                "Essential_V2"
              ]
            },
            "collectionFormat": "multi"
          }
        ],
        "tags": [
          "RegionService"
        ]
      }
    }
  },
  "definitions": {
    "ClusterNodeChangingProgress": {
      "type": "object",
      "properties": {
        "matchingNodeSpecNodeCount": {
          "type": "integer",
          "format": "int32",
          "description": "The number of nodes that match the specified node spec.",
          "readOnly": true
        },
        "remainingDeletionNodeCount": {
          "type": "integer",
          "format": "int32",
          "description": "The number of nodes pending deletion. This value appears only during node deletion operations.",
          "readOnly": true
        }
      }
    },
    "ClusterSpendingLimit": {
      "type": "object",
      "properties": {
        "monthly": {
          "type": "integer",
          "format": "int32",
          "description": "The maximum spending limit for the cluster per month, in USD cents."
        }
      },
      "description": "Message for spending limit configuration."
    },
    "ClusterStorageNodeSettingStorageType": {
      "type": "string",
      "enum": [
        "Basic",
        "Standard",
        "Performance",
        "Plus"
      ],
      "description": " - Basic: Data disk: gp3; Raft log disk: none.\n - Standard: Data disk: gp3; Raft log disk: gp3.\n - Performance: Data disk: gp3; Raft log disk: io2.\n - Plus: Data disk: io2; Raft log disk: none."
    },
    "EndpointsPrivate": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string",
          "description": "The hostname of the private endpoint.",
          "readOnly": true
        },
        "port": {
          "type": "integer",
          "format": "int32",
          "description": "The port number of the private endpoint.",
          "readOnly": true
        },
        "aws": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/PrivateAWS"
            }
          ]
        },
        "gcp": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/PrivateGCP"
            }
          ]
        },
        "alicloud": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/PrivateALICLOUD"
            }
          ]
        },
        "authorizedNetworks": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/EndpointsPrivateAuthorizedNetwork"
          }
        }
      },
      "description": "Message for private endpoint to securely connect to the cluster."
    },
    "EndpointsPrivateAuthorizedNetwork": {
      "type": "object",
      "properties": {
        "vpcEndpointId": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        }
      },
      "required": [
        "vpcEndpointId",
        "displayName"
      ]
    },
    "EndpointsPublic": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string",
          "description": "The hostname of the public endpoint.",
          "readOnly": true
        },
        "port": {
          "type": "integer",
          "format": "int32",
          "title": "The port number of the public endpoint",
          "readOnly": true
        },
        "disabled": {
          "type": "boolean",
          "description": "Indicates whether the public endpoint is disabled."
        },
        "authorizedNetworks": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/EndpointsPublicAuthorizedNetwork"
          },
          "description": "The list of networks that are allowed to connect to the cluster."
        }
      },
      "description": "Message for public endpoint to connect to the cluster."
    },
    "EndpointsPublicAuthorizedNetwork": {
      "type": "object",
      "properties": {
        "startIpAddress": {
          "type": "string",
          "description": "The starting IP address of the authorized network range."
        },
        "endIpAddress": {
          "type": "string",
          "description": "The ending IP address of the authorized network range."
        },
        "displayName": {
          "type": "string",
          "description": "The display name of the authorized network."
        }
      },
      "required": [
        "startIpAddress",
        "endIpAddress",
        "displayName"
      ]
    },
    "ListCloudProvidersResponseGroupedCloudProvider": {
      "type": "object",
      "properties": {
        "servicePlan": {
          "$ref": "#/definitions/commonv1beta1ServicePlan"
        },
        "cloudProviders": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/v1beta1RegionCloudProvider"
          }
        }
      }
    },
    "ListRegionsResponseFlatView": {
      "type": "object",
      "properties": {
        "regions": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/commonv1beta1Region"
          }
        }
      }
    },
    "ListRegionsResponseServicePlanGroup": {
      "type": "object",
      "properties": {
        "servicePlan": {
          "$ref": "#/definitions/commonv1beta1ServicePlan"
        },
        "regions": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/commonv1beta1Region"
          }
        }
      }
    },
    "ListRegionsResponseServicePlanGroupedView": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/ListRegionsResponseServicePlanGroup"
          }
        }
      }
    },
    "PrivateALICLOUD": {
      "type": "object",
      "properties": {
        "serviceName": {
          "type": "string",
          "description": "The Alibaba Cloud service name for private access.",
          "readOnly": true
        },
        "availabilityZone": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of availability zones where the service is available.",
          "readOnly": true
        }
      },
      "description": "The [Alibaba Cloud PrivateLink](https://www.alibabacloud.com/help/en/privatelink/product-overview/what-is-a-private-network-connection) configuration for private access."
    },
    "PrivateAWS": {
      "type": "object",
      "properties": {
        "serviceName": {
          "type": "string",
          "description": "The AWS service name for private access.",
          "readOnly": true
        },
        "availabilityZone": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of availability zones where the service is available.",
          "readOnly": true
        }
      },
      "description": "The [AWS PrivateLink](https://aws.amazon.com/privatelink/) configuration details for private access."
    },
    "PrivateGCP": {
      "type": "object",
      "properties": {
        "serviceAttachmentName": {
          "type": "string",
          "description": "The target GCP service attachment name for private access.",
          "readOnly": true
        }
      },
      "description": "Message for GCP Private Service information."
    },
    "TiDBServiceMoveTiDBBody": {
      "type": "object",
      "properties": {
        "targetProjectId": {
          "type": "string",
          "description": "target_project_id is the destination project."
        },
        "name": {
          "type": "string",
          "description": "new name of instance after move, if not provided, the name won't be changed."
        }
      },
      "description": "MoveTiDBRequest moves a single Starter or Essential tidb to a target project.",
      "required": [
        "targetProjectId"
      ]
    },
    "bffcluster_managementv1beta2BindTagsResponse": {
      "type": "object",
      "properties": {
        "tags": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/commonv1beta1Tag"
          }
        }
      }
    },
    "bffcluster_managementv1beta2ListCloudProvidersResponse": {
      "type": "object",
      "properties": {
        "cloudProviders": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/ListCloudProvidersResponseGroupedCloudProvider"
          }
        }
      }
    },
    "bffcluster_managementv1beta2ListRegionsResponse": {
      "type": "object",
      "properties": {
        "servicePlanGroupView": {
          "$ref": "#/definitions/ListRegionsResponseServicePlanGroupedView"
        },
        "flatView": {
          "$ref": "#/definitions/ListRegionsResponseFlatView"
        }
      }
    },
    "bffcluster_managementv1beta2ListTidbsResponse": {
      "type": "object",
      "properties": {
        "tidbs": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/bffcluster_managementv1beta2Tidb"
          }
        },
        "totalSize": {
          "type": "integer",
          "format": "int32"
        },
        "nextPageToken": {
          "type": "string"
        }
      }
    },
    "bffcluster_managementv1beta2Tidb": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "readOnly": true
        },
        "tidbId": {
          "type": "string"
        },
        "servicePlan": {
          "$ref": "#/definitions/commonv1beta1ServicePlan"
        },
        "engineType": {
          "$ref": "#/definitions/commonv1beta1EngineType"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/commonv1beta1Tag"
          }
        },
        "organizationId": {
          "type": "string",
          "format": "uint64",
          "readOnly": true
        },
        "projectId": {
          "type": "string",
          "format": "uint64",
          "readOnly": true
        },
        "originalProjectId": {
          "type": "string",
          "format": "uint64",
          "readOnly": true
        },
        "ruVersion": {
          "type": "integer",
          "format": "int32",
          "description": "The version of RU (Request Unit) calculation used by the TiDB kernel.\nOnly visible in BFF API (Console), not in public OpenAPI.",
          "readOnly": true
        },
        "dedicatedCluster": {
          "$ref": "#/definitions/tidb_cloud_open_apidedicatedv1beta1Cluster"
        },
        "starterInstance": {
          "$ref": "#/definitions/tidb_cloud_open_apiserverlessv1beta1Cluster"
        },
        "essentialInstance": {
          "$ref": "#/definitions/tidb_cloud_open_apiserverlessv1beta1Cluster"
        },
        "premiumInstance": {
          "$ref": "#/definitions/tidb_cloud_open_apinextgenv1beta2Tidb"
        },
        "byocInstance": {
          "$ref": "#/definitions/tidb_cloud_open_apinextgenv1beta2Tidb"
        },
        "essentialV2Instance": {
          "$ref": "#/definitions/tidb_cloud_open_apinextgenv1beta2Tidb"
        },
        "premiumReservedInstance": {
          "$ref": "#/definitions/tidb_cloud_open_apinextgenv1beta2Tidb"
        }
      }
    },
    "bffcluster_managementv1beta2UnbindTagsResponse": {
      "type": "object",
      "properties": {
        "tags": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/commonv1beta1Tag"
          }
        }
      }
    },
    "commonv1beta1ClusterState": {
      "type": "string",
      "enum": [
        "CREATING",
        "DELETING",
        "ACTIVE",
        "RESTORING",
        "MAINTENANCE",
        "DELETED",
        "INACTIVE",
        "UPGRADING",
        "IMPORTING",
        "MODIFYING",
        "PAUSING",
        "PAUSED",
        "RESUMING"
      ],
      "description": "Enum of possible states of a cluster.\n\n - CREATING: Cluster is being created.\n - DELETING: Cluster is being deleted.\n - ACTIVE: Cluster is active for use.\n - RESTORING: Cluster data is being restored.\n - MAINTENANCE: Cluster is under maintenance.\n - DELETED: Cluster has been deleted.\n - INACTIVE: Cluster is not active, but not being deleted.\n - UPGRADING: Cluster is being updated.\nOnly for Dedicated Cluster.\n - IMPORTING: Cluster is being imported.\nOnly for Dedicated Cluster.\n - MODIFYING: Cluster is being modified.\nOnly for Dedicated Cluster.\n - PAUSING: Cluster is being paused.\nOnly for Dedicated Cluster.\n - PAUSED: Cluster is paused.\nOnly for Dedicated Cluster.\n - RESUMING: Cluster is resuming.\nOnly for Dedicated Cluster."
    },
    "commonv1beta1EngineType": {
      "type": "string",
      "enum": [
        "MYSQL_COMPATIBLE",
        "POSTGRESQL_COMPATIBLE"
      ]
    },
    "commonv1beta1Region": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "example": "regions/aws-us-west-2",
          "description": "The unique name of the region, in the format of `regions/{region_id}`. For example, `regions/aws-us-west-2`.",
          "pattern": "^regions/(aws|gcp|azure)-(.+)$"
        },
        "regionId": {
          "type": "string",
          "example": "aws-us-west-2",
          "description": "The unique identifier for the region, in the format of `{cloud_provider}-{region_code}`. For example, `aws-us-west-2`.",
          "readOnly": true,
          "pattern": "^(aws|gcp|azure|alicloud)-[a-z0-9-]+$"
        },
        "cloudProvider": {
          "example": "aws",
          "description": "The cloud provider that offers the region.\n\n- `\"aws\"`: Amazon Web Services\n\n- `\"gcp\"`: Google Cloud\n\n- `\"azure\"`: Microsoft Azure\n\n- `\"alicloud\"`: Alibaba Cloud",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1RegionCloudProvider"
            }
          ]
        },
        "displayName": {
          "type": "string",
          "example": "Oregon (us-west-2)",
          "description": "A human-readable name for the region. For example, `Oregon (us-west-2)`.",
          "readOnly": true
        },
        "provider": {
          "type": "string",
          "x-nullable": true,
          "example": "aws",
          "description": "**Deprecated.** Use `cloudProvider` instead. The name of the cloud provider. For example, `aws`, `gcp`, `azure`, or `alicloud`.",
          "title": "Deprecated",
          "readOnly": true
        },
        "servicePlans": {
          "type": "array",
          "example": [
            "Premium",
            "Essential_V2",
            "Premium_Reserved"
          ],
          "items": {
            "$ref": "#/definitions/commonv1beta1ServicePlan"
          },
          "description": "The service plans available in this region. Premium, Essential_V2, and Premium_Reserved can appear together in the same logical region. Starter, Essential, and BYOC are standalone service plans and cannot share a logical region with any other service plan.",
          "title": "ServicePlan",
          "readOnly": true
        },
        "supportedServicePlans": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1beta1ServicePlanInfo"
          },
          "readOnly": true
        }
      },
      "description": "A representation of a region for deploying TiDB clusters."
    },
    "commonv1beta1ServicePlan": {
      "type": "string",
      "enum": [
        "Starter",
        "Essential",
        "Premium",
        "BYOC",
        "Dedicated",
        "Premium_Reserved",
        "Essential_V2"
      ]
    },
    "commonv1beta1Tag": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "example": "tags/aaa:bbb",
          "description": "The unique name of the tag, in the format `tags/{key}:{value}`.",
          "pattern": "^tags/(.+):(.+)$"
        },
        "key": {
          "type": "string",
          "example": "env",
          "description": "The key of the tag."
        },
        "value": {
          "type": "string",
          "example": "prod",
          "description": "The value of the tag."
        }
      },
      "required": [
        "key",
        "value"
      ]
    },
    "dedicatedv1beta1ClusterPausePlan": {
      "type": "object",
      "properties": {
        "pauseType": {
          "description": "The type of the pause plan.\n\n- `\"NORMAL\"`: the default pause plan.\n- `\"DEPRECATE\"`: the legacy pause plan and will be removed in a future release.",
          "title": "PausePlanType",
          "allOf": [
            {
              "$ref": "#/definitions/dedicatedv1beta1ClusterPausePlanType"
            }
          ]
        },
        "scheduledResumeTime": {
          "type": "string",
          "format": "date-time",
          "description": "The scheduled time for the cluster to automatically resume from the `PAUSED` state, in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
          "readOnly": true
        }
      },
      "required": [
        "pauseType"
      ]
    },
    "dedicatedv1beta1ClusterPausePlanType": {
      "type": "string",
      "enum": [
        "NORMAL",
        "DEPRECATE"
      ],
      "title": "- NORMAL: default pause plan\n - DEPRECATE: old pause plan, will be removed"
    },
    "dedicatedv1beta1TidbNodeGroup": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "example": "tidbNodeGroups/1",
          "description": "The resource name of the TiDB group, in the format of `tidbNodeGroups/{tidb_node_group_id}`.",
          "readOnly": true
        },
        "tidbNodeGroupId": {
          "type": "string",
          "example": "1",
          "description": "The unique ID of the TiDB group.",
          "readOnly": true
        },
        "clusterId": {
          "type": "string",
          "example": "1",
          "description": "The ID of the cluster that the TiDB node group belongs to.\n\n- This field is **optional** when creating a cluster with the default TiDB group.\n\n- This field is **required** when creating a non-default TiDB group."
        },
        "displayName": {
          "type": "string",
          "example": "DefaultGroup",
          "description": "The display name of the TiDB group."
        },
        "nodeCount": {
          "type": "integer",
          "format": "int32",
          "example": 2,
          "description": "The number of TiDB nodes in the TiDB group. It must be greater than or equal to `1`.",
          "minimum": 1
        },
        "endpoints": {
          "type": "array",
          "example": [],
          "items": {
            "type": "object",
            "$ref": "#/definitions/dedicatedv1beta1TidbNodeGroupEndpoint"
          },
          "description": "The endpoints of the TiDB group.",
          "title": "Endpoint",
          "readOnly": true
        },
        "nodeSpecKey": {
          "type": "string",
          "example": "8C32G",
          "description": "The node spec key of the TiDB group. For example, `8C32G`."
        },
        "nodeSpecVersion": {
          "type": "string",
          "description": "The version tag of the node spec resource. The performance and price of the component may vary based on the version tag.",
          "readOnly": true
        },
        "nodeSpecDisplayName": {
          "type": "string",
          "example": "8 vCPU, 32 GiB",
          "description": "The display name of the node spec of the TiDB group. For example, `8 vCPU, 32 GiB`.",
          "readOnly": true
        },
        "isDefaultGroup": {
          "type": "boolean",
          "example": false,
          "description": "Indicates whether this is the default TiDB node group.",
          "readOnly": true
        },
        "state": {
          "example": "ACTIVE",
          "description": "The current state of the TiDB group.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/dedicatedv1beta1TidbNodeGroupState"
            }
          ]
        },
        "nodeChangingProgress": {
          "description": "The progress of node configuration changes.",
          "title": "NodeChangingProgress",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/ClusterNodeChangingProgress"
            }
          ]
        },
        "tiproxySetting": {
          "description": "Configures TiProxy settings for this TiDB group. If not specified, the default TiProxy settings is used.",
          "allOf": [
            {
              "$ref": "#/definitions/dedicatedv1beta1TidbNodeGroupTiProxySetting"
            }
          ]
        },
        "tiproxyNodeChangingProgress": {
          "description": "The progress of TiProxy node configuration changes.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/ClusterNodeChangingProgress"
            }
          ]
        }
      },
      "required": [
        "nodeCount"
      ]
    },
    "dedicatedv1beta1TidbNodeGroupEndpoint": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string",
          "description": "The hostname or IP address of the endpoint. For `PRIVATE_ENDPOINT` connection types, availability varies by cloud provider:\n\n- For clusters deployed on AWS, the `host` field is available after the private link service is ready.\n\n- For clusters deployed on Google Cloud or Azure, the `host` field is available after you create a `PrivateEndpointConnection`.",
          "readOnly": true
        },
        "port": {
          "type": "integer",
          "format": "int32",
          "description": "The port of the endpoint connection.",
          "readOnly": true
        },
        "connectionType": {
          "example": "PRIVATE_ENDPOINT",
          "description": "The connection type for TiDB node group endpoints.\n\n- `\"PUBLIC\"`: indicates that the endpoint is accessible over the public network.\n\n- `\"VPC_PEERING\"`: indicates that the endpoint is accessible over [VPC peering](https://docs.pingcap.com/tidbcloud/tidb-cloud-glossary/#vpc-peering).\n\n- `\"PRIVATE_ENDPOINT\"`: indicates that the endpoint is accessible over a private link.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1TidbNodeGroupEndpointConnectionType"
            }
          ]
        }
      }
    },
    "dedicatedv1beta1TidbNodeGroupState": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "MODIFYING",
        "PAUSED"
      ],
      "description": " - ACTIVE: Indicates the TiDB group is active and ready for use.\n - MODIFYING: Indicates the TiDB group is being modified.\n - PAUSED: Indicates the TiDB group is paused."
    },
    "dedicatedv1beta1TidbNodeGroupTiProxySetting": {
      "type": "object",
      "properties": {
        "nodeSpecKey": {
          "type": "string",
          "example": "2C4G",
          "description": "The node spec key of the TiProxy nodes in the cluster. For example, `2C4G`.\n\nTo view available node specs, use the [List node specs](#tag/RegionService/operation/RegionService_ListNodeSpecs) endpoint."
        },
        "nodeSpecVersion": {
          "type": "string",
          "readOnly": true
        },
        "nodeCount": {
          "type": "integer",
          "format": "int32",
          "x-nullable": true,
          "example": 2,
          "description": "The number of TiProxy nodes in the TiDB group. If not specified or set to `0`, TiProxy is disabled."
        },
        "nodeSpecDisplayName": {
          "type": "string",
          "example": "2 vCPU, 4 GiB",
          "description": "The display name of the TiProxy node spec. For example, `2 vCPU, 4 GiB`.",
          "readOnly": true
        }
      },
      "required": [
        "nodeSpecKey"
      ]
    },
    "googlerpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "description": "The status code, which should be an enum value of\n[google.rpc.Code][google.rpc.Code]."
        },
        "message": {
          "type": "string",
          "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized\nby the client."
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/protobufAny"
          },
          "description": "A list of messages that carry the error details.  There is a common set of\nmessage types for APIs to use."
        }
      },
      "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)."
    },
    "nextgenv1beta2CmekAccessIamPrincipalAliyunCmekPrincipal": {
      "type": "object",
      "properties": {
        "accountId": {
          "type": "string",
          "description": "The Alibaba Cloud account ID of the CMEK IAM principal.",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2CmekAccessIamPrincipalAwsCmekPrincipal": {
      "type": "object",
      "properties": {
        "accountId": {
          "type": "string",
          "description": "The AWS account ID of the CMEK IAM principal.",
          "readOnly": true
        },
        "externalId": {
          "type": "string",
          "description": "The AWS STS AssumeRole `ExternalId` that must be pinned in the KMS\nkey policy's `Condition` block when granting access to this principal.",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ConnectionReachability": {
      "type": "object",
      "properties": {
        "reachable": {
          "type": "boolean",
          "description": "Indicates whether the endpoint is reachable.",
          "readOnly": true
        },
        "detail": {
          "description": "The detailed reachability status of the endpoint connection.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ConnectionReachabilityDetail"
            }
          ]
        }
      }
    },
    "nextgenv1beta2ConnectionReachabilityDetail": {
      "type": "object",
      "properties": {
        "serviceActive": {
          "type": "boolean",
          "description": "Indicates whether the service is active.",
          "readOnly": true
        },
        "endpointActive": {
          "type": "boolean",
          "description": "Indicates whether the endpoint is active.",
          "readOnly": true
        },
        "dnsReachable": {
          "type": "boolean",
          "description": "Indicates whether the DNS is reachable.",
          "readOnly": true
        },
        "message": {
          "type": "string",
          "description": "A human-readable message that describes the reachability status.",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2CustomerManagedEncryptionKey": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The unique name of the CMEK, in the format of `cmeks/{cmek_id}`.",
          "readOnly": true
        },
        "customerManagedEncryptionKeyId": {
          "type": "string",
          "description": "The ID of the CMEK.",
          "readOnly": true
        },
        "regionId": {
          "type": "string",
          "description": "The region where the CMEK is located, in the format of `{cloud_provider}-{region_code}`. For example, `aws-us-west-2`."
        },
        "cloudProvider": {
          "description": "The cloud provider where the CMEK is located.\n\n- `\"aws\"`: Amazon Web Services\n\n- `\"gcp\"`: Google Cloud (not yet supported, planned for a future release)\n\n- `\"azure\"`: Microsoft Azure (not yet supported, planned for a future release)\n\n- `\"alicloud\"`: Alibaba Cloud",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1RegionCloudProvider"
            }
          ]
        },
        "servicePlan": {
          "$ref": "#/definitions/commonv1beta1ServicePlan"
        },
        "awsKms": {
          "description": "The configuration for AWS KMS.",
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2CustomerManagedEncryptionKeyAwsKms"
            }
          ]
        },
        "aliyunKms": {
          "description": "The configuration for Alibaba Cloud KMS.",
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2CustomerManagedEncryptionKeyAliyunKms"
            }
          ]
        },
        "awsPrincipal": {
          "description": "AWS IAM principal.",
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2CmekAccessIamPrincipalAwsCmekPrincipal"
            }
          ]
        },
        "aliyunPrincipal": {
          "description": "Alibaba Cloud RAM principal.",
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2CmekAccessIamPrincipalAliyunCmekPrincipal"
            }
          ]
        },
        "createTime": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the CMEK was created, in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
          "readOnly": true
        }
      },
      "required": [
        "regionId",
        "servicePlan"
      ]
    },
    "nextgenv1beta2CustomerManagedEncryptionKeyAliyunKms": {
      "type": "object",
      "properties": {
        "kmsKeyArn": {
          "type": "string",
          "description": "The Alibaba Cloud KMS key ARN used for encryption, e.g.\n`acs:kms:ap-southeast-1:5841052134823325:key/key-sgp68887a54phjt9703ut`."
        }
      },
      "required": [
        "kmsKeyArn"
      ]
    },
    "nextgenv1beta2CustomerManagedEncryptionKeyAwsKms": {
      "type": "object",
      "properties": {
        "kmsKeyArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the AWS KMS key used for encryption."
        }
      },
      "required": [
        "kmsKeyArn"
      ]
    },
    "protobufAny": {
      "type": "object",
      "properties": {
        "@type": {
          "type": "string",
          "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
        }
      },
      "additionalProperties": {},
      "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(\u0026foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n    // or ...\n    if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n      foo = any.unpack(Foo.getDefaultInstance());\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := \u0026pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := \u0026pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": \u003cstring\u003e,\n      \"lastName\": \u003cstring\u003e\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"
    },
    "serverlessv1beta1ClusterHighAvailabilityType": {
      "type": "string",
      "enum": [
        "ZONAL",
        "REGIONAL"
      ],
      "description": "The high availability configuration for the cluster.\n\n- `ZONAL`: high availability within a single availability zone. For more information, see [Zonal high availability architecture](https://docs.pingcap.com/tidbcloud/serverless-high-availability/#zonal-high-availability-architecture).\n- `REGIONAL`: high availability across multiple availability zones within a region. For more information, see [Regional high availability architecture](https://docs.pingcap.com/tidbcloud/serverless-high-availability/#regional-high-availability-architecture)."
    },
    "tidb_cloud_open_apidedicatedv1beta1Cluster": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "example": "clusters/1",
          "description": "The unique identifier for the TiDB cluster, which is generated by the API and follows the format `clusters/{clusterId}`.",
          "readOnly": true
        },
        "clusterId": {
          "type": "string",
          "example": "1",
          "description": "The ID of the cluster.",
          "readOnly": true
        },
        "displayName": {
          "type": "string",
          "example": "foo-bar",
          "description": "The user-defined name of the cluster.",
          "maxLength": 64,
          "minLength": 4,
          "pattern": "^[A-Za-z0-9][-A-Za-z0-9]{2,62}[A-Za-z0-9]$"
        },
        "regionId": {
          "type": "string",
          "example": "aws-us-west-2",
          "description": "The region where the cluster is deployed, in the format of `{cloud_provider}-{region_code}`. For example, `aws-us-west-2`."
        },
        "labels": {
          "type": "object",
          "example": {
            "tidb.cloud/project": "1"
          },
          "additionalProperties": {
            "type": "string"
          },
          "description": "Key-value pairs used to label the cluster. If the `tidb.cloud/project` label is not specified, the cluster is associated with the default project in the creator's organization. \n\n**Note**: Currently, only the `tidb.cloud/project` label key can be specified when creating a new cluster.",
          "title": "map\u003cstring, string\u003e"
        },
        "tidbNodeSetting": {
          "description": "The configuration for [TiDB nodes](https://docs.pingcap.com/tidbcloud/tidb-cloud-glossary/#tidb-node) in a TiDB Cloud Dedicated cluster.\n\nTo view available node specs for a specific region and cloud provider, use the [List node specs](#tag/RegionService/operation/RegionService_ListNodeSpecs) endpoint.",
          "title": "TidbNodeSetting",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1ClusterTidbNodeSetting"
            }
          ]
        },
        "tikvNodeSetting": {
          "description": "The configuration for [TiKV nodes](https://docs.pingcap.com/tidbcloud/tidb-cloud-glossary/#tikv-node) in a TiDB Cloud Dedicated cluster.\n\nTo view available node specs for a specific region and cloud provider, use the [List node specs](#tag/RegionService/operation/RegionService_ListNodeSpecs) endpoint.",
          "title": "StorageNodeSetting",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1ClusterStorageNodeSetting"
            }
          ]
        },
        "tiflashNodeSetting": {
          "example": {
            "nodeCount": 3,
            "nodeSpecKey": "16C128G",
            "storageSizeGi": 500,
            "storageType": "Basic"
          },
          "description": "The configuration for [TiFlash nodes](https://docs.pingcap.com/tidbcloud/tidb-cloud-glossary/#tiflash-node) in a TiDB Cloud Dedicated cluster. If not set, TiFlash is disabled.\n\nTo view available node specs for a specific region and cloud provider, use the [List node specs](#tag/RegionService/operation/RegionService_ListNodeSpecs) endpoint.",
          "title": "StorageNodeSetting",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1ClusterStorageNodeSetting"
            }
          ]
        },
        "port": {
          "type": "integer",
          "format": "int32",
          "example": 4000,
          "default": "4000",
          "description": "The port for cluster connections. All network endpoints in the cluster use this port.",
          "maximum": 65535,
          "minimum": 1024
        },
        "rootPassword": {
          "type": "string",
          "example": "my-shining-password",
          "description": "The root password of the cluster. It must be between 8 and 64 characters long and can contain letters, numbers, and special characters.",
          "maxLength": 64,
          "minLength": 8,
          "pattern": "^.{8,64}$"
        },
        "state": {
          "example": "ACTIVE",
          "description": "The current state of the cluster.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1ClusterState"
            }
          ]
        },
        "version": {
          "type": "string",
          "example": "8.5.2",
          "description": "The TiDB version of the cluster.",
          "readOnly": true
        },
        "createdBy": {
          "type": "string",
          "example": "test@example.com",
          "description": "The email address or public API key of the user who create the cluster.",
          "readOnly": true
        },
        "createTime": {
          "type": "string",
          "format": "date-time",
          "example": "2023-10-01T12:00:00Z",
          "description": "The timestamp when the cluster was created, in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
          "readOnly": true
        },
        "updateTime": {
          "type": "string",
          "format": "date-time",
          "example": "2023-10-01T12:00:00Z",
          "description": "The timestamp when the cluster was last updated, in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
          "readOnly": true
        },
        "pausePlan": {
          "description": "The pause plan configuration of the cluster.",
          "title": "PausePlan",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/dedicatedv1beta1ClusterPausePlan"
            }
          ]
        },
        "regionDisplayName": {
          "type": "string",
          "example": "N. Virginia (us-east-1)",
          "description": "The display name of the region where the cluster is located. For example, `N. Virginia (us-east-1)`.",
          "readOnly": true
        },
        "cloudProvider": {
          "example": "aws",
          "description": "The cloud provider where the cluster is located.\n\n- `\"aws\"`: Amazon Web Services\n\n- `\"gcp\"`: Google Cloud\n\n- `\"azure\"`: Microsoft Azure\n\n- `\"alicloud\"`: Alibaba Cloud",
          "title": "CloudProvider",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1RegionCloudProvider"
            }
          ]
        },
        "annotations": {
          "type": "object",
          "example": {
            "tidb.cloud/has-set-password": "false"
          },
          "additionalProperties": {
            "type": "string"
          },
          "description": "The annotations for the cluster. The following lists some predefined annotations:\n- `tidb.cloud/has-set-password`: indicates whether the cluster has a root password set.\n- `tidb.cloud/available-features`: lists available features of the cluster.\n- `tidb.cloud/insufficient-vm-resource`: indicates insufficient virtual machine resources during during cluster creation or modification.",
          "title": "map\u003cstring, string\u003e",
          "readOnly": true
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/commonv1beta1Tag"
          }
        }
      },
      "description": "Cluster represents a dedicated TiDB cluster.",
      "required": [
        "displayName",
        "regionId",
        "tidbNodeSetting",
        "tikvNodeSetting",
        "port"
      ]
    },
    "tidb_cloud_open_apinextgenv1beta2Tidb": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The unique identifier for the TiDB Cloud Premium instance, which is generated by the API and follows the format `tidbs/{tidbId}`.",
          "readOnly": true
        },
        "tidbId": {
          "type": "string",
          "description": "The ID of the TiDB Cloud Premium instance.",
          "readOnly": true
        },
        "displayName": {
          "type": "string",
          "example": "foo-bar",
          "description": "The user-defined name of the TiDB Cloud Premium instance.",
          "maxLength": 64,
          "minLength": 4,
          "pattern": "^[A-Za-z0-9][-A-Za-z0-9]{2,62}[A-Za-z0-9]$"
        },
        "regionId": {
          "type": "string",
          "description": "The unique identifier of the region where the TiDB Cloud Premium instance is deployed, in the format of `{cloud_provider}-{region_code}`. For example, `aws-us-west-2`."
        },
        "cloudProvider": {
          "description": "The cloud provider where the TiDB Cloud Premium instance is deployed.\n\n- `\"aws\"`: Amazon Web Services\n\n- `\"gcp\"`: Google Cloud\n\n- `\"azure\"`: Microsoft Azure\n\n- `\"alicloud\"`: Alibaba Cloud",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1RegionCloudProvider"
            }
          ]
        },
        "regionDisplayName": {
          "type": "string",
          "description": "The display name of the region where the TiDB Cloud Premium instance is deployed. For example, `Oregon (us-west-2)`.",
          "readOnly": true
        },
        "state": {
          "description": "The current state of the TiDB Cloud Premium instance.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1ClusterState"
            }
          ]
        },
        "rootPassword": {
          "type": "string",
          "example": "my-shining-password",
          "description": "The root password of the TiDB Cloud Premium instance.\n\nThis field supports two input formats:\n- Plaintext password (legacy behavior)\n- RSA-OAEP-SHA256 encrypted payload prefixed with `rsa_oaep_sha256:`\n\nIf the marker prefix is present, the server parses and decrypts the encrypted payload.\nAny parse/decrypt failure returns an explicit parameter error without plaintext fallback.\nIf the marker prefix is absent, the value is treated as plaintext for backward compatibility.\n\nFor plaintext input, the password must be between 8 and 64 characters long and can contain letters,\nnumbers, and special characters.",
          "pattern": "^(rsa_oaep_sha256:.+|.{8,64})$"
        },
        "minRcu": {
          "type": "string",
          "format": "int64",
          "description": "The minimum number of Request Capacity Units (RCUs) for the TiDB Cloud Premium instance.\n\nThis field is read-only and is automatically calculated as `max(5000, maxRcu / 4)`.",
          "readOnly": true
        },
        "maxRcu": {
          "type": "string",
          "format": "int64",
          "description": "The maximum number of Request Capacity Units (RCUs) for the TiDB Cloud Premium instance."
        },
        "servicePlan": {
          "description": "The plan of the service.\n\n- `Premium`: [TiDB Cloud Premium](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#tidb-cloud-premium)\n\n- `Premium_Reserved`: TiDB Cloud Premium Reserved",
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1ServicePlan"
            }
          ]
        },
        "reservedCapacityTemplateId": {
          "type": "string",
          "format": "int64",
          "description": "The capacity template ID for Premium Reserved. This field is only accepted\nwhen `service_plan` is `Premium_Reserved`; it is not returned in responses."
        },
        "reservedCapacity": {
          "description": "The current Reserved capacity information. This field is only returned for\nPremium Reserved instances.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2ReservedCapacity"
            }
          ]
        },
        "resourcePoolId": {
          "type": "string",
          "x-nullable": true,
          "description": "The resource pool selected for this TiDB Cloud instance.\nCurrently, this field is only used for TiDB Cloud BYOC instances."
        },
        "resourcePoolDisplayName": {
          "type": "string",
          "x-nullable": true,
          "description": "The current display name of the selected resource pool.\nCurrently, this field is only returned for TiDB Cloud BYOC instances.",
          "readOnly": true
        },
        "highAvailabilityType": {
          "description": "The high availability configuration for the TiDB Cloud instance.\n- `REGIONAL`: high availability across multiple availability zones within a region. For more information, see [Regional high availability architecture](https://docs.pingcap.com/tidbcloud/serverless-high-availability/#regional-high-availability-architecture).\n- `ZONAL`: high availability within a single availability zone. For more information, see [Zonal high availability architecture](https://docs.pingcap.com/tidbcloud/serverless-high-availability/#zonal-high-availability-architecture).\nTiDB Cloud Premium and Premium Reserved support only `REGIONAL`.\nIf omitted for TiDB Cloud Essential, the selected resource pool determines the value.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2TidbHighAvailabilityType"
            }
          ]
        },
        "annotations": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The annotations for the TiDB Cloud Premium instance. The following lists some predefined annotations:\n- `tidb.cloud/has-set-password`: indicates whether the TiDB Cloud Premium instance has a root password set.\n- `tidb.cloud/available-features`: lists available features of the TiDB Cloud Premium instance."
        },
        "labels": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The labels for the TiDB Cloud Premium instance.\n- `tidb.cloud/organization`: the ID of the organization where the TiDB Cloud Premium instance belongs.\n- `tidb.cloud/project`: the ID of the project where the TiDB Cloud Premium instance belongs."
        },
        "creator": {
          "type": "string",
          "description": "The email address or public API key of the user who created the TiDB Cloud Premium instance.",
          "readOnly": true
        },
        "createTime": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the TiDB Cloud Premium instance was created, in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
          "readOnly": true
        },
        "updateTime": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the TiDB Cloud Premium instance was last updated, in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
          "readOnly": true
        },
        "automaticResumeAt": {
          "type": "string",
          "format": "date-time",
          "description": "The scheduled time when the Resource Pool will automatically resume this instance's pool.\nThis field is set only while the Resource Pool is paused.",
          "readOnly": true
        },
        "endpoints": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1beta2TidbEndpoint"
          },
          "description": "The connection endpoints for accessing the TiDB Cloud Premium instance.",
          "readOnly": true
        },
        "dualLayerDataEncryption": {
          "description": "The dual-layer data encryption configuration for the TiDB Cloud Premium instance.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2TidbDualLayerDataEncryption"
            }
          ]
        },
        "tidbVersion": {
          "type": "string",
          "description": "The version of the TiDB instance.",
          "readOnly": true
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "capacityUpdateTime": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the capacity of the TiDB Cloud Premium instance was last updated, in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
          "readOnly": true
        }
      },
      "required": [
        "displayName",
        "regionId",
        "maxRcu",
        "servicePlan"
      ]
    },
    "tidb_cloud_open_apiserverlessv1beta1Cluster": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The unique identifier for the TiDB cluster, which is generated by the API and follows the format `clusters/{clusterId}`.",
          "readOnly": true
        },
        "clusterId": {
          "type": "string",
          "description": "The ID of the cluster.",
          "readOnly": true
        },
        "displayName": {
          "type": "string",
          "example": "foo-bar",
          "description": "The user-defined name of the cluster.",
          "maxLength": 64,
          "minLength": 4,
          "pattern": "^[A-Za-z0-9][-A-Za-z0-9]{2,62}[A-Za-z0-9]$"
        },
        "region": {
          "description": "The region where the cluster is deployed.",
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1Region"
            }
          ]
        },
        "spendingLimit": {
          "description": "The [spending limit](https://docs.pingcap.com/tidbcloud/tidb-cloud-glossary/#spending-limit) for the cluster.",
          "allOf": [
            {
              "$ref": "#/definitions/ClusterSpendingLimit"
            }
          ]
        },
        "automatedBackupPolicy": {
          "description": "The schedule and retention rules for automated database backups.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1ClusterAutomatedBackupPolicy"
            }
          ]
        },
        "endpoints": {
          "description": "The connection endpoints for accessing the cluster.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1ClusterEndpoints"
            }
          ]
        },
        "rootPassword": {
          "type": "string",
          "example": "my-shining-password",
          "description": "The root password of the cluster. It must be between 8 and 64 characters long and can contain letters, numbers, and special characters.",
          "maxLength": 64,
          "minLength": 8,
          "pattern": "^.{8,64}$"
        },
        "encryptionConfig": {
          "description": "The data encryption settings for the cluster.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1ClusterEncryptionConfig"
            }
          ]
        },
        "highAvailabilityType": {
          "$ref": "#/definitions/serverlessv1beta1ClusterHighAvailabilityType"
        },
        "version": {
          "type": "string",
          "description": "The TiDB version of the cluster.",
          "readOnly": true
        },
        "createdBy": {
          "type": "string",
          "description": "The email address of the user who create the cluster.",
          "readOnly": true
        },
        "userPrefix": {
          "type": "string",
          "description": "The unique prefix automatically generated for SQL usernames on this cluster. TiDB Cloud uses this prefix to distinguish between clusters. For more information, see [User name prefix](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#user-name-prefix).",
          "readOnly": true
        },
        "state": {
          "description": "The current state of the cluster.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1ClusterState"
            }
          ]
        },
        "labels": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The labels for the cluster.\n\n- `tidb.cloud/organization`: the ID of the organization where the cluster belongs.\n- `tidb.cloud/project`: the ID of the project where the cluster belongs."
        },
        "annotations": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The annotations for the cluster. The following lists some predefined annotations.\n\n- `tidb.cloud/has-set-password`: indicates whether the cluster has a root password set.\n- `tidb.cloud/available-features`: lists available features of the cluster.",
          "readOnly": true
        },
        "createTime": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the cluster was created, in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
          "readOnly": true
        },
        "updateTime": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the cluster was last updated, in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.",
          "readOnly": true
        },
        "auditLogConfig": {
          "description": "The audit log configuration for the cluster.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1ClusterAuditLogConfig"
            }
          ]
        },
        "autoScaling": {
          "description": "The auto-scaling configuration for the cluster.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1ClusterAutoScaling"
            }
          ]
        },
        "servicePlan": {
          "description": "The plan of the service.\n\n- `Starter`: [TiDB Cloud Starter](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#tidb-cloud-serverless)\n- `Essential`: [TiDB Cloud Essential](https://docs.pingcap.com/tidbcloud/select-cluster-tier/#essential)",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1ServicePlan"
            }
          ]
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/commonv1beta1Tag"
          }
        },
        "engineType": {
          "description": "The database engine compatibility of the cluster.\n\n- `MYSQL_COMPATIBLE`: TiDB Starter/Essential MySQL-compatible engine.\n- `POSTGRESQL_COMPATIBLE`: TiDB Starter PostgreSQL-compatible engine.",
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1EngineType"
            }
          ]
        }
      },
      "description": "Message for a TiDB Cloud Starter or Essential cluster.",
      "required": [
        "displayName",
        "region"
      ]
    },
    "v1beta1ClusterAuditLogConfig": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "x-nullable": true,
          "description": "Whether audit log is enabled."
        },
        "unredacted": {
          "type": "boolean",
          "x-nullable": true,
          "description": "Whether unredacted the audit log."
        }
      },
      "description": "Message for audit log configuration."
    },
    "v1beta1ClusterAutoScaling": {
      "type": "object",
      "properties": {
        "minRcu": {
          "type": "integer",
          "format": "int64",
          "description": "The minimum number of Request Capacity Units (RCUs) for auto-scaling."
        },
        "maxRcu": {
          "type": "integer",
          "format": "int64",
          "description": "The maximum number of Request Capacity Units (RCUs) for auto-scaling."
        }
      },
      "description": "Message for auto scaling configuration."
    },
    "v1beta1ClusterAutomatedBackupPolicy": {
      "type": "object",
      "properties": {
        "startTime": {
          "type": "string",
          "description": "The UTC time of day in `HH:mm` format when the automated backup starts."
        },
        "retentionDays": {
          "type": "integer",
          "format": "int32",
          "description": "The number of days to retain automated backups."
        }
      },
      "description": "Message for automated backup configuration for a cluster."
    },
    "v1beta1ClusterEncryptionConfig": {
      "type": "object",
      "properties": {
        "enhancedEncryptionEnabled": {
          "type": "boolean",
          "description": "Indicates whether enhanced encryption for cluster data is enabled."
        }
      },
      "description": "Message for encryption settings for a cluster."
    },
    "v1beta1ClusterEndpoints": {
      "type": "object",
      "properties": {
        "public": {
          "description": "The public endpoint configuration for connecting to the cluster. For more information, see [Network](https://docs.pingcap.com/tidbcloud/connect-to-tidb-cluster-serverless/#network).",
          "allOf": [
            {
              "$ref": "#/definitions/EndpointsPublic"
            }
          ]
        },
        "private": {
          "description": "The private endpoint for securely connecting to the cluster. For more information, see [Network](https://docs.pingcap.com/tidbcloud/connect-to-tidb-cluster-serverless/#network).",
          "allOf": [
            {
              "$ref": "#/definitions/EndpointsPrivate"
            }
          ]
        }
      },
      "description": "Message for endpoint information for connecting to a cluster."
    },
    "v1beta1ClusterStorageNodeSetting": {
      "type": "object",
      "properties": {
        "nodeCount": {
          "type": "integer",
          "format": "int32",
          "example": 3,
          "description": "The number of nodes in the cluster."
        },
        "nodeSpecKey": {
          "type": "string",
          "example": "8C32G",
          "description": "The node spec key of the nodes in the cluster. For example, `8C32G`."
        },
        "nodeSpecVersion": {
          "type": "string",
          "example": "v1",
          "description": "The version tag of the node spec resource. The performance and price of the component may vary based on the version tag.",
          "readOnly": true
        },
        "storageSizeGi": {
          "type": "integer",
          "format": "int32",
          "example": 500,
          "description": "The storage size of each node in gibibytes (GiB). To view supported storage size ranges, use the [List node specs](#tag/RegionService/operation/RegionService_ListNodeSpecs) or [Get a node spec](#tag/RegionService/operation/RegionService_GetNodeSpec) endpoint."
        },
        "storageType": {
          "example": "Standard",
          "description": "The storage type of the node. For more information, see [TiKV node storage types](https://docs.pingcap.com/tidbcloud/size-your-cluster/#tikv-node-storage-types) and [TiFlash node storage types](https://docs.pingcap.com/tidbcloud/size-your-cluster/#tiflash-node-storage-types).",
          "allOf": [
            {
              "$ref": "#/definitions/ClusterStorageNodeSettingStorageType"
            }
          ]
        },
        "dataStoreIops": {
          "type": "integer",
          "format": "int32",
          "x-nullable": true,
          "example": 3000,
          "description": "The IOPS (input/output operations per second) of the data store for the node. Only supported for AWS clusters with `Plus` TiKV storage type. If not specified, the default IOPS of the data store is used."
        },
        "raftStoreIops": {
          "type": "integer",
          "format": "int32",
          "x-nullable": true,
          "example": 3000,
          "description": "The IOPS (input/output operations per second) of the Raft store for the node. If not specified, the default IOPS of Raft store is used. It is recommended to leave it blank to use the default settings for optimal performance."
        },
        "nodeSpecDisplayName": {
          "type": "string",
          "example": "8 vCPU, 32 GiB",
          "description": "The display name of the node spec. For example, `8 vCPU, 32 GiB`.",
          "readOnly": true
        },
        "nodeChangingProgress": {
          "description": "The progress of the node changing.",
          "title": "NodeChangingProgress",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/ClusterNodeChangingProgress"
            }
          ]
        }
      },
      "required": [
        "nodeCount",
        "nodeSpecKey",
        "storageSizeGi"
      ]
    },
    "v1beta1ClusterTidbNodeSetting": {
      "type": "object",
      "properties": {
        "nodeSpecKey": {
          "type": "string",
          "example": "8C32G",
          "description": "The node spec key of the TiDB nodes in the cluster. For example, `8C32G`. \n\nTo get the node spec available configurations of a specific region for a cloud provider, please refer to [List node specs](#tag/RegionService/operation/RegionService_ListNodeSpecs) API."
        },
        "nodeSpecDisplayName": {
          "type": "string",
          "example": "8 vCPU, 32 GiB",
          "description": "The display name of the node spec. For example, `8 vCPU, 32 GiB`.",
          "readOnly": true
        },
        "nodeSpecVersion": {
          "type": "string",
          "example": "v1",
          "description": "The version tag of the node spec resource. The performance and price of the component may vary based on the version tag.",
          "readOnly": true
        },
        "tidbNodeGroups": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/dedicatedv1beta1TidbNodeGroup"
          },
          "description": "The [TiDB node groups](https://docs.pingcap.com/tidbcloud/tidb-node-group-overview/) in the cluster.\n\nWhen you create a cluster, this array must contain exactly one `TidbNodeGroup` object, and the `nodeCount` field must be set.",
          "title": "TidbNodeGroup"
        }
      },
      "required": [
        "tidbNodeGroups"
      ]
    },
    "v1beta1RegionCloudProvider": {
      "type": "string",
      "enum": [
        "aws",
        "gcp",
        "azure",
        "alicloud"
      ],
      "description": "Enum of cloud provider names.\n\n - aws: Amazon Web Services.\n - gcp: Google Cloud Platform.\n - azure: Microsoft Azure.\n - alicloud: Alibaba Cloud."
    },
    "v1beta1ServicePlanInfo": {
      "type": "object",
      "properties": {
        "servicePlan": {
          "$ref": "#/definitions/commonv1beta1ServicePlan"
        },
        "displayName": {
          "type": "string"
        },
        "supportedEngineTypes": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/commonv1beta1EngineType"
          }
        }
      }
    },
    "v1beta1TidbNodeGroupEndpointConnectionType": {
      "type": "string",
      "enum": [
        "PUBLIC",
        "VPC_PEERING",
        "PRIVATE_ENDPOINT"
      ],
      "description": "The connection type for TiDB node group endpoints.\n\n - PUBLIC: Indicates that the endpoint is accessible over the public network.\n - VPC_PEERING: Indicates that the endpoint is accessible over [VPC peering](https://docs.pingcap.com/tidbcloud/tidb-cloud-glossary/#vpc-peering).\n - PRIVATE_ENDPOINT: Indicates that the endpoint is accessible over a private link."
    },
    "v1beta2ApproveProjectMigrationTaskRequest": {
      "type": "object",
      "properties": {
        "migrations": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1beta2Migration"
          }
        }
      },
      "required": [
        "migrations"
      ]
    },
    "v1beta2ApproveProjectMigrationTaskResponse": {
      "type": "object",
      "properties": {
        "task": {
          "$ref": "#/definitions/v1beta2ProjectMigrationTask"
        }
      }
    },
    "v1beta2BatchMoveTiDBsRequest": {
      "type": "object",
      "properties": {
        "sourceProjectId": {
          "type": "string",
          "description": "source_project_id is the source project (required)."
        },
        "targetProjectId": {
          "type": "string",
          "description": "target_project_id is the destination project (required)."
        },
        "servicePlans": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/commonv1beta1ServicePlan"
          },
          "description": "service_plans filters which service plans to move (optional; default: all supported plans)."
        }
      },
      "description": "BatchMoveTiDBsRequest moves multiple Starter/Essential TiDBs from one project to another.\nMax 1000 tidbs per request.",
      "required": [
        "sourceProjectId",
        "targetProjectId"
      ]
    },
    "v1beta2BatchMoveTiDBsResponse": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "format": "int32",
          "description": "total is the number of TiDBs scheduled for migration."
        },
        "failedTidbIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "failed_tidb_ids lists the IDs of TiDBs that failed to move."
        },
        "successTidbIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "success_tidb_ids lists the IDs of TiDBs that were successfully moved."
        }
      }
    },
    "v1beta2ClusterInventoryItem": {
      "type": "object",
      "properties": {
        "servicePlan": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1ServicePlan"
            }
          ]
        },
        "limit": {
          "type": "integer",
          "format": "int32",
          "readOnly": true
        },
        "currentCount": {
          "type": "integer",
          "format": "int32",
          "readOnly": true
        }
      }
    },
    "v1beta2GetClusterInventoryResponse": {
      "type": "object",
      "properties": {
        "inventories": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1beta2ClusterInventoryItem"
          }
        }
      }
    },
    "v1beta2ListRegionsRequestViewMode": {
      "type": "string",
      "enum": [
        "SERVICE_PLAN_GROUP",
        "FLAT"
      ]
    },
    "v1beta2ListTidbsRequestViewMode": {
      "type": "string",
      "enum": [
        "BASIC",
        "MINI"
      ]
    },
    "v1beta2Migration": {
      "type": "object",
      "properties": {
        "sourceProjectId": {
          "type": "string",
          "format": "uint64"
        },
        "sourceProjectName": {
          "type": "string",
          "readOnly": true
        },
        "targetProjectId": {
          "type": "string",
          "format": "uint64"
        },
        "targetProjectName": {
          "type": "string"
        },
        "countInSourceProject": {
          "type": "string",
          "format": "uint64",
          "readOnly": true
        },
        "countInTargetProject": {
          "type": "string",
          "format": "uint64",
          "readOnly": true
        }
      },
      "required": [
        "sourceProjectId"
      ]
    },
    "v1beta2MoveTiDBResponse": {
      "type": "object",
      "properties": {
        "tidb": {
          "description": "tidb is the moved tidb.",
          "allOf": [
            {
              "$ref": "#/definitions/bffcluster_managementv1beta2Tidb"
            }
          ]
        }
      }
    },
    "v1beta2ProjectMigrationTask": {
      "type": "object",
      "properties": {
        "orgId": {
          "type": "string",
          "format": "uint64",
          "readOnly": true
        },
        "state": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2ProjectMigrationTaskState"
            }
          ]
        },
        "migrations": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1beta2Migration"
          },
          "readOnly": true
        }
      }
    },
    "v1beta2ProjectMigrationTaskState": {
      "type": "string",
      "enum": [
        "PENDING",
        "RUNNING",
        "SUCCEED",
        "FAILED"
      ]
    },
    "v1beta2ReservedCapacity": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "readOnly": true
        },
        "templateCode": {
          "type": "string",
          "readOnly": true
        },
        "purchasedVcpu": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "peakQps": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "workloadType": {
          "type": "string",
          "readOnly": true
        },
        "description": {
          "type": "string",
          "readOnly": true
        },
        "scope": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2ReservedCapacityScope"
            }
          ]
        }
      }
    },
    "v1beta2ReservedCapacityScope": {
      "type": "string",
      "enum": [
        "DEFAULT",
        "ORG_PRIVATE"
      ]
    },
    "v1beta2TiDBServiceBindTagsBody": {
      "type": "object",
      "properties": {
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "tags"
      ]
    },
    "v1beta2TiDBServiceUnbindTagsBody": {
      "type": "object",
      "properties": {
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "tags"
      ]
    },
    "v1beta2TidbDualLayerDataEncryption": {
      "type": "object",
      "properties": {
        "noEncryption": {
          "type": "object",
          "properties": {},
          "description": "Disables dual-layer data encryption. The TiDB Cloud Premium instance uses the default encryption provided by the cloud provider."
        },
        "defaultKey": {
          "type": "object",
          "properties": {},
          "description": "Enables dual-layer data encryption using the TiDB Cloud default key."
        },
        "cmek": {
          "description": "Enables dual-layer data encryption using a customer-managed encryption key (CMEK).\nConfigure the key according to the cloud provider:\n- AWS: set `awsKms` and `awsPrincipal`.\n- Alibaba Cloud: set `aliyunKms` and `aliyunPrincipal`.",
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2CustomerManagedEncryptionKey"
            }
          ]
        }
      },
      "description": "The dual-layer data encryption configuration for a TiDB Cloud Premium instance. Specify exactly one of the following options: `noEncryption`, `defaultKey`, or `cmek`."
    },
    "v1beta2TidbEndpoint": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string",
          "description": "The hostname of the endpoint.\n\nWhen `connectionType` is `\"PRIVATE_ENDPOINT\"`, the behavior of the `host` field varies by cloud provider:\n- For AWS, this field is available after the Private Link service is ready.\n- For Google Cloud and Azure, this field is available after you create a private endpoint connection.",
          "readOnly": true
        },
        "port": {
          "type": "integer",
          "format": "int32",
          "description": "The port number of the endpoint.",
          "readOnly": true
        },
        "connectionType": {
          "description": "The connection type of the endpoint.\n\n- `PUBLIC`: a public endpoint. For more information, see [Network](https://docs.pingcap.com/tidbcloud/connect-to-tidb-instance/#network).\n\n- `PRIVATE_ENDPOINT`: a private endpoint. For more information, see [Network](https://docs.pingcap.com/tidbcloud/connect-to-tidb-instance/#network).\n\n- `VPC_PEERING`: a VPC peering endpoint (not yet supported, planned for a future release).",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2TidbEndpointConnectionType"
            }
          ]
        },
        "connectionReachability": {
          "description": "The reachability status of the endpoint connection.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ConnectionReachability"
            }
          ]
        },
        "egressIps": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The public egress IP addresses used by the TiDB Cloud Premium instance.\n\nThis field is returned only for public endpoints. You can use these IP addresses\nto configure allowlists on upstream services when connecting through a public endpoint.",
          "readOnly": true
        }
      }
    },
    "v1beta2TidbEndpointConnectionType": {
      "type": "string",
      "enum": [
        "PUBLIC",
        "PRIVATE_ENDPOINT",
        "VPC_PEERING"
      ]
    },
    "v1beta2TidbHighAvailabilityType": {
      "type": "string",
      "enum": [
        "REGIONAL",
        "ZONAL"
      ],
      "description": "The high availability configuration for the TiDB Cloud Premium instance.\n\n - REGIONAL: High availability across multiple availability zones within a region.\n - ZONAL: High availability within a single availability zone."
    }
  }
}
