All Products
Search
Document Center

EventBridge:ListTargets

Last Updated:Aug 28, 2026

Queries all event targets of an event rule.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

eventbridge:ListTargets

list

*Rule

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

None None

Request parameters

Parameter

Type

Required

Description

Example

EventBusName

string

No

The name of the event bus.

my-event-bus

Limit

integer

No

The maximum number of entries to return per request.

10

RuleName

string

No

The name of the event rule.

tf-testacc-rule

NextToken

string

No

The pagination token for the next page. If a previous call returned this token, pass it to retrieve the next page of results.

0

Arn

string

No

The Alibaba Cloud Resource Name (ARN) of the event rule.

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

Response elements

Element

Type

Description

Example

object

The response body.

Message

string

The error message.

EventRuleNotExisted

RequestId

string

The request ID.

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

Data

object

The response data.

Targets

array<object>

The event targets.

array<object>

The event target.

Type

string

The type of the event target. Valid values are listed in 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 event target parameters.

object

Value

string

The parameter value.

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

Template

string

The template for the parameter value.

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

Form

string

The format of the parameter value.

TEMPLATE

ResourceKey

string

The resource key of the event target.

body

ErrorsTolerance

string

The fault tolerance policy. Valid values:

  • ALL: Tolerates errors. Failed events are delivered to the dead-letter queue or discarded after exhausting retries, without blocking subsequent events.

  • NONE: Does not tolerate errors. Event processing is blocked if delivery fails after exhausting retries.

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 event deliveries for this target.

10

NextToken

string

The pagination token for the next page. Present only when more results are available.

1

Total

integer

The total number of event targets.

18

Code

string

The response code. Valid values:

  • Success: The request succeeded.

  • Other values indicate an error. See the error code table below.

Success

Success

boolean

Indicates whether the request succeeded. Valid values: true and false.

true

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

403 ServiceNotEnable Service not enable

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.