This topic describes how to create, view, modify, and delete a connection and an API destination to help you quickly integrate EventBridge with other applications.

Prerequisites

Activate EventBridge and grant permissions to a RAM user

Background information

An API destination allows you to call the API operations of a third-party Software as a Service (SaaS) system or a self-managed system that is connected over HTTP in a low-code way and without extra architectures. You can use API destinations to easily build and connect to SaaS applications. This helps prevent data silos. In addition, a connection can be shared among multiple API operations to provide convenient and pluggable authentication capabilities.

An API operation in a third-party SaaS system or a self-managed system includes an API destination and a connection.

An API destination defines the metadata of an API operation. When you create an event rule, you can reference different API destinations to access different third-party SaaS systems or self-managed systems. You can also reference the same API destination for different event rules. Assume that you deliver events to an API operation of a service by using multiple event rules, and you want to change a specific parameter in the event rules. If an API destination is not defined, you must change the specific parameter in all event rules one by one. However, if an API destination is defined, you need to modify only the configurations of the API destination, and the specific parameter is automatically updated in all event rules that reference the API destination.

A connection is used to connect a third-party SaaS system or a self-managed system to the current API destination. The configurations of a connection consist of a network configuration and an authentication configuration. A network configuration specifies whether a third-party SaaS system or a self-managed system connects to the current API destination over the Internet or over a private network. In EventBridge, you can select one of the following authentication methods: basic authentication, OAuth authentication, and API key.
  • Basic authentication: The username and password must be verified before you access data resources. The username and password are Base64-encoded and are prefixed with Basic and a space before they are sent to the destination service. If the username and password are decoded and pass the verification, the server responds to the request from EventBridge. Otherwise, the request is sent back.
  • OAuth authentication: This authentication method is secure and reliable. OAuth authentication allows you to authorize a third-party application by using an authorization code, an implicit authorization code, a password, or a client credential. In event-driven scenarios, client credentials are commonly used. If you use a client credential to authorize a third-party application, you must configure the information that is required to obtain a client credential in EventBridge, including the IP address of the OAuth service, client ID, and client password. EventBridge allows you to obtain a client credential by using the GET or POST method.
  • API key: This authentication method is relatively easy. Users can use a custom key name and key value to call an API operation. EventBridge sends the key name and key value to the server for authentication by using an HTTP header.
API destination

Connections

Create a connection

When you create an API destination, you can specify a connection to define the authorization type and parameters that are used to define the API endpoint.

  1. Log on to the EventBridge console. In the left-side navigation pane, choose Integration Center > API Destination.
  2. In the top navigation bar, select the region where you want to configure the connection. Then, click the Connection Configuration tab.
  3. On the Connection Configuration tab, click Create. In the Create Connection panel, set the following parameters and click OK.
    Parameter Description Example
    Name The name of the connection. testName
    Description The description of the connection. test
    Authentication The authentication method of the connection. Valid values:
    • Basic
    • OAuth Client Credential
    • API Key
    Basic
    Username The username that is used for authorization. This parameter is required only when the Authentication parameter is set to Basic. Admin
    Password The password that is used for authorization. This parameter is required only when the Authentication parameter is set to Basic. ******
    Endpoint The endpoint that is used to obtain access_token required by the server to call the API operation. This parameter is required only when the Authentication parameter is set to OAuth Client Credential. https://postman-echo.com/oauth1
    HTTP Method The type of the request that is used to obtain access_token. This parameter is required only when the Authentication parameter is set to OAuth Client Credential. POST
    Client ID The ID of the client that you authorize to obtain access_token. This parameter is required only when the Authentication parameter is set to OAuth Client Credential. Admin
    ClientSecret The password of the client to which you grant permissions. This parameter is required only when the Authentication parameter is set to OAuth Client Credential. ******
    OAuth HTTP Parameter The request header, request body, and request parameters to be added when you configure a request to obtain access_token. This parameter is required only when the Authentication parameter is set to OAuth Client Credential.
    Parameter:Header
    key:name
    Value:eventbridge
    ApiKeyName The username that is used for authorization. This parameter is required only when the Authentication parameter is set to API Key. Admin
    ApiKeyValue The password of the authorized account. This parameter is required only when the Authentication parameter is set to API Key. ******
    Network The network connection between the API destination and third-party applications. Default value: Internet Internet

Other supported operations

After you create a connection, you can view, modify, and delete the connection in the EventBridge console.

Other supported operations
  • View the details of a connection: Click Details in the Actions column of the created connection to view the basic information, authentication configuration, network configuration, and bound API destinations of the connection.
  • Modify a connection: Click Edit in the Actions column to modify the description of the connection.
  • Delete a connection: Find the connection that you created and click Delete in the Actions column. Read the Note message that appears and click OK.

API destination

Create an API destination

  1. Log on to the EventBridge console. In the left-side navigation pane, choose Integration Center > API Destination.
  2. In the top navigation bar, select the region where you want to configure the API destination. Then, click the API Destination tab.
  3. On the API Destination tab, click Create. In the Create API Destination panel, set the following parameters and click OK.
    1. In the Basic Information section, set Method to Custom. Then, specify the name and description of the API destination.
    2. In the API Configuration section, set URL to the API URL of the resource that you want to access on the server, and set HTTP Method to the method that is used to obtain the URL.
    3. In the Connection Configuration section, select Create Connection or Select Existing Connection. Then, click OK.
      • If you select Create Connection for this parameter, configure the Name, Description, and Authentication parameters by following the instructions in the "Create a connection" section of this topic.
      • If you select Select Existing Connection for this parameter, select an existing connection from the drop-down list.

Select an API destination as the event target

  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 configurations and click Create.
    1. Configure the parameters in the Configure Basic Info and Configure Event Pattern tabs. For more information, see Create an event rule.
    2. In the Configure Targets step, select Triggered by API Operation from the Service Type drop-down list.
      • Perform the following steps to create a custom API destination: In the Basic Information section, select Custom for the Method parameter. Then, configure other parameters by following the instructions in the "Create an API destination" section of this topic.
      • Perform the following steps if you want to use an existing API destination: In the Basic Information section, select Use Existing Item for the Method parameter and select a created API destination from the drop-down list.

Other supported operations

After an API destination is created, you can view, modify, and delete the API destination in the EventBridge console.

Other supported operations
  • View the details of an API destination: Find the API destination that you created and click Details in the Actions column to view the basic information, API configurations, and connected configurations of the API destination.
  • Modify an API destination: Find the API destination that you created and click Edit in the Actions column to modify the description and API configurations of the API destination.
  • Delete an API destination: Find the API destination that you created and click Delete in the Actions column. Read the Note message that appears and click OK.