全部产品
阿里云办公

停止构建

更新时间:2017-11-23 20:59:50

描述

说明:停止您在Codepipeline中的项目正在执行中的构建。

请求信息

请求行 RequestLine

  1. POST /job/{JobName}/build/{BuildNumber}/stop HTTP/1.1

请求行参数 URI Param

名称 类型 是否必须 描述
JobName String 项目名称
BuildNumber String 构建号

返回信息

返回行 ResponseLine

  1. HTTP/1.1 200 OK

返回码 HTTP Status Code

Status Code 描述
201 Created
401 Authentication failed
403 The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource, or may need an account of some sort.
404 Job not found
405 Invalid input
500 Internal Error

返回体 ResponseBody

  1. {
  2. "RequestId": "string"
  3. }

返回体解释

名称 类型 描述
BuildNumber int 构建号
StartTime Long 构建开始时间,格式是Unix时间戳(毫秒)

示例

  1. @Test
  2. public void deleteJobBuild() {
  3. DeleteBuildRequest deleteBuildRequest = new DeleteBuildRequest();
  4. try {
  5. deleteBuildRequest.setAcceptFormat(FormatType.JSON);
  6. deleteBuildRequest.setJobName("test");
  7. deleteBuildRequest.setBuildNumber(1);
  8. deleteBuildRequest.setMethod(MethodType.DELETE);
  9. DeleteBuildResponse getBuildResponse = client.getAcsResponse(deleteBuildRequest);
  10. } catch (ServerException e) {
  11. e.printStackTrace();
  12. Assert.fail();
  13. } catch (ClientException e) {
  14. e.printStackTrace();
  15. Assert.fail();
  16. }
  17. }
本文导读目录