All Products
Search
Document Center

Container Registry:Modify an event notification template

Last Updated:Jul 11, 2023

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. This topic also describes the parameters that can be modified in an event notification template.

Procedure

  1. Log on to the Container Registry console.
  2. In the top navigation bar, select a region.
  3. In the left-side navigation pane, click Instances.

  4. On the Instances page, click the Enterprise Edition instance that you want to manage.
  5. In the left-side navigation pane of the instance details page, choose Instances > Event Notification.

  6. On the Event Notification page, click the Event History tab, and then click View Details in the Actions column corresponding to the event ID.

  7. In the left-side navigation pane of the event bus details page of the EventBridge console, click Event Rules.

  8. On the Event Rules page, find the event rule that you want to modify and click Edit Targets in the Actions column.

  9. 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 list the parameters that can be modified in the event notification templates of image build completed, image scan completed, delivery chain completed, image tagging completed, and image synchronization completed.

The image is built

Event type: cr:Artifact:BuildCompleted.

Parameter

Type

Example

Description

RegionId

String

cn-hangzhou

The region ID of the image. For more information about region IDs, see Supported regions.

InstanceId

String

cri-kmsiwlxxdcv****

The ID of the instance.

InstanceName

String

shanghai-instance1

The name of the instance.

RepoBuildType

String

MANUAL

The type of the repository build. Valid values:

  • MANUAL

  • AUTO

RepoId

String

test

The ID of the repository.

RepoName

String

test

The name of the repository.

RepoNamespaceName

String

test

The name of the namespace to which the repository belongs.

Tag

String

1.0

The tag of the image.

ImageUpdate

String

2021-03-26 12:51:12

The time when the image is updated.

The image is scanned

Event type: cr:Artifact:ScanCompleted.

Parameter

Type

Example

Description

RegionId

String

cn-hangzhou

The region ID of the image. For more information about region IDs, see Supported regions.

InstanceId

String

cri-kmsiwlxxdcvaduwb

The ID of the instance.

InstanceName

String

shanghai-instance1

The name of the instance.

RepoId

String

test

The ID of the repository.

RepoName

String

test

The name of the repository.

RepoNamespaceName

String

test

The name of the namespace to which the repository belongs.

Tag

String

1.0

The tag of the image.

ImageUpdate

String

2021-03-26 12:51:12

The time when the image is updated.

Status

String

COMPLETE

The status of the image scan. 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 on images.

EndTime

String

2021-03-26 12:51:12

The time when the scan is complete.

The delivery chain is processed

Event type: cr:Artifact:DeliveryChainCompleted.

Parameter

Type

Example

Description

RegionId

String

cn-hangzhou

The region ID of the image. For more information about region IDs, see Supported regions.

InstanceId

String

cri-kmsiwlxxdcvaduwb

The ID of the instance.

InstanceName

String

shanghai-instance1

The name of the instance.

RepoId

String

test

The ID of the repository.

RepoName

String

test

The name of the repository.

RepoNamespaceName

String

test

The name of 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 processing is complete.

The image is signed

Event type: cr:Artifact:SigningCompleted.

Parameter

Type

Example

Description

RegionId

String

cn-hangzhou

The region ID of the image. For more information about region IDs, see Supported regions.

InstanceId

String

cri-kmsiwlxxdcvaduwb

The ID of the instance.

InstanceName

String

shanghai-instance1

The name of the instance.

RepoId

String

test

The ID of the repository.

RepoName

String

test

The name of the repository.

RepoNamespaceName

String

test

The name of the namespace to which the repository belongs.

Tag

String

1.0

The tag of the image.

Result

String

SUCCESS

The result of image tagging. Valid values:

  • SUCCESS

  • FAILED

FailureMessage

String

No such algorithm

The reason for image tagging failure.

The image is synchronized

Event type: cr:Artifact:SynchronizationCompleted.

Parameter

Type

Example

Description

SyncTaskId

String

rst-c8zx2c80z0071zmq

The ID of the synchronization task.

TaskStatus

String

SUCCESS

The status of the image synchronization. Valid values:

  • CANCELED

  • SUCCESS

  • ERROR

SyncRuleId

String

crsr-tifk99k64ifasrhu

The ID of the synchronization rule.

TaskTrigger

String

PASSIVE

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 about region IDs, 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 about region IDs, see Supported regions.