All Products
Search
Document Center

EventBridge:ListTargets

Last Updated:Jun 11, 2026

Mengkueri semua target event dari aturan event.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

eventbridge:ListTargets

list

*Rule

acs:eventbridge:{#regionId}:{#accountId}:eventbus/{#EventBusName}/rule/{#RuleName}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

EventBusName

string

No

Nama EventBridge.

my-event-bus

Limit

integer

No

Jumlah maksimum entri yang dikembalikan dalam satu panggilan.

10

RuleName

string

No

Nama aturan event.

tf-testacc-rule

NextToken

string

No

Jika Anda mengonfigurasi Limit dan terdapat nilai pengembalian yang melebihi batas, parameter ini akan dikembalikan.

0

Arn

string

No

Nama Sumber Daya Alibaba Cloud (ARN) aturan event.

acs:fc:cn-hangzhou:118609547428****:services/fc-connector.a1/functions/event

Elemen respons

Element

Type

Description

Example

object

The response parameters.

Message

string

The returned error message.

EventRuleNotExisted

RequestId

string

The request ID.

5DAF96FB-A4B6-548C-B999-0BFDCB2261B9

Data

object

The returned data.

Targets

array<object>

The event targets.

array<object>

The event target.

Type

string

The type of the event target. For more information, see Event target parameters.

acs.fc.function

Endpoint

string

The endpoint of the event target.

acs:fc:cn-hangzhou:123456789098****:services/guide.LATEST/functions/HelloFC

ParamList

array<object>

The parameters that are configured for the event target.

object

Value

string

The value of the event target parameter.

{\"key\"=\"value\"}

Template

string

The template that is used by the event target parameter.

The value of ${key} is ${value}!

Form

string

The format that is used by the event target parameter.

TEMPLATE

ResourceKey

string

The resource parameter of the event target.

body

ErrorsTolerance

string

The fault tolerance policy. Valid values: ALL and NONE.

  • ALL: Fault tolerance is allowed. If an error occurs in an event, event processing is not blocked. If the event fails to be sent after the maximum number of retries specified by the retry policy is reached, the event is delivered to the dead-letter queue or discarded based on your configurations.

  • NONE: Fault tolerance is not allowed. If an error occurs in an event and the event fails to be sent after the maximum number of retries specified by the retry policy is reached, event processing is blocked.

ALL

Id

string

The ID of the event target.

1453

EventBusName

string

The name of the event bus.

sls-beijing-one1-tf

RuleName

string

The name of the event rule.

rule-uKAK2

ConcurrentConfig

object

The concurrency configuration.

Concurrency

integer

The maximum number of concurrent events allowed in the event target.

10

NextToken

string

If excess return values exist, this parameter is returned.

1

Total

integer

The total number of entries.

18

Code

string

The returned response code. Valid values:

  • Success: The request is successful.

  • Other codes: The request failed. For a list of error codes, see Error codes.

Success

Success

boolean

Indicates whether the request is successful. Valid values:

  • true

  • false

true

Contoh

Respons sukses

JSONformat

{
  "Message": "EventRuleNotExisted",
  "RequestId": "5DAF96FB-A4B6-548C-B999-0BFDCB2261B9",
  "Data": {
    "Targets": [
      {
        "Type": "acs.fc.function ",
        "Endpoint": "acs:fc:cn-hangzhou:123456789098****:services/guide.LATEST/functions/HelloFC ",
        "ParamList": [
          {
            "Value": "{\\\"key\\\"=\\\"value\\\"}",
            "Template": "The value of ${key} is ${value}! ",
            "Form": "TEMPLATE",
            "ResourceKey": "body"
          }
        ],
        "ErrorsTolerance": "ALL",
        "Id": "1453",
        "EventBusName": "sls-beijing-one1-tf",
        "RuleName": "rule-uKAK2",
        "ConcurrentConfig": {
          "Concurrency": 10
        }
      }
    ],
    "NextToken": "1",
    "Total": 18
  },
  "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.