Deletes one or more event targets from an event rule.

URI

/openapi/deleteTargets

Request parameters

Parameter Type Required Example Description
EventBusName String Yes default The name of the event bus.For more information, see Limits.
RuleName String Yes myRule The name of the event rule.
Targets List<Target> Yes target10 The event targets that you want to delete.

Response parameters

Parameter Type Example Description
ErrorEntriesCount Int
  • 0
  • 1
The number of event bodies that failed to be processed. Valid values:
  • 0: No event bodies failed to be processed.
  • An integer other than 0: indicates the number of event bodies that failed to be processed.
ErrorEntries List
  • N/A
  • [
        {
            "ErrorCode":"EventTargetNotExist",
            "ErrorMessage":"The event target delete has not exist! ",
            "EntryId":"target10"
        }
    ]
The information about the event body that failed to be processed.
ErrorCode String EventTargetNotExist The error code returned.
ErrorMessage String The event target delete has not exist! The error message returned.
EntryId String target10 The ID of the event body that failed to be processed.

Examples

Sample requests

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"
}

Sample success response

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":[

    ]
}

Sample error response

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"
    }
]
}