Updated on 2023-08-18 GMT+08:00

Adding an Event Source

Creating an API

After creating an API group, custom authentication function, and backend function, create a FunctionGraph backend API that uses a custom authorizer by performing the following steps:

  1. Log in to the APIG console, choose API Management > APIs in the navigation pane, and click Create API in the upper right.
  2. Configure the basic information according to Figure 1 and Figure 2.

    • API Name: Enter a name, for example, API_test.
    • Group: Select API group APIGroup_test.
    • URL: Set Method to ANY, Protocol to HTTPS, and Path to /testAPI.
    • Gateway Response: Select default.
    • Authentication Mode: Select Custom.
    • Custom Authorizer: Select Authorizer_test.
      Figure 1 Configuring frontend definition
      Figure 2 Configuring security settings

    For more parameters, see Creating an API.

  3. Click Next to configure the backend service according to Figure 3.

    • Backend Type: Select FunctionGraph.
    • Function URN: Select the created service function.
    • Version/Alias: Select the latest version.
    • Invocation Mode: Select Synchronous.
      Figure 3 Configuring the backend service

  4. Click Finish.
  5. Click Publish to publish the API in the RELEASE environment.

    Figure 4 Publishing an API