If you want to modify event notifications, you can modify the template of the event notifications. This topic describes how to modify an event notification template and the parameters that you can modify in an event notification template.
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 left-side navigation pane of the instance details page, choose .
On the Event Notification page, click the Event History tab, and then click View Details in the Actions column that corresponds to the event ID.
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 that you want to modify and click Edit Targets in the Actions column.
In the Template text box of the template edit page, modify the DingTalk event notification template. For example, you can modify the link of a screenshot. Then, click Save.
Parameters that can be modified in an event notification template
The following tables describe the parameters that can be modified in the event notification templates of image build completed, image scan completed, delivery chain processing completed, image tagging completed, image push completed, and image synchronization completed.
The image is built
Event type: cr:Artifact:BuildCompleted.
Parameter | Type | Example | Description |
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 | Specifies how the repository was built. Valid values: |
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 updated. |
The image is scanned
Event type: cr:Artifact:ScanCompleted.
Parameter | Type | Example | Description |
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 updated. |
Status | String | COMPLETE | The status of the image scan. Valid values: |
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 on images. |
EndTime | String | 2021-03-26 12:51:12 | The time when the scan is complete. |
The image is pushed
Event type: cr:Artifact:PushCompleted.
Parameter | Type | Example | Description |
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 | Specifies how the repository was built. Valid values: |
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 updated. |
The delivery chain is processed
Event type: cr:Artifact:DeliveryChainCompleted.
Parameter | Type | Example | Description |
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 result of the delivery chain processing. Valid values: SUCCESS
FAILED
CANCELED
DENIED
|
EndTime | String | 2021-03-26 12:51:12 | The time when the delivery chain is processed. |
The image tagging succeeds
Event type: cr:Artifact:SigningCompleted.
Parameter | Type | Example | Description |
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 result of image tagging. Valid values: |
FailureMessage | String | No such algorithm | The reason why image tagging failed. |
The image is synchronized
Event type: cr:Artifact:SynchronizationCompleted.
Parameter | Type | Example | Description |
Parameter | Type | Example | Description |
SyncTaskId | String | rst-c8zx2c80z0071zmq | The ID of the synchronization task. |
TaskStatus | String | SUCCESS | The status of the synchronization task. Valid values: |
SyncRuleId | String | crsr-tifk99k64ifasrhu | The ID of the synchronization rule. |
TaskTrigger | String | IPASSIVE | The policy that is applied to trigger the synchronization rule. Valid values: INITIATIVE : manual, active synchronization
PASSIVE : automatic, passive synchronization
|
SyncBatchTaskId | String | 15DEEB56-9271-4FDD-AC4D-C3A5CC2C0BE9 | The ID of the batch synchronization task. |
StartTime | String | 2021-03-26 12:51:12 | The start time of the image synchronization. |
EndTime | String | 2021-03-26 12:51:12 | The end time of the image synchronization. |
ImageFrom.RepoNamespaceName | String | test | The name of the namespace to which the source repository belongs. |
ImageFrom.ImageTag | String | v0.1 | The tag of the source image. |
ImageFrom.InstanceId | String | cri-kmsiwlxxdcvaduwb | The ID of the source instance. |
ImageFrom.RepoName | String | test | The name of the source repository. |
ImageFrom.RegionId | String | cn-hangzhou | The ID of the source region. For more information, see Supported regions. |
ImageTo.RepoNamespaceName | String | test | The name of the namespace to which the destination repository belongs. |
ImageTo.ImageTag | String | v0.1 | The tag of the destination image. |
ImageTo.InstanceId | String | cri-kmsiwlxxdcvaduwb | The ID of the destination instance. |
ImageTo.RepoName | String | test | The name of the destination repository. |
ImageTo.RegionId | String | cn-hangzhou | The ID of the destination region. For more information, see Supported regions. |