All Products
Search
Document Center

CloudMonitor:PutContact

Last Updated:Jul 26, 2024

Debugging

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

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cms:PutContactcreate
  • All Resources
    *
    none
none

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