Updated on 2026-07-22 GMT+08:00

Creating a Message Notification Configuration

Function

This API is used to create a message notification configuration.

Authorization Information

Each account root user 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

Definition:

Unique identifier of an analyzer.

You can call the ListAnalyzers API to obtain the analyzer ID. The response parameters of this API return an analyzer list. The id field of each analyzer object is the analyzer ID.

Constraints:

N/A

Range:

1 to 36 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.

Default Value:

N/A

mc_switch

Yes

Boolean

Definition:

Whether to enable message notifications.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

smn_topic_urns

Yes

Array of strings

Definition:

URN list of SMN topics configured for message notifications.

Constraints:

N/A

Range:

The array length ranges from 0 to 3. The array element contains 1 to 1,500 characters.

Default Value:

N/A

Response Parameters

Status code: 201

Table 2 Response body parameters

Parameter

Type

Description

id

String

Definition:

Unique identifier of the message notification configuration.

Range:

1 to 36 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.

urn

String

Definition:

Unique resource identifier of the message notification configuration.

Range:

The value contains 1 to 1,500 characters.

Status code: 400

Table 3 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error code.

Range:

N/A

error_msg

String

Definition:

Error message.

Range:

N/A

request_id

String

Definition:

Request ID.

Range:

N/A

encoded_authorization_message

String

Definition:

Authentication information.

Range:

N/A

Status code: 403

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error code.

Range:

N/A

error_msg

String

Definition:

Error message.

Range:

N/A

request_id

String

Definition:

Request ID.

Range:

N/A

encoded_authorization_message

String

Definition:

Authentication information.

Range:

N/A

Status code: 404

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error code.

Range:

N/A

error_msg

String

Definition:

Error message.

Range:

N/A

request_id

String

Definition:

Request ID.

Range:

N/A

encoded_authorization_message

String

Definition:

Authentication information.

Range:

N/A

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.