全部產品
Search
文件中心

Data Transmission Service:建立警示規則

更新時間:Feb 10, 2025

調用CreateDedicatedClusterMonitorRule介面建立警示規則。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

請求參數

名稱 類型 是否必選 樣本值 描述
Action String CreateDedicatedClusterMonitorRule

系統規定參數。取值:CreateDedicatedClusterMonitorRule

InstanceId String rm-bp1162kryivb8****

執行個體ID。

DedicatedClusterId String dts-dasd22******

叢集ID。

NoticeSwitch Long 1

警示開關,取值:

  • 1:開啟。
  • 0:關閉。
DuAlarmThreshold Long 20

DU警示閾值,單位為%。

CpuAlarmThreshold Long 30

CPU警示閾值,單位為%。

MemAlarmThreshold Long 40

Mem警示閾值,單位為%。

DiskAlarmThreshold Long 100

磁碟警示閾值,單位為%。

Phones String 186****7654

警示電話,多個用逗號(,)隔開。

RegionId String cn-hangzhou

DTS執行個體所在地區。

返回資料

名稱 類型 樣本值 描述
HttpStatusCode String 200

狀態代碼。

RequestId String 621BB4F8-3016-4FAA-8D5A-5D3163CC****

請求ID。

ErrCode String InternalError

調用出錯時返回的錯誤碼。

Success String true

請求是否成功。

ErrMessage String The Value of Input Parameter %s is not valid.

調用出錯時返回的錯誤資訊。

樣本

請求樣本

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
&公用請求參數

正常返回樣本

XML格式

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格式

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
}

錯誤碼

HttpCode 錯誤碼 錯誤資訊 描述
400 Throttling.User Request was denied due to user flow control. 由於請求頻次達到閾值,請求被拒絕,請稍後重試。
500 ServiceUnavailable The request has failed due to a temporary failure of the server. 由於服務端響應逾時或者不可用導致請求失敗,請重試,重試後仍失敗請聯絡支援人員。
403 InvalidSecurityToken.Expired Specified SecurityToken is expired. 簽名已經到期,請更新簽名

訪問錯誤中心查看更多錯誤碼。