创建升级计划。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求头

该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。

请求语法

POST /escalationPlan/create HTTP/1.1

请求参数

名称 类型 位置 是否必选 示例值 描述
Object Body

A short description of struct

escalationPlanName String Body name123

升级计划名称

escalationPlanDescription String Body desc2322424

升级计划描述

escalationPlanScopeObjects Array Body

升级计划范围对象列表

scopeObjectId Long Body 23433

范围对象id

scope String Body SERVICE

范围对象类型

escalationPlanRules Array Body

升级计划规则列表

escalationPlanType String Body UN_FINISH

升级类型

escalationPlanConditions Array Body

升级条件

level String Body P1

事件等级

effection String Body LOW

影响等级

escalationPlanStrategies Array Body

升级策略

noticeTime String Body 40

通知时间

noticeObjects Array of Long Body 23

通知对象

noticeChannels Array of String Body ["SMS","PHONE"]

通知渠道列表

enableWebhook Boolean Body true

是否webhook

serviceGroupIds Array of Long Body 434

服务组id

clientToken String Body 6b404f14-77d1-4b53-a1a1-30a58bREQUEST

clientToken

返回数据

名称 类型 示例值 描述
requestId String A5A1FEAE-9C47-011C-9C73-A376BC21925D

Id of the request

data Object

data

escalationPlanId Long 234532

升级计划id

示例

请求示例

POST /escalationPlan/create HTTP/1.1
Host:gemp.aliyuncs.com
Content-Type:application/json

{
  "escalationPlanName" : "name123",
  "escalationPlanDescription" : "desc2322424",
  "escalationPlanScopeObjects" : [ {
    "scopeObjectId" : 23433,
    "scope" : "SERVICE"
  } ],
  "escalationPlanRules" : [ {
    "escalationPlanType" : "UN_FINISH",
    "escalationPlanConditions" : [ {
      "level" : "P1",
      "effection" : "LOW"
    } ],
    "escalationPlanStrategies" : [ {
      "noticeTime" : "40",
      "noticeObjects" : [ ],
      "noticeChannels" : [ "[\"SMS\",\"PHONE\"]" ]
    } ]
  } ],
  "clientToken" : "6b404f14-77d1-4b53-a1a1-30a58bREQUEST"
}

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateEscalationPlanResponse>
    <requestId>A5A1FEAE-9C47-011C-9C73-A376BC21925D</requestId>
    <data>
        <escalationPlanId>234532</escalationPlanId>
    </data>
</CreateEscalationPlanResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "requestId" : "A5A1FEAE-9C47-011C-9C73-A376BC21925D",
  "data" : {
    "escalationPlanId" : 234532
  }
}

错误码

HttpCode 错误码 错误信息 描述
400 EscalationPlanRuleNull Escalation plan rule can not be null. 升级策略规则不能为空
400 EscalationPlanServiceNull Escalation plan service can not be nulll 升级策略关联服务不能为空
400 EscalationPlanAlreadyExisted The escalation plan already exists. 升级计划已存在
400 EscalationPlanServiceAleardyRelated The specified service is already related. 服务已关联

访问错误中心查看更多错误码。

访问错误中心查看更多错误码。