DeleteTargets

更新时间:
复制 MD 格式

Deletes one or more event targets from an event rule.

URI

/openapi/deleteTargets

Request parameters

ParameterTypeRequiredExampleDescription
EventBusNameStringYesdefaultThe name of the event bus.For more information, see Limits.
RuleNameStringYesmyRuleThe name of the event rule.
TargetsList<Target>Yestarget10The event targets that you want to delete.

Response parameters

ParameterTypeExampleDescription
ErrorEntriesCountInt
  • 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.
ErrorEntriesList
  • 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.
ErrorCodeStringEventTargetNotExistThe error code returned.
ErrorMessageStringThe event target delete has not exist!The error message returned.
EntryIdStringtarget10The 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"
    }
]
}