{
  "swagger": "2.0",
  "info": {
    "title": "TiDB Cloud Premium API",
    "description": "TiDB Cloud Premium API",
    "version": "v1beta2"
  },
  "tags": [
    {
      "name": "RegionService"
    }
  ],
  "host": "cloud.tidbapi.com",
  "basePath": "/v1beta2",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/regions": {
      "get": {
        "summary": "List regions",
        "description": "Lists the regions where you can create a TiDB Cloud Premium instance. You can filter results by cloud provider or service plan.",
        "operationId": "RegionService_ListRegions",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/tidb_cloud_open_apinextgenv1beta2ListRegionsResponse"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "cloudProvider",
            "description": "The cloud provider. If specified, only regions belonging to the specified cloud provider are returned.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "servicePlan",
            "description": "The plan of the service. If specified, only regions that support the specified service plan are returned.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "Starter",
              "Essential",
              "Premium",
              "BYOC",
              "Dedicated",
              "Premium_Reserved",
              "Essential_V2"
            ]
          },
          {
            "name": "pageSize",
            "description": "The maximum number of regions to return. If not specified, at most 10 regions will be returned. The maximum value is `100`. Values greater than `100` are set to `100`.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32",
            "default": "10"
          },
          {
            "name": "pageToken",
            "description": "The pagination token received from a previous [List regions](#tag/Region/operation/RegionService_ListRegions) request. Use this token to retrieve the next page of results.\n\n**Note**: When paginating, all other parameters must match the original request.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "skip",
            "description": "The number of regions to skip before returning results. If the value exceeds the total number of regions, the response is `200` with an empty list and no `nextPageToken`.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          }
        ],
        "tags": [
          "public",
          "Region"
        ],
        "x-code-samples": [
          {
            "label": "curl",
            "lang": "curl",
            "source": "curl --location 'https://cloud.tidbapi.com/v1beta2/regions' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Accept: application/json'"
          }
        ]
      }
    },
    "/regions:listCloudProviders": {
      "get": {
        "summary": "List cloud providers",
        "description": "Lists all available cloud providers for a given service plan.",
        "operationId": "RegionService_ListCloudProviders",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/tidb_cloud_open_apinextgenv1beta2ListCloudProvidersResponse"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "servicePlan",
            "description": "If specified, only cloud providers of the specified region will be returned.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "Starter",
              "Essential",
              "Premium",
              "BYOC",
              "Dedicated",
              "Premium_Reserved",
              "Essential_V2"
            ]
          },
          {
            "name": "pageSize",
            "description": "The maximum number of cloud providers to return. The service may return fewer than this value.\nIf unspecified, at most X cloud providers 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 `ListCloudProviders` call.\nProvide this to retrieve the subsequent page.\n\nWhen paginating, all other parameters provided to `ListCloudProviders` must match\nthe call that provided the page token.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "RegionService"
        ]
      }
    },
    "/opsAuditLogSettings": {
      "get": {
        "summary": "List ops audit log settings",
        "description": "Lists the operational audit log settings for all regions. You can filter results by cloud provider, service plan, or region.",
        "operationId": "RegionService_ListOpsAuditLogSettings",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2ListOpsAuditLogSettingsResponse"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "cloudProvider",
            "description": "If specified, only regions of the specified cloud provider will be returned.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "servicePlan",
            "description": "If specified, only regions that support the specified service plan will be returned.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "Starter",
              "Essential",
              "Premium",
              "BYOC",
              "Dedicated",
              "Premium_Reserved",
              "Essential_V2"
            ]
          },
          {
            "name": "regionId",
            "description": "If specified, only the region with the specified region ID will be returned.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "status",
            "description": "If specified, only regions with ops audit log enabled or disabled will be returned.",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "boolean"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "pageSize",
            "description": "The maximum number of regions to return. The service may return fewer than this value.\nIf unspecified, at most X regions 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 `ListRegions` call.\nProvide this to retrieve the subsequent page.\n\nWhen paginating, all other parameters provided to `ListRegions` 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"
          }
        ],
        "tags": [
          "RegionService"
        ]
      }
    },
    "/regions:listCapacities": {
      "get": {
        "summary": "List region capacities",
        "description": "Lists the resource capacities for all regions. Currently only supports BYOC service plan.",
        "operationId": "RegionService_ListRegionCapacities",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/nextgenv1beta2ListRegionCapacitiesResponse"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "cloudProvider",
            "description": "If specified, only regions of the specified cloud provider will be returned.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "servicePlan",
            "description": "Only BYOC is supported for now.",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "Starter",
              "Essential",
              "Premium",
              "BYOC",
              "Dedicated",
              "Premium_Reserved",
              "Essential_V2"
            ]
          },
          {
            "name": "usage.startTime",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "usage.endTime",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "pageSize",
            "description": "The maximum number of regions to return. The service may return fewer than this value.\nIf unspecified, at most X regions 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 `ListRegions` call.\nProvide this to retrieve the subsequent page.\n\nWhen paginating, all other parameters provided to `ListRegions` 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"
          }
        ],
        "tags": [
          "RegionService"
        ]
      }
    },
    "/byocVcpuPools": {
      "get": {
        "summary": "List BYOC vCPU pools",
        "description": "Lists the BYOC resource pool inventory grouped by cloud provider and region for the current organization.",
        "operationId": "RegionService_ListByocVcpuPools",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/nextgenv1beta2ListByocVcpuPoolsResponse"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "cloudProvider",
            "description": "If specified, only pools of the specified cloud provider will be returned.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "regionId",
            "description": "If specified, only pools of the specified region will be returned.\nFormat: {cloud_provider}-{region_code}. For example, aws-us-west-2.",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "RegionService"
        ]
      }
    },
    "/byocVcpuPools/{resourcePoolId}": {
      "patch": {
        "summary": "Update BYOC vCPU pool limit",
        "description": "Updates the vCPU limit of a BYOC resource pool for the current organization.",
        "operationId": "RegionService_UpdateByocVcpuPool",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2ByocVcpuPool"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "resourcePoolId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "byocVcpuPool",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1beta2ByocVcpuPool"
            }
          }
        ],
        "tags": [
          "RegionService"
        ]
      }
    },
    "/byocVcpuPools/{resourcePoolId}/sharedComponentScaleConstraints": {
      "get": {
        "summary": "Get BYOC shared component scale constraints",
        "description": "Returns the current shared component scale constraints and usage preview for a BYOC resource pool in the current organization.",
        "operationId": "RegionService_GetByocSharedComponentScaleConstraints",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleConstraints"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "resourcePoolId",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "RegionService"
        ]
      }
    },
    "/byocVcpuPools/{resourcePoolId}:scaleByocSharedComponents": {
      "post": {
        "summary": "Scale BYOC shared components",
        "description": "Validates or submits a BYOC shared component scale plan for a BYOC resource pool in the current organization.",
        "operationId": "RegionService_ScaleByocSharedComponents",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/nextgenv1beta2ScaleByocSharedComponentsResponse"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "resourcePoolId",
            "description": "Scales existing shared components under the selected BYOC resource pool.\nThis API does not create a brand-new shared component when the shared pool\ndoes not already contain the corresponding component.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/nextgenv1beta2RegionServiceScaleByocSharedComponentsBody"
            }
          }
        ],
        "tags": [
          "RegionService"
        ]
      }
    },
    "/regions/{regionId}/nodeSpecs": {
      "get": {
        "summary": "List node specifications",
        "description": "Lists the TiKV or TiFlash node specifications available when creating a BYOC resource pool in a region.",
        "operationId": "RegionService_ListNodeSpecs",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/nextgenv1beta2ListNodeSpecsResponse"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "regionId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "organizationId",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "componentType",
            "in": "query",
            "required": true,
            "type": "string",
            "enum": [
              "NODE_SPEC_COMPONENT_TYPE_TIKV",
              "NODE_SPEC_COMPONENT_TYPE_TIFLASH"
            ]
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pageToken",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "Region"
        ],
        "x-code-samples": [
          {
            "label": "curl",
            "lang": "curl",
            "source": "curl --location 'https://cloud.tidbapi.com/v1beta2/regions/aws-us-west-2/nodeSpecs?organizationId=73127\u0026componentType=NODE_SPEC_COMPONENT_TYPE_TIKV\u0026pageSize=20' \\\n--digest --user 'YOUR_PUBLIC_KEY:YOUR_PRIVATE_KEY' \\\n--header 'Accept: application/json'"
          }
        ]
      }
    },
    "/regions/{regionId}:planResourcePoolCidr": {
      "get": {
        "summary": "Plan a resource pool CIDR",
        "description": "Returns current CIDR restrictions, excluded CIDRs, and a recommendation for the authenticated organization and selected region.",
        "operationId": "RegionService_PlanResourcePoolCidr",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/nextgenv1beta2PlanResourcePoolCidrResponse"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "regionId",
            "description": "The logical region in which the resource pool will be created.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "highAvailabilityType",
            "description": "The intended availability scope. If unspecified, the default is REGIONAL.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "REGIONAL",
              "ZONAL"
            ]
          }
        ],
        "tags": [
          "Region"
        ]
      }
    },
    "/regions/{regionId}:validateResourcePoolCidr": {
      "post": {
        "summary": "Validate a resource pool CIDR",
        "description": "Validates a customer-supplied CIDR and returns its aggregate dataplane node capacity and blocking findings.",
        "operationId": "RegionService_ValidateResourcePoolCidr",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/nextgenv1beta2ValidateResourcePoolCidrResponse"
            }
          },
          "400": {
            "description": "A request field is invalid.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "401": {
            "description": "The API key cannot be authenticated.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "403": {
            "description": "The API key does not have permission to access the resource.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "429": {
            "description": "You have exceeded the rate limit.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "regionId",
            "description": "The logical region in which the resource pool will be created.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/nextgenv1beta2RegionServiceValidateResourcePoolCidrBody"
            }
          }
        ],
        "tags": [
          "Region"
        ]
      }
    }
  },
  "definitions": {
    "ByocVcpuPoolTidbInstancesState": {
      "type": "object",
      "properties": {
        "active": {
          "type": "integer",
          "format": "int32",
          "readOnly": true
        },
        "modifying": {
          "type": "integer",
          "format": "int32",
          "readOnly": true
        },
        "creating": {
          "type": "integer",
          "format": "int32",
          "readOnly": true
        },
        "deleting": {
          "type": "integer",
          "format": "int32",
          "readOnly": true
        }
      }
    },
    "ListCloudProvidersResponseCloudProviderPlan": {
      "type": "object",
      "properties": {
        "cloudProvider": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1RegionCloudProvider"
            }
          ]
        },
        "servicePlans": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/commonv1beta1ServicePlan"
          },
          "readOnly": true
        },
        "supportedServicePlans": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1beta1ServicePlanInfo"
          },
          "readOnly": true
        }
      }
    },
    "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"
      ]
    },
    "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)."
    },
    "nextgenv1beta2ByocSharedComponentScaleConstraint": {
      "type": "object",
      "properties": {
        "componentType": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentType"
            }
          ]
        },
        "componentId": {
          "type": "string",
          "readOnly": true
        },
        "exists": {
          "type": "boolean",
          "readOnly": true
        },
        "phase": {
          "type": "string",
          "readOnly": true
        },
        "current": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleTarget"
            }
          ]
        },
        "blockingReasons": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleConstraintReason"
          },
          "readOnly": true
        },
        "nodeCountConstraints": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleNodeCountConstraints"
            }
          ]
        },
        "nodeSpecConstraints": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleNodeSpecConstraints"
            }
          ]
        }
      }
    },
    "nextgenv1beta2ByocSharedComponentScaleConstraintReason": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "readOnly": true
        },
        "message": {
          "type": "string",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ByocSharedComponentScaleConstraints": {
      "type": "object",
      "properties": {
        "resourcePoolId": {
          "type": "string",
          "readOnly": true
        },
        "vcpusLimit": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "preview": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScalePreviewSummary"
            }
          ]
        },
        "components": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleConstraint"
          },
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ByocSharedComponentScaleNodeCountConstraints": {
      "type": "object",
      "properties": {
        "current": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "min": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "max": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "rule": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleNodeCountRule"
            }
          ]
        },
        "allowCrossZero": {
          "type": "boolean",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ByocSharedComponentScaleNodeCountRule": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "readOnly": true
        },
        "value": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ByocSharedComponentScaleNodeSpecCandidate": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "readOnly": true
        },
        "cpu": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "memoryGi": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "available": {
          "type": "boolean",
          "readOnly": true
        },
        "isCurrent": {
          "type": "boolean",
          "readOnly": true
        },
        "reasons": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleConstraintReason"
          },
          "readOnly": true
        },
        "requiredMinSpec": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleRequiredMinSpec"
            }
          ]
        },
        "storageConstraints": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleStorageConstraint"
          },
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ByocSharedComponentScaleNodeSpecConstraints": {
      "type": "object",
      "properties": {
        "current": {
          "type": "string",
          "readOnly": true
        },
        "candidates": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleNodeSpecCandidate"
          },
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ByocSharedComponentScalePlanComponent": {
      "type": "object",
      "properties": {
        "componentType": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentType"
            }
          ]
        },
        "componentId": {
          "type": "string",
          "readOnly": true
        },
        "current": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleTarget"
            }
          ]
        },
        "target": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleTarget"
            }
          ]
        },
        "allowed": {
          "type": "boolean",
          "readOnly": true
        },
        "blockingReasons": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ByocSharedComponentScalePreviewSummary": {
      "type": "object",
      "properties": {
        "currentVcpusUsed": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "scalingVcpusUsed": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "maxVcpusLimit": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "allowed": {
          "type": "boolean",
          "readOnly": true
        },
        "blockingReasons": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ByocSharedComponentScaleRequiredMinSpec": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "readOnly": true
        },
        "cpu": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "memoryGi": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ByocSharedComponentScaleStorageConstraint": {
      "type": "object",
      "properties": {
        "storageName": {
          "type": "string",
          "readOnly": true
        },
        "resizable": {
          "type": "boolean",
          "readOnly": true
        },
        "currentSizeGi": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "maxSizeGi": {
          "type": "string",
          "format": "int64",
          "x-nullable": true,
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ByocSharedComponentScaleTarget": {
      "type": "object",
      "properties": {
        "nodeCount": {
          "type": "string",
          "format": "int64",
          "x-nullable": true
        },
        "cpu": {
          "type": "string",
          "format": "int64",
          "x-nullable": true
        },
        "memoryGi": {
          "type": "string",
          "format": "int64",
          "x-nullable": true
        },
        "storages": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentStorage"
          }
        }
      }
    },
    "nextgenv1beta2ByocSharedComponentStorage": {
      "type": "object",
      "properties": {
        "storageName": {
          "type": "string"
        },
        "sizeGi": {
          "type": "string",
          "format": "int64",
          "x-nullable": true
        }
      },
      "required": [
        "storageName"
      ]
    },
    "nextgenv1beta2ByocSharedComponentType": {
      "type": "string",
      "enum": [
        "BYOC_SHARED_COMPONENT_TYPE_TIKV",
        "BYOC_SHARED_COMPONENT_TYPE_TIFLASH_WRITE",
        "BYOC_SHARED_COMPONENT_TYPE_TIFLASH_COMPUTE"
      ]
    },
    "nextgenv1beta2ListByocVcpuPoolsResponse": {
      "type": "object",
      "properties": {
        "groups": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/nextgenv1beta2ListByocVcpuPoolsResponseGroup"
          }
        }
      }
    },
    "nextgenv1beta2ListByocVcpuPoolsResponseGroup": {
      "type": "object",
      "properties": {
        "region": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1Region"
            }
          ]
        },
        "totalVcpusLimit": {
          "type": "string",
          "format": "int64",
          "description": "The sum of vcpus_limit across all active organization-owned BYOC pools\nin the group, regardless of whether dataplane_id is empty.",
          "readOnly": true
        },
        "pools": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1beta2ByocVcpuPool"
          },
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ListNodeSpecsResponse": {
      "type": "object",
      "properties": {
        "nodeSpecs": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/nextgenv1beta2NodeSpec"
          }
        },
        "nodeCountOptions": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2NodeCountOptions"
            }
          ]
        },
        "totalSize": {
          "type": "integer",
          "format": "int32"
        },
        "nextPageToken": {
          "type": "string"
        }
      }
    },
    "nextgenv1beta2ListRegionCapacitiesRequestUsageRequest": {
      "type": "object",
      "properties": {
        "startTime": {
          "type": "string",
          "format": "date-time"
        },
        "endTime": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "startTime",
        "endTime"
      ]
    },
    "nextgenv1beta2ListRegionCapacitiesResponse": {
      "type": "object",
      "properties": {
        "capacities": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/nextgenv1beta2ListRegionCapacitiesResponseRegionCapacity"
          },
          "description": "The list of ops audit log settings."
        },
        "totalSize": {
          "type": "integer",
          "format": "int32",
          "description": "The total number of regions that match the query."
        },
        "nextPageToken": {
          "type": "string",
          "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."
        }
      }
    },
    "nextgenv1beta2ListRegionCapacitiesResponseRegionCapacity": {
      "type": "object",
      "properties": {
        "region": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1Region"
            }
          ]
        },
        "totalVcpusLimit": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "usedVcpus": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "historyUsages": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/nextgenv1beta2ListRegionCapacitiesResponseUsageMetrics"
          },
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ListRegionCapacitiesResponseUsageMetrics": {
      "type": "object",
      "properties": {
        "metricsTime": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "usedVcpus": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2NodeCountOptions": {
      "type": "object",
      "properties": {
        "defaultNodeCount": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "minNodeCount": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "maxNodeCount": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "rule": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2NodeCountRule"
            }
          ]
        }
      }
    },
    "nextgenv1beta2NodeCountRule": {
      "type": "object",
      "properties": {
        "type": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2NodeCountRuleType"
            }
          ]
        },
        "value": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2NodeCountRuleType": {
      "type": "string",
      "enum": [
        "NODE_COUNT_RULE_TYPE_NONE",
        "NODE_COUNT_RULE_TYPE_MULTIPLE_OF",
        "NODE_COUNT_RULE_TYPE_FIXED"
      ]
    },
    "nextgenv1beta2NodeSpec": {
      "type": "object",
      "properties": {
        "nodeSpecKey": {
          "type": "string",
          "readOnly": true
        },
        "displayName": {
          "type": "string",
          "readOnly": true
        },
        "componentType": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2NodeSpecComponentType"
            }
          ]
        },
        "cpu": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "memoryGi": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "isDefault": {
          "type": "boolean",
          "readOnly": true
        },
        "storages": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/nextgenv1beta2NodeSpecStorage"
          },
          "description": "Customer-configurable data storage. Service-managed storage is not returned.",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2NodeSpecComponentType": {
      "type": "string",
      "enum": [
        "NODE_SPEC_COMPONENT_TYPE_TIKV",
        "NODE_SPEC_COMPONENT_TYPE_TIFLASH"
      ]
    },
    "nextgenv1beta2NodeSpecStorage": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The storage name. Only `data` is returned.",
          "readOnly": true
        },
        "defaultSizeGi": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "minSizeGi": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "maxSizeGi": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "resizable": {
          "type": "boolean",
          "x-nullable": true,
          "readOnly": true
        },
        "currentSizeGi": {
          "type": "string",
          "format": "int64",
          "x-nullable": true,
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2PlanResourcePoolCidrResponse": {
      "type": "object",
      "properties": {
        "regionId": {
          "type": "string",
          "description": "The selected logical region.",
          "readOnly": true
        },
        "cloudProvider": {
          "description": "The cloud provider of the selected region.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1RegionCloudProvider"
            }
          ]
        },
        "policy": {
          "description": "The effective CIDR policy for the selected provider and region.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ResourcePoolCidrPolicy"
            }
          ]
        },
        "exclusions": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/nextgenv1beta2ResourcePoolCidrExclusion"
          },
          "description": "CIDRs excluded from recommendation and create.",
          "readOnly": true
        },
        "recommendationStatus": {
          "description": "The result of the recommendation search.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2PlanResourcePoolCidrResponseRecommendationStatus"
            }
          ]
        },
        "recommendation": {
          "description": "The recommended CIDR and its derived node capacity. Present only when recommendation_status is AVAILABLE.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ResourcePoolCidrRecommendation"
            }
          ]
        }
      }
    },
    "nextgenv1beta2PlanResourcePoolCidrResponseRecommendationStatus": {
      "type": "string",
      "enum": [
        "AVAILABLE",
        "EXHAUSTED"
      ]
    },
    "nextgenv1beta2RegionServiceScaleByocSharedComponentsBody": {
      "type": "object",
      "properties": {
        "tikv": {
          "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleTarget"
        },
        "tiflashWrite": {
          "description": "Requests may also update the component spec or storage while node_count\nremains 0, as long as the shared pool already contains a TiFlash Write\ncomponent whose current node_count is 0.",
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleTarget"
            }
          ]
        },
        "tiflashCompute": {
          "description": "Requests may also update the component spec or storage while node_count\nremains 0, as long as the shared pool already contains a TiFlash Compute\ncomponent whose current node_count is 0.",
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScaleTarget"
            }
          ]
        },
        "validateOnly": {
          "type": "boolean"
        }
      }
    },
    "nextgenv1beta2RegionServiceValidateResourcePoolCidrBody": {
      "type": "object",
      "properties": {
        "cidr": {
          "type": "string",
          "description": "The CIDR to validate."
        },
        "highAvailabilityType": {
          "description": "The intended availability scope. If unspecified, the default is REGIONAL.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2ByocVcpuPoolHighAvailabilityType"
            }
          ]
        }
      },
      "required": [
        "cidr"
      ]
    },
    "nextgenv1beta2ResourcePoolCidrExclusion": {
      "type": "object",
      "properties": {
        "type": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ResourcePoolCidrExclusionType"
            }
          ]
        },
        "cidr": {
          "type": "string",
          "readOnly": true
        },
        "resourcePoolId": {
          "type": "string",
          "x-nullable": true,
          "description": "Present only for RESOURCE_POOL.",
          "readOnly": true
        },
        "resourcePoolDisplayName": {
          "type": "string",
          "x-nullable": true,
          "description": "Present only for RESOURCE_POOL.",
          "readOnly": true
        },
        "regionId": {
          "type": "string",
          "x-nullable": true,
          "description": "Present only for RESOURCE_POOL.",
          "readOnly": true
        },
        "cloudProvider": {
          "description": "Present only for RESOURCE_POOL.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1RegionCloudProvider"
            }
          ]
        }
      }
    },
    "nextgenv1beta2ResourcePoolCidrExclusionType": {
      "type": "string",
      "enum": [
        "RESOURCE_POOL",
        "O11Y_CLUSTER",
        "TIDB_CLOUD_RESERVED"
      ]
    },
    "nextgenv1beta2ResourcePoolCidrPolicy": {
      "type": "object",
      "properties": {
        "supportedPrivateCidrs": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Private IPv4 ranges accepted by common validation.",
          "readOnly": true
        },
        "allowedPrefixRanges": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/nextgenv1beta2ResourcePoolCidrPrefixRange"
          },
          "description": "Inclusive provider-specific prefix guidance. An empty list advertises no additional client-side restriction.",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ResourcePoolCidrPrefixRange": {
      "type": "object",
      "properties": {
        "minPrefixLength": {
          "type": "integer",
          "format": "int32",
          "readOnly": true
        },
        "maxPrefixLength": {
          "type": "integer",
          "format": "int32",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ResourcePoolCidrRecommendation": {
      "type": "object",
      "properties": {
        "cidr": {
          "type": "string",
          "description": "The recommended canonical CIDR.",
          "readOnly": true
        },
        "supportedNodeCount": {
          "type": "string",
          "format": "int64",
          "description": "The maximum aggregate steady-state dataplane node count supported across the resource pool and its TiDB instances.",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ResourcePoolCidrValidationFinding": {
      "type": "object",
      "properties": {
        "code": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ResourcePoolCidrValidationFindingCode"
            }
          ]
        },
        "message": {
          "type": "string",
          "description": "Human-readable fallback text. Clients use code for behavior and localization.",
          "readOnly": true
        },
        "conflictingExclusion": {
          "description": "Present only for an overlap finding.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ResourcePoolCidrExclusion"
            }
          ]
        }
      }
    },
    "nextgenv1beta2ResourcePoolCidrValidationFindingCode": {
      "type": "string",
      "enum": [
        "INVALID_CIDR",
        "CIDR_NOT_PRIVATE",
        "CIDR_PREFIX_UNSUPPORTED",
        "CIDR_OVERLAPS_RESOURCE_POOL",
        "CIDR_OVERLAPS_O11Y",
        "CIDR_OVERLAPS_RESERVED_NETWORK"
      ]
    },
    "nextgenv1beta2ScaleByocSharedComponentsResponse": {
      "type": "object",
      "properties": {
        "preview": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScalePreviewSummary"
            }
          ]
        },
        "components": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/nextgenv1beta2ByocSharedComponentScalePlanComponent"
          },
          "readOnly": true
        },
        "operationId": {
          "type": "string",
          "readOnly": true
        }
      }
    },
    "nextgenv1beta2ValidateResourcePoolCidrResponse": {
      "type": "object",
      "properties": {
        "regionId": {
          "type": "string",
          "description": "The selected logical region.",
          "readOnly": true
        },
        "cloudProvider": {
          "description": "The cloud provider of the selected region.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1RegionCloudProvider"
            }
          ]
        },
        "cidr": {
          "type": "string",
          "description": "The trimmed submitted value. A valid value is canonical.",
          "readOnly": true
        },
        "supportedNodeCount": {
          "type": "string",
          "format": "int64",
          "x-nullable": true,
          "description": "The maximum aggregate steady-state dataplane node count supported across the resource pool and its TiDB instances.\nPresent only when CSNG reports supported=true; independent overlap findings may still be present.",
          "readOnly": true
        },
        "blockingFindings": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/nextgenv1beta2ResourcePoolCidrValidationFinding"
          },
          "description": "All known findings that block resource-pool creation.",
          "readOnly": true
        }
      }
    },
    "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    }"
    },
    "tidb_cloud_open_apinextgenv1beta2ListCloudProvidersResponse": {
      "type": "object",
      "properties": {
        "cloudProviders": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/v1beta1RegionCloudProvider"
          },
          "description": "The list of cloud providers."
        },
        "cloudProviderPlans": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/ListCloudProvidersResponseCloudProviderPlan"
          },
          "description": "The list of cloud providers with supported service plans and display names."
        },
        "totalSize": {
          "type": "integer",
          "format": "int32",
          "description": "The total number of cloud providers that match the query."
        },
        "nextPageToken": {
          "type": "string",
          "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."
        }
      }
    },
    "tidb_cloud_open_apinextgenv1beta2ListRegionsResponse": {
      "type": "object",
      "properties": {
        "regions": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/commonv1beta1Region"
          },
          "description": "A list of regions that match the query."
        },
        "totalSize": {
          "type": "integer",
          "format": "int32",
          "description": "The total number of regions that match the query."
        },
        "nextPageToken": {
          "type": "string",
          "description": "The token to retrieve the next page of results. Use this value as the `pageToken` parameter in the next request. This field is empty when there are no more pages."
        }
      }
    },
    "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"
          }
        }
      }
    },
    "v1beta2ByocVcpuPool": {
      "type": "object",
      "properties": {
        "resourcePoolId": {
          "type": "string",
          "description": "The BYOC resource pool ID as a plain string id.",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "readOnly": true
        },
        "dataplaneId": {
          "type": "string",
          "description": "The control-plane recorded dataplane locator used by clients for O11Y discovery.\nIts presence does not guarantee runtime discovery or metrics query success.",
          "readOnly": true
        },
        "vcpusLimit": {
          "type": "string",
          "format": "int64",
          "x-nullable": true
        },
        "vcpusUsed": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "isDefault": {
          "type": "boolean",
          "description": "Whether this pool is the default BYOC pool for the current organization\nunder the same cloud provider and region.",
          "readOnly": true
        },
        "highAvailabilityType": {
          "description": "Availability scope of the underlying resource pool.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2ByocVcpuPoolHighAvailabilityType"
            }
          ]
        },
        "zoneConfig": {
          "description": "Runtime placement zones reported by dataplane-manager for the resource pool.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2ByocVcpuPoolZoneConfig"
            }
          ]
        },
        "state": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2ByocVcpuPoolState"
            }
          ]
        },
        "tidbInstancesState": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/ByocVcpuPoolTidbInstancesState"
            }
          ]
        }
      }
    },
    "v1beta2ByocVcpuPoolHighAvailabilityType": {
      "type": "string",
      "enum": [
        "REGIONAL",
        "ZONAL"
      ]
    },
    "v1beta2ByocVcpuPoolState": {
      "type": "string",
      "enum": [
        "AVAILABLE",
        "MODIFYING"
      ]
    },
    "v1beta2ByocVcpuPoolZoneConfig": {
      "type": "object",
      "properties": {
        "nodeZones": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Explicit node zones used by the dataplane nodes.",
          "readOnly": true
        }
      }
    },
    "v1beta2ListOpsAuditLogSettingsResponse": {
      "type": "object",
      "properties": {
        "opsAuditLogSettings": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1beta2OpsAuditLogSetting"
          },
          "description": "The list of ops audit log settings."
        },
        "totalSize": {
          "type": "integer",
          "format": "int32",
          "description": "The total number of regions that match the query."
        },
        "nextPageToken": {
          "type": "string",
          "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."
        }
      }
    },
    "v1beta2OpsAuditLogSetting": {
      "type": "object",
      "properties": {
        "region": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/commonv1beta1Region"
            }
          ]
        },
        "enabled": {
          "type": "boolean",
          "readOnly": true
        },
        "logLocation": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2OpsAuditLogSettingLogLocation"
            }
          ]
        },
        "logRotation": {
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2OpsAuditLogSettingLogRotation"
            }
          ]
        }
      }
    },
    "v1beta2OpsAuditLogSettingLogLocation": {
      "type": "object",
      "properties": {
        "bucketUri": {
          "type": "string",
          "readOnly": true
        },
        "roleArn": {
          "type": "string",
          "readOnly": true
        },
        "accountId": {
          "type": "string",
          "readOnly": true
        },
        "externalId": {
          "type": "string",
          "readOnly": true
        }
      }
    },
    "v1beta2OpsAuditLogSettingLogRotation": {
      "type": "object",
      "properties": {
        "fileSizeLimitMb": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        },
        "rotationIntervalMin": {
          "type": "string",
          "format": "int64",
          "readOnly": true
        }
      }
    }
  }
}
