修改DTS任務(wù)的源或目標(biāo)庫實(shí)例
調(diào)用ModifyDtsJobEndpoint接口,修改(替換)DTS同步或遷移任務(wù)的源或目標(biāo)庫實(shí)例。
調(diào)試
您可以在OpenAPI Explorer中直接運(yùn)行該接口,免去您計(jì)算簽名的困擾。運(yùn)行成功后,OpenAPI Explorer可以自動(dòng)生成SDK代碼示例。
請(qǐng)求參數(shù)
名稱 |
類型 |
是否必選 |
示例值 |
描述 |
Action | String | 是 | ModifyDtsJobEndpoint | 系統(tǒng)規(guī)定參數(shù)。取值:ModifyDtsJobEndpoint。 |
RegionId | String | 否 | cn-hangzhou | DTS實(shí)例所屬的地域。 |
DtsJobId | String | 否 | m4312mab158**** | DTS任務(wù)ID,可調(diào)用DescribeDtsJobs查詢。 說明 若不填入此參數(shù),則必須填入DtsInstanceId。 |
DtsInstanceId | String | 否 | dtsaw012y2g15q**** | DTS實(shí)例的ID。 說明 若不填入此參數(shù),則必須填入DtsJobId。 |
SynchronizationDirection | String | 否 | Forward | 同步方向,取值:
|
Endpoint | String | 是 | src | 待修改的數(shù)據(jù)庫實(shí)例,取值:
|
EndpointRegionId | String | 否 | cn-hangzhou | 數(shù)據(jù)庫實(shí)例所屬的地域。 |
EndpointInstanceType | String | 是 | rds | 數(shù)據(jù)庫實(shí)例類型,取值為:
說明
|
EndpointInstanceId | String | 否 | rm-bp10k50h8374w**** | 數(shù)據(jù)庫實(shí)例的ID。 |
EndpointIp | String | 否 | 172.168.XX.XXX | 數(shù)據(jù)庫實(shí)例的IP。 |
EndpointPort | String | 否 | 3306 | 數(shù)據(jù)庫實(shí)例的端口。 |
ModifyAccount | Boolean | 否 | false | 是否修改賬號(hào)密碼,取值為:
|
Username | String | 否 | dtstest | 數(shù)據(jù)庫賬號(hào)。 說明 僅當(dāng)ModifyAccount取值為true時(shí)才生效。 |
Password | String | 否 | DTStest**** | 數(shù)據(jù)庫密碼。 說明 僅當(dāng)ModifyAccount取值為true時(shí)才生效。 |
Database | String | 否 | admin | 鑒權(quán)數(shù)據(jù)庫名稱。 說明 當(dāng)數(shù)據(jù)庫實(shí)例為MongoDB時(shí),本參數(shù)才可用且必須傳入。 |
ShardUsername | String | 否 | shard | MongoDB分片集群實(shí)例的Shard的賬號(hào)。 說明
|
ShardPassword | String | 否 | DTStest**** | MongoDB分片集群實(shí)例的Shard的密碼。 說明
|
RoleName | String | 否 | ram-for-dts | 跨阿里云賬號(hào)角色名。 說明 執(zhí)行跨阿里云賬號(hào)的數(shù)據(jù)同步時(shí)須傳入本參數(shù),該角色所需的權(quán)限及授權(quán)方式,請(qǐng)參見跨阿里云賬號(hào)數(shù)據(jù)遷移或同步時(shí)如何配置RAM授權(quán)。 |
AliyunUid | String | 否 | 150780020300**** | 數(shù)據(jù)庫實(shí)例所屬的阿里云賬號(hào)(主賬號(hào))的ID。 說明 傳入本參數(shù)即代表執(zhí)行跨阿里云賬號(hào)的數(shù)據(jù)同步,同時(shí)您還需要傳入RoleName參數(shù)。 |
DryRun | Boolean | 否 | true | 是否只進(jìn)行預(yù)檢查,取值為:
|
ResourceGroupId | String | 否 | rg-acfmzawhxxc**** | 資源組ID。 |
返回?cái)?shù)據(jù)
名稱 |
類型 |
示例值 |
描述 |
HttpStatusCode | String | 200 | 狀態(tài)碼。 |
RequestId | String | 3FA98DF2-2F81-51FF-8A38-AA5112DD**** | 請(qǐng)求ID。 |
Success | Boolean | true | 請(qǐng)求是否成功。 |
ErrCode | String | DTS.Msg.InvalidEndpoint | 調(diào)用出錯(cuò)時(shí)返回的錯(cuò)誤碼。 |
ErrMessage | String | The endpoint is invalid. | 調(diào)用錯(cuò)誤時(shí)返回的錯(cuò)誤信息。 |
示例
請(qǐng)求示例
http(s)://dts.aliyuncs.com/?Action=ModifyDtsJobEndpoint
&RegionId=cn-hangzhou
&DtsInstanceId=dtsaw012y2g15q****
&SynchronizationDirection=Forward
&Endpoint=src
&EndpointInstanceType=rds
&EndpointInstanceId=rm-bp10k50h8374w****
&Username=dtstest
&Password=DTStest****
&DryRun=true
&公共請(qǐng)求參數(shù)
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyDtsJobEndpointResponse>
<HttpStatusCode>200</HttpStatusCode>
<RequestId>3FA98DF2-2F81-51FF-8A38-AA5112DD****</RequestId>
<Success>true</Success>
</ModifyDtsJobEndpointResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"HttpStatusCode" : "200",
"RequestId" : "3FA98DF2-2F81-51FF-8A38-AA5112DD****",
"Success" : true
}
錯(cuò)誤碼
HttpCode |
錯(cuò)誤碼 |
錯(cuò)誤信息 |
描述 |
400 | InvalidParameter.TagKey | The Tag.N.Key parameter is invalid. | 標(biāo)簽鍵無效,請(qǐng)輸入有效的標(biāo)簽鍵。 |
400 | InvalidParameter.TagValue | The Tag.N.Value parameter is invalid. | 標(biāo)簽值無效,請(qǐng)輸入有效的標(biāo)簽值。 |
400 | InvalidParameter.Tags | The specified value of parameter Tags is not valid. | 標(biāo)簽的鍵或值無效,請(qǐng)輸入有效的標(biāo)簽鍵或值。 |
400 | Missing.TagKey | You must specify the key for value %s in Tag.N.Key. | 同一個(gè)N的標(biāo)簽鍵值對(duì),對(duì)應(yīng)的Value缺失相同Key。 |
400 | MissingParameter.TagOrResourceId | Either Tags or ResourceIds must be specified. | 標(biāo)簽和ResourceId(DTS實(shí)例ID)均不可以為空。 |
400 | NumberExceed.Tags | The maximum number of Tags is exceeded. The maximum value is 20. | 已超過標(biāo)簽數(shù)量上限(上限:20個(gè)),請(qǐng)先刪除不需要的標(biāo)簽。 |
400 | NumberExceed.ResourceIds | The maximum number of ResourceIds is exceeded. The maximum value is 50. | 已超過ResourceId(DTS實(shí)例ID)的數(shù)量上限(上限:20個(gè)),請(qǐng)先刪除不需要的ResourceId。 |
400 | InvalidParameter.Category | The specified Category is invalid. Valid values are Custom and System. | 標(biāo)簽類型非法,合法值為Custom,System。 |
400 | InvalidParameter.NextToken | The parameter NextToken is invalid. | 參數(shù)NextToken(查詢憑證)無效,請(qǐng)輸入正確的NextToken值。 |
400 | InvalidParameter.ResourceType | The ResourceType parameter is invalid. | 參數(shù)ResourceType無效,請(qǐng)輸入固定值A(chǔ)LIYUN::DTS::INSTANCE。 |
400 | InvalidParameter.Scope | The specified Scope is invalid. Valid value: public, private. | 標(biāo)簽可見范圍輸入無效,請(qǐng)輸入有效值public或 private。 |
400 | Throttling.User | Request was denied due to user flow control. | 由于請(qǐng)求頻次達(dá)到閾值,請(qǐng)求被拒絕,請(qǐng)稍后重試。 |
403 | Duplicate.TagKey | The Tag.N.Key contains duplicate keys. | 存在重復(fù)的標(biāo)簽鍵,請(qǐng)刪除多余的標(biāo)簽鍵。 |
403 | NoPermission.SystemTag | You are not authorized to operate system tag because the product code is invalid. | 由于產(chǎn)品code非法,您未被授權(quán)操作該系統(tǒng)標(biāo)簽鍵。 |
403 | QuotaExceed.TagsPerResource | The maximum number of tags for each resource is exceeded. | 已超過標(biāo)簽數(shù)量上限,請(qǐng)先刪除不需要的標(biāo)簽。 |
403 | NoPermission.Operator | The user is not authorized to operate on the specified resource. | 該用戶未被授權(quán)在指定的資源上進(jìn)行操作。 |
403 | InvalidSecurityToken.Expired | Specified SecurityToken is expired. | 簽名已經(jīng)過期,請(qǐng)更新簽名 |
500 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | 由于服務(wù)端響應(yīng)超時(shí)或者不可用導(dǎo)致請(qǐng)求失敗,請(qǐng)重試,重試后仍失敗請(qǐng)聯(lián)系技術(shù)支持。 |
訪問錯(cuò)誤中心查看更多錯(cuò)誤碼。