应用运维管理 AOM-根据作业id查询方案(自定义模板)列表:响应示例

时间:2023-11-24 09:53:28

响应示例

状态码: 200

请求响应成功,返回执行方案列表。

{
  "elements" : [ {
    "approve_info" : {
      "need_approve" : false
    },
    "create_by" : "xxxxx",
    "create_time" : 1600073877378,
    "enterprise_project_id" : "0",
    "id" : "xxxxxx",
    "is_collect" : false,
    "is_publish" : false,
    "job_id" : "xxxxx",
    "job_version" : 1,
    "name" : "t1",
    "need_synchronize" : false,
    "nodes" : [ {
      "category" : "service",
      "description" : "",
      "id" : "xxxxx",
      "ignore_error" : false,
      "metadata" : {
        "configuration" : {
          "parameters" : {
            "project_id" : "{{project_id}}",
            "script_param" : "{xxxx}",
            "region_id" : "{{region_id}}",
            "get_instances" : "{xxxxx}"
          }
        },
        "type" : "operation"
      },
      "name" : "1",
      "task_name" : "CMS::E CS ::runScript"
    }, {
      "category" : "service",
      "description" : "",
      "id" : "xxxxx",
      "ignore_error" : false,
      "metadata" : {
        "configuration" : {
          "parameters" : {
            "package" : "{xxxxxx}",
            "project_id" : "{{project_id}}",
            "region_id" : "{{region_id}}",
            "get_instances" : "{xxxxx}"
          }
        },
        "type" : "operation"
      },
      "name" : "xxx",
      "task_name" : "CMS::ECS::Package"
    } ],
    "parameters" : [ ],
    "project_id" : "xxxxx",
    "quote" : [ ],
    "rate_control" : {
      "have_rate_control" : false,
      "max" : 0,
      "time_delay" : 0
    },
    "share_type" : "private",
    "steps" : [ {
      "description" : "",
      "id" : "xxxxx",
      "ignore_error" : false,
      "input" : {
        "script_param" : "{xxxxx}",
        "get_instances" : "{xxxxx}"
      },
      "name" : "xxxx",
      "type" : "script"
    }, {
      "description" : "",
      "id" : "xxxxx",
      "ignore_error" : false,
      "input" : {
        "package" : "{xxxxx}",
        "get_instances" : "{xxxxx}"
      },
      "name" : "2",
      "type" : "package"
    } ],
    "update_by" : "xxxxx",
    "update_time" : 1600073877378,
    "version" : "v1"
  } ],
  "total_elements" : 1
}

状态码: 400

BadRequest。非法请求。建议直接修改该请求,不要重试该请求。

{
  "error_code" : " AOM .31001202",
  "error_msg" : " parameter invalid.",
  "http_code" : 400
}

状态码: 401

Unauthorized。在客户端提供认证信息后,返回该状态码,表明服务端指出客户端所提供的认证信息不正确或非法。

{
  "error_code" : "AOM.31009002",
  "error_message" : "auth failed.",
  "http_code" : "401"
}
support.huaweicloud.com/api-aom/ListTemplateByJobId.html