云应用引擎 CAE-修改定时启停规则:请求示例

时间:2023-11-20 10:32:01

请求示例

修改定时启停规则,修改策略名称为“test-2”,是一个启动策略,生效组件范围涉及部分组件,触发策略为“执行一次”。

PUT https://{endpoint}/v1/{project_id}/cae/timer-rules/{rule_id}

{
  "api_version" : "v1",
  "kind" : "TimerRule",
  "spec" : {
    "name" : "test-2",
    "type" : "start",
    "cron" : "0 55 16 22 2 ? 2023",
    "status" : "on",
    "env_id" : "c41a8e9f-5447-406a-8783-85885f3870a3",
    "effective_range" : "component",
    "effective_policy" : "onetime",
    "components" : [ {
      "component_id" : "10f7b6be-5dc2-4fb7-b62c-e8f362dfdabf",
      "component_name" : "addd"
    }, {
      "component_id" : "3f3041f9-5063-40c9-94ee-8473517b3956",
      "component_name" : "demo-frontend-1676360408"
    } ]
  }
}
support.huaweicloud.com/api-cae/UpdateTimerRule.html