basePath: /
definitions:
  secondaryconfirm.ApplyParam:
    properties:
      cluster_id:
        type: string
      config_revision_id:
        type: string
      curr_config_revision_id:
        description: is name of ConfigRevision the cluster currently using
        type: string
      project_id:
        type: string
      strategy:
        allOf:
        - $ref: '#/definitions/v1.ConfigChangeStrategy'
        enum:
        - RollingRestart
        - HotReload
    type: object
  secondaryconfirm.ApplyResult:
    type: object
  secondaryconfirm.ConfigPair:
    properties:
      current_image:
        type: string
      current_toml:
        type: string
      next_image:
        type: string
      next_toml:
        type: string
    type: object
  secondaryconfirm.ConfigRevisionBatchGetParam:
    properties:
      list:
        items:
          $ref: '#/definitions/secondaryconfirm.ConfigRevisionGetParam'
        type: array
    type: object
  secondaryconfirm.ConfigRevisionGetParam:
    properties:
      cluster_id:
        type: string
      config_revision_id:
        type: string
      project_id:
        type: string
    type: object
  secondaryconfirm.ConfigRevisionInfo:
    properties:
      config_revision_id:
        type: string
      status:
        enum:
        - generated
        - outdated
        - applying
        - applied
        type: string
    type: object
  secondaryconfirm.DiffResult:
    properties:
      backup_config_pair:
        allOf:
        - $ref: '#/definitions/secondaryconfirm.ConfigPair'
        description: disposable task, support neither RollingRestart nor HotReload
      creation_timestamp_unix:
        type: integer
      curr_config_revision_id:
        description: is name of ConfigRevision the cluster currently using
        type: string
      lightning_config_pair:
        allOf:
        - $ref: '#/definitions/secondaryconfirm.ConfigPair'
        description: disposable task, support neither RollingRestart nor HotReload
      pd_config_pair:
        allOf:
        - $ref: '#/definitions/secondaryconfirm.ConfigPair'
        description: always use HotReload, regardless of strategy
      restore_config_pair:
        allOf:
        - $ref: '#/definitions/secondaryconfirm.ConfigPair'
        description: disposable task, support neither RollingRestart nor HotReload
      skip_apply:
        type: boolean
      ticdc_config_pair:
        allOf:
        - $ref: '#/definitions/secondaryconfirm.ConfigPair'
        description: RollingRestart only
      tidb_config_pair:
        allOf:
        - $ref: '#/definitions/secondaryconfirm.ConfigPair'
        description: RollingRestart only
      tiflash_config_pair:
        $ref: '#/definitions/secondaryconfirm.ConfigPair'
      tiflash_learner_config_pair:
        $ref: '#/definitions/secondaryconfirm.ConfigPair'
      tikv_config_pair:
        $ref: '#/definitions/secondaryconfirm.ConfigPair'
      tiproxy_config_pair:
        allOf:
        - $ref: '#/definitions/secondaryconfirm.ConfigPair'
        description: RollingRestart only
      version_pair:
        $ref: '#/definitions/secondaryconfirm.VersionPair'
    type: object
  secondaryconfirm.ErrCodeType:
    enum:
    - FeatureNotEnabled
    - ResourceStatusConflict
    - ClusterUnderConfigChanging
    type: string
    x-enum-varnames:
    - EFeatureNotEnabled
    - EResourceStatusConflict
    - EClusterUnderConfigChanging
  secondaryconfirm.ErrResp:
    properties:
      error:
        $ref: '#/definitions/secondaryconfirm.ErrorInfo'
    type: object
  secondaryconfirm.ErrorInfo:
    properties:
      code:
        description: same as http code
        type: integer
      errcode:
        $ref: '#/definitions/secondaryconfirm.ErrCodeType'
      message:
        type: string
    type: object
  secondaryconfirm.VersionPair:
    properties:
      current:
        type: string
      next:
        type: string
    type: object
  v1.ConfigChangeStrategy:
    enum:
    - RollingRestart
    - HotReload
    type: string
    x-enum-varnames:
    - ConfigChangeStrategyRollingRestart
    - ConfigChangeStrategyHotReload
info:
  contact: {}
  description: Whatever.
  title: Config Manager Secondary Confirm API
  version: "1.0"
paths:
  /api/v1/secondaryconfirm/apply:
    post:
      consumes:
      - application/json
      description: apply config revision on cluster
      parameters:
      - description: param
        in: body
        name: param
        required: true
        schema:
          $ref: '#/definitions/secondaryconfirm.ApplyParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/secondaryconfirm.ApplyResult'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/secondaryconfirm.ErrResp'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/secondaryconfirm.ErrResp'
      summary: Apply config revision on cluster
      tags:
      - config-manager
  /api/v1/secondaryconfirm/config_revision/{config_revision_id}:
    get:
      consumes:
      - application/json
      description: get config revision by id
      parameters:
      - description: name of ConfigRevision
        in: path
        name: config_revision_id
        required: true
        type: string
      - description: name of Cluster
        in: query
        name: cluster_id
        required: true
        type: string
      - description: project id
        in: query
        name: project_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/secondaryconfirm.ConfigRevisionInfo'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/secondaryconfirm.ErrResp'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/secondaryconfirm.ErrResp'
      summary: Get config revision info
      tags:
      - config-manager
  /api/v1/secondaryconfirm/config_revision:batch_get:
    post:
      consumes:
      - application/json
      description: get config revision by id
      parameters:
      - description: parameter of batch get ConfigRevision
        in: body
        name: batch_get_params
        required: true
        schema:
          $ref: '#/definitions/secondaryconfirm.ConfigRevisionBatchGetParam'
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            items:
              $ref: '#/definitions/secondaryconfirm.ConfigRevisionInfo'
            type: array
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/secondaryconfirm.ErrResp'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/secondaryconfirm.ErrResp'
      summary: Get config revision info
      tags:
      - config-manager
  /api/v1/secondaryconfirm/diff:
    get:
      consumes:
      - application/json
      description: diff config revision content
      parameters:
      - description: project id
        in: query
        name: project_id
        required: true
        type: string
      - description: cluster id
        in: query
        name: cluster_id
        required: true
        type: string
      - description: config revision id
        in: query
        name: config_revision_id
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: OK
          schema:
            $ref: '#/definitions/secondaryconfirm.DiffResult'
        "400":
          description: Bad Request
          schema:
            $ref: '#/definitions/secondaryconfirm.ErrResp'
        "500":
          description: Internal Server Error
          schema:
            $ref: '#/definitions/secondaryconfirm.ErrResp'
      summary: Diff config revision content
      tags:
      - config-manager
swagger: "2.0"
