PAI workspace event notification configuration
Use event notifications to track status changes of DLC jobs, pipeline tasks, and DSW instances, or to automatically trigger downstream operations when the status of a model version changes.
1. Activate EventBridge and grant permissions (one-time setup)
Before you create your first notification rule, activate EventBridge and configure the required permissions. Otherwise, you cannot create event rules.
To access the configuration page, go to Workspace Details, select your PAI workspace, and then click Workspace Configurations > Configure Event Notification in the upper-right corner.
1.1 Activate EventBridge
On the Event Notification Configuration tab, click Activate for Free to go to the EventBridge activation page. For more information, see Activate EventBridge.
After activation, PAI automatically creates a custom event bus named pai-system-${workspace_name} for each PAI workspace. You can go to the EventBridge console, switch to the region where your workspace resides, and view and manage your custom event buses.
1.2 Grant PAI access to cloud resources
Click Authorize Now. The system automatically creates the AliyunServiceRoleForPAIWorkspace service-linked role, which authorizes PAI to access your cloud resources. For more information about this role, see Appendix: PAI workspace service-linked role.
In the one-click authorization dialog box that appears, click Authorize.
1.3 (Optional) Grant event notification permissions to a RAM user
If you use a Resource Access Management (RAM) user (sub-account) for configuration, grant that user permissions to manage the event bus. Otherwise, the RAM user cannot create or manage event rules.
Create a custom policy and attach it to the RAM user. The policy content is as follows:
{
"Statement": [{
"Effect": "Allow",
"Action": [
"eventbridge:CreateEventBus",
"eventbridge:GetEventBus",
"eventbridge:DeleteEventBus",
"eventbridge:ListEventBuses",
"eventbridge:CreateRule",
"eventbridge:GetRule",
"eventbridge:UpdateRule",
"eventbridge:EnableRule",
"eventbridge:DisableRule",
"eventbridge:DeleteRule",
"eventbridge:ListRules",
"eventbridge:PutEvents",
"eventbridge:UpdateTargets",
"eventbridge:DeleteTargets",
"eventbridge:ListTargets"
],
"Resource": "acs:eventbridge:*:*:eventbus/*"
}],
"Version": "1"
}2. Create an event rule
After the initial setup, return to the configuration page: go to Workspace Details, select your PAI workspace, and then click Workspace Configurations > Configure Event Notification. Click Create Event Rule.
In the Create Event Rule panel that appears, enter a Rule Name and a Rule Description (up to 256 characters), and then configure Event Type, Event Scope, and Event Target.
2.1 Configure event type
Select the Event Source and the specific Event Type that you want to monitor.
Pipeline Jobs: Monitor the status of Designer pipeline tasks.
DLC Jobs: Monitor the lifecycle events of DLC jobs.
Models: Monitor the status changes of model versions in AI Asset Management.
DSW instance: Monitor the status changes of DSW instances and saved images.
2.2 Configure event targets
Configure how and where to deliver event notifications.
DingTalk Notification: Configure the webhook and signing key parameters. For more information, see Appendix: Obtain the webhook and signing key of a DingTalk bot. After you configure the parameters, click Test Connectivity to run a connectivity validation.
WeCom Notification: Configure the webhook URL for WeCom messages.
Lark Notification: Configure the webhook URL for a custom Lark bot.
HTTP/HTTPS: Automatically calls a specified URL when the status of a model version changes. This target applies only to Model event types, and your receiving API must parse the request based on the required template.
Voice Calls, Text Message, and Email: Place a voice call to, or send a text message or an email to, the specified contacts. These targets do not apply to Model event types. These targets are available only in the China (Hangzhou), China (Shanghai), and China (Ulanqab) regions. If no contact is available for selection, first complete the message receiving settings.
By default, each event rule supports up to 5 event targets. If this quota does not meet your requirements, you can request a quota increase. We recommend that you do not exceed 100.When you configure voice calls, text messages, or emails, each contact that you add consumes one quota unit. Contacts are not deduplicated. For example, if you add Alice and Tony as text message contacts and Alice and Alan as email contacts, you consume 4 quota units in total.
FAQ
Q: The following error occurs when you open the event notification configuration page: ServiceNotEnable
This error indicates that EventBridge is not activated. First activate EventBridge.
Appendix: Obtain the webhook and signing key of a DingTalk bot
In the DingTalk group where you want to receive notifications, open the group bot dialog box.
Click the settings icon in the upper-right corner of the group chat window, click Bots on the Group Settings panel, and then click Add Robot on the bot management panel.
Go to the Add Robot dialog box.
In the bot list, select Custom (Connect to custom services by using a webhook), and then click Add.
In the Add Robot dialog box, configure the following parameters, copy the signing key, and then click Finished.
NoteSave the copied signing key to your local device for later use.
Enter a Bot Name. In the Security Settings section, select Sign to add signature, click Copy to obtain the signing key, select I have read and agree, and then click Finished.
In the Add Robot dialog box, click Copy and Finished.
NoteSave the webhook URL to your local device for later use.
Do not publish the webhook URL on external websites, to prevent leaks.
The signing key and the webhook URL that you obtain in Step 3 and Step 4 are the signing key and Webhook values that you configure when you create an event rule in Event notification configuration.