Updated on 2026-06-09 GMT+08:00

Querying Triggered Event Notification Records

Function

This API is used to query all event notifications triggered in the last three months.

Constraints

Only event notification records generated within three months are stored.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    csms::listNotificationRecords

    List

    -

    -

    csms:event:listNotificationRecords

    -

URI

GET /v1/{project_id}/csms/notification-records

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. For details, see Obtaining a Project ID.

Constraints

N/A

Range

The value returned by the IAM API is used, which contains 32 characters.

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. It can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token. This parameter is optional if AK/SK authentication is used.

Constraints

N/A

Range

Obtain the value by calling the IAM API for obtaining the user token.

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

records

Array of Record objects

Definition

Secret event notification record

Range

N/A

page_info

PageInfo object

Definition

Pagination information.

Range

N/A

Table 4 Record

Parameter

Type

Description

event_name

String

Definition

Event name

Range

N/A

trigger_event_type

String

Definition

Event type

Range

  • SECRET_VERSION_CREATED: Version created.

  • SECRET_VERSION_EXPIRED: Version expired.

  • SECRET_ROTATED: Secret rotated.

  • SECRET_DELETED: Secret deleted.

  • SECRET_ROTATED_FAILED: Secret rotation failed.

create_time

Long

Definition

Timestamp when an event notification record was created, that is, the total number of seconds since January 1, 1970.

Range

N/A

secret_name

String

Definition

Secret name

Range

N/A

secret_type

String

Definition

Secret type

Range

  • COMMON: shared secret (default). It is used to store sensitive information in an application system.

  • RDS: RDS secret. It is used to store RDS account information. (This value is no longer supported and is replaced by RDS-FG.)

  • RDS-FG: RDS secret. It is used to store RDS account information.

  • GaussDB-FG: TaurusDB secret. It is used to store TaurusDB account information.

notification_target_name

String

Definition

Name of the object to which the event notification is sent

Range

N/A

notification_target_id

String

Definition

ID of the object to which the event notification is sent

Range

N/A

notification_content

String

Definition

Event notification

Range

N/A

notification_status

String

Definition

Event notification status

Range

  • SUCCESS: Event notification succeeded.

  • FAIL: Event notification failed.

  • INVALID: Failed to send the event notification because the topic is invalid or incorrect.

Table 5 PageInfo

Parameter

Type

Description

next_marker

String

Definition

Query address of the next page (secret name at the end of the current page and the start of the next page)

Range

N/A

previous_marker

String

Definition

Secret name at the start of the current page and the end of the last page

Range

N/A

current_count

Integer

Definition

Number of records returned on this page

Range

N/A

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "records" : [ {
    "event_name" : "demo-event",
    "trigger_event_type" : "SECRET_VERSION_EXPIRED",
    "create_time" : 1581507580000,
    "secret_name" : "demo-secret",
    "secret_type" : "COMMON",
    "notification_target_name" : "SecretExpirationNotificationTest",
    "notification_target_id" : "urn:smn:cn-north-4:SecretExpirationTest",
    "notification_content" : "{\"eventName\":\"TestEvent20221112\",\"eventType\":\"SECRET_VERSION_EXPIRED\",\"eventTime\":\"2023-04-14T20:25:10.126Z\",\"data\":{\"secretId\":\"fde3d6ba-cb31-40b0-b6c4-78757050f8c8\",\"secretName\":\"Secret20230325\",\"createTime\":\"2023-03-22T20:43:04.000Z\",\"updateTime\":\"2023-04-14T20:18:29.000Z\",\"versionId\":\"v18\",\"versionExpireTime\":\"2023-03-29T17:07:23.000Z\"}}",
    "notification_status" : "SUCCESS"
  } ]
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.