调用DeleteTargets接口删除一个规则下的一个或多个规则投递目标。

URI

/openapi/deleteTargets

请求参数

名称 类型 是否必选 示例值 描述
EventBusName String default 事件总线的名称。更多信息,请参见使用限制
RuleName String myRule 事件规则的名称。
Targets List<Target> target10 需要删除的Target列表。

返回参数

名称 类型 示例值 描述
ErrorEntriesCount Int
  • 0
  • 1
处理失败的事件体数量。取值说明如下:
  • 取值为0:所有事件均正常处理。
  • 取值为除0以外的其他整数:处理失败的事件个数。
ErrorEntries List
  • [
        {
            "ErrorCode":"EventTargetNotExist",
            "ErrorMessage":"The event target delete has not exist! ",
            "EntryId":"target10"
        }
    ]
处理失败的事件体信息。
ErrorCode String EventTargetNotExist 错误码。
ErrorMessage String The event target delete has not exist! 错误详细描述。
EntryId String target10 处理失败的事件体编号。

示例

请求示例

POST /openapi/deleteTargets HTTP/1.1
Host: 123456789098****.eventbridge.cn-hangzhou.aliyuncs.com
Date: Sat, 18 Apr 2020 05:30:41 GMT
x-eventbridge-version: 2020-04-01
Authorization: acs vZ3VL0SuJdHi****:Jo2PbT*****4azYAYoYslKLvWzg=
Content-type: application/json;charset=UTF-8
Content-Length: 26

{
    "EventBusName":"default",
    "RuleName":"myRule",
    "TargetIds":"target10"
}

返回示例一:处理正常

HTTP/1.1 200 OK
Server: AliyunEventBridge
Connection: keep-alive
Content-Type: application/json;charset=utf-8
Content-Length: 79
x-eventbridge-request-id: 5E9A9081333245F1D130****
Date: Sat, 18 Apr 2020 05:30:41 GMT

{
    "errorEntriesCount":0,
    "errorEntries":[

    ]
}

返回示例二:处理异常

HTTP/1.1 200 OK
Server: AliyunEventBridge
Connection: keep-alive
Content-Type: application/json;charset=utf-8
Content-Length: 79
x-eventbridge-request-id: 5E9A9081333245F1D130****
Date: Sat, 18 Apr 2020 05:30:41 GMT

{
    "errorEntriesCount":1,
    "errorEntries":[
    {
        "ErrorCode":"EventTargetNotExist",
        "ErrorMessage":"The event target delete has not exist! ",
        "EntryId":"target10"
    }
]
}