Help Center>
FunctionGraph>
Best Practices>
Gracefully Shutting Down ECSs Using FunctionGraph and AS>
Configuring a Message Notification
Updated on 2023-08-18 GMT+08:00
Configuring a Message Notification
- Log in to the SMN console, choose Topic Management > Topics, and click Create Topic.
- Set the topic information, and click OK.
- Topic Name: Enter AStoFunctionGraph.
- Enterprise Project: Select default or another one.
Figure 1 Creating a topic
- Log in to the AS console, go to the details page of the target AS group, click the Lifecycle Hooks tab, and then click Add Lifecycle Hook.
Figure 2 Lifecycle hooks
- Configure the lifecycle hook information, and click OK. This hook is used to suspend the scaled-in instances and send a message to the specified SMN topic.
- Hook Type: Select Instance removal.
- Default Callback Action: Select Continue.
- Timeout Duration: Enter 300.
- Notification Topic: Select AStoFunctionGraph.
Figure 3 Creating a lifecycle hook
- Go to the FunctionGraph console. On the details page of function as_graceful_shutdown, choose Configuration > Triggers, and click Create Trigger.
- Select SMN for the trigger type and AStoFunctionGraph for the topic. Then the messages received by this topic will trigger the handler function.
Figure 4 Creating a trigger
Parent topic: Gracefully Shutting Down ECSs Using FunctionGraph and AS
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot