Membuat atau memperbarui target event untuk aturan tertentu.
Deskripsi operasi
Creates or updates event targets for a specified rule.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eventbridge:PutTargets |
update |
*Rule
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| EventBusName |
string |
Yes |
Nama EventBridge. |
eventTest |
| RuleName |
string |
Yes |
Nama aturan event. |
ssr-send-to-vendor-test01 |
| Targets |
array<object> |
Yes |
Daftar target event yang akan dibuat atau diperbarui. Untuk informasi lebih lanjut, lihat Batas. |
|
|
array<object> |
No |
An event target. |
||
| Id |
string |
Yes |
The custom ID of the event target. |
Mlm123456JHd2RsRoKw |
| Type |
string |
Yes |
The type of the event target. For more information, see Event target parameters. |
acs.fc.function |
| Endpoint |
string |
No |
The endpoint of the event target. |
acs:fc:cn-hangzhou:123456789098****:services/guide.LATEST/functions/HelloFC |
| PushRetryStrategy |
string |
No |
The retry strategy for pushing events. Valid values:
|
BACKOFFRETRY |
| DeadLetterQueue |
object |
No |
The dead-letter queue (DLQ) to which events are sent after all retry attempts fail. Supported DLQ types include Message Queue for Apache RocketMQ, Message Service (MNS), Message Queue for Apache Kafka, and EventBridge. |
|
| Arn |
string |
No |
The Alibaba Cloud Resource Name (ARN) of the dead-letter queue. |
acs:mns:cn-hangzhou:123456789098****:/queues/deadletterqueue 或 acs:mq:cn-hangzhou:123456789098****:/instances/MQ_INST_123456789098****_BX8QbBPL/topic/deadlettertopic 或 acs:alikafka:cn-hangzhou:123456789098****:instance/alikafka_post-cn-123456/topic/deadlettertopic 或 acs:eventbridge:cn-hangzhou:123456789098****:eventbus/deadletterbus |
| Network |
string |
No |
The network type of the dead-letter queue. |
|
| VpcId |
string |
No |
The VPC ID. |
|
| VSwitchIds |
string |
No |
The VSwitch IDs. |
|
| SecurityGroupId |
string |
No |
The security group ID. |
|
| ErrorsTolerance |
string |
No |
The fault tolerance policy. Valid values:
|
ALL |
| ParamList |
array<object> |
No |
A list of parameters for the event target. |
|
|
object |
No |
An event target parameter. |
||
| ResourceKey |
string |
No |
The key of the parameter. For more information, see Event target parameters. |
body |
| Form |
string |
No |
The format of the parameter value. For more information, see Event target parameters. |
TEMPLATE |
| Value |
string |
No |
The value of the parameter. |
{\"key\"=\"value\"} |
| Template |
string |
No |
The template for the parameter value. This parameter applies only when |
The value of ${key} is ${value}! |
| ConcurrentConfig |
object |
No |
The concurrency control settings. |
|
| Concurrency |
integer |
No |
The maximum number of concurrent executions for the event target. |
34 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| Message |
string |
The error message. |
The event rule not existed! |
| RequestId |
string |
The unique ID that Alibaba Cloud generates for the request. |
6FB52207-7621-5292-BDF2-A17E2E984160 |
| Data |
object |
The returned data. |
|
| ErrorEntriesCount |
integer |
The number of event targets that failed to be processed. A value of 0 indicates that all event targets were processed successfully. |
0 |
| ErrorEntries |
array<object> |
Details about the event targets that failed to be processed. |
|
|
object |
Details about a failed event target. |
||
| ErrorMessage |
string |
The details of the error. |
The id of event target is duplicate! |
| ErrorCode |
string |
The error code. |
EventRuleTargetIdDuplicate |
| EntryId |
string |
The ID of the event target that failed to be processed. |
Mlm123456JHd2RsRoKw |
| Code |
string |
The response code.
|
Success |
| Success |
boolean |
Returns true if the operation is successful. |
true |
Contoh
Respons sukses
JSONformat
{
"Message": "The event rule not existed!",
"RequestId": "6FB52207-7621-5292-BDF2-A17E2E984160\n",
"Data": {
"ErrorEntriesCount": 0,
"ErrorEntries": [
{
"ErrorMessage": "The id of event target is duplicate!",
"ErrorCode": "EventRuleTargetIdDuplicate",
"EntryId": "Mlm123456JHd2RsRoKw"
}
]
},
"Code": "Success",
"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.