- operation_id: ClusterService_CreateCluster
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "https://dedicated.staging.tidbapi.com/v1beta1/clusters",
      "headers": {},
      "query_params": {},
      "body": {
        "displayName": "llm-e2e-cluster-1234",
        "regionId": "{region_id}",
        "labels": {
          "tidb.cloud/project": "{project_id}"
        },
        "tidbNodeSetting": {
          "nodeSpecKey": "8C32G",
          "tidbNodeGroups": [
            {
              "nodeCount": 2
            }
          ]
        },
        "tikvNodeSetting": {
          "nodeSpecKey": "8C32G",
          "nodeCount": 3,
          "storageSizeGi": 200,
          "storageType": "Basic"
        },
        "port": 4000,
        "rootPassword": "my-shining-password"
      },
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "body_params": {
        "region_id": "region_id",
        "project_id": "project_id"
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": ""
    }
  save: |-
    {
      "placeholder": [
        {
          "key": "cluster_1",
          "eval": "body.clusterId"
        },
        {
          "key": "nodegroup_1",
          "eval": "body.tidbNodeSetting.tidbNodeGroups[0].tidbNodeGroupId"
        }
      ]
    }
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 0
- operation_id: ClusterService_GetCluster
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "https://dedicated.staging.tidbapi.com/v1beta1/clusters/{clusterId}",
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "clusterId": "cluster_1"
      },
      "auth_params": {
        "private_key": "private_key",
        "public_key": "public_key"
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.state == 'ACTIVE'"
    }
  save: |-
    {
      "placeholder": [
        {
          "key": "nodegroup_2",
          "eval": "body.tidbNodeSetting.tidbNodeGroups[0].tidbNodeGroupId"
        }
      ]
    }
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 1
- operation_id: ClusterService_UpdateCluster
  request_type: http
  request: |-
    {
      "method": "PATCH",
      "path": "https://dedicated.staging.tidbapi.com/v1beta1/clusters/{clusterId}",
      "headers": {},
      "query_params": {},
      "body": {
        "tidbNodeSetting": {
          "nodeSpecKey": "16C64G",
          "tidbNodeGroups": [
            {
              "tidbNodeGroupId": "{nodegroup_2}",
              "nodeCount": 2
            }
          ]
        }
      },
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "clusterId": "cluster_1"
      },
      "body_params": {
        "nodegroup_2": "nodegroup_2"
      },
      "auth_params": {
        "public_key": "public_key"
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": ""
    }
  save: |-
    {
      "placeholder": [
        {
          "key": "cluster_1",
          "eval": "body.clusterId"
        }
      ]
    }
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 2
- operation_id: ClusterService_GetCluster
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "https://dedicated.staging.tidbapi.com/v1beta1/clusters/{clusterId}",
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "clusterId": "cluster_1"
      },
      "auth_params": {
        "private_key": "private_key",
        "public_key": "public_key"
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.state == 'ACTIVE'"
    }
  save: |-
    {
      "placeholder": [
        {
          "key": "cluster_1",
          "eval": "body.clusterId"
        }
      ]
    }
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 3
- operation_id: ClusterService_UpdateCluster
  request_type: http
  request: |-
    {
      "method": "PATCH",
      "path": "https://dedicated.staging.tidbapi.com/v1beta1/clusters/{clusterId}",
      "headers": {},
      "query_params": {},
      "body": {
        "tidbNodeSetting": {
          "nodeSpecKey": "8C32G",
          "tidbNodeGroups": [
            {
              "tidbNodeGroupId": "{nodegroup_2}",
              "nodeCount": 2
            }
          ]
        }
      },
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "clusterId": "cluster_1"
      },
      "body_params": {
        "nodegroup_2": "nodegroup_2"
      },
      "auth_params": {
        "private_key": "private_key",
        "public_key": "public_key"
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": ""
    }
  save: null
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 4
- operation_id: ClusterService_GetCluster
  request_type: http
  request: |-
    {
      "method": "DELETE",
      "path": "https://dedicated.staging.tidbapi.com/v1beta1/clusters/{clusterId}",
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "clusterId": "cluster_1"
      },
      "auth_params": {
        "private_key": "private_key",
        "public_key": "public_key"
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": ""
    }
  save: |-
    {
      "placeholder": [
        {
          "key": "cluster_1",
          "eval": "body.clusterId"
        }
      ]
    }
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 5
