You can call this operation to modify the backup source of a database.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyBackupSourceEndpoint |
The parameter specified by the system. Value: ModifyBackupSourceEndpoint. |
BackupPlanId | String | Yes | dbs1h****usfa |
The ID of the backup plan. |
SourceEndpointInstanceType | String | Yes | RDS |
The location of the database. Valid values:
|
SourceEndpointRegion | String | No | cn-hangzhou |
The region of the database. You must specify this parameter if you specify the value of the SourceEndpoint.InstanceType parameter as RDS, ECS, DDS, Express, or Agent. |
SourceEndpointInstanceID | String | No | rm-bp1p8c29479jvXXXX |
The ID of the database instance. You must specify this parameter if the value of the SourceEndpoint.InstanceType parameter is set to RDS, ECS, DDS, or Express. |
SourceEndpointIP | String | No | 100.*. *.10:33204 |
The database endpoint. This parameter must be specified if the value of the SourceEndpoint.InstanceType parameter is express, agent, or other. |
SourceEndpointPort | Integer | No | 3306 |
The port number of the database. You must specify this parameter if you set the value of the SourceEndpoint.InstanceType parameter to express, agent, other, or ECS. |
SourceEndpointDatabaseName | String | No | test |
The database name. When the database type is PostgreSQL or MongoDB, this parameter is required. When the database location is agent and the database type is MSSQL, this parameter is required. |
SourceEndpointUserName | String | No | test |
The database account used to log on to the apsaradb for Redis instance. This parameter is required when the database location is agent and the database type is MSSQL. |
SourceEndpointPassword | String | No | test |
The password required. You must specify a password when the database type is Redis, or the database location is agent and the database type is MSSQL. |
BackupGatewayId | Long | No | 21321323213 |
The ID of the backup gateway. If the value of the SourceEndpoint.InstanceType parameter is agent, this parameter is required. |
BackupObjects | String | No | [{"DBName":"The name of the database to be backed up", "SchemaName":"The name of the Schema to be backed up", "TableExcludes":[{"TableName":"The name of the table to be backed up" }], "TableExcludes":[{"TableName":"Name of the database to be backed up. Name of a table that does not need to be backed up" }] } ] |
The ID of the backup object. If the agent is used to store the database, this parameter is required in other scenarios. |
SourceEndpointOracleSID | String | No | test |
The SID of the Oracle database. This parameter is required when the database type is Oracle. |
RegionId | String | No | cn-hangzhou |
Region ID, call DescribeRegions to view the regions supported by DBS. |
ClientToken | String | No | ETnLKlblzczshOTUbOCzxxxxxxx |
The client token that is used to ensure the idempotency of the request. |
Response parameters
Parameter | Type | Sample response | Description |
---|---|---|---|
BackupPlanId | String | dbs1h****usfa |
The ID of the backup plan. |
ErrCode | String | Param.NotFound |
The error code. |
ErrMessage | String | The specified parameter %s value is not valid. |
The returned message. |
HttpStatusCode | Integer | 200 |
The HTTP status code. |
NeedPrecheck | Boolean | false |
Determines whether or not the modification will trigger a PreCheck. If so, you need to call the StartBackupPlan interface to start a backup plan. |
RequestId | String | D6E068C3-25BC-455A-85FE-45F0B22ECB1F |
The ID of the request. |
Success | Boolean | true |
Indicates whether the request succeeded. |
Examples
Sample requests
http(s)://dbs-api.cn-hangzhou.aliyuncs.com/? Action=ModifyBackupSourceEndpoint
&BackupPlanId=dbs1h****usfa
&SourceEndpointInstanceType=rds
&<Common request parameters>
Sample success responses
XML
format
<ModifyBackupSourceEndpointReponse>
<RequestId>D6E068C3-25BC-455A-85FE-45F0B22ECB1F</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<BackupPlanId>dbs1h****usfa</BackupPlanId>
<NeedPrecheck>false</NeedPrecheck>
<Success>true</Success>
</ModifyBackupSourceEndpointReponse>
JSON
format
{
"RequestId": "D6E068C3-25BC-455A-85FE-45F0B22ECB1F",
"HttpStatusCode": 200,
"BackupPlanId": "dbs1h****usfa",
"NeedPrecheck": false,
"Success": true
}
Error codes
For a list of error codes, visit the API Error Center.