调用DescribeClusterOperateLogs接口查询DTS集群日志信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeClusterOperateLogs |
系统规定参数。取值:DescribeClusterOperateLogs。 |
StartTime | Long | 否 | 1650866955000 |
起始时间戳,当不传时默认最近返回七天的数据,单位为毫秒(ms)。 |
EndTime | Long | 否 | 1650866995000 |
结束时间戳,单位为毫秒(ms)。 |
DedicatedClusterId | String | 是 | dtsxxxxx |
DTS专属集群ID。 |
PageSize | Integer | 否 | 20 |
每页日志的请求条数,默认值为:20。 |
PageNumber | Integer | 否 | 1 |
页码,取值为大于0且不超过Integer数据类型的最大值,默认值为1。 |
DtsJobId | String | 否 | k2gm967v16f**** |
迁移或同步任务ID。 |
ClientToken | String | 否 | 0c593ea1-3bea-11e9-b96b-88e9fe63**** |
保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken只支持ASCII字符,且不能超过64个字符。 |
AccountId | String | 否 | 12323344**** |
阿里云主账号ID。 |
返回数据
示例
请求示例
http(s)://dts.aliyuncs.com/?Action=DescribeClusterOperateLogs
&StartTime=1650866955000
&EndTime=1650866995000
&DedicatedClusterId=dtsxxxxx
&PageSize=20
&PageNumber=1
&DtsJobId=k2gm967v16f****
&ClientToken=0c593ea1-3bea-11e9-b96b-88e9fe63****
&AccountId=12323344****
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeClusterOperateLogsResponse>
<requestId>1651135450713-***</requestId>
<success>true</success>
<code/>
<errCode/>
<errMessage/>
<dynamicMessage/>
<httpStatusCode>200</httpStatusCode>
<pageNumber>1</pageNumber>
<pageRecordCount>3</pageRecordCount>
<totalRecordCount>3</totalRecordCount>
<dataPoints>
<id>2</id>
<logDatetime>1642077211574</logDatetime>
<operationName>modify-network-***</operationName>
<operationUser/>
<oldValue>1</oldValue>
<newValue>2</newValue>
<content>ak</content>
<success>1</success>
</dataPoints>
<dataPoints>
<id>3</id>
<logDatetime>1642077211574</logDatetime>
<operationName>modify-network-***</operationName>
<operationUser/>
<oldValue>2</oldValue>
<newValue>3</newValue>
<content>ak</content>
<success>1</success>
</dataPoints>
<dataPoints>
<id>4</id>
<logDatetime>1642077211574</logDatetime>
<operationName>modify-network-***</operationName>
<operationUser/>
<oldValue>3</oldValue>
<newValue>4</newValue>
<content>ak</content>
<success>1</success>
</dataPoints>
</DescribeClusterOperateLogsResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"requestId" : "1651135450713-***",
"success" : true,
"httpStatusCode" : 200,
"pageNumber" : 1,
"pageRecordCount" : 3,
"totalRecordCount" : 3,
"dataPoints" : [ {
"id" : "2",
"logDatetime" : 1642077211574,
"operationName" : "modify-network-***",
"oldValue" : "1",
"newValue" : "2",
"content" : "ak",
"success" : 1
}, {
"id" : "3",
"logDatetime" : 1642077211574,
"operationName" : "modify-network-***",
"oldValue" : "2",
"newValue" : "3",
"content" : "ak",
"success" : 1
}, {
"id" : "4",
"logDatetime" : 1642077211574,
"operationName" : "modify-network-***",
"oldValue" : "3",
"newValue" : "4",
"content" : "ak",
"success" : 1
} ]
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
403 | InvalidParameter | The Value of Input Parameter %s is not valid. | 参数值校验不通过,请检查是否缺失所提示的参数以及用户AK是否正确。 |
403 | InvalidSecurityToken.Expired | Specified SecurityToken is expired. | 签名已经过期,请更新签名 |
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. | 由于服务端响应超时或者不可用导致请求失败,请重试,重试后仍失败请联系技术支持。 |
访问错误中心查看更多错误码。