Container Registry (ACR) lets you customize event notification content using templates. This topic describes how to modify an event notification template and lists its parameters.
Procedure
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 navigation pane on the left, choose .
-
On the Event Notification page, click the Event History tab, and then click View Details next to the target event ID.
-
You are then redirected to the EventBridge console. In the navigation pane on the left, click Event Rules.
-
On the Event Rules page, find the target rule and click Edit Targets in the Actions column.
-
In the Template text box, modify the DingTalk event notification template. For example, you can update a screenshot link. Then, click Save.
Event notification parameters
The following sections list the parameters for image build, image scan, image push, delivery chain, image signing, and synchronization events.
The image is built.
Event type: cr:Artifact:BuildCompleted
|
Parameter |
Type |
Example |
Description |
|
RegionId |
String |
cn-hangzhou |
The region ID. For more information, see supported regions. |
|
InstanceId |
String |
cri-kmsiwlxxdcv**** |
The instance ID. |
|
InstanceName |
String |
shanghai-instance1 |
The instance name. |
|
RepoBuildType |
String |
MANUAL |
The repository's build type. Valid values are:
|
|
RepoId |
String |
test |
The repository ID. |
|
RepoName |
String |
test |
The repository name. |
|
RepoNamespaceName |
String |
test |
The repository namespace. |
|
Tag |
String |
1.0 |
The image tag. |
|
ImageUpdate |
String |
2021-03-26 12:51:12 |
When the image was last updated. |
The image is scanned.
Event type: cr:Artifact:ScanCompleted
|
Parameter |
Type |
Example |
Description |
|
RegionId |
String |
cn-hangzhou |
The region ID. 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 repository namespace. |
|
Tag |
String |
1.0 |
The image tag. |
|
ImageUpdate |
String |
2021-03-26 12:51:12 |
When the image was last updated. |
|
Status |
String |
COMPLETE |
The image scan status. Valid values are:
|
|
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. |
|
EndTime |
String |
2021-03-26 12:51:12 |
When the scan completed. |
Image push completion
Event type: cr:Artifact:PushCompleted
|
Parameter |
Type |
Example |
Description |
|
RegionId |
String |
cn-hangzhou |
The region ID. For more information, see supported regions. |
|
InstanceId |
String |
cri-kmsiwlxxdcv**** |
The instance ID. |
|
InstanceName |
String |
shanghai-instance1 |
The instance name. |
|
RepoBuildType |
String |
MANUAL |
The repository's build type. Valid values are:
|
|
RepoId |
String |
test |
The repository ID. |
|
RepoName |
String |
test |
The repository name. |
|
RepoNamespaceName |
String |
test |
The repository namespace. |
|
Tag |
String |
1.0 |
The image tag. |
|
ImageUpdate |
String |
2021-03-26 12:51:12 |
When the image was last updated. |
The delivery chain is processed.
Event type: cr:Artifact:DeliveryChainCompleted
|
Parameter |
Type |
Example |
Description |
|
RegionId |
String |
cn-hangzhou |
The region ID. 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 repository namespace. |
|
Result |
String |
SUCCESS |
The delivery chain result. Valid values are:
|
|
EndTime |
String |
2021-03-26 12:51:12 |
When the delivery chain completed. |
The image is signed.
Event type: cr:Artifact:SigningCompleted
|
Parameter |
Type |
Example |
Description |
|
RegionId |
String |
cn-hangzhou |
The region ID. 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 repository namespace. |
|
Tag |
String |
1.0 |
The image tag. |
|
Result |
String |
SUCCESS |
The image signing result. Valid values are:
|
|
FailureMessage |
String |
No such algorithm |
The reason for the signing failure. |
The image is synchronized.
Event type: cr:Artifact:SynchronizationCompleted
|
Parameter |
Type |
Example |
Description |
|
SyncTaskId |
String |
rst-c8zx2c80z0071zmq |
The synchronization task ID. |
|
TaskStatus |
String |
SUCCESS |
The synchronization task status. Valid values are:
|
|
SyncRuleId |
String |
crsr-tifk99k64ifasrhu |
The synchronization rule ID. |
|
TaskTrigger |
String |
IPASSIVE |
The trigger policy. Valid values are:
|
|
SyncBatchTaskId |
String |
15DEEB56-9271-4FDD-AC4D-C3A5CC2C0BE9 |
The batch synchronization task ID. |
|
StartTime |
String |
2021-03-26 12:51:12 |
The start time. |
|
EndTime |
String |
2021-03-26 12:51:12 |
The end time. |
|
ImageFrom.RepoNamespaceName |
String |
test |
The source repository namespace. |
|
ImageFrom.ImageTag |
String |
v0.1 |
The source image tag. |
|
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 destination repository namespace. |
|
ImageTo.ImageTag |
String |
v0.1 |
The destination image tag. |
|
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. |