apollo-openapi/src/main/java/com/ctrip/framework/apollo/openapi/client/service/ClusterOpenApiService.java/ClusterOpenApiService/createCluster
class ClusterOpenApiService:  @Override
  public OpenClusterDTO createCluster(String env, OpenClusterDTO openClusterDTO) {
    checkNotEmpty(openClusterDTO.getAppId(), "App id");
    checkNotEmpty(env, "Env");
    checkNotEmpty(openClusterDTO.getName(), "Cluster name");
    checkNotEmpty(openClusterDTO.getDataChangeCreatedBy(), "Created by");

    OpenApiPathBuilder pathBuilder = OpenApiPathBuilder.newBuilder()
        .envsPathVal(env)
        .appsPathVal(openClusterDTO.getAppId())
        .customResource("clusters");

    try (CloseableHttpResponse response = post(pathBuilder, openClusterDTO)) {
      return gson.fromJson(EntityUtils.toString(response.getEntity()), OpenClusterDTO.class);
    } catch (Throwable ex) {
      throw new RuntimeException(String
          .format("Create cluster: %s for appId: %s in env: %s failed", openClusterDTO.getName(),
              openClusterDTO.getAppId(), env), ex);
    }
  }