检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
Step 2: Buying a Dedicated Gateway Buy a dedicated gateway based on your service requirements. For details, see Creating a Gateway.
Configuring Triggers Overview Timer Trigger API Gateway (Dedicated) Trigger API Connect (APIC) Trigger Cloud Trace Service (CTS) Trigger Document Database Service (DDS) Trigger (Offline Soon) Data Ingestion Service (DIS) Trigger DMS (for Kafka) Trigger Kafka (Open-Source) Trigger
Click Create Trigger and select API Gateway (Dedicated) for Trigger Type. API Instance: Select a gateway. If no gateway is available, click Create API Instance. API Name: Retain the default name. API Group: If no API group is available, click Create API Group to create one.
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.
Table 2 Event template description Template Name Description API Gateway (Dedicated Gateway) Simulates a dedicated APIG event to trigger your function. Cloud Trace Service (CTS) Simulates a CTS event to trigger your function.
Click Create Trigger and select API Gateway (Dedicated) for Trigger Type. API Instance: Select a gateway. If no gateway is available, click Create API Instance. API Name: Retain the default name. API Group: If no API group is available, click Create API Group to create one.
API Gateway FunctionGraph functions are invoked over HTTPS by defining REST APIs with specified backend services. For details, see the APIG User Guide. OBS FunctionGraph functions are created to process OBS bucket events, such as object creation or deletion events.
(Dedicated) API Gateway event example.
Table 1 Function trigger invocation Trigger Invocation Mode API Gateway (dedicated) Synchronous. You can change it to asynchronous. For details, see Configuring Asynchronous Invocation. API Connect (APIC) Synchronous. You can change it to asynchronous.
" : { "body" : { "app_id" : "3d40caf3ddfc4e83815b54b50f13aad7", "app_name" : "DefaultApp_6439vdv2", "device_id" : "66eb7a0ffa8d9c36870c6892_ttytytytytytyt", "node_id" : "ttytytytytytyt", "gateway_id" : "66eb7a0ffa8d9c36870c6892_ttytytytytytyt", "node_type" : "GATEWAY
TIMER APIC: API Connect (APIC) (only available in AP-Singapore) DEDICATEDGATEWAY: API Gateway (Dedicated) CTS: Cloud Trace Service (CTS): Enable CTS first.
APIG trigger: APIG gateway ID. DDS trigger: DDS instance ID. Kafka trigger: Kafka instance ID. RabbitMQ trigger: RabbitMQ instance ID.
If no gateway is available, click Create Instance on the right to go to the creation page. apig-fg After the application is created, the required function resources and gateway resources are automatically created, as shown in Figure 3.
APIG trigger: APIG gateway ID. DDS trigger: DDS instance ID. Kafka trigger: Kafka instance ID. RabbitMQ trigger: RabbitMQ instance ID.
The following uses API Gateway (Dedicated) as an example. For details about the parameters, see API Gateway (Dedicated) Trigger. Figure 4 Create a trigger. In this example, Security Authentication is set to None.
Table 3 Function trigger invocation Trigger Invocation Mode API Gateway (Dedicated) Synchronous invocation is used by default. You can change it to asynchronous invocation. For details, see Asynchronous Invocation. API Connect (APIC) Synchronous invocation is used by default.
Request information, including the API gateway configuration, request ID, authentication information, and source httpMethod String GET HTTP method queryStringParameters Map See the example.
Table 4 FuncVpc Parameter Type Description domain_id String Domain name ID. namespace String Project ID. vpc_name String VPC name. vpc_id String VPC ID. subnet_name String Subnet name. subnet_id String Subnet ID. cidr String Subnet mask. gateway String Gateway. security_groups Array
Obtain it from Regions and Endpoints. code_url: OBS object link obtained in step 2 apig_id: APIG gateway ID On the Configure Stack page, specify an IAM agency, retain the default values for other parameters, and click Next to confirm the deployment of this stack.
APIG trigger: APIG gateway ID. DDS trigger: DDS instance ID. Kafka trigger: Kafka instance ID. RabbitMQ trigger: RabbitMQ instance ID.