- 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": "2C8G",
          "tidbNodeGroups": [
            {
              "nodeCount": 1
            }
          ]
        },
        "tikvNodeSetting": {
          "nodeCount": 3,
          "nodeSpecKey": "2C8G",
          "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",
        "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: 0
- operation_id: TidbNodeGroupService_GetPublicEndpointSetting
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "https://dedicated.staging.tidbapi.com/v1beta1/clusters/{clusterId}/tidbNodeGroups",
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "clusterId": "cluster_1"
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": ""
    }
  save: |-
    {
      "placeholder": [
        {
          "key": "nodegroup_1",
          "eval": "body.tidbNodeGroups[0].tidbNodeGroupId"
        }
      ]
    }
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 1
- operation_id: TidbNodeGroupService_GetPublicEndpointSetting
  request_type: http
  request: |-
    {
      "method": "PATCH",
      "path": "https://dedicated.staging.tidbapi.com/v1beta1/clusters/{clusterId}/tidbNodeGroups/{tidbNodeGroupId}/publicEndpointSetting",
      "headers": {},
      "query_params": {},
      "body": {
        "enabled": true,
        "ipAccessList": []
      },
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "clusterId": "cluster_1",
        "tidbNodeGroupId": "nodegroup_1"
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": ""
    }
  save: null
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 2
- operation_id: TidbNodeGroupService_GetPublicEndpointSetting
  request_type: http
  request: |-
    {
      "method": "PATCH",
      "path": "https://dedicated.staging.tidbapi.com/v1beta1/clusters/{clusterId}/tidbNodeGroups/{tidbNodeGroupId}/publicEndpointSetting",
      "headers": {},
      "query_params": {},
      "body": {
        "enabled": true,
        "ipAccessList": [
          {
            "cidrNotation": "152.104.28.129/32",
            "description": "Added IP"
          }
        ]
      },
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "clusterId": "cluster_1",
        "tidbNodeGroupId": "nodegroup_1"
      }
    }
  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: TidbNodeGroupService_GetPublicEndpointSetting
  request_type: http
  request: |-
    {
      "method": "PATCH",
      "path": "https://dedicated.staging.tidbapi.com/v1beta1/clusters/{clusterId}/tidbNodeGroups/{tidbNodeGroupId}/publicEndpointSetting",
      "headers": {},
      "query_params": {},
      "body": {
        "enabled": true,
        "ipAccessList": [
          {
            "cidrNotation": "152.104.28.129/32",
            "description": "Added IP"
          },
          {
            "cidrNotation": "0.0.0.0/0",
            "description": "Allow all"
          }
        ]
      },
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "clusterId": "cluster_1",
        "tidbNodeGroupId": "nodegroup_1"
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": ""
    }
  save: null
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 5
- operation_id: TidbNodeGroupService_GetPublicEndpointSetting
  request_type: http
  request: |-
    {
      "method": "PATCH",
      "path": "https://dedicated.staging.tidbapi.com/v1beta1/clusters/{clusterId}/tidbNodeGroups/{tidbNodeGroupId}/publicEndpointSetting",
      "headers": {},
      "query_params": {},
      "body": {
        "enabled": false
      },
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "clusterId": "cluster_1",
        "tidbNodeGroupId": "nodegroup_1"
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": ""
    }
  save: null
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 6
