Creates an alert rule.

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

ParameterTypeRequiredExampleDescription
ActionStringYesCreateDedicatedClusterMonitorRule

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

InstanceIdStringNorm-bp1162kryivb8****

The instance ID.

DedicatedClusterIdStringYesdts-dasd22******

The ID of the cluster.

NoticeSwitchLongNo1

Specifies whether to enable the alert feature. Valid values:

  • 1: enables the alert feature.
  • 0: disables the alert feature.
DuAlarmThresholdLongNo20

The alert threshold for DTS Unit (DU) usage. Unit: percentage.

CpuAlarmThresholdLongNo30

The alert threshold for CPU utilization. Unit: percentage.

MemAlarmThresholdLongNo40

The alert threshold for memory usage. Unit: percentage.

DiskAlarmThresholdLongNo100

The alert threshold for disk usage. Unit: percentage.

PhonesStringYes186****7654

The mobile phone number to which alerts are sent. Separate multiple mobile phone numbers with commas (,).

RegionIdStringNocn-hangzhou

The ID of the region in which the DTS instance resides.

Response parameters

ParameterTypeExampleDescription
HttpStatusCodeString200

The HTTP status code.

RequestIdString621BB4F8-3016-4FAA-8D5A-5D3163CC****

The request ID.

ErrCodeStringInternalError

The error code returned if the request failed.

SuccessStringtrue

Indicates whether the request was successful.

ErrMessageStringThe Value of Input Parameter %s is not valid.

The error message returned if the request failed.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=CreateDedicatedClusterMonitorRule
&InstanceId=rm-bp1162kryivb8****
&DedicatedClusterId=dts-dasd22******
&NoticeSwitch=1
&DuAlarmThreshold=20
&CpuAlarmThreshold=30
&MemAlarmThreshold=40
&DiskAlarmThreshold=100
&Phones=186****7654
&RegionId=cn-hangzhou
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateDedicatedClusterMonitorRuleResponse>
    <code>200</code>
    <data>
        <RequestId>C80CF904-73D1-1983-9A1C-****</RequestId>
        <HttpStatusCode>200</HttpStatusCode>
        <Success>true</Success>
    </data>
    <httpStatusCode>200</httpStatusCode>
    <requestId>C80CF904-73D1-1983-9A1C-****</requestId>
    <successResponse>true</successResponse>
</CreateDedicatedClusterMonitorRuleResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "code" : "200",
  "data" : {
    "RequestId" : "C80CF904-73D1-1983-9A1C-****",
    "HttpStatusCode" : 200,
    "Success" : true
  },
  "httpStatusCode" : "200",
  "requestId" : "C80CF904-73D1-1983-9A1C-****",
  "successResponse" : true
}

Error codes

HTTP status codeError codeError messageDescription
400Throttling.UserRequest was denied due to user flow control.The number of requests reached the limit and the request was rejected. Try again later.
500ServiceUnavailableThe request has failed due to a temporary failure of the server.The response of the server timed out or the server was unavailable. Try again. If the error persists, contact technical support.
403InvalidSecurityToken.ExpiredSpecified SecurityToken is expired.The signature expired. Use a new signature.

For a list of error codes, see Service error codes.