Event notification templates control the content and format of notifications sent when ACR Container Registry (ACR) events occur. This topic describes how to edit a DingTalk notification template and lists the available parameters for each event type.
Prerequisites
Before you begin, ensure that you have:
An ACR Enterprise Edition instance
At least one event notification rule configured in EventBridge
Modify a template
Log on to the Container Registry console.
In the top navigation bar, select a region.
On the Instances page, click the Enterprise Edition instance that you want to manage.
In the left-side navigation pane of the instance details page, choose Instances > Event Notification.
On the Event Notification page, click the Event History tab, and then click View Details in the Actions column for the event you want to modify.
In the left-side navigation pane of the event bus details page of the EventBridge console, click Event Rules.
On the Event Rules page, find the event rule you want to modify and click Edit Targets in the Actions column.
In the Template text box, edit the DingTalk notification template — for example, update a screenshot link — and then click Save.
Template parameters
The following table summarizes which parameters are available for each event type.
| Event | Event type | Key parameters |
|---|---|---|
| Image build completed | cr:Artifact:BuildCompleted | RegionId, InstanceId, InstanceName, RepoBuildType, RepoId, RepoName, RepoNamespaceName, Tag, ImageUpdate |
| Image scan completed | cr:Artifact:ScanCompleted | RegionId, InstanceId, InstanceName, RepoId, RepoName, RepoNamespaceName, Tag, ImageUpdate, Status, HighSeverity, MediumSeverity, LowSeverity, UnknownSeverity, TotalSeverity, EndTime |
| Image push completed | cr:Artifact:PushCompleted | RegionId, InstanceId, InstanceName, RepoBuildType, RepoId, RepoName, RepoNamespaceName, Tag, ImageUpdate |
| Delivery chain processing completed | cr:Artifact:DeliveryChainCompleted | RegionId, InstanceId, InstanceName, RepoId, RepoName, RepoNamespaceName, Result, EndTime |
| Image signing completed | cr:Artifact:SigningCompleted | RegionId, InstanceId, InstanceName, RepoId, RepoName, RepoNamespaceName, Tag, Result, FailureMessage |
| Image synchronization completed | cr:Artifact:SynchronizationCompleted | SyncTaskId, TaskStatus, SyncRuleId, TaskTrigger, SyncBatchTaskId, StartTime, EndTime, ImageFrom.*, ImageTo.* |
The following sections describe each event type's parameters in detail.
Image build completed
Event type: cr:Artifact:BuildCompleted
| Parameter | Type | Example | Description |
|---|---|---|---|
| RegionId | String | cn-hangzhou | The region ID of the image. For more information, see Supported regions. |
| InstanceId | String | cri-kmsiwlxxdcv\*\*\*\* | The instance ID. |
| InstanceName | String | shanghai-instance1 | The instance name. |
| RepoBuildType | String | MANUAL | How the repository was built. Valid values: MANUAL, AUTO. |
| RepoId | String | test | The repository ID. |
| RepoName | String | test | The repository name. |
| RepoNamespaceName | String | test | The namespace to which the repository belongs. |
| Tag | String | 1.0 | The image tag. |
| ImageUpdate | String | 2021-03-26 12:51:12 | The time when the image was last updated. |
Image scan completed
Event type: cr:Artifact:ScanCompleted
| Parameter | Type | Example | Description |
|---|---|---|---|
| RegionId | String | cn-hangzhou | The region ID of the image. For more information, see Supported regions. |
| InstanceId | String | cri-kmsiwlxxdcvaduwb | The instance ID. |
| InstanceName | String | shanghai-instance1 | The instance name. |
| RepoId | String | test | The repository ID. |
| RepoName | String | test | The repository name. |
| RepoNamespaceName | String | test | The namespace to which the repository belongs. |
| Tag | String | 1.0 | The image tag. |
| ImageUpdate | String | 2021-03-26 12:51:12 | The time when the image was last updated. |
| Status | String | COMPLETE | The scan status. Valid values: COMPLETE, FAILED. |
| HighSeverity | Integer | 1 | The number of high-severity vulnerabilities. |
| MediumSeverity | Integer | 1 | The number of medium-severity vulnerabilities. |
| LowSeverity | Integer | 1 | The number of low-severity vulnerabilities. |
| UnknownSeverity | Integer | 1 | The number of unknown-severity vulnerabilities. |
| TotalSeverity | Integer | 1 | The total number of vulnerabilities detected. |
| EndTime | String | 2021-03-26 12:51:12 | The time when the scan completed. |
Image push completed
Event type: cr:Artifact:PushCompleted
| Parameter | Type | Example | Description |
|---|---|---|---|
| RegionId | String | cn-hangzhou | The region ID of the image. For more information, see Supported regions. |
| InstanceId | String | cri-kmsiwlxxdcv\*\*\*\* | The instance ID. |
| InstanceName | String | shanghai-instance1 | The instance name. |
| RepoBuildType | String | MANUAL | How the repository was built. Valid values: MANUAL, AUTO. |
| RepoId | String | test | The repository ID. |
| RepoName | String | test | The repository name. |
| RepoNamespaceName | String | test | The namespace to which the repository belongs. |
| Tag | String | 1.0 | The image tag. |
| ImageUpdate | String | 2021-03-26 12:51:12 | The time when the image was last updated. |
Delivery chain processing completed
Event type: cr:Artifact:DeliveryChainCompleted
| Parameter | Type | Example | Description |
|---|---|---|---|
| RegionId | String | cn-hangzhou | The region ID of the image. For more information, see Supported regions. |
| InstanceId | String | cri-kmsiwlxxdcvaduwb | The instance ID. |
| InstanceName | String | shanghai-instance1 | The instance name. |
| RepoId | String | test | The repository ID. |
| RepoName | String | test | The repository name. |
| RepoNamespaceName | String | test | The namespace to which the repository belongs. |
| Result | String | SUCCESS | The delivery chain processing result. Valid values: SUCCESS, FAILED, CANCELED, DENIED. |
| EndTime | String | 2021-03-26 12:51:12 | The time when delivery chain processing completed. |
Image signing completed
Event type: cr:Artifact:SigningCompleted
| Parameter | Type | Example | Description |
|---|---|---|---|
| RegionId | String | cn-hangzhou | The region ID of the image. For more information, see Supported regions. |
| InstanceId | String | cri-kmsiwlxxdcvaduwb | The instance ID. |
| InstanceName | String | shanghai-instance1 | The instance name. |
| RepoId | String | test | The repository ID. |
| RepoName | String | test | The repository name. |
| RepoNamespaceName | String | test | The namespace to which the repository belongs. |
| Tag | String | 1.0 | The image tag. |
| Result | String | SUCCESS | The image signing result. Valid values: SUCCESS, FAILED. |
| FailureMessage | String | No such algorithm | The reason image signing failed. |
Image synchronization completed
Event type: cr:Artifact:SynchronizationCompleted
All ImageFrom.* parameters describe the source image. All ImageTo.* parameters describe the destination image.
| Parameter | Type | Example | Description |
|---|---|---|---|
| SyncTaskId | String | rst-c8zx2c80z0071zmq | The synchronization task ID. |
| TaskStatus | String | SUCCESS | The synchronization task status. Valid values: SUCCESS, ERROR, CANCELED. |
| SyncRuleId | String | crsr-tifk99k64ifasrhu | The synchronization rule ID. |
| TaskTrigger | String | IPASSIVE | The trigger policy for the synchronization rule. Valid values: INITIATIVE (manual, active synchronization), PASSIVE (automatic, passive synchronization). |
| SyncBatchTaskId | String | 15DEEB56-9271-4FDD-AC4D-C3A5CC2C0BE9 | The batch synchronization task ID. |
| StartTime | String | 2021-03-26 12:51:12 | The time when image synchronization started. |
| EndTime | String | 2021-03-26 12:51:12 | The time when image synchronization completed. |
| ImageFrom.RepoNamespaceName | String | test | The namespace of the source repository. |
| ImageFrom.ImageTag | String | v0.1 | The tag of the source image. |
| ImageFrom.InstanceId | String | cri-kmsiwlxxdcvaduwb | The source instance ID. |
| ImageFrom.RepoName | String | test | The source repository name. |
| ImageFrom.RegionId | String | cn-hangzhou | The source region ID. For more information, see Supported regions. |
| ImageTo.RepoNamespaceName | String | test | The namespace of the destination repository. |
| ImageTo.ImageTag | String | v0.1 | The tag of the destination image. |
| ImageTo.InstanceId | String | cri-kmsiwlxxdcvaduwb | The destination instance ID. |
| ImageTo.RepoName | String | test | The destination repository name. |
| ImageTo.RegionId | String | cn-hangzhou | The destination region ID. For more information, see Supported regions. |