調用DescribeJobMonitorRule查詢DTS任務的警示規則。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
請求參數
| 名稱 | 類型 | 是否必選 | 樣本值 | 描述 |
| Action | String | 是 | DescribeJobMonitorRule | 系統規定參數。取值:DescribeJobMonitorRule。 |
| DtsJobId | String | 是 | ta7w132u12h**** | 遷移、同步或訂閱任務ID,可通過調用DescribeDtsJobs擷取。 |
| RegionId | String | 否 | cn-shenzhen | DTS執行個體所屬的地區,詳情請參見支援的地區列表。 |
返回資料
| 名稱 | 類型 | 樣本值 | 描述 |
| HttpStatusCode | Integer | 200 | 狀態代碼。 |
| RequestId | String | 0CA14388-DD89-4A7B-8CDD-884A10CE**** | 請求ID。 |
| DtsJobId | String | ta7w132u12h**** | 遷移、同步或訂閱任務ID。 |
| ErrCode | String | 403 | 調用出錯時返回的錯誤碼。 |
| Success | Boolean | true | 請求是否成功,傳回值:
|
| ErrMessage | String | The Value of Input Parameter %s is not valid. | 調用錯誤時返回的錯誤資訊。 |
| Code | String | 200 | 錯誤碼,本參數即將下線。 |
| DynamicMessage | String | DtsJobId | 動態錯誤資訊,用於替換返回參數ErrMessage錯誤資訊中的%s。 說明 如果ErrMessage返回The Value of Input Parameter %s is not valid,且DynamicMessage返回DtsJobId,則代表所傳入的請求參數DtsJobId不合法。 |
| MonitorRules | Array of MonitorRule | DTS任務的監控規則資訊。 |
|
| Type | String | delay | 監控規則的類型,傳回值:
|
| DelayRuleTime | Long | 60 | 觸發延遲警示的閾值,單位為秒。 |
| State | String | Y | 是否啟用監控規則,傳回值:
|
| Phone | String | 1361234****,1371234**** | 警示觸發後需通知的連絡人手機號碼,多個手機號碼之間以英文逗號(,)分隔。 |
| JobType | String | normal | DTS執行個體的任務類型,取值:
|
| Period | Integer | 5 | 增量校正任務的統計周期,單位為分鐘。 說明 當前支援取值為1分鐘、5分鐘、10分鐘和30分鐘。 |
| Times | Integer | 2 | 增量校正任務的周期數。 |
| NoticeValue | Integer | 2 | 警示閾值。 |
| JobId | String | bi6e22ay243**** | 任務ID。 |
| Topics | Array of String | ['topic_zyjg_prd'] | 同步或遷移到Kafka時的Topic。 |
樣本
請求樣本
http(s)://dts.aliyuncs.com/?Action=DescribeJobMonitorRule
&DtsJobId=ta7w132u12h****
&<公用請求參數>
正常返回樣本
XML格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeJobMonitorRuleResponse>
<DtsJobId>y5il58kzo9n****</DtsJobId>
<RequestId>90DB5FA4-8C53-5123-91A9-63A4CA42****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<MonitorRules>
<Type>delay</Type>
<JobType>normal</JobType>
<State>N</State>
<Phone>1361234****</Phone>
<Times>0</Times>
<Period>0</Period>
<NoticeValue>0</NoticeValue>
<DelayRuleTime>0</DelayRuleTime>
<JobId>y5il58kzo9n****</JobId>
</MonitorRules>
<MonitorRules>
<Type>full_timeout</Type>
<JobType>normal</JobType>
<State>Y</State>
<Times>0</Times>
<Period>0</Period>
<NoticeValue>0</NoticeValue>
<JobId>y5il58kzo9n****</JobId>
</MonitorRules>
<MonitorRules>
<Type>error</Type>
<JobType>normal</JobType>
<State>N</State>
<Phone>1361234****</Phone>
<Times>0</Times>
<Period>0</Period>
<NoticeValue>0</NoticeValue>
<JobId>y5il58kzo9n****</JobId>
</MonitorRules>
<MonitorRules>
<Type>error</Type>
<JobType>full_check</JobType>
<State>Y</State>
<Times>0</Times>
<Period>0</Period>
<NoticeValue>0</NoticeValue>
<JobId>qm2g550ku9x****</JobId>
</MonitorRules>
<MonitorRules>
<Type>warn</Type>
<JobType>full_check</JobType>
<State>Y</State>
<Times>0</Times>
<Period>0</Period>
<NoticeValue>1</NoticeValue>
<JobId>qm2g550ku9x****</JobId>
</MonitorRules>
<MonitorRules>
<Type>error</Type>
<JobType>etl_check</JobType>
<State>Y</State>
<Times>0</Times>
<Period>0</Period>
<NoticeValue>0</NoticeValue>
<JobId>wrdx5a8pc93****</JobId>
</MonitorRules>
<MonitorRules>
<Type>delay</Type>
<JobType>etl_check</JobType>
<State>Y</State>
<Times>2</Times>
<Period>3</Period>
<NoticeValue>0</NoticeValue>
<DelayRuleTime>60</DelayRuleTime>
<JobId>wrdx5a8pc93****</JobId>
</MonitorRules>
<MonitorRules>
<Type>warn</Type>
<JobType>etl_check</JobType>
<State>Y</State>
<Times>2</Times>
<Period>3</Period>
<NoticeValue>1</NoticeValue>
<JobId>wrdx5a8pc93****</JobId>
</MonitorRules>
<Success>true</Success>
</DescribeJobMonitorRuleResponse>
JSON格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"DtsJobId" : "y5il58kzo9n****",
"Topics" : [ ],
"RequestId" : "90DB5FA4-8C53-5123-91A9-63A4CA42****",
"HttpStatusCode" : 200,
"MonitorRules" : [ {
"Type" : "delay",
"JobType" : "normal",
"State" : "N",
"Phone" : "1361234****",
"Times" : 0,
"Period" : 0,
"NoticeValue" : 0,
"DelayRuleTime" : 0,
"JobId" : "y5il58kzo9n****"
}, {
"Type" : "full_timeout",
"JobType" : "normal",
"State" : "Y",
"Times" : 0,
"Period" : 0,
"NoticeValue" : 0,
"JobId" : "y5il58kzo9n****"
}, {
"Type" : "error",
"JobType" : "normal",
"State" : "N",
"Phone" : "1361234****",
"Times" : 0,
"Period" : 0,
"NoticeValue" : 0,
"JobId" : "y5il58kzo9n****"
}, {
"Type" : "error",
"JobType" : "full_check",
"State" : "Y",
"Times" : 0,
"Period" : 0,
"NoticeValue" : 0,
"JobId" : "qm2g550ku9x****"
}, {
"Type" : "warn",
"JobType" : "full_check",
"State" : "Y",
"Times" : 0,
"Period" : 0,
"NoticeValue" : 1,
"JobId" : "qm2g550ku9x****"
}, {
"Type" : "error",
"JobType" : "etl_check",
"State" : "Y",
"Times" : 0,
"Period" : 0,
"NoticeValue" : 0,
"JobId" : "wrdx5a8pc93****"
}, {
"Type" : "delay",
"JobType" : "etl_check",
"State" : "Y",
"Times" : 2,
"Period" : 3,
"NoticeValue" : 0,
"DelayRuleTime" : 60,
"JobId" : "wrdx5a8pc93****"
}, {
"Type" : "warn",
"JobType" : "etl_check",
"State" : "Y",
"Times" : 2,
"Period" : 3,
"NoticeValue" : 1,
"JobId" : "wrdx5a8pc93****"
} ],
"Success" : 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. | 簽名已經到期,請更新簽名 |
訪問錯誤中心查看更多錯誤碼。