Route events to an HTTPS endpoint

更新时间:
复制 MD 格式

Use an event rule to filter and route events to an HTTPS endpoint. This topic demonstrates the process with a custom event, covering the prerequisites, procedure, and result verification.

Prerequisites

Step 1: Add a custom event source

  1. Log on to the EventBridge console. In the left navigation pane, click Event Buses.
  2. In the top navigation bar, select a region. On the Event Buses page, click the name of the target custom event bus.
  3. In the left navigation pane, click Event Sources, and then click Add Event Source.
  4. In the Add Custom Event Source panel, enter a Name and Description, select Custom Application for Event Provider, and then click OK.

Step 2: Create an event rule

  1. Log on to the EventBridge console. In the left-side navigation pane, click Event Buses.

  2. In the top navigation bar, select a region. On the Event Buses page, click the name of the event bus that you want to manage.

  3. In the left-side navigation pane, click Event Rules. On the page that appears, click Create Rule.

  4. In the Create Rule panel, complete the following steps:

    1. On the Configure Basic Info tab, specify a Name and Description for the rule, and then click Next Step.

      DUlQIswVhV

    2. On the Configure Event Pattern tab, set Event Source Type to Custom Event Sources, select the event source that you created, and then click Next Step.

      m0El15IReD

    3. On the Configure Targets tab, configure the following parameters, and then click Create.

      BMT2vVpTa2

      Parameter

      Example

      Description

      Service Type

      HTTPS

      Select HTTPS from the drop-down list.

      URL

      https://******

      Enter the address of the HTTPS endpoint.

      Body

      Complete Event

      Four types of event transformation are supported:

      • Complete Event

      • Partial Event

      • Fixed Value

      • Template

      For more information about event transformation, see event transformation.

      Network Type

      Public Network

      Two network types are available:

      Retry Policy and Dead-letter Queue

      None

      For details, see Retry policies and dead-letter queues.

Step 3: Publish an event

  1. Log on to the EventBridge console. In the left-side navigation pane, click Event Buses.

  2. In the top navigation bar, select a region.
  3. On the Event Buses page, find the destination event bus and click Publish Event in the Operations column.

    Note

    You can publish events from the console only to a custom event bus.

  4. In the Publish Event to Custom Event Bus panel, select your custom event source from the Custom Event Source drop-down list, enter the event content in the Event Body code editor, and then click Confirm.

    Note
    • For information about event parameters, see Event overview.

    • After you click Confirm, the event ID is copied by default.

Result verification

  1. Go to the Overview page of the destination event bus.

  2. In the left navigation pane, click Event Tracking, and then click the Query by Event ID tab.

  3. In the Event ID text box, paste the event ID, and then click Query.

  4. In the Actions column for the event, click Event Trace to verify its successful delivery.

    yTBOXVk0U5