云运维中心 COC-执行自定义脚本:请求示例

时间:2024-04-11 11:58:27

请求示例

https://coc.myhuawei.com/v1/job/scripts/{script_uuid}

{
  "execute_param" : {
    "timeout" : 300,
    "execute_user" : "root",
    "success_rate" : "100.0",
    "script_params" : [ {
      "param_name" : "a",
      "param_value" : "key1",
      "param_order" : 1
    } ]
  },
  "execute_batches" : [ {
    "batch_index" : 1,
    "rotation_strategy" : "CONTINUE",
    "target_instances" : [ {
      "resource_id" : "resource_id",
      "agent_sn" : "agent_sn",
      "agent_status" : "ONLINE",
      "region_id" : "cn-north-7",
      "project_id" : "project_id"
    } ]
  } ]
}
support.huaweicloud.com/api-coc/ExecuteScript.html