应用运维管理 AOM-查询任务列表:响应示例

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

响应示例

状态码: 200

请求响应成功,返回任务列表。

{
  "elements" : [ {
    "citation_urns" : [ ],
    "create_by" : "xxxx",
    "create_time" : 16000000000,
    "description" : "",
    "edit_time" : 0,
    "enterprise_project_id" : "0",
    "execution_action_rules" : [ "xxxxxxx", "xxxxxxx" ],
    "execution_permission" : [ "xxxxxxx", "xxxxxx" ],
    "id" : "xxxxxx",
    "input" : {
      "package" : {
        "cmd_user" : "xxxxx",
        "software_list" : "[xxxxxxx]",
        "pre_install_script" : "",
        "operate_type" : "install",
        "un_install_script" : "",
        "version_number" : "1",
        "time_out" : "7200",
        "install_script" : "xxxx",
        "package_version_id" : "xxxxxx",
        "package_basic_id" : "xxxxxx",
        "package_name" : "xxxxx",
        "install_file_dir" : "xxxxx",
        "plat_form" : "Linux",
        "group" : "package"
      },
      "project_id" : "xxxxxxx",
      "approve" : {
        "need_approve" : "false",
        "group" : "approve"
      },
      "region_id" : "cn-north-7",
      "get_instances" : {
        "frontend_info" : "{xxxxxx}",
        "ecs_id_list" : "[xxxxxxx]",
        "type" : "cmdb_manual",
        "group" : "ecs_instance"
      },
      "rate_control" : {
        "max" : "0",
        "timeDelay" : "0",
        "group" : "rate_control"
      }
    },
    "is_delete" : false,
    "last_execute_by" : "xxxxxx",
    "last_execution_end_time" : 1600000000,
    "last_execution_id" : "xxxxxx",
    "last_execution_start_time" : 1600000000,
    "name" : "xxxxxx",
    "nodes" : [ {
      "category" : "service",
      "description" : "download obs plug and install plug",
      "id" : "xxxxxx",
      "ignore_error" : true,
      "metadata" : {
        "configuration" : {
          "func_urn" : "xxxxxxx",
          "dataOutputPath" : "",
          "func_app" : "CMS",
          "dataInputPath" : "",
          "validator" : true,
          "func_version" : "latest",
          "dataResultsPath" : "",
          "parameters" : [ {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "root",
            "isEditor" : false,
            "key" : "properties.cmd_user"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "[xxxxxx]",
            "isEditor" : false,
            "key" : "properties.software_list"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "",
            "isEditor" : false,
            "key" : "properties.pre_install_script"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "install",
            "isEditor" : false,
            "key" : "properties.operate_type"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "",
            "isEditor" : false,
            "key" : "properties.un_install_script"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "1",
            "isEditor" : false,
            "key" : "properties.version_number"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "7200",
            "isEditor" : false,
            "key" : "properties.time_out"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "xxxx",
            "isEditor" : false,
            "key" : "properties.install_script"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "xxxxxx",
            "isEditor" : false,
            "key" : "properties.package_version_id"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "xxxxxx",
            "isEditor" : false,
            "key" : "properties.package_basic_id"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "xxxxx",
            "isEditor" : false,
            "key" : "properties.package_name"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "xxxx",
            "isEditor" : false,
            "key" : "properties.install_file_dir"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "Linux",
            "isEditor" : false,
            "key" : "properties.plat_form"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "package",
            "isEditor" : false,
            "key" : "properties.group"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "xxxxxx",
            "isEditor" : false,
            "key" : "properties.project_id"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "cn-north-4",
            "isEditor" : false,
            "key" : "properties.region_id"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "{xxxxxx}",
            "isEditor" : false,
            "key" : "properties.frontend_info"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "[xxxxxx]",
            "isEditor" : false,
            "key" : "properties.ecs_id_list"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "cmdb_manual",
            "isEditor" : false,
            "key" : "properties.type"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "ecs_instance",
            "isEditor" : false,
            "key" : "properties.group"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "0",
            "isEditor" : false,
            "key" : "properties.max"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "0",
            "isEditor" : false,
            "key" : "properties.timeDelay"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "rate_control",
            "isEditor" : false,
            "key" : "properties.group"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "$.executionId",
            "isEditor" : false,
            "key" : "properties.executionId"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "xxxxxxx",
            "isEditor" : false,
            "key" : "properties.workflowId"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "CMS::E CS ::Package",
            "isEditor" : false,
            "key" : "properties.cmsTaskName2Distribute"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "xxxxxx",
            "isEditor" : false,
            "key" : "properties.cmsAccessPodLb"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "manual",
            "isEditor" : false,
            "key" : "properties.workflowType"
          }, {
            "default" : "",
            "showFormat" : false,
            "format" : "",
            "value" : "package-manipulation",
            "isEditor" : false,
            "key" : "properties.nodeId"
          } ]
        },
        "type" : "operation"
      },
      "name" : "package",
      "task_name" : "CMS::ECS::Package"
    } ],
    "project_id" : "xxxxxx",
    "quote" : [ ],
    "status" : "fail",
    "steps" : [ ],
    "tags" : { },
    "task_type" : "package",
    "template_i18n" : {
      "en-us" : {
        "name" : "Package",
        "description" : "download install plug or uninstall plug"
      },
      "zh-cn" : {
        "name" : "文件管理",
        "description" : " "
      }
    },
    "template_id" : "CMS::ECS::Package",
    "template_name" : "CMS::ECS::Package",
    "type" : "manual",
    "update_time" : 1600000000
  } ],
  "total_elements" : 1
}

状态码: 400

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

{
  "error_code" : " AOM .31001302",
  "error_msg" : "Invalid input parameter.",
  "http_code" : 400
}

状态码: 401

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

{
  "error_code" : "AOM.31009003",
  "error_msg" : "auth failed.",
  "http_code" : 401
}

状态码: 500

InternalServerError 表明服务端能被请求访问到,但是不能理解用户的请求。

{
  "error_code" : "AOM.31001305",
  "error_msg" : "workflow internal server error.",
  "http_code" : 500
}
support.huaweicloud.com/api-aom/ListWorkflow.html