{
  "swagger": "2.0",
  "info": {
    "title": "TiDB Cloud Console API",
    "description": "TiDB Cloud Console API.",
    "version": "v1beta1"
  },
  "tags": [
    {
      "name": "ClusterService"
    }
  ],
  "host": "us-west-2.staging.shared.aws.tidbcloud.com",
  "basePath": "/api/v2023/clusterManagement/v1beta1",
  "security": [
    {
      "oauth2": []
    }
  ],
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/clusters": {
      "get": {
        "operationId": "ClusterService_ListClusters",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/bffcluster_managementv1beta1ListClustersResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "pageSize",
            "description": "The maximum number of clusters to return. The service may return fewer than this value.\nIf unspecified, at most X clusters will be returned.\nThe maximum value is X; values above X will be coerced to X.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pageToken",
            "description": "A page token, received from a previous `ListClusters` call.\nProvide this to retrieve the subsequent page.\n\nWhen paginating, all other parameters provided to `ListClusters` must match\nthe call that provided the page token.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "skip",
            "description": "The number of individual resources to skip before starting to return results.\nIf the skip value causes the cursor to move past the end of the collection,\nthe response will be 200 OK with an empty result set and no next_page_token.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "orgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "projectId",
            "description": "Project id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "ClusterService"
        ]
      }
    },
    "/clusters/{clusterId}": {
      "get": {
        "operationId": "ClusterService_GetCluster",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/bffcluster_managementv1beta1Cluster"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "clusterId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "orgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "projectId",
            "description": "Project id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "ClusterService"
        ]
      }
    },
    "/clusters/{clusterId}:dedicatedAdvancedModify": {
      "post": {
        "operationId": "ClusterService_AdvancedModifyDedicatedCluster",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/bffcluster_managementv1beta1Cluster"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "clusterId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "displayName": {
                  "type": "string"
                },
                "tidbNodeSetting": {
                  "$ref": "#/definitions/v1beta1AdvancedModifyDedicatedClusterRequestTidbNodeSetting"
                },
                "tiflashNodeSetting": {
                  "$ref": "#/definitions/v1beta1UpdateClusterRequestStorageNodeSetting"
                },
                "tikvNodeSetting": {
                  "$ref": "#/definitions/v1beta1UpdateClusterRequestStorageNodeSetting"
                }
              }
            }
          },
          {
            "name": "orgId",
            "description": "Organization id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          },
          {
            "name": "projectId",
            "description": "Project id",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "uint64"
          }
        ],
        "tags": [
          "ClusterService"
        ]
      }
    }
  },
  "definitions": {
    "AdvancedModifyDedicatedClusterRequestTidbNodeGroupCreate": {
      "properties": {
        "displayName": {
          "description": "The display name of the TiDB group.",
          "type": "string"
        },
        "nodeCount": {
          "description": "The number of TiDB nodes in the TiDB group.",
          "format": "int32",
          "type": "integer"
        }
      },
      "required": [
        "displayName",
        "nodeCount"
      ],
      "type": "object"
    },
    "AdvancedModifyDedicatedClusterRequestTidbNodeGroupUpdate": {
      "properties": {
        "nodeCount": {
          "description": "The number of TiDB nodes in the TiDB group.",
          "format": "int32",
          "type": "integer"
        },
        "tidbNodeGroupId": {
          "type": "string"
        }
      },
      "required": [
        "tidbNodeGroupId"
      ],
      "type": "object"
    },
    "ClusterClusterType": {
      "enum": [
        "DEDICATED",
        "SERVERLESS"
      ],
      "type": "string"
    },
    "ClusterNodeChangingProgress": {
      "properties": {
        "matchingNodeSpecNodeCount": {
          "format": "int32",
          "readOnly": true,
          "type": "integer"
        },
        "remainingDeletionNodeCount": {
          "description": "available if some nodes are deleting.",
          "format": "int32",
          "readOnly": true,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "ClusterSpendingLimit": {
      "description": "Message for spending limit configuration.",
      "properties": {
        "monthly": {
          "description": "Optional. Maximum monthly spending limit in USD cents.",
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "ClusterStorageNodeSettingStorageType": {
      "enum": [
        "BASIC",
        "BASICV2",
        "OPTIMIZED",
        "PLUS"
      ],
      "title": "- BASIC: default\n - BASICV2: separate raft-log and data storage, only for tikv\n - OPTIMIZED: separate raft-log and data storage, and use high performance storage volume for raft-log, only for tikv\n - PLUS: use high performance storage volume",
      "type": "string"
    },
    "EndpointConnectionType": {
      "description": " - PUBLIC: The endpoint is a public endpoint.\n - VPC_PEERING: The endpoint is a VPC peering endpoint.\n - PRIVATE_ENDPOINT: The endpoint is a private link endpoint.",
      "enum": [
        "PUBLIC",
        "VPC_PEERING",
        "PRIVATE_ENDPOINT"
      ],
      "type": "string"
    },
    "EndpointsPrivate": {
      "description": "Message for private endpoint to securely connect to the cluster.",
      "properties": {
        "aws": {
          "allOf": [
            {
              "$ref": "#/definitions/PrivateAWS"
            }
          ],
          "readOnly": true
        },
        "gcp": {
          "allOf": [
            {
              "$ref": "#/definitions/PrivateGCP"
            }
          ],
          "readOnly": true
        },
        "host": {
          "description": "Output_only. The hostname of the private endpoint.",
          "readOnly": true,
          "type": "string"
        },
        "port": {
          "description": "Output_only. The port of the private endpoint.",
          "format": "int32",
          "readOnly": true,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "EndpointsPublic": {
      "description": "Message for public endpoint to connect to the cluster.",
      "properties": {
        "disabled": {
          "description": "Optional. Whether the public endpoint is disabled.",
          "type": "boolean"
        },
        "host": {
          "description": "Output_only. The hostname of the public endpoint.",
          "readOnly": true,
          "type": "string"
        },
        "port": {
          "description": "Output_only. The port of the public endpoint.",
          "format": "int32",
          "readOnly": true,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "PrivateAWS": {
      "description": "Message for AWS PrivateLink information.",
      "properties": {
        "availabilityZone": {
          "description": "Output_only. The availability zones that the service is available in.",
          "items": {
            "type": "string"
          },
          "readOnly": true,
          "type": "array"
        },
        "serviceName": {
          "description": "Output_only. The AWS service name for private access.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "PrivateGCP": {
      "description": "Message for GCP Private Service information.",
      "properties": {
        "serviceAttachmentName": {
          "description": "Output_only. The target GCP service attachment name for private access.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "bffcluster_managementv1beta1Cluster": {
      "properties": {
        "clusterType": {
          "$ref": "#/definitions/ClusterClusterType"
        },
        "dedicatedCluster": {
          "$ref": "#/definitions/tidb_cloud_open_apidedicatedv1beta1Cluster"
        },
        "serverlessCluster": {
          "$ref": "#/definitions/tidb_cloud_open_apiserverlessv1beta1Cluster"
        }
      },
      "type": "object"
    },
    "bffcluster_managementv1beta1ListClustersResponse": {
      "properties": {
        "clusters": {
          "items": {
            "$ref": "#/definitions/bffcluster_managementv1beta1Cluster",
            "type": "object"
          },
          "type": "array"
        },
        "nextPageToken": {
          "description": "A token, which can be sent as `page_token` to retrieve the next page.\nIf this field is omitted, there are no subsequent pages.",
          "type": "string"
        },
        "totalSize": {
          "description": "The total number of clusters that matched the query.",
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "commonv1beta1ClusterState": {
      "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.",
      "enum": [
        "CREATING",
        "DELETING",
        "ACTIVE",
        "RESTORING",
        "MAINTENANCE",
        "DELETED",
        "INACTIVE",
        "UPGRADING",
        "IMPORTING",
        "MODIFYING",
        "PAUSING",
        "PAUSED",
        "RESUMING"
      ],
      "type": "string"
    },
    "commonv1beta1Region": {
      "description": "A representation of a region for deploying TiDB clusters.",
      "properties": {
        "cloudProvider": {
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1RegionCloudProvider"
            }
          ],
          "description": "The cloud provider for the region.",
          "readOnly": true
        },
        "displayName": {
          "description": "User-friendly display name of the region.",
          "readOnly": true,
          "type": "string"
        },
        "name": {
          "example": "regions/aws-us-west-2",
          "pattern": "^regions/(aws|gcp|azure)-(.+)$",
          "title": "The unique name of the region.\nFormat: regions/{region_id}",
          "type": "string"
        },
        "provider": {
          "description": "Optional provider name for the region.\nOnly used for serverless cluster.\nDeprecated.",
          "readOnly": true,
          "type": "string",
          "x-nullable": true
        },
        "regionId": {
          "description": "Format: {cloud_provider}-{region_code}\nRegion code: us-west-2, asia-east1.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "dedicatedv1beta1ClusterPausePlan": {
      "properties": {
        "pauseType": {
          "$ref": "#/definitions/dedicatedv1beta1ClusterPausePlanType"
        },
        "scheduledResumeTime": {
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        }
      },
      "required": [
        "pauseType"
      ],
      "type": "object"
    },
    "dedicatedv1beta1ClusterPausePlanType": {
      "enum": [
        "NORMAL",
        "DEPRECATE"
      ],
      "title": "- NORMAL: default pause plan\n - DEPRECATE: old pause plan, will be removed",
      "type": "string"
    },
    "dedicatedv1beta1TidbNodeGroup": {
      "properties": {
        "clusterId": {
          "description": "The cluster ID of the TiDB group.\nOptional when creating cluster with the default TiDB group.\nRequired when creating non-default TiDB group.",
          "type": "string"
        },
        "displayName": {
          "description": "The display name of the TiDB group.",
          "type": "string"
        },
        "endpoints": {
          "items": {
            "$ref": "#/definitions/dedicatedv1beta1TidbNodeGroupEndpoint",
            "type": "object"
          },
          "readOnly": true,
          "type": "array"
        },
        "isDefaultGroup": {
          "readOnly": true,
          "type": "boolean"
        },
        "name": {
          "readOnly": true,
          "title": "Format: tidbNodeGroups/{tidb_node_group_id}",
          "type": "string"
        },
        "nodeChangingProgress": {
          "allOf": [
            {
              "$ref": "#/definitions/ClusterNodeChangingProgress"
            }
          ],
          "readOnly": true
        },
        "nodeCount": {
          "description": "The number of TiDB nodes in the TiDB group.",
          "format": "int32",
          "type": "integer"
        },
        "nodeSpecDisplayName": {
          "readOnly": true,
          "type": "string"
        },
        "nodeSpecKey": {
          "readOnly": true,
          "type": "string"
        },
        "state": {
          "allOf": [
            {
              "$ref": "#/definitions/dedicatedv1beta1TidbNodeGroupState"
            }
          ],
          "readOnly": true
        },
        "tidbNodeGroupId": {
          "description": "The unique ID of the TiDB group.",
          "readOnly": true,
          "type": "string"
        }
      },
      "required": [
        "nodeCount"
      ],
      "type": "object"
    },
    "dedicatedv1beta1TidbNodeGroupEndpoint": {
      "properties": {
        "connectionType": {
          "allOf": [
            {
              "$ref": "#/definitions/EndpointConnectionType"
            }
          ],
          "readOnly": true
        },
        "host": {
          "description": "When endpoint's type is `PRIVATE_ENDPOINT`, the `host` field behave differently across cloud providers:\nFor AWS clusters, the `host` field is available right after the private link service is ready.\nFor GCP and Azure clusters, the `host` field is available after the user creates a `PrivateEndpointConnection`.",
          "readOnly": true,
          "type": "string"
        },
        "port": {
          "format": "int32",
          "readOnly": true,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "dedicatedv1beta1TidbNodeGroupState": {
      "description": " - ACTIVE: All nodes are ready.\n - MODIFYING: When TiDB group is modifying.\n - PAUSED: When cluster is paused.",
      "enum": [
        "ACTIVE",
        "MODIFYING",
        "PAUSED"
      ],
      "type": "string"
    },
    "googlerpcStatus": {
      "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).",
      "properties": {
        "code": {
          "description": "The status code, which should be an enum value of\n[google.rpc.Code][google.rpc.Code].",
          "format": "int32",
          "type": "integer"
        },
        "details": {
          "description": "A list of messages that carry the error details.  There is a common set of\nmessage types for APIs to use.",
          "items": {
            "$ref": "#/definitions/protobufAny",
            "type": "object"
          },
          "type": "array"
        },
        "message": {
          "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.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "protobufAny": {
      "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    }",
      "properties": {
        "@type": {
          "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.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "tidb_cloud_open_apidedicatedv1beta1Cluster": {
      "description": "Cluster represents a dedicated TiDB cluster.",
      "properties": {
        "annotations": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "OUTPUT_ONLY. The annotations for the cluster.\ntidb.cloud/has-set-password. The annotation for whether the cluster has set password.\ntidb.cloud/available-features. The annotation for the available features of the cluster.",
          "readOnly": true,
          "type": "object"
        },
        "cloudProvider": {
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1RegionCloudProvider"
            }
          ],
          "readOnly": true
        },
        "clusterId": {
          "description": "The unique ID of the cluster.",
          "readOnly": true,
          "type": "string"
        },
        "createTime": {
          "description": "Timestamp when the cluster was created.",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "createdBy": {
          "description": "The email address or public api key of the creator of the cluster.",
          "readOnly": true,
          "type": "string"
        },
        "displayName": {
          "description": "The display name of the cluster.",
          "example": "foo-bar",
          "maxLength": 64,
          "minLength": 4,
          "pattern": "^[A-Za-z0-9][-A-Za-z0-9]{2,62}[A-Za-z0-9]$",
          "type": "string"
        },
        "labels": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "The labels of the cluster.\nIf there is no \"project_id\" in labels, resource should be in the default project of the creator's organization.",
          "type": "object"
        },
        "name": {
          "readOnly": true,
          "title": "The name of TiDB cluster resource.\nFormat: clusters/{cluster_id}",
          "type": "string"
        },
        "pausePlan": {
          "allOf": [
            {
              "$ref": "#/definitions/dedicatedv1beta1ClusterPausePlan"
            }
          ],
          "description": "Pause plan of the cluster.",
          "readOnly": true
        },
        "port": {
          "description": "The port of the cluster. This port applies to all network endpoints of the cluster.",
          "format": "int32",
          "type": "integer"
        },
        "regionDisplayName": {
          "readOnly": true,
          "type": "string"
        },
        "regionId": {
          "title": "Required. Region where the cluster will be created.\nFormat: {cloud_provider}-{region_code}",
          "type": "string"
        },
        "rootPassword": {
          "example": "my-shining-password",
          "maxLength": 64,
          "minLength": 8,
          "pattern": "^.{8,64}$",
          "type": "string"
        },
        "state": {
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1ClusterState"
            }
          ],
          "description": "The current state of the cluster.",
          "readOnly": true
        },
        "tidbNodeSetting": {
          "$ref": "#/definitions/v1beta1ClusterTidbNodeSetting"
        },
        "tiflashNodeSetting": {
          "$ref": "#/definitions/v1beta1ClusterStorageNodeSetting"
        },
        "tikvNodeSetting": {
          "$ref": "#/definitions/v1beta1ClusterStorageNodeSetting"
        },
        "updateTime": {
          "description": "Timestamp when the cluster was last updated.",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "version": {
          "description": "The TiDB version of the cluster.",
          "readOnly": true,
          "type": "string"
        }
      },
      "required": [
        "displayName",
        "regionId",
        "tidbNodeSetting",
        "tikvNodeSetting",
        "port"
      ],
      "type": "object"
    },
    "tidb_cloud_open_apiserverlessv1beta1Cluster": {
      "description": "Message for a serverless TiDB cluster resource.",
      "properties": {
        "annotations": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "OUTPUT_ONLY. The annotations for the cluster.\ntidb.cloud/has-set-password. The annotation for whether the cluster has set password.\ntidb.cloud/available-features. The annotation for the available features of the cluster.",
          "readOnly": true,
          "type": "object"
        },
        "automatedBackupPolicy": {
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1ClusterAutomatedBackupPolicy"
            }
          ],
          "description": "Optional. Automated backup policy to set on the cluster."
        },
        "clusterId": {
          "description": "Output_only. The unique ID of the cluster.",
          "readOnly": true,
          "type": "string"
        },
        "createTime": {
          "description": "Output_only. Timestamp when the cluster was created.",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "createdBy": {
          "description": "Output_only. The email of the creator of the cluster.",
          "readOnly": true,
          "type": "string"
        },
        "displayName": {
          "description": "Required. User friendly display name of the cluster.",
          "type": "string"
        },
        "encryptionConfig": {
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1ClusterEncryptionConfig"
            }
          ],
          "description": "Optional. Encryption settings for the cluster."
        },
        "endpoints": {
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1ClusterEndpoints"
            }
          ],
          "description": "Optional. The endpoints for connecting to the cluster."
        },
        "labels": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Optional. The labels for the cluster.\ntidb.cloud/organization. The label for the cluster organization id.\ntidb.cloud/project. The label for the cluster project id.",
          "type": "object"
        },
        "name": {
          "description": "Output_only. The unique name of the cluster.",
          "readOnly": true,
          "type": "string"
        },
        "region": {
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1Region"
            }
          ],
          "description": "Required. Region where the cluster will be created."
        },
        "rootPassword": {
          "example": "my-shining-password",
          "maxLength": 64,
          "minLength": 8,
          "pattern": "^.{8,64}$",
          "type": "string"
        },
        "spendingLimit": {
          "allOf": [
            {
              "$ref": "#/definitions/ClusterSpendingLimit"
            }
          ],
          "description": "Optional. The spending limit for the cluster."
        },
        "state": {
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1ClusterState"
            }
          ],
          "description": "Output_only. The current state of the cluster.",
          "readOnly": true
        },
        "updateTime": {
          "description": "Output_only. Timestamp when the cluster was last updated.",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "usage": {
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1ClusterUsage"
            }
          ],
          "description": "Output_only. Usage details of the cluster.",
          "readOnly": true
        },
        "userPrefix": {
          "description": "Output_only. The unique prefix in SQL user name.",
          "readOnly": true,
          "type": "string"
        },
        "version": {
          "description": "Output_only. The TiDB version of the cluster.",
          "readOnly": true,
          "type": "string"
        }
      },
      "required": [
        "displayName",
        "region"
      ],
      "type": "object"
    },
    "v1beta1AdvancedModifyDedicatedClusterRequestCluster": {
      "properties": {
        "clusterId": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "tidbNodeSetting": {
          "$ref": "#/definitions/v1beta1AdvancedModifyDedicatedClusterRequestTidbNodeSetting"
        },
        "tiflashNodeSetting": {
          "$ref": "#/definitions/v1beta1UpdateClusterRequestStorageNodeSetting"
        },
        "tikvNodeSetting": {
          "$ref": "#/definitions/v1beta1UpdateClusterRequestStorageNodeSetting"
        }
      },
      "required": [
        "clusterId"
      ],
      "type": "object"
    },
    "v1beta1AdvancedModifyDedicatedClusterRequestTidbNodeSetting": {
      "properties": {
        "createTidbNodeGroups": {
          "items": {
            "$ref": "#/definitions/AdvancedModifyDedicatedClusterRequestTidbNodeGroupCreate",
            "type": "object"
          },
          "type": "array"
        },
        "deleteTidbNodeGroupIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "nodeSpecKey": {
          "type": "string"
        },
        "updateTidbNodeGroups": {
          "items": {
            "$ref": "#/definitions/AdvancedModifyDedicatedClusterRequestTidbNodeGroupUpdate",
            "type": "object"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "v1beta1ClusterAutomatedBackupPolicy": {
      "description": "Message for automated backup configuration for a cluster.",
      "properties": {
        "retentionDays": {
          "description": "Optional. Number of days to retain automated backups.",
          "format": "int32",
          "type": "integer"
        },
        "startTime": {
          "description": "Optional. Cron expression for when automated backups should start.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "v1beta1ClusterEncryptionConfig": {
      "description": "Message for encryption settings for a cluster.",
      "properties": {
        "enhancedEncryptionEnabled": {
          "description": "Optional. Whether enhanced encryption for cluster data is enabled.",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "v1beta1ClusterEndpoints": {
      "description": "Message for endpoint information for connecting to a cluster.",
      "properties": {
        "private": {
          "allOf": [
            {
              "$ref": "#/definitions/EndpointsPrivate"
            }
          ],
          "description": "Output_only. Private endpoint to securely connect to the cluster.",
          "readOnly": true
        },
        "public": {
          "allOf": [
            {
              "$ref": "#/definitions/EndpointsPublic"
            }
          ],
          "description": "Optional. Public endpoint to connect to the cluster."
        }
      },
      "type": "object"
    },
    "v1beta1ClusterStorageNodeSetting": {
      "properties": {
        "nodeChangingProgress": {
          "allOf": [
            {
              "$ref": "#/definitions/ClusterNodeChangingProgress"
            }
          ],
          "readOnly": true
        },
        "nodeCount": {
          "format": "int32",
          "type": "integer"
        },
        "nodeSpecDisplayName": {
          "readOnly": true,
          "title": "output only",
          "type": "string"
        },
        "nodeSpecKey": {
          "type": "string"
        },
        "storageSizeGi": {
          "format": "int32",
          "type": "integer"
        },
        "storageType": {
          "$ref": "#/definitions/ClusterStorageNodeSettingStorageType"
        }
      },
      "required": [
        "nodeCount",
        "nodeSpecKey",
        "storageSizeGi",
        "storageType"
      ],
      "type": "object"
    },
    "v1beta1ClusterTidbNodeSetting": {
      "properties": {
        "nodeSpecDisplayName": {
          "readOnly": true,
          "type": "string"
        },
        "nodeSpecKey": {
          "type": "string"
        },
        "tidbNodeGroups": {
          "description": "When creating a cluster, the length of the `tidb_node_groups` should be 1\nand the `node_count` field of `TidbNodeGroup` should be set.",
          "items": {
            "$ref": "#/definitions/dedicatedv1beta1TidbNodeGroup",
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "nodeSpecKey",
        "tidbNodeGroups"
      ],
      "type": "object"
    },
    "v1beta1ClusterUsage": {
      "description": "Message for usage statistics of a cluster.",
      "properties": {
        "columnarStorage": {
          "description": "Output_only. The storage used on column-based storage in bytes.",
          "format": "double",
          "readOnly": true,
          "type": "number"
        },
        "requestUnit": {
          "description": "Output_only. The Request Units used in this month.",
          "format": "int64",
          "readOnly": true,
          "type": "string"
        },
        "rowBasedStorage": {
          "description": "Output_only. The storage used on row-based storage in bytes.",
          "format": "double",
          "readOnly": true,
          "type": "number"
        }
      },
      "type": "object"
    },
    "v1beta1RegionCloudProvider": {
      "description": "Enum of cloud provider names.\n\n - aws: Amazon Web Services.\nbuf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE\n - gcp: Google Cloud Platform.\nbuf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE\n - azure: Microsoft Azure.\nbuf:lint:ignore ENUM_VALUE_UPPER_SNAKE_CASE",
      "enum": [
        "aws",
        "gcp",
        "azure"
      ],
      "type": "string"
    },
    "v1beta1UpdateClusterRequestStorageNodeSetting": {
      "properties": {
        "nodeCount": {
          "description": "When update TiFlash node setting:\n  - If the node count is set to 0, the TiFlash node will be removed.\n  - If the node count is null, the TiFlash node count won't change.\nFor other components, if the node count is set to 0, server will ignore the node count.",
          "format": "int32",
          "type": "integer",
          "x-nullable": true
        },
        "nodeSpecKey": {
          "type": "string"
        },
        "storageSizeGi": {
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object"
    }
  }
}