public static void main()

in schedulerx-demo/schedulerx-example-api/src/main/java/com/aliyun/schedulerx/example/api/TestRetryJobInstance.java [24:62]


    public static void main(String[] args) {
        // Open API 的接入点,具体查看上表支持地域列表以及购买机器地域填写
        String regionId = "cn-huhehaote";
        //鉴权使用的 AccessKeyId,由阿里云官网控制台获取
        String accessKeyId = "xxxxx";
        //鉴权使用的 AccessKeySecret,由阿里云官网控制台获取
        String accessKeySecret = "xxxxxx";
        //产品名称
        String productName = "schedulerx2";
        //对照支持地域列表选择Domain填写
        String domain ="schedulerx.aliyuncs.com";
        //构建 OpenApi 客户端
        DefaultProfile.addEndpoint(regionId, productName, domain);
        DefaultProfile defaultProfile = DefaultProfile.getProfile(regionId, accessKeyId, accessKeySecret);
        DefaultAcsClient client = new DefaultAcsClient(defaultProfile);
        
        RetryJobInstanceRequest request = new RetryJobInstanceRequest();
        request.setNamespace("5084ff70-0eeb-493b-8d19-492536ff7cb2");
        request.setGroupId("k8s.test");
        request.setJobId(1744L);
        request.setJobInstanceId(39887791L);
        
        RetryJobInstanceResponse response;
        try {
            response = client.getAcsResponse(request);
            if (!response.getSuccess()) {
                System.out.println(JsonUtil.toJson(response));
                System.out.println(response.getCode());
            } else {
                System.out.println(JsonUtil.toJson(response));
            }
        } catch (ServerException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (ClientException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }