scenario:
  id: 10e5fb01-2d4a-4d16-a624-801d28324e53
  context:
    auth:
      type: digest
    base_path: /v1beta2
    host: null
  description: ng_private_endpoint_alicloud
  name: ng_private_endpoint_alicloud
steps:
- operation_id: TidbService_CreateTidb
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/tidbs",
      "headers": {},
      "query_params": {},
      "body": {
        "displayName": "sce-ng-private-endpoint",
        "regionId": "{regionId}",
        "minRcu": "5000",
        "maxRcu": "6000",
        "servicePlan": "Premium",
        "cloudProvider": "{cloud_provider}"
      },
      "body_params": {
        "regionId": "region_id",
        "cloud_provider": "cloud_provider"
      },
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": ""
    }
  save: |-
    {
      "placeholder": [
        {
          "key": "cluster_1",
          "eval": "body.tidbId"
        }
      ]
    }
  description: ""
  max_retries: 0
  delay_after: 0
  name: ""
  continue_on_unexpected: false
  stage: ""
  meta: "{}"
  generation_id: ""
  order: 0
- operation_id: TidbService_GetTidb
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/tidbs/{tidbId}",
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "tidbId": "cluster_1"
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.state == 'ACTIVE'"
    }
  save: null
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 1
- operation_id: PrivateEndpointConnectionService_GetPrivateLinkService
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/tidbs/{tidbId}/privateLinkService",
      "headers": {},
      "query_params": {},
      "body": {},
      "path_params": {
        "tidbId": "cluster_1"
      },
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.state == 'ACTIVE'"
    }
  save: |-
    {
      "placeholder": [
        {
          "key": "private_link_service_1",
          "eval": "body.serviceName"
        }
      ]
    }
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 0
- operation_id: privatelink CreateVpcEndpoint
  request_type: cmd_aliyun
  request: |-
    {
      "args": [
        "privatelink",
        "CreateVpcEndpoint",
        "--RegionId",
        "ap-southeast-1",
        "--VpcId",
        "vpc-t4nmm1kjhyfpkap198t2k",
        "--EndpointType",
        "Interface",
        "--ServiceName",
        "{private_link_service_1}",
        "--SecurityGroupId.1",
        "sg-t4nbk2kcmu59wgsxd12x",
        "--EndpointDescription",
        "e2e-automation-testing",
        "--region",
        "ap-southeast-1"
      ],
      "args_params": {
        "private_link_service_1": "private_link_service_1"
      },
      "name": "aliyun"
    }
  expect: |-
    {
      "status_code": 0,
      "cel": ""
    }
  save: |-
    {
      "placeholder": [
        {
          "key": "private_endpoint_1",
          "eval": "output.EndpointId"
        },
        {
          "key": "endpoint_domain_name",
          "eval": "output.EndpointDomain"
        }
      ]
    }
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 2
- operation_id: PrivateEndpointConnectionService_CreatePrivateEndpointConnection
  request_type: http
  request: |-
    {
      "method": "POST",
      "path": "/tidbs/{tidbId}/privateEndpointConnections",
      "headers": {},
      "query_params": {},
      "body": {
        "regionId": "{regionId}",
        "endpointId": "{private_endpoint_1}",
        "privateDomainName": "{endpoint_domain_name}"
      },
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "tidbId": "cluster_1"
      },
      "body_params": {
        "regionId": "region_id",
        "private_endpoint_1": "private_endpoint_1",
        "endpoint_domain_name": "endpoint_domain_name"
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": ""
    }
  save: |-
    {
      "placeholder": [
        {
          "key": "private_endpoint_connection_1",
          "eval": "body.privateEndpointConnectionId"
        }
      ]
    }
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 3
- operation_id: PrivateEndpointConnectionService_GetPrivateEndpointConnection
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/tidbs/{tidbId}/privateEndpointConnections/{privateEndpointConnectionId}",
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "tidbId": "cluster_1",
        "privateEndpointConnectionId": "private_endpoint_connection_1"
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.endpointState == 'ACTIVE'"
    }
  save: null
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 4
- operation_id: PrivateEndpointConnectionService_ListPrivateEndpointConnections
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/tidbs/{tidbId}/privateEndpointConnections",
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "tidbId": "cluster_1"
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.totalSize > 0"
    }
  save: null
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 5
- operation_id: PrivateEndpointConnectionService_GetPrivateEndpointConnection
  request_type: http
  request: |-
    {
      "method": "GET",
      "path": "/tidbs/{tidbId}/privateEndpointConnections/{privateEndpointConnectionId}",
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "tidbId": "cluster_1",
        "privateEndpointConnectionId": "private_endpoint_connection_1"
      }
    }
  expect: |-
    {
      "status_code": 200,
      "cel": "body.endpointState == 'ACTIVE'"
    }
  save: null
  description: ''
  max_retries: 120
  delay_after: 30
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 6
- operation_id: PrivateEndpointConnectionService_DeletePrivateEndpointConnection
  request_type: http
  request: |-
    {
      "method": "DELETE",
      "path": "/tidbs/{tidbId}/privateEndpointConnections/{privateEndpointConnectionId}",
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "tidbId": "cluster_1",
        "privateEndpointConnectionId": "private_endpoint_connection_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: 7
- operation_id: privatelink DeleteVpcEndpoint
  request_type: cmd_aliyun
  request: |-
    {
      "args": [
        "privatelink",
        "DeleteVpcEndpoint",
        "--EndpointId",
        "{private_endpoint_1}",
        "--RegionId",
        "ap-southeast-1",
        "--region",
        "ap-southeast-1"
      ],
      "args_params": {
        "private_endpoint_1": "private_endpoint_1"
      },
      "name": "aliyun"
    }
  expect: |-
    {
      "status_code": 0,
      "cel": ""
    }
  save: null
  description: ''
  max_retries: 0
  delay_after: 0
  name: ''
  continue_on_unexpected: false
  stage: ''
  meta: '{}'
  generation_id: ''
  order: 8
- operation_id: TidbService_DeleteTidb
  request_type: http
  request: |-
    {
      "method": "DELETE",
      "path": "/tidbs/{tidbId}",
      "headers": {},
      "query_params": {},
      "body": {},
      "auth": {
        "auth_type": "digest",
        "content": {
          "private_key": "placeholder",
          "public_key": "placeholder"
        }
      },
      "path_params": {
        "tidbId": "cluster_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: 9
