更新任务连接信息
更新时间:
复制 MD 格式
调用UpdateDtsJobConnection接口更新DTS任务的连接信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
|
名称 |
类型 |
是否必选 |
示例值 |
描述 |
| Action | String | 是 | UpdateDtsJobConnection | 系统规定参数。取值:UpdateDtsJobConnection。 |
| DtsJobId | String | 是 | k2gm967v16f**** | 迁移、同步或订阅任务ID。 |
| RegionId | String | 否 | cn-hangzhou | DTS实例所属的地域,详情请参见支持的地域列表。 |
| UpdateSourceEndpoint | Boolean | 否 | true | 是否更新源库连接信息,取值:
默认取值为false。 |
| UpdateDestinationEndpoint | Boolean | 否 | true | 是否更新目标库连接信息,取值:
默认取值为false。 |
| NeedRestart | Boolean | 否 | True | 是否需要重启任务,取值:
默认取值为false。 |
| ResourceGroupId | String | 否 | rg-acfmzawhxxc**** | 资源组ID。 |
返回数据
名称 |
类型 |
示例值 |
描述 |
| HttpStatusCode | Integer | 200 | 状态码。 |
| RequestId | String | F28A96B1-F897-4246-833B-310A3345**** | 请求id。 |
| ErrCode | String | InternalError | 调用出错时返回的错误码。 |
| Success | Boolean | true | 请求是否成功。 |
| ErrMessage | String | The request processing has failed due to some unknown error. | 调用错误时返回的错误信息。 |
| Code | String | 200 | 错误码。 |
| DynamicMessage | String | DtsJobId | 动态错误信息,用于替换返回参数ErrMessage错误信息中的%s。 说明 如果ErrMessage返回The Value of Input Parameter %s is not valid,且DynamicMessage返回DtsJobId,则代表所传入的请求参数DtsJobId不合法。 |
示例
请求示例
http(s)://[Endpoint]/?Action=UpdateDtsJobConnection
&DtsJobId=k2gm967v16f****
&RegionId=cn-hangzhou
&UpdateSourceEndpoint=true
&UpdateDestinationEndpoint=true
&NeedRestart=true
&ResourceGroupId=rg-acfmzawhxxc****
&公共请求参数
正常返回示例
XML格式
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateDtsJobConnectionResponse>
<HttpStatusCode>200</HttpStatusCode>
<RequestId>F28A96B1-F897-4246-833B-310A3345****</RequestId>
<ErrCode>InternalError</ErrCode>
<Success>true</Success>
<ErrMessage>The request processing has failed due to some unknown error.</ErrMessage>
<Code>200</Code>
<DynamicMessage>DtsJobId</DynamicMessage>
</UpdateDtsJobConnectionResponse>
JSON格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"HttpStatusCode" : 200,
"RequestId" : "F28A96B1-F897-4246-833B-310A3345****",
"ErrCode" : "InternalError",
"Success" : true,
"ErrMessage" : "The request processing has failed due to some unknown error.",
"Code" : "200",
"DynamicMessage" : "DtsJobId"
}
错误码
|
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. | 由于服务端响应超时或者不可用导致请求失败,请重试,重试后仍失败请联系技术支持。 |
访问错误中心查看更多错误码。
该文章对您有帮助吗?