Associating a Secret with an Event
With event notification, you can understand the secret version changes. The notifications are in JSON format, which is applicable to automatic parsing in machine-machine scenarios. This section describes how to create an event on the Events page.
When creating an event, you can set the event type to new Version creation, Version expiry, Secret rotation, and Secret deletion.
Constraints
- You can create up to 30 events.
- Simple Message Notification (SMN) is required when you create an SMN message type. SMN is billed based on the actual usage. For details, see SMN Pricing Details.
Before setting alarm notifications, create a message topic in SMN.
- To create an event grid (EG) message type, you need to create a cloud service event subscription on the EG console. For details, see Creating an Event Subscription.
Associating a Secret with an Event
- Log in to the DEW console.
- Click
in the upper left corner and select a region or project.
- In the navigation pane on the left, choose Cloud Secret Management Service > Events. The Events page is displayed.
- Click Create Event in the upper right corner.
Figure 1 Creating an event
Table 1 Parameters for creating an event Parameter
Description
Event Name
Name of the event to be created.
NOTE:Only letters, digits, hyphens (-), and underscores (_) are supported.
Status
The options are Enabled and Disabled. By default, Enabled is selected.
Message Type
The following message types are supported:
- Simple Message Notification (SMN): When a selected event is triggered for the target secret, CSMS sends a notification through SMN.
- Event Grid (EG): When a selected event is triggered for the target secret, CSMS sends a notification through EG. When creating an event subscription, set Event Source to HC.DEW.CSMS. For details, see Creating an Event Subscription.
Topic Name
This parameter is mandatory when Message Type is set to Simple Message Notification (SMN).
Select a topic from the drop-down list or create a topic.
If there are no topics, click View SMN topic and perform the following steps to create a topic:- Create a topic. For details, see Creating a Topic.
- Add one or more subscriptions to the topic. You will need to provide a phone number, email address, function, platform application endpoint, DMS endpoint, or HTTP/HTTPS endpoint for receiving alarm notifications. For details, see Adding a Subscription.
- Confirm the subscription. Add and confirm the subscription.
For details about topics and subscriptions, see the Simple Message Notification User Guide.
Message Template
(Optional) Select a message template created in SMN or leave it as None.
Channel
This parameter is mandatory when Message Type is set to Event Grid (EG). Currently, only default is supported. A cloud service event channel automatically created by EG to receive events from cloud services. This channel cannot be modified. Events generated by cloud service event sources can only be published to this channel.
Event Type
Supported event types, including Version creation, Version expiry, Secret rotation, and Secret deletion.
- Click OK.
- View the created event in the event list. The default event status is Enabled.
Figure 2 Event list
Viewing Event Notification Records
- In the navigation pane on the left, choose Cloud Secret Management Service > Events. The Events page is displayed.
- Click the Notifications tab.
- In the Notifications tab, you can view the changes made to the secrets of the associated events.
Related Operations
- Viewing event details: Click the event name to view its details.
- Editing an event: Locate the target event and click Edit in the Operation column. On the displayed page, edit message type and event type as required.
- Enabling an event:
- Locate the target disabled event and click Edit in the Operation column.
- Set Status to Enabled.
- Click OK. A message is displayed in the upper right corner of the page, indicating that the event is enabled.
- Disabling an event:
- Locate the target enabled event and click Edit in the Operation column.
- Set Status to Disabled.
- Click OK. A message is displayed in the upper right corner of the page, indicating that the event is disabled.
- Deleting an event: Locate the target event and click Delete in the Operation column. In the displayed dialog box, enter DELETE and click OK.
Event notifications can be deleted only after all associated secrets have been canceled. If the associated secret is not canceled, the deletion will fail.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot