UpdateMmsDb

Updated at:

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

  1. Call CreateMmsDataSource to create a data source and obtain the sourceId.

  2. Make sure that the data source is in the STARTED state. You can call UpdateMmsDataSource and set action=START to start the data source. CreateMmsFetchMetadataJob also automatically starts data sources that are not running when automatic start and stop is enabled.

  3. Call CreateMmsFetchMetadataJob to initiate a metadata scan, and wait for the scan to complete by calling GetMmsFetchMetadataJob.

  4. 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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

odps:UpdateMmsDb

update

*Project

acs:odps:{#regionId}:{#accountId}:mmsdatasource/{#sourceId}

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.