API Connect (APIC) Trigger
This section describes how to create an APIC trigger on the FunctionGraph console to invoke a function using an API.
For details about the APIC event source, see Supported Event Sources.
Notes and Constraints
APIC triggers are available only in the AP-Singapore region. You can check whether the trigger type is supported on the console.
Prerequisites
- You have created a function.
- You have created an APIC instance. For details, see Creating an APIC Instance.
- You have created an API group, for example, APIConnect_test. For details, see Creating an API Group.
Creating an APIC Trigger
- Log in to the FunctionGraph console. In the navigation pane, choose Functions > Function List.
- Click the function to be configured to go to the function details page.
- Choose Configuration > Triggers and click Create Trigger.
Figure 1 Creating a trigger
- Configure the following parameters.
Table 1 APIC trigger parameters Parameter
Description
Example Value
Trigger Type
Mandatory.
Select API Connect (APIC).
API Connect (APIC)
API Instance
Mandatory.
Select an APIC instance. If no instance is available, click Create API Instance.
APIC_fg
API Name
Mandatory.
APIG trigger name. The name can contain 3 to 64 characters and must start with a letter. Only letters, digits, and underscores (_) are allowed.
API_apic
API Group
Mandatory.
Select an API group. An API group is a collection of APIs. You can manage APIs by API group.
If no group is available, click Create API Group.
APIConnect_test
Environment
Mandatory.
The environment where the API is published. An API can be called in different environments, such as production, test, and development environments only when the parameter is set to RELEASE.
If no environment is available, click Create Environment.
RELEASE
Security Authentication
Mandatory.
API authentication modes are as follows:
- App: AppKey and AppSecret authentication. This mode is of high security and is recommended. For details, see App Authentication.
- IAM: IAM authentication. This mode grants access permissions to IAM users only and is of medium security. For details, see IAM Authentication
- None: No authentication. This mode grants access permissions to all users.
None
Protocol
Mandatory.
There are two types of API request protocols:
- HTTP: Data is not encrypted during transmission.
- HTTPS: Data is encrypted during transmission.
HTTPS
Timeout (ms)
Mandatory.
API backend timeout in milliseconds. Range: 1–60,000.
5000
- Click OK.
After the trigger is created, an API named API_apic is generated on the APIG console. You can click the API name in the trigger list to go to the APIG console.
Invoking the Function
- Log in to ROMA Connect, find the selected instance (for example, Ac6-instance-NoDelete), and view the public IP address.
- Enter the public IP address in the address box of the browser.
- After the function is executed, a result is returned.
Viewing the Execution Result
- Return to the FunctionGraph console. In the navigation pane, choose Functions > Function List.
- Click the name of the desired function.
- On the displayed function details page, click the Logs tab to query the function running logs. For details, see Configuring and Viewing Function Invocation Logs
- Click View Context in the same row as a log to view log details.
Helpful Links
Manage function triggers through APIs. For details, see Function Trigger APIs.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot