All Products
Search
Document Center

CloudMonitor:DescribeContactList

Last Updated:Jul 26, 2024

Queries alert contacts.

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:DescribeContactListget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PageSizeintegerNo

The number of entries to return on each page.

Default value: 100.

10
PageNumberintegerNo

The number of the page to return.

Default value: 1.

1
ContactNamestringNo

The name of the alert contact.

Alice
ChanelTypestringNo

The alert notification method. Valid values:

  • Mail: emails
  • DingWebHook: DingTalk chatbots
Mail
ChanelValuestringNo

The value specified for the alert notification method.

Note This parameter is required only if you set the ChanelType parameter to Mail.
Alice@example.com

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The HTTP status code.

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

The error message.

The Request is not authorization.
RequestIdstring

The ID of the request.

06D5ECC2-B9BE-42A4-8FA3-1A610FB08B83
Totalinteger

The total number of returned entries.

15
Successboolean

Indicates whether the call was successful. Valid values:

  • true: The call was successful.
  • false: The call failed.
true
Contactsarray<object>

The alert contacts.

object
UpdateTimelong

The timestamp when the alert contact was updated.

Unit: milliseconds.

1552356159000
Namestring

The name of the alert contact.

Alice
CreateTimelong

The timestamp when the alert contact was created.

Unit: milliseconds.

1552356159000
Langstring

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

  • zh-cn: simplified Chinese
  • en: English
zh-cn
Descstring

The description of the alert contact.

ContactGroupsarray

The alert contact groups.

string
{ "ContactGroup": [ "ECS_Group", "Jim" ] }
Channelsobject

The alert notification method.

Mailstring

The email address of the alert contact.

Alice@example.com
AliIMstring

The TradeManager ID of the alert contact.

Alice
DingWebHookstring

The webhook URL of the DingTalk chatbot.

https://oapi.dingtalk.com/robot/send?access_token=9bf44f8189597d07dfdd7a123455ffc112****
SMSstring

The phone number of the alert contact.

1333333****
ChannelsStateobject

The status of the alert notification method. Valid values: PENDING and OK.

The email address must be activated after it is added as the value specified for the alert notification method. The value PENDING indicates that the email address is not activated. The value OK indicates that the email address is activated.

Mailstring

The status of the email address. Valid values:

  • PENDING: The email address is not activated. Alert notifications can be sent to the email address only after the email address is activated.
  • OK: The email address is activated and can receive alert notifications.
PENDING
AliIMstring

The status of the TradeManager ID.

Valid value: OK. The value OK indicates that the TradeManager ID is valid and can receive alert notifications.

Note This parameter can be returned only on the China site (aliyun.com).
OK
DingWebHookstring

The status of the DingTalk chatbot.

Valid value: OK. The value OK indicates that the DingTalk chatbot is normal and alert notifications can be received in a DingTalk group.

OK
SMSstring

The status of the phone number. Valid values:

  • PENDING: The phone number is not activated. Alert notifications can be sent to the phone number by using text messages only after the phone number is activated.
  • OK: The phone number is activated and can receive alert notifications.
Note This parameter can be returned only on the China site (aliyun.com).
OK

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "The Request is not authorization.",
  "RequestId": "06D5ECC2-B9BE-42A4-8FA3-1A610FB08B83",
  "Total": 15,
  "Success": true,
  "Contacts": {
    "Contact": [
      {
        "UpdateTime": 1552356159000,
        "Name": "Alice",
        "CreateTime": 1552356159000,
        "Lang": "zh-cn",
        "Desc": "",
        "ContactGroups": {
          "ContactGroup": [
            "{ \"ContactGroup\": [ \t\"ECS_Group\", \"Jim\" ] }"
          ]
        },
        "Channels": {
          "Mail": "Alice@example.com",
          "AliIM": "Alice",
          "DingWebHook": "https://oapi.dingtalk.com/robot/send?access_token=9bf44f8189597d07dfdd7a123455ffc112****",
          "SMS": "1333333****"
        },
        "ChannelsState": {
          "Mail": "PENDING",
          "AliIM": "OK",
          "DingWebHook": "OK",
          "SMS": "OK"
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError message
400InvalidParameter%s
403InvalidAuthorization%s
404ResourceNotFound%s
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