Menghapus satu atau lebih target peristiwa dari sebuah aturan peristiwa.
Deskripsi operasi
Anda dapat memanggil operasi API ini untuk menghapus satu atau lebih target peristiwa dari sebuah aturan peristiwa.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eventbridge:DeleteTargets |
delete |
*Rule
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| EventBusName |
string |
Yes |
Nama event bus. |
MyEventBus |
| RuleName |
string |
Yes |
Nama aturan peristiwa. |
ramrolechange-mns |
| TargetIds |
array |
No |
ID target peristiwa yang ingin Anda hapus. |
|
|
string |
No |
ID target peristiwa.
Anda dapat memanggil operasi GetRule untuk menanyakan ID target peristiwa. |
12 |
Contoh permintaan: `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": [ "targetId1", "targetId2" ] }`
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| Message |
string |
Pesan kesalahan yang dikembalikan. |
EventBusNotExist |
| RequestId |
string |
ID permintaan. |
78FA9EAC-F0C0-58B0-871E-9F9756CE1D29 |
| Data |
object |
Data yang dikembalikan. |
|
| ErrorEntriesCount |
integer |
Jumlah event body yang gagal diproses. Nilai yang valid: 0: Tidak ada event body yang gagal diproses. Bilangan bulat selain 0: jumlah event body yang gagal diproses. |
0 |
| ErrorEntries |
array<object> |
Informasi tentang event body yang gagal diproses. |
|
|
object |
|||
| ErrorMessage |
string |
The error message. |
The id of event target is duplicate! |
| ErrorCode |
string |
The error code. |
EventRuleTargetIdDuplicate |
| EntryId |
string |
The ID of the event body that failed to be processed. |
target5 |
| Code |
string |
Kode respons. Kode 200 menunjukkan bahwa permintaan berhasil. Kode lain menunjukkan bahwa permintaan gagal. Untuk informasi tentang kode kesalahan, lihat Kode kesalahan. |
200 |
| Success |
boolean |
Menunjukkan apakah operasi berhasil. Nilai yang valid: true dan false. |
true |
Contoh
Respons sukses
JSONformat
{
"Message": "EventBusNotExist",
"RequestId": "78FA9EAC-F0C0-58B0-871E-9F9756CE1D29",
"Data": {
"ErrorEntriesCount": 0,
"ErrorEntries": [
{
"ErrorMessage": "The id of event target is duplicate!",
"ErrorCode": "EventRuleTargetIdDuplicate",
"EntryId": "target5"
}
]
},
"Code": "200",
"Success": true
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | ServiceNotEnable | Service not enable |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.