調用DescribeDtsJobLogs查詢一個資料移轉或同步任務的時間軸。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
請求參數
| 名稱 | 類型 | 是否必選 | 樣本值 | 描述 |
| Action | String | 是 | DescribeDtsJobLogs | 系統規定參數。取值:DescribeDtsJobLogs。 |
| DtsJobId | String | 是 | c1yr56py103**** | 遷移或同步任務ID。 |
| PageSize | Integer | 否 | 20 | 分頁查詢時的每頁行數,預設為20。取值範圍為0~200的整數。 說明 取值不包含0。 |
| PageNumber | Integer | 否 | 1 | 頁碼,取值為大於0且不超過Integer資料類型的最大值,通常與PageSize搭配使用,預設值為1。 |
| StartTime | Long | 否 | 1620896327000 | 日誌資訊的起始時間。 說明
|
| EndTime | Long | 否 | 1620897227000 | 日誌資訊的截止時間。 說明
|
| Status | String | 否 | INFO | 日誌資訊的記錄層級,取值:
|
| Type | String | 否 | ALL | 查詢日誌類型,取值:
|
| RegionId | String | 否 | cn-hangzhou | DTS執行個體所屬的地區,詳情請參見支援的地區列表。 |
返回資料
| 名稱 | 類型 | 樣本值 | 描述 |
| HttpStatusCode | Integer | 200 | 狀態代碼。 |
| RequestId | String | 300E71E3-F632-5784-B3A5-E10F82DD**** | 請求ID。 |
| ErrCode | String | InternalError | 調用出錯時返回的錯誤碼。 |
| PageRecordCount | Integer | 20 | 當前頁可展示的最大記錄數。 |
| Success | Boolean | true | 請求是否成功。 |
| TotalRecordCount | Long | 22 | 合格日誌資訊的總數。 |
| ErrMessage | String | The request processing has failed due to some unknown error. | 調用錯誤時返回的錯誤資訊。 |
| DynamicMessage | String | can not find env: pre | 動態錯誤資訊,用於替換返回參數ErrMessage錯誤資訊中的%s。 說明 如果ErrMessage返回The Value of Input Parameter %s is not valid,且DynamicMessage返回Type,則代表所傳入的請求參數Type不合法。 |
| PageNumber | Integer | 1 | 當前頁碼。 |
| DynamicCode | String | 403 | 動態錯誤碼,本參數即將下線。 |
| JobRunningLogs | Array of JobRunningLog | DTS任務啟動並執行日誌資訊。 |
|
| Status | String | INFO | 日誌資訊的記錄層級,取值:
|
| LogDatetime | Long | 1620896327000 | 任務執行時間,單位為毫秒。 |
| ContentKey | String | master.schedule.inc.job.start | 日誌內容。 |
| JobId | String | u45q15r310u**** | 日誌對應的任務ID。 |
| Id | Long | 4509 | 記錄在中繼資料庫中的ID。 |
| Params | Array of String | asioqejwdnf**** | 參數記錄。 |
樣本
請求樣本
http(s)://dts.aliyuncs.com/?Action=DescribeDtsJobLogs
&DtsJobId=c1yr56py103****
&RegionId=cn-hangzhou
&<公用請求參數>
正常返回樣本
XML格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeDtsJobLogsResponse>
<pageNumber>1</pageNumber>
<jobRunningLogs>
<contentKey>master.schedule.inc.job.start</contentKey>
<id>9650139</id>
<jobId>plpt2*****o933w</jobId>
<logDatetime>1645428763000</logDatetime>
<status>INFO</status>
</jobRunningLogs>
<jobRunningLogs>
<contentKey>master.schedule.struct.job.start</contentKey>
<id>9650132</id>
<jobId>plpt2*****o933w</jobId>
<logDatetime>1645428734000</logDatetime>
<status>INFO</status>
</jobRunningLogs>
<jobRunningLogs>
<contentKey>master.schedule.full.job.start</contentKey>
<id>9650057</id>
<jobId>plpt2*****o933w</jobId>
<logDatetime>1645428500000</logDatetime>
<status>INFO</status>
</jobRunningLogs>
<jobRunningLogs>
<contentKey>master.schedule.struct.job.start</contentKey>
<id>9650054</id>
<jobId>plpt2*****o933w</jobId>
<logDatetime>1645428471000</logDatetime>
<status>INFO</status>
</jobRunningLogs>
<jobRunningLogs>
<contentKey>portal.user.purchase.instance.success</contentKey>
<id>9650036</id>
<jobId>plpt2*****o933w</jobId>
<logDatetime>1645428412000</logDatetime>
<status>INFO</status>
</jobRunningLogs>
<jobRunningLogs>
<contentKey>master.schedule.check.job.start</contentKey>
<id>9650021</id>
<jobId>plpt2*****o933w</jobId>
<logDatetime>1645428362000</logDatetime>
<status>INFO</status>
</jobRunningLogs>
<jobRunningLogs>
<contentKey>portal.user.start.job.success</contentKey>
<id>9650020</id>
<jobId>plpt2*****o933w</jobId>
<logDatetime>1645428353000</logDatetime>
<status>INFO</status>
</jobRunningLogs>
<jobRunningLogs>
<contentKey>portal.user.create.job.success</contentKey>
<id>9650018</id>
<jobId>plpt2*****o933w</jobId>
<logDatetime>1645428353000</logDatetime>
<status>INFO</status>
</jobRunningLogs>
<pageRecordCount>20</pageRecordCount>
<requestId>300E71E3-F632-5784-B3A5-E10F82DD****</requestId>
<success>true</success>
<class>com.aliyun.dts.portal.main.openapi.response.DescribeDtsJobLogsResponse</class>
<httpStatusCode>200</httpStatusCode>
<totalRecordCount>8</totalRecordCount>
</DescribeDtsJobLogsResponse>
JSON格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"pageNumber" : 1,
"jobRunningLogs" : [ {
"contentKey" : "master.schedule.inc.job.start",
"id" : 9650139,
"jobId" : "plpt2*****o933w",
"logDatetime" : 1645428763000,
"status" : "INFO"
}, {
"contentKey" : "master.schedule.struct.job.start",
"id" : 9650132,
"jobId" : "plpt2*****o933w",
"logDatetime" : 1645428734000,
"status" : "INFO"
}, {
"contentKey" : "master.schedule.full.job.start",
"id" : 9650057,
"jobId" : "plpt2*****o933w",
"logDatetime" : 1645428500000,
"status" : "INFO"
}, {
"contentKey" : "master.schedule.struct.job.start",
"id" : 9650054,
"jobId" : "plpt2*****o933w",
"logDatetime" : 1645428471000,
"status" : "INFO"
}, {
"contentKey" : "portal.user.purchase.instance.success",
"id" : 9650036,
"jobId" : "plpt2*****o933w",
"logDatetime" : 1645428412000,
"status" : "INFO"
}, {
"contentKey" : "master.schedule.check.job.start",
"id" : 9650021,
"jobId" : "plpt2*****o933w",
"logDatetime" : 1645428362000,
"status" : "INFO"
}, {
"contentKey" : "portal.user.start.job.success",
"id" : 9650020,
"jobId" : "plpt2*****o933w",
"logDatetime" : 1645428353000,
"status" : "INFO"
}, {
"contentKey" : "portal.user.create.job.success",
"id" : 9650018,
"jobId" : "plpt2*****o933w",
"logDatetime" : 1645428353000,
"status" : "INFO"
} ],
"pageRecordCount" : 20,
"requestId" : "300E71E3-F632-5784-B3A5-E10F82DD****",
"success" : true,
"class" : "com.aliyun.dts.portal.main.openapi.response.DescribeDtsJobLogsResponse",
"httpStatusCode" : 200,
"totalRecordCount" : 8
}
錯誤碼
| HttpCode | 錯誤碼 | 錯誤資訊 | 描述 |
| 400 | Throttling.User | Request was denied due to user flow control. | 由於請求頻次達到閾值,請求被拒絕,請稍後重試。 |
| 403 | InvalidSecurityToken.Expired | Specified SecurityToken is expired. | 簽名已經到期,請更新簽名 |
| 500 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | 由於服務端響應逾時或者不可用導致請求失敗,請重試,重試後仍失敗請聯絡支援人員。 |
訪問錯誤中心查看更多錯誤碼。