Configuring Exception Notifications
Function
- This API is used to set alarm information in batches. This parameter cannot be set for stopped tasks.
- You can select an existing SMN topic or manually enter a mobile number or email address.
Debugging
You can debug the API in API Explorer to support automatic authentication. API Explorer can automatically generate and debug example SDK code.
URI
POST /v3/{project_id}/jobs/batch-set-smn
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token obtained from IAM. |
X-Language |
No |
String |
Request language type. Default value: en-us Enumerated values:
|
Content-Type |
Yes |
String |
Content type, which is application/json. The default value is application/json. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
jobs |
Yes |
Array of objects |
Task information. For details, see Table 4. |
alarm_notify_info |
Yes |
Object |
Notification method and information. For details, see Table 5. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
job_id |
Yes |
String |
Task ID. |
status |
Yes |
String |
Task status. |
engine_type |
Yes |
String |
Engine type of a DRS task. The value can be:
For details, see Engine Types. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
subscriptions |
No |
Array of objects |
Entered when the mobile number or email address is manually entered. For details, see Table 6. |
topic_urn |
No |
String |
Topic resource ID. |
delay_time |
No |
Long |
Subscription delay. |
rto_delay |
No |
Long |
RTO delay. |
rpo_delay |
No |
Long |
RPO delay. |
alarm_to_user |
No |
Boolean |
Whether to notify users of abnormal alarms. If this parameter is not specified, the default value is false. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
results |
Array of objects |
Response body for inputting SMN. For details, see Table 8. |
count |
Integer |
Total number of input SMNs. |
Example Request
- Associating an existing SMN topic with a MySQL task that is being configuring
https://{endpoint}/v3/0ac6eb2c8000d2ee2fd9c006dededbe6/jobs/batch-set-smn { "jobs" : [ { "job_id" : "c7296a3b-0d9f-424c-8d74-816ca62jb2a2", "status" : "CONFIGURATION", "engine_type" : "mysql" } ], "alarm_notify_info" : { "topic_urn" : "urn:smn:cn-north-7:04f9aca88c00d3202fd4c01ed679daf0:drs-zw", "delay_time" : 1200 } }
- Manually entering the mobile number and email address for an incremental task
https://{endpoint}/v3/0ac6eb2c8000d2ee2fd9c006dededbe6/jobs/batch-set-smn { "jobs" : [ { "job_id" : "2b36da5c-44a7-41af-8889-247b14djb2a2", "status" : "INCRE_TRANSFER_STARTED", "engine_type" : "oracle-to-dws" } ], "alarm_notify_info" : { "subscriptions" : [ { "protocol" : "sms", "endpoints" : [ "12345678910" ] }, { "protocol" : "email", "endpoints" : [ "123456@abc.com" ] } ], "delay_time" : 100 } }
Example Response
Status code: 200
OK
{ "count" : 1, "results" : [ { "id" : "ed3723ca-d34a-42b0-9829-0baef12jb20b", "status" : "success" } ] }
Status Code
Status Code |
Description |
---|---|
200 |
OK |
Error Code
For details, see Error Code.
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