UpdateMmsDb
Updates the destination and status of an MMS database.
Operation description
Before calling this operation, make sure that you fully understand the billing methods and pricing of exclusive resource groups and elastic reserved compute resources for Data Transfer.
Before you begin
Call CreateMmsDataSource to create a data source and obtain the
sourceId.Make sure that the data source is in the
STARTEDstate. You can call UpdateMmsDataSource and setaction=STARTto start the data source. CreateMmsFetchMetadataJob also automatically starts data sources that are not running when automatic start and stop is enabled.Call CreateMmsFetchMetadataJob to initiate a metadata scan, and wait for the scan to complete by calling GetMmsFetchMetadataJob.
Call ListMmsDbs to query the database records generated by the scan and obtain the
dbId, and then call this operation.
MMS does not provide the CreateMmsDb operation. Database records are automatically generated by metadata scans based on the databases in the actual data source.
Error codes and troubleshooting.
OBJECT_NOT_EXIST (HTTP 404)
Cause The database to be updated cannot be found under the specified data source, or the database is not visible to the current caller.
Solution Verify the sourceId. Use ListMmsDbs to obtain the IDs of databases visible under this data source, and confirm the dbId before updating.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
odps:UpdateMmsDb |
update |
*Project
|
None | None |
Request syntax
PUT /api/v1/mms/datasources/{sourceId}/dbs/{dbId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| sourceId |
integer |
Yes |
The ID of the data source. |
2000014 |
| dbId |
integer |
Yes |
The ID of the database. |
2 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| dstProjectName |
string |
No |
The name of the destination MaxCompute project. |
dst_project_name |
| dstName |
string |
No |
The MaxCompute schema that corresponds to the source database. |
default |
| status |
string |
No |
The migration status. |
INIT |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
ApiRes |
||
| requestId |
string |
The ID of the request. |
0b87b7e716665825896565060e87a4 |
| data |
integer |
The returned result. |
123456 |
Examples
Success response
JSON format
{
"requestId": "0b87b7e716665825896565060e87a4",
"data": 123456
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.