basePath: /api/v1
definitions:
  dedicated.CaCertDownloadUrl:
    properties:
      download_url:
        example: https://tidb-xxx.us-east-1.aws.tidbcloud.com/ca-cert
        type: string
    type: object
  dedicated.CreateDedicatedClusterInstance:
    properties:
      instance_count:
        example: 3
        type: integer
      instance_type:
        example: tidb
        type: string
      node_storage_size_gi:
        example: 0
        type: integer
      node_type:
        example: 4C8G
        type: string
    type: object
  dedicated.CreateDedicatedClusterRequest:
    properties:
      cloud_provider:
        example: aws
        type: string
      cluster_name:
        example: my-cluster
        type: string
      instances:
        items:
          $ref: '#/definitions/dedicated.CreateDedicatedClusterInstance'
        type: array
      region:
        example: us-west-2
        type: string
    type: object
  dedicated.CreateDedicatedClusterResponse:
    properties:
      cluster_id:
        example: "123456"
        type: string
      cluster_name:
        example: my-cluster
        type: string
      created_at:
        example: "2022-03-22T20:23:11.285067Z"
        type: string
      operation:
        $ref: '#/definitions/operation.Operation'
    type: object
  dedicated.DedicatedCloudProvider:
    properties:
      cloud_provider:
        example: aws
        type: string
      description:
        example: Amazon Web Services
        type: string
    type: object
  dedicated.DedicatedCloudProviderNodeType:
    properties:
      cloud_provider:
        example: aws
        type: string
      description:
        example: 2 vCPU, 4 GiB
        type: string
      instance_type:
        example: tidb
        type: string
      node_cpu_num:
        example: 2
        type: integer
      node_max_storage_size_gi:
        example: 0
        type: integer
      node_memory_gi:
        example: 4
        type: integer
      node_min_storage_size_gi:
        example: 0
        type: integer
      node_type:
        example: 2C4G
        type: string
      region:
        example: us-west-2
        type: string
    type: object
  dedicated.DedicatedCloudProviderRegion:
    properties:
      cloud_provider:
        example: aws
        type: string
      description:
        example: US West (Oregon)
        type: string
      region:
        example: us-west-2
        type: string
    type: object
  dedicated.DedicatedCluster:
    properties:
      cloud_provider:
        example: aws
        type: string
      cluster_id:
        example: "123456"
        type: string
      cluster_name:
        example: my-cluster
        type: string
      cluster_version:
        example: v6.5.0
        type: string
      created_at:
        example: "2022-03-22T20:23:11.285067Z"
        type: string
      creator:
        example: me@pingcap.com
        type: string
      has_set_pwd:
        example: true
        type: boolean
      instances:
        items:
          $ref: '#/definitions/dedicated.DedicatedInstance'
        type: array
      region:
        example: us-west-2
        type: string
      status:
        example: AVAILABLE
        type: string
      updated_at:
        example: "2022-03-22T20:23:11.285067Z"
        type: string
    type: object
  dedicated.DedicatedInstance:
    properties:
      instance_count:
        example: 3
        type: integer
      instance_type:
        example: tidb
        type: string
      node_storage_size_gi:
        example: 0
        type: integer
      node_type:
        example: 4C8G
        type: string
    type: object
  dedicated.DeleteDedicatedClusterResponse:
    properties:
      cloud_provider:
        example: aws
        type: string
      cluster_id:
        example: "123456"
        type: string
      cluster_name:
        example: my-cluster
        type: string
      cluster_version:
        example: v6.5.0
        type: string
      created_at:
        example: "2022-03-22T20:13:11.285067Z"
        type: string
      creator:
        example: me@pingcap.com
        type: string
      has_set_pwd:
        example: true
        type: boolean
      instances:
        items:
          $ref: '#/definitions/dedicated.DedicatedInstance'
        type: array
      operation:
        $ref: '#/definitions/operation.Operation'
      region:
        example: us-west-2
        type: string
      status:
        example: DELETING
        type: string
      updated_at:
        example: "2022-03-22T20:23:11.285067Z"
        type: string
    type: object
  dedicated.IPAccessListItem:
    properties:
      cidr:
        example: 0.0.0.0/0
        type: string
      description:
        example: Allow Access from Anywhere.
        type: string
    type: object
  dedicated.IPAccessRule:
    properties:
      cidr:
        type: string
      description:
        type: string
    type: object
  dedicated.PauseDedicatedClusterResponse:
    properties:
      operation:
        $ref: '#/definitions/operation.Operation'
    type: object
  dedicated.PublicAddress:
    properties:
      port:
        example: 4000
        type: integer
      public_address:
        example: tidb-xxx.us-east-1.aws.tidbcloud.com
        type: string
    type: object
  dedicated.ResumeDedicatedClusterResponse:
    properties:
      operation:
        $ref: '#/definitions/operation.Operation'
    type: object
  dedicated.ScaleClusterRequest:
    properties:
      instances:
        items:
          $ref: '#/definitions/dedicated.DedicatedInstance'
        type: array
    type: object
  dedicated.ScaleClusterResponse:
    properties:
      operation:
        $ref: '#/definitions/operation.Operation'
    type: object
  dedicated.Status:
    properties:
      status:
        example: success
        type: string
    type: object
  network.AWSPrivateEndpointInfo:
    properties:
      cluster_id:
        example: "1373933076661807113"
        type: string
      cluster_name:
        example: yifan-test-keep-2h
        type: string
      id:
        example: 1
        type: integer
      region_name:
        example: Oregon (us-west-2)
        type: string
      service_name:
        example: com.amazonaws.vpce.us-west-2.vpce-svc-0b3cd45936052c59e
        type: string
      service_status:
        example: ACTIVE
        type: string
      status:
        example: FAILED
        type: string
      status_message:
        example: The Vpc Endpoint Id 'vpce-09b49c676e8715bf0' does not exist
        type: string
      vpc_endpoint_id:
        example: vpce-09b49c676e8715bf0
        type: string
    type: object
  network.AWSPrivateEndpointServiceInfo:
    properties:
      dns_name:
        example: privatelink-tidb.odxhbtnq69f.clusters.staging.tidb-cloud.com
        type: string
      id:
        example: 1
        type: integer
      port:
        example: 4000
        type: integer
      region_name:
        example: Oregon (us-west-2)
        type: string
      service_name:
        example: com.amazonaws.vpce.us-west-2.vpce-svc-0b3cd45936052c59e
        type: string
      service_status:
        example: ACTIVE
        type: string
    type: object
  network.AWSVpcPeeringInfo:
    properties:
      customer_region:
        example: Oregon (us-west-2)
        type: string
      customer_vpc_cidr:
        example: 172.31.0.0/16
        type: string
      customer_vpc_id:
        example: vpc-085f890400d64cd0a
        type: string
      id:
        example: 1
        type: integer
      peering_connection_id:
        example: pcx-0b440980960d6526f
        type: string
      status:
        example: pending
        type: string
    type: object
  network.CheckPrivateEndpointServiceResponse:
    properties:
      aws:
        $ref: '#/definitions/network.AWSPrivateEndpointServiceInfo'
      gcp:
        $ref: '#/definitions/network.GCPPrivateEndpointServiceInfo'
    type: object
  network.CreateAWSPeeringRequest:
    properties:
      account_id:
        example: "552185537300"
        type: string
      region:
        example: us-west-2
        type: string
      vpc_cidr:
        example: 172.31.0.0/16
        type: string
      vpc_id:
        example: vpc-085f890400d64cd0a
        type: string
    type: object
  network.CreateGCPPeeringRequest:
    properties:
      network_cidr:
        example: 172.31.0.0/16
        type: string
      network_name:
        example: gcp-network-name
        type: string
      project_id:
        example: gcp-project-id
        type: string
      region:
        example: us-west1
        type: string
      zone:
        example: us-west1-a
        type: string
    type: object
  network.CreatePrivateEndpointServiceRequest:
    properties:
      provider:
        example: aws
        type: string
    type: object
  network.CreateVpcPeeringRequest:
    properties:
      aws:
        $ref: '#/definitions/network.CreateAWSPeeringRequest'
      gcp:
        $ref: '#/definitions/network.CreateGCPPeeringRequest'
    type: object
  network.CreateVpcPeeringResponse:
    properties:
      aws:
        $ref: '#/definitions/network.CreatedAWSPeeringResponse'
      gcp:
        $ref: '#/definitions/network.CreatedGCPPeeringResponse'
    type: object
  network.CreatedAWSPeeringResponse:
    properties:
      id:
        example: 1
        type: integer
      peering_connection_id:
        example: pcx-0b440980960d6526f
        type: string
    type: object
  network.CreatedGCPPeeringResponse:
    properties:
      id:
        example: 1
        type: integer
      tidb_cloud_network_name:
        example: shoot--staging--a1ae7733
        type: string
      tidb_cloud_project_id:
        example: pingcap-gardener
        type: string
      tidb_cloud_region_name:
        example: ' Oregon (us-west1)'
        type: string
      tidb_cloud_vpc_cidr:
        example: 172.30.168.0/21
        type: string
    type: object
  network.GCPPrivateEndpointInfo:
    properties:
      cluster_id:
        example: "1373933076661807113"
        type: string
      cluster_name:
        example: yifan-test-keep-2h
        type: string
      connection_id:
        example: "10498320298297858"
        type: string
      connection_name:
        example: promethues-enpoint-a-80b7345b-m
        type: string
      id:
        example: 1
        type: integer
      region_name:
        example: us-west2
        type: string
      service_attachment_name:
        example: vpce-09b49c676e8715bf0
        type: string
      service_status:
        example: ACTIVE
        type: string
      status:
        example: FAILED
        type: string
      status_message:
        example: The Vpc Endpoint Id 'vpce-09b49c676e8715bf0' does not exist
        type: string
    type: object
  network.GCPPrivateEndpointServiceInfo:
    properties:
      dns_name:
        example: privatelink-tidb.odxhbtnq69f.clusters.staging.tidb-cloud.com
        type: string
      id:
        example: 1
        type: integer
      port:
        example: 4000
        type: integer
      region_name:
        example: us-west2
        type: string
      service_name:
        example: com.google.vpcendpoints.tidb-cloud.com
        type: string
      service_status:
        example: ACTIVE
        type: string
    type: object
  network.GCPVpcPeeringInfo:
    properties:
      customer_network_name:
        example: yifan-test
        type: string
      customer_project_id:
        example: gcp-autonomous-dev
        type: string
      customer_region:
        example: ' Oregon (us-west1)'
        type: string
      customer_vpc_cidr:
        example: 10.128.0.0/20
        type: string
      id:
        example: 1
        type: integer
      peering_connection_name:
        example: gcp-us-west1-yifan-test-networkpeer
        type: string
      status:
        example: pending
        type: string
      tidb_cloud_network_name:
        example: shoot--staging--a1ae7733
        type: string
      tidb_cloud_project_id:
        example: pingcap-gardener
        type: string
      tidb_cloud_region:
        example: ' Oregon (us-west1)'
        type: string
      tidb_cloud_vpc_cidr:
        example: 172.30.168.0/21
        type: string
    type: object
  network.GetPrivateAddressResponse:
    properties:
      port:
        example: 4000
        type: integer
      private_address:
        example: tidb-xxx.us-east-1.aws.tidbcloud.com
        type: string
    type: object
  network.ListPrivateEndpointsResponse:
    properties:
      aws:
        items:
          $ref: '#/definitions/network.AWSPrivateEndpointInfo'
        type: array
      gcp:
        items:
          $ref: '#/definitions/network.GCPPrivateEndpointInfo'
        type: array
    type: object
  network.ListVpcPeeringsResponse:
    properties:
      aws:
        items:
          $ref: '#/definitions/network.AWSVpcPeeringInfo'
        type: array
      gcp:
        items:
          $ref: '#/definitions/network.GCPVpcPeeringInfo'
        type: array
    type: object
  network.ProjectCidrRequest:
    properties:
      cidr:
        example: 172.30.0.0/16
        type: string
      provider:
        example: gcp
        type: string
    type: object
  network.ProjectCidrs:
    properties:
      cidr:
        example: 10.250.0.0/16
        type: string
      provider:
        example: aws
        type: string
      regions:
        items:
          properties:
            cidr:
              example: 10.250.24.0/21
              type: string
            region:
              example: us-west-2
              type: string
            region_name:
              example: Oregon (us-west-2)
              type: string
          type: object
        type: array
    type: object
  network.StatusResponse:
    properties:
      status:
        example: success
        type: string
    type: object
  network.SubmitPrivateEndpointRequest:
    properties:
      endpoint_id:
        example: projects/gcp-autonomous-prod/regions/us-west1/serviceAttachments/o11y-prod-nginx-nlb-a
        type: string
      provider:
        example: gcp
        type: string
    type: object
  network.SubmitPrivateEndpointResponse:
    properties:
      id:
        example: 1
        type: integer
    type: object
  operation.Error:
    properties:
      code:
        type: string
      message:
        type: string
    type: object
  operation.Operation:
    properties:
      created_at:
        example: "2022-03-22T20:13:11.285067Z"
        type: string
      ended_at:
        example: "2022-03-22T20:33:11.285067Z"
        type: string
      error:
        $ref: '#/definitions/operation.Error'
      id:
        example: 123456
        type: integer
      progress:
        example: 100
        type: integer
      started_at:
        example: "2022-03-22T20:23:11.285067Z"
        type: string
      status:
        example: DONE
        type: string
      status_message:
        example: ""
        type: string
      user:
        example: user@example.com
        type: string
    type: object
  operation.OperationResponse:
    properties:
      operation:
        $ref: '#/definitions/operation.Operation'
    type: object
  serverless.CloudProvider:
    properties:
      cloud_provider:
        example: aws
        type: string
      description:
        example: Amazon Web Services
        type: string
    type: object
  serverless.CloudRegion:
    properties:
      cloud_provider:
        example: aws
        type: string
      description:
        example: US West (Oregon)
        type: string
      region:
        example: us-west-2
        type: string
    type: object
  serverless.CreateClusterRequest:
    properties:
      cloud_provider:
        example: aws
        type: string
      cluster_name:
        example: my-cluster
        type: string
      region:
        example: us-west-2
        type: string
      spend_limit:
        example: 0
        type: integer
    type: object
  serverless.CreateClusterResponse:
    properties:
      cloud_provider:
        example: aws
        type: string
      cluster_id:
        example: "123456"
        type: string
      cluster_name:
        example: my-cluster
        type: string
      cluster_status:
        example: AVAILABLE
        type: string
      cluster_version:
        example: v6.1.0
        type: string
      created_at:
        example: "2022-03-22T20:23:11.285067Z"
        type: string
      creator:
        example: me@pingcap.com
        type: string
      free_credits:
        example: 113.86
        type: number
      operation:
        $ref: '#/definitions/operation.Operation'
      region:
        example: us-east-1
        type: string
      root_password_set:
        example: true
        type: boolean
      spend_limit:
        example: 1000
        type: integer
      updated_at:
        example: "2022-03-22T20:23:11.285067Z"
        type: string
    type: object
  serverless.DeleteServerlessClusterResponse:
    properties:
      cloud_provider:
        example: aws
        type: string
      cluster_id:
        example: "123456"
        type: string
      cluster_name:
        example: my-cluster
        type: string
      cluster_status:
        example: AVAILABLE
        type: string
      cluster_version:
        example: v6.1.0
        type: string
      created_at:
        example: "2022-03-22T20:23:11.285067Z"
        type: string
      creator:
        example: me@pingcap.com
        type: string
      free_credits:
        example: 113.86
        type: number
      operation:
        $ref: '#/definitions/operation.Operation'
      region:
        example: us-east-1
        type: string
      root_password_set:
        example: true
        type: boolean
      spend_limit:
        example: 1000
        type: integer
      updated_at:
        example: "2022-03-22T20:23:11.285067Z"
        type: string
    type: object
  serverless.PublicAddress:
    properties:
      port:
        example: 4000
        type: integer
      public_address:
        example: tidb-xxx.us-east-1.aws.tidbcloud.com
        type: string
    type: object
  serverless.ServerlessCluster:
    properties:
      cloud_provider:
        example: aws
        type: string
      cluster_id:
        example: "123456"
        type: string
      cluster_name:
        example: my-cluster
        type: string
      cluster_status:
        example: AVAILABLE
        type: string
      cluster_version:
        example: v6.1.0
        type: string
      created_at:
        example: "2022-03-22T20:23:11.285067Z"
        type: string
      creator:
        example: me@pingcap.com
        type: string
      free_credits:
        example: 113.86
        type: number
      region:
        example: us-east-1
        type: string
      root_password_set:
        example: true
        type: boolean
      spend_limit:
        example: 1000
        type: integer
      updated_at:
        example: "2022-03-22T20:23:11.285067Z"
        type: string
    type: object
  serverless.SpendLimitUpdateRequest:
    properties:
      spend_limit:
        example: 1000
        type: integer
    type: object
  serverless.SpendLimitUpdateResponse:
    properties:
      status:
        example: success
        type: string
    type: object
info:
  contact: {}
  description: This API provides a set of endpoints to manage and interact with TiDB
    Cloud services, including clusters and other related resources.
  title: TiDB Cloud API
  version: "1.0"
paths:
  /dedicated-clusters/cloud-providers:
    get:
      description: Fetch info to create dedicated clusters.
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/dedicated.DedicatedCloudProvider'
            type: array
      summary: ListDedicatedCloudProviders
      tags:
      - Dedicated Clusters
  /dedicated-clusters/cloud-providers/node-types:
    get:
      description: This is for fetching info to create cluster.
      parameters:
      - description: 'Cloud provider types. Choose from: '''' (all) | ''aws'' | ''gcp''
          | ''azure'' | ... '
        in: query
        name: cloud-provider
        type: string
      - description: 'Region types. Choose from: '''' (all) | ''us-west-2'' | ... '
        in: query
        name: region
        type: string
      - description: 'Instance types: '''' (all) | ''tidb'' | ''tikv'' | ''tiflash''
          | ... '
        in: query
        name: instance-type
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/dedicated.DedicatedCloudProviderNodeType'
            type: array
      summary: ListDedicatedCloudProvidersNodeTypes
      tags:
      - Dedicated Clusters
  /dedicated-clusters/cloud-providers/regions:
    get:
      description: Fetches information about cloud provider regions for creating dedicated
        clusters.
      parameters:
      - description: 'Cloud provider types, choose from: '''' (all) | ''aws'' | ''gcp''
          | ''azure'' | ... '
        in: query
        name: cloud-provider
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/dedicated.DedicatedCloudProviderRegion'
            type: array
      summary: ListDedicatedCloudProviderRegions
      tags:
      - Dedicated Clusters
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters:
    get:
      description: List all Dedicated Clusters.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: 'Cloud provider types. Choose from: ” (all) | ''aws'' | ''gcp''
          | ''azure'' | ...'
        in: query
        name: cloud-provider
        type: string
      - description: 'Region types. Choose from: ” (all) | ''us-west-2'' | ...'
        in: query
        name: region
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/dedicated.DedicatedCluster'
            type: array
      summary: ListDedicatedClusters
      tags:
      - Dedicated Clusters
    post:
      consumes:
      - application/json
      description: Create a Dedicated Cluster.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Request body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/dedicated.CreateDedicatedClusterRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dedicated.CreateDedicatedClusterResponse'
      summary: CreateDedicatedCluster
      tags:
      - Dedicated Clusters
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters/{cluster_id}:
    delete:
      description: Delete Dedicated Cluster.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dedicated.DeleteDedicatedClusterResponse'
      summary: DeleteDedicatedCluster
      tags:
      - Dedicated Clusters
    get:
      description: Get detailed information about a Dedicated Cluster.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dedicated.DedicatedCluster'
      summary: GetDedicatedCluster
      tags:
      - Dedicated Clusters
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters/{cluster_id}/ca-cert-download-url:
    get:
      description: Get the URL to download the CA certificate of a dedicated cluster.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dedicated.CaCertDownloadUrl'
      summary: GetDedicatedClusterCaCertDownloadUrl
      tags:
      - Dedicated Clusters
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters/{cluster_id}/ip-access-list:
    get:
      description: Get the list of CIDR addresses that are allowed to connect to the
        public TiDB address.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/dedicated.IPAccessListItem'
            type: array
      summary: GetDedicatedClusterIPAccessList
      tags:
      - Dedicated Clusters
    put:
      description: Update (overwrite) IP whitelist of a dedicated cluster.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      - description: IP access list
        in: body
        name: access_list
        required: true
        schema:
          items:
            $ref: '#/definitions/dedicated.IPAccessRule'
          type: array
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dedicated.Status'
      summary: UpdateDedicatedClusterIPAccessList
      tags:
      - Dedicated Clusters
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters/{cluster_id}/pause:
    post:
      description: Pause a Dedicated Cluster.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dedicated.PauseDedicatedClusterResponse'
      summary: PauseDedicatedCluster
      tags:
      - Dedicated Clusters
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters/{cluster_id}/private-address:
    get:
      consumes:
      - application/json
      description: Get the private TiDB address within the VPC of a dedicated cluster
        in a specified project and organization.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Returns the private TiDB address and port
          schema:
            $ref: '#/definitions/network.GetPrivateAddressResponse'
      summary: GetDedicatedClusterPrivateAddress
      tags:
      - Network
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters/{cluster_id}/private-endpoint-services:
    post:
      consumes:
      - application/json
      description: Create or check the Private Endpoint Service of a dedicated cluster
        in a specified project and organization.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      - description: Create or check the Private Endpoint Service request body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/network.CreatePrivateEndpointServiceRequest'
      produces:
      - application/json
      responses:
        "200":
          description: Returns the response with the status of the created or checked
            Private Endpoint Service
          schema:
            $ref: '#/definitions/network.CheckPrivateEndpointServiceResponse'
      summary: CreateOrCheckDedicatedClusterPrivateEndpointService
      tags:
      - Network
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters/{cluster_id}/private-endpoints:
    post:
      consumes:
      - application/json
      description: Submit the Private Endpoint connection request of a dedicated cluster
        in a specified project and organization.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      - description: Submit Private Endpoint request body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/network.SubmitPrivateEndpointRequest'
      produces:
      - application/json
      responses:
        "200":
          description: Returns the ID of the submitted Private Endpoint
          schema:
            $ref: '#/definitions/network.SubmitPrivateEndpointResponse'
      summary: SubmitDedicatedClusterPrivateEndpoint
      tags:
      - Network
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters/{cluster_id}/public-address:
    get:
      description: Get public TiDB address.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dedicated.PublicAddress'
      summary: GetDedicatedClusterPublicAddress
      tags:
      - Dedicated Clusters
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters/{cluster_id}/resume:
    post:
      description: Resume a Dedicated Cluster.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dedicated.ResumeDedicatedClusterResponse'
      summary: ResumeDedicatedCluster
      tags:
      - Dedicated Clusters
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters/{cluster_id}/scale:
    post:
      consumes:
      - application/json
      description: Scale a Dedicated Cluster.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      - description: Request body containing the cluster scaling information
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/dedicated.ScaleClusterRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/dedicated.ScaleClusterResponse'
      summary: ScaleDedicatedCluster
      tags:
      - Dedicated Clusters
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters/cidrs:
    get:
      description: Retrieves the CIDRs for different providers and regions of a project's
        dedicated clusters.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/network.ProjectCidrs'
            type: array
      summary: GetDedicatedClusterProjectCidrs
      tags:
      - Network
    post:
      consumes:
      - application/json
      description: Creates a CIDR for a project and provider, with automatic allocation
        of different CIDRs for different regions.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Request body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/network.ProjectCidrRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/network.StatusResponse'
      summary: CreateDedicatedClusterProjectCidr
      tags:
      - Network
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters/private-endpoints:
    get:
      consumes:
      - application/json
      description: List all Private Endpoints that have been requested to accept (regardless
        of whether the acceptance is successful or not) in a specific project of an
        organization.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: query
        name: cluster-id
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Returns the response with the list of Private Endpoints
          schema:
            $ref: '#/definitions/network.ListPrivateEndpointsResponse'
      summary: ListDedicatedClusterPrivateEndpoints
      tags:
      - Network
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters/private-endpoints/{endpoint_id}:
    delete:
      consumes:
      - application/json
      description: Delete the Private Endpoint connection of a dedicated cluster in
        a specified project and organization.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Vpc Endpoint ID
        in: path
        name: endpoint_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Returns an empty response if the Private Endpoint connection
            is deleted successfully
      summary: DeleteDedicatedClusterPrivateEndpoint
      tags:
      - Network
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters/vpc-peerings:
    get:
      consumes:
      - application/json
      description: List all VPC peerings of a dedicated cluster in a specified project
        and organization.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: Returns the response with the list of VPC peerings
          schema:
            $ref: '#/definitions/network.ListVpcPeeringsResponse'
      summary: ListDedicatedClusterVpcPeerings
      tags:
      - Network
    post:
      consumes:
      - application/json
      description: Create a VPC peering connection for a dedicated cluster in a specified
        project and organization.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Request body containing the information for creating a VPC peering
          connection
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/network.CreateVpcPeeringRequest'
      produces:
      - application/json
      responses:
        "200":
          description: Returns the response with the created VPC peering connection
            information
          schema:
            $ref: '#/definitions/network.CreateVpcPeeringResponse'
        "409":
          description: Returns a conflict response with the existing VPC peering connection
            information
          schema:
            $ref: '#/definitions/network.CreateVpcPeeringResponse'
      summary: CreateDedicatedClusterVpcPeering
      tags:
      - Network
  /orgs/{org_id}/projects/{project_id}/dedicated-clusters/vpc-peerings/{id}:
    delete:
      description: Deletes a VPC peering connection.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Peering connection ID
        in: path
        name: id
        required: true
        type: string
      responses:
        "200":
          description: OK
      summary: DeleteDedicatedClusterVpcPeering
      tags:
      - Network
  /orgs/{org_id}/projects/{project_id}/operations:
    get:
      description: List all running LRO operations' status.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Number of pages
        in: query
        name: page
        required: true
        type: integer
      - description: Size of a page
        in: query
        name: page_size
        required: true
        type: integer
      - description: A filter expression that filters resources listed in the response
        in: query
        name: filter
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/operation.Operation'
            type: array
      summary: ListOperations
      tags:
      - Long-Running Operations
  /orgs/{org_id}/projects/{project_id}/operations/{operation_id}:
    get:
      description: Get LRO operation status check.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: LRO ID
        in: path
        name: operation_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/operation.OperationResponse'
      summary: GetOperation
      tags:
      - Long-Running Operations
  /orgs/{org_id}/projects/{project_id}/serverless:
    get:
      description: List all Serverless Clusters.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/serverless.ServerlessCluster'
            type: array
      summary: ListServerlessClusters
      tags:
      - Serverless
    post:
      consumes:
      - application/json
      description: Create a Serverless Cluster.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Request body
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/serverless.CreateClusterRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/serverless.CreateClusterResponse'
      summary: CreateServerlessCluster
      tags:
      - Serverless
  /orgs/{org_id}/projects/{project_id}/serverless/{cluster_id}:
    delete:
      description: Delete Serverless Cluster.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/serverless.DeleteServerlessClusterResponse'
      summary: DeleteServerlessCluster
      tags:
      - Serverless
    get:
      description: Get detailed information about Serverless Cluster.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/serverless.ServerlessCluster'
      summary: GetServerlessCluster
      tags:
      - Serverless
  /orgs/{org_id}/projects/{project_id}/serverless/{cluster_id}/public-address:
    get:
      description: Get public TiDB address.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/serverless.PublicAddress'
      summary: GetServerlessClusterPublicAddress
      tags:
      - Serverless
  /orgs/{org_id}/projects/{project_id}/serverless/{cluster_id}/spend-limit:
    put:
      consumes:
      - application/json
      description: Update the Spend Limit of the given Serverless Cluster.
      parameters:
      - description: Organization ID
        in: path
        name: org_id
        required: true
        type: string
      - description: Project ID
        in: path
        name: project_id
        required: true
        type: string
      - description: Cluster ID
        in: path
        name: cluster_id
        required: true
        type: string
      - description: Spend Limit Update Request
        in: body
        name: request_body
        required: true
        schema:
          $ref: '#/definitions/serverless.SpendLimitUpdateRequest'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/serverless.SpendLimitUpdateResponse'
      summary: UpdateServerlessClusterSpendLimit
      tags:
      - Serverless
  /serverless/cloud-providers:
    get:
      description: List the cloud providers that allow the creation of Serverless
        clusters.
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/serverless.CloudProvider'
            type: array
      summary: ListServerlessCloudProviders
      tags:
      - Serverless
  /serverless/cloud-providers/regions:
    get:
      description: List regions of cloud providers that allow the creation of Serverless
        clusters.
      parameters:
      - description: 'Cloud provider types - Choose from: '''' (all) | ''aws'' | ''gcp''
          | ''azure'' | ...'
        in: query
        name: cloud-provider
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/serverless.CloudRegion'
            type: array
      summary: ListServerlessRegions
      tags:
      - Serverless
swagger: "2.0"
