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 userBackground 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.
- 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.
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.
- Log on to the EventBridge console. In the left-side navigation pane, choose .
- In the top navigation bar, select the region where you want to configure the connection. Then, click the Connection Configuration tab.
- 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.
- 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
- Log on to the EventBridge console. In the left-side navigation pane, choose .
- In the top navigation bar, select the region where you want to configure the API destination. Then, click the API Destination tab.
- On the API Destination tab, click Create. In the Create API Destination panel, set the following parameters and click OK.
Select an API destination as the event target
- Log on to the EventBridge console. In the left-side navigation pane, click Event Buses.
- 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.
- In the left-side navigation pane, click Event Rules. On the page that appears, click Create Rule.
- In the Create Rule panel, complete the following configurations and click Create.
Other supported operations
After an API destination is created, you can view, modify, and delete the API destination in the EventBridge console.
- 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.