Updated on 2025-11-06 GMT+08:00

Creating a Message Notification Configuration

Function

This API is used to create a message notification configuration.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

AccessAnalyzer:notificationSetting:create

Write

notificationSetting *

-

-

-

URI

POST /v5/notification-settings

Request Parameters

Table 1 Request body parameters

Parameter

Mandatory

Type

Description

analyzer_id

Yes

String

Unique identifier of an analyzer

mc_switch

Yes

Boolean

Whether to enable message notifications.

smn_topic_urns

Yes

Array of strings

URN list of SMN topics configured for message notifications.

Response Parameters

Status code: 201

Table 2 Response body parameters

Parameter

Type

Description

id

String

Unique identifier of the message notification configuration.

urn

String

Unique resource identifier of the message notification configuration.

Status code: 400

Table 3 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

request_id

String

Request ID.

encoded_authorization_message

String

Authentication information.

Status code: 403

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

request_id

String

Request ID.

encoded_authorization_message

String

Authentication information.

Status code: 404

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

request_id

String

Request ID.

encoded_authorization_message

String

Authentication information.

Example Requests

Creating a message notification configuration

POST https://{hostname}/v5/notification-settings

{
  "analyzer_id" : "3de500b3f6c74b0a8ef170656f8a6376",
  "mc_switch" : true,
  "smn_topic_urns" : [ "urn:smn:cn-north-7:******:test1" ]
}

Example Responses

Status code: 201

Created

{
  "id" : "1c8b66cc466943ad9f6238a19f6f6679"
}

Status Codes

Status Code

Description

201

Created

400

Bad request

403

Forbidden

404

NotFound

Error Codes

See Error Codes.