All Products
Search
Document Center

CloudMonitor:PutContact

Last Updated:Mar 01, 2024

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ContactNamestringYes

The name of the alert contact.

Alice
DescribestringYes

The description of the alert contact.

ECS_Instance
Channels.SMSstringNo

The phone number of the alert contact. After you add or modify a phone number, the recipient receives a text message that contains an activation link. The system adds the recipient to the list of alert contacts only after the recipient activates the phone number.

Specify at least one of the following alert notification targets: email address or webhook URL of the DingTalk chatbot.

1333333****
Channels.MailstringNo

The email address of the alert contact. After you add or modify an email address, the recipient receives an email that contains an activation link. The system adds the recipient to the list of alert contacts only after the recipient activates the email address.

Specify at least one of the following alert notification targets: email address or webhook URL of the DingTalk chatbot.

test@aliyun.com
Channels.AliIMstringNo

The TradeManager ID of the alert contact.

Specify at least one of the following alert notification targets: email address or webhook URL of the DingTalk chatbot.

Jim
Channels.DingWebHookstringNo

The webhook URL of the DingTalk chatbot.

Specify at least one of the following alert notification targets: email address or webhook URL of the DingTalk chatbot.

https://oapi.dingtalk.com/robot/send?access_token=7d49515e8ebf21106a80a9cc4bb3d247771305d52fb15d6201234565****
LangstringNo

The language in which the alert information is displayed. Valid values:

  • zh-cn: simplified Chinese
  • en: English
Note If you do not specify a value for this parameter, Cloud Monitor identifies the language of the alert information based on the region of your Alibaba Cloud account.
zh-cn

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The HTTP status code.

Note The status code 200 indicates that the call was successful.
200
Messagestring

The returned message.

The Request is not authorization.
RequestIdstring

The ID of the request.

181C406E-9DE4-484C-9C61-37AE9A1A12EE
Successboolean

Indicates whether the call was successful. Valid values:

  • true: The call was successful.
  • false: The call failed.
true

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "The Request is not authorization.",
  "RequestId": "181C406E-9DE4-484C-9C61-37AE9A1A12EE",
  "Success": true
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterValue%s-
403InvalidAuthorizationPermission deniedPermission denied.
500InternalErrorThe request processing has failed due to some unknown error.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history