Creates or modifies an alert contact group.

This topic provides an example on how to create an alert contact group named ECS_Group.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes PutContactGroup

The operation that you want to perform. Set the value to PutContactGroup.

ContactGroupName String Yes ECS_Group

The name of the alert contact group.

For information about how to obtain the name of an alert contact group, see DescribeContactGroupList.

Describe String No ECS_Alert_Group

The description of the alert contact group.

EnableSubscribed Boolean No true

Specifies whether to enable the weekly report subscription feature. Valid values:

  • true: The weekly report subscription feature is enabled.
  • false: The weekly report subscription feature is disabled.
Note You can enable the weekly report subscription only for an Alibaba Cloud account that has at least five Elastic Compute Service (ECS) instances.
ContactNames.N RepeatList No Alice

The name of the alert contact. Valid values of N: 1 to 100.

Response parameters

Parameter Type Example Description
Code String 200

The HTTP status code.

Note The status code 200 indicates that the call was successful.
Message String Illegal parameters.

The error message.

RequestId String B4E30DB6-F069-5D0B-A589-2A89F7D62A57

The ID of the request.

Success Boolean true

Indicates whether the call was successful. Valid values:

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

Examples

Sample requests

http(s)://[Endpoint]/?Action=PutContactGroup
&ContactGroupName=ECS_Group
&<Common request parameters>

Sample success responses

XML format

<PutContactGroupResponse>
	  <RequestId>B4E30DB6-F069-5D0B-A589-2A89F7D62A57</RequestId>
	  <Code>200</Code>
	  <Success>true</Success>
</PutContactGroupResponse>

JSON format

{
    "RequestId": "B4E30DB6-F069-5D0B-A589-2A89F7D62A57",
    "Code": "200",
    "Success": true
}

Error codes

For a list of error codes, visit the API Error Center.