Updated on 2024-07-11 GMT+08:00

Querying Task Details

Function

This API is used to query task details.

Constraints

  • This API is available only for synchronization from MySQL to MySQL, migration from Redis to GeminiDB Redis, migration from cluster Redis to GeminiDB Redis, and synchronization from Oracle to GaussDB Distributed.
  • This API can be used only in certain regions. For details, see Endpoints.

URI

GET /v5/{project_id}/jobs/{job_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region.

For details about how to obtain the project ID, see Obtaining a Project ID.

job_id

Yes

String

Task ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

type

Yes

String

Type of task details. Values:

  • detail: basic task information.
  • network: connection testing result, which must be used together with the query_id parameter.
  • precheck: pre-check result, which must be used together with the query_id parameter.
  • progress: task progress information.
  • log: task log information. Pagination query parameters offset and limit are supported.
  • compare: a comparison task.
  • file: object import information.
  • is_writable: Result for disabling read-only for the destination database.
  • cloud_connection: the connectivity test of workload replay from other clouds, which must be used together with the query_id parameter.

Enumerated values:

  • detail
  • network
  • precheck
  • progress
  • log
  • compare
  • file
  • is_writable
  • cloud_connection

query_id

No

String

Query ID, which is used to query task details.

Note: For task details of some types, query the operation result based on the query_id returned by the request that triggers the operation.

offset

No

Integer

Offset. The records after this offset will be queried.

Note: Pagination query is supported for task details of some types. This parameter can be specified to control pagination query.

limit

No

Integer

Maximum number of records that can be returned.

Note: Pagination query is supported for task details of some types. This parameter can be specified to control pagination query.

compare_type

No

String

Type of a comparison task. This parameter is mandatory when type is set to compare. The value can be:

  • object_compare: object-level comparison.
  • line_compare: row comparison.
  • content_compare: value comparison.
  • data_compare: data-level comparison.

Enumerated values:

  • object_compare
  • line_compare
  • content_compare
  • data_compare

query_type

No

String

Type of the comparison content. This parameter is mandatory when type is set to compare. Values:

  • overview: comparison task overview.
  • list: list of data comparison tasks.
  • detail: comparison details.
  • diff: inconsistency details.

Enumerated values:

  • overview
  • list
  • detail
  • diff

object_type

No

String

Type of comparison details. Values:

  • DB: database-level comparison details.
  • TABLE: table-level comparison details.
  • INDEX: index comparison details.

Enumerated values:

  • DB
  • TABLE
  • INDEX

compare_task_id

No

String

ID of a comparison task.

source_db_name

No

String

Name of the source database for data comparison.

target_db_name

No

String

Name of the destination database for data comparison.

compare_detail_type

No

String

Type of the comparison result. Values:

  • compare: The comparison is complete.
  • uncompare: The comparison cannot be performed.

Enumerated values:

  • compare
  • uncompare

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

MIME type of the request body. Use the default value application/json. For APIs used to upload objects or images, the value varies depending on the flow type.

The default value is application/json.

X-Auth-Token

Yes

String

User token obtained from IAM.

It is a response to the API for obtaining a user token. This API is the only one that does not require authentication.

After a request is processed, the value of X-Subject-Token in the header is the token value.

X-Language

No

String

Request language type.

Default value: en-us

Enumerated values:

  • en-us
  • zh-cn

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

job

Object

Response body for querying details about a single task.

For details, see Table 5.

Table 5 Data structure description of field job

Parameter

Type

Description

id

String

Task ID.

status

String

Task status.

  • CREATING: The task is being created.
  • CREATE_FAILED: The task fails to be created.
  • CONFIGURATION: The task is being configured.
  • STARTJOBING: The task is being started.
  • WAITING_FOR_START: The task is waiting to be started.
  • START_JOB_FAILED: The task fails to be started.
  • PAUSING: The task is paused.
  • FULL_TRANSFER_STARTED: Full migration or synchronization starts. Initialization is in progress in the DR scenario.
  • FULL_TRANSFER_FAILED: Full migration or synchronization fails. Initialization fails in the DR scenario.
  • FULL_TRANSFER_COMPLETE: Full migration or synchronization is complete. Initialization is complete in the DR scenario.
  • INCRE_TRANSFER_STARTED: Incremental migration or synchronization starts. Disaster recovery is in progress in the DR scenario.
  • INCRE_TRANSFER_FAILED: Incremental migration or synchronization fails. An exception occurs in the DR scenario.
  • RELEASE_RESOURCE_STARTED: The task is being stopped.
  • RELEASE_RESOURCE_FAILED: The task fails to be stopped.
  • RELEASE_RESOURCE_COMPLETE: The task is stopped.
  • REBUILD_NODE_STARTED: The task is being recovered.
  • REBUILD_NODE_FAILED: The task fails to be recovered.
  • CHANGE_JOB_STARTED: The task is being changed.
  • CHANGE_JOB_FAILED: The task fails to be changed.
  • DELETED: The task is deleted.
  • CHILD_TRANSFER_STARTING: The subtask is being started.
  • CHILD_TRANSFER_STARTED: The subtask is being migrated.
  • CHILD_TRANSFER_COMPLETE: The subtask migration is complete.
  • CHILD_TRANSFER_FAILED: The subtask fails to be migrated.
  • RELEASE_CHILD_TRANSFER_STARTED: The subtask is being stopped.
  • RELEASE_CHILD_TRANSFER_COMPLETE: The subtask is stopped.
  • NODE_UPGRADE_START: The upgrade starts.
  • NODE_UPGRADE_COMPLETE: The upgrade is complete.
  • NODE_UPGRADE_FAILED: The upgrade fails.

create_time

String

Task creation time.

total_count

Integer

Total number of tasks in the list, which is irrelevant to pagination.

master_job_id

String

ID of the primary task.

base_info

Object

Basic information body of a task.

For details, see Table 6.

source_endpoint

Array of objects

Information body of the source database.

For details, see Table 8.

target_endpoint

Array of objects

Information body of the destination database.

For details, see Table 8.

alarm_notify

Object

Information body for setting task exception notification. If this parameter is enabled, the system sends a notification to a specified SMN topic when the task is abnormal.

For details, see Table 15.

speed_limit

Array of objects

Flow control information body.

  • If you enable flow control, you can customize the maximum migration speed.
  • If you disable flow control, the migration speed is not limited and the outbound bandwidth of the source database is maximally used,

which causes read consumption on the source database accordingly. For example, if the outbound bandwidth of the source database is 100 MB/s and 80% bandwidth is used, the I/O consumption on the source database is 80 MB/s.

For details, see Table 16.

user_migration

Object

User migration information body.

For details, see Table 17.

policy_config

Object

Policy information body. This parameter is used to configure migration and synchronization policies, including the conflict policy, DROP DATASE filtering, and object synchronization scope.

For details, see Table 20.

db_param

Object

Database parameter information body.

For details, see Table 21.

tuning_params

Object

Advanced setting information body.

For details, see Table 23.

period_order

Object

Yearly/Monthly information body.

For details, see Table 25.

node_info

Object

Information body of the DRS instance.

For details, see Table 26.

logs

Array of objects

Information body of a log query result.

For details, see Table 30.

network_results

Array of objects

Information body of a connection testing result.

For details, see Table 31.

precheck_result

Object

Pre-check result information body.

For details, see Table 32.

progress_info

Object

Task progress information body.

For details, see Table 35.

migration_object_progress_info

Object

Progress information body of objects being migrated.

For details, see Table 37.

metrics

Object

Node metrics.

For details, see Table 39.

compare_result

Object

Task comparison result.

For details, see Table 40.

support_import_file_resp

Object

file: object import information.

For details, see Table 51.

instance_features

Map<String,String>

A list of task-level functions controlled by both the switch and version.

task_version

String

Task version.

connection_management

Object

Connection management.

For details, see Table 52.

public_ip_list

Array of objects

Information about a specified EIP.

For details, see Table 54.

bind_public_ip_state

String

Whether an EIP is successfully bound.

children

Array of objects

In the case of multiple tasks, if an EIP fails to be bound to a subtask, the subtask information is returned.

For details, see Table 55.

is_writable

String

Whether read-only is disabled for the destination database.

  • pending: Read-only is being disabled for the destination database.
  • success: Read-only is disabled for the destination database.

Enumerated values:

  • pending
  • success
Table 6 Data structure description of field base_info

Parameter

Type

Description

name

String

Task name. The task name can be 4 to 50 characters in length. It is case-insensitive and can contain only letters, digits, hyphens (-), and underscores (_).

  • Minimum length: 4
  • Maximum length: 50

job_type

String

Task scenario. Values:

  • migration: real-time migration.
  • sync: real-time synchronization.
  • cloudDataGuard: real-time disaster recovery.

Enumerated values:

  • migration
  • sync
  • cloudDataGuard

multi_write

Boolean

Whether the DR type is dual-active. Note:

  • This parameter is mandatory when job_type is set to cloudDataGuard. If the DR type is dual-active, the value of multi_write is true. Otherwise, the value is false.
  • If job_type is set to other values, multi_write is optional.

engine_type

String

Engine type. The value can be:

  • oracle-to-gaussdbv5: Synchronization from Oracle to GaussDB distributed.
  • redis-to-gaussredis: Migration from Redis to GeminiDB Redis.
  • rediscluster-to-gaussredis: Migration from cluster Redis to GeminiDB Redis.

Enumerated values:

  • oracle-to-gaussdbv5
  • redis-to-gaussredis
  • rediscluster-to-gaussredis

job_direction

String

Migration direction. Values:

  • up: to-the-cloud scenarios and DR scenarios where the current cloud is the standby.
  • down: out-of-cloud scenarios and DR scenarios where the current cloud is the active.
  • non-dbs: self-built databases.

Enumerated values:

  • up
  • down
  • non-dbs

task_type

String

Migration type. Values:

  • FULL_TRANS: full migration.
  • FULL_INCR_TRANS: full+incremental migration.
  • INCR_TRANS: incremental migration.

Enumerated values:

  • FULL_TRANS
  • FULL_INCR_TRANS
  • INCR_TRANS

net_type

String

Network type. Values:

  • eip: public network.
  • vpc: VPC network. The VPC network cannot be selected in DR scenarios.
  • vpn: VPN or Direct Connect.

Enumerated values:

  • eip
  • vpc
  • vpn

charging_mode

String

Billing mode. The pay-per-use billing is used by default. Values:

  • period: indicates the yearly/monthly billing.
  • on_demand: indicates the pay-per-use billing.

Enumerated values:

  • period
  • on_demand

enterprise_project_id

String

Enterprise project ID. The default value is 0, indicating the default enterprise project.

Default value: 0

description

String

Task description. The task description can contain a maximum of 256 characters and cannot contain the following special characters: !<>'&"\

Minimum length: 0

Maximum length: 256

start_time

String

Scheduled start time of a task.

expired_days

String

Number of days after which an abnormal task automatically stops. The unit is day. The value ranges from 14 to 100. If this parameter is not specified, the default value is 14.

Default value: 14

tags

Array of objects

Tag information. Up to 20 tags can be added.

For details, see Table 7.

is_open_fast_clean

Boolean

Specifies whether to enable binlog clearing for RDS for MySQL or RDS for MariaDB.

Table 7 Data structure description of field tags

Parameter

Type

Description

key

String

Tag key. The value can contain a maximum of 36 characters, including letters, digits, underscores (_), and hyphens (-).

Minimum length: 1

Maximum length: 36

value

String

Tag value. The value can contain a maximum of 43 characters, including letters, digits, underscores (_), and hyphens (-).

Minimum length: 1

Maximum length: 43

Table 8 Data structure description of fields source_endpoint and target_endpoint

Parameter

Type

Description

db_type

String

Database type. The value can be:

  • oracle: Oracle.
  • gaussdbv5: GaussDB distributed.
  • redis: Redis.
  • rediscluster: Cluster Redis.
  • gaussredis: GeminiDB Redis.

Enumerated values:

  • oracle
  • gaussdbv5
  • redis
  • rediscluster
  • gaussredis

endpoint_type

String

DB instance type. Values:

  • offline: indicates an on-premises database.
  • ecs: indicates a database built on Huawei Cloud ECSs.
  • cloud: indicates a Huawei cloud database.

Enumerated values:

  • offline
  • ecs
  • cloud

endpoint_role

String

DB instance role. Values:

  • so: indicates the source database.
  • ta: indicates the destination database.

Enumerated values:

  • so
  • ta

endpoint

Object

Basic information body of the database.

For details, see Table 9.

cloud

Object

Region and project where a DB instance is located.

For details, see Table 10.

vpc

Object

Information about the VPC, subnet, and security group where a DB instance resides.

For details, see Table 11.

config

Object

Basic information body of database settings.

For details, see Table 12.

ssl

Object

Information body of the database SSL certificate.

For details, see Table 13.

customized_dns

Object

Custom DNS server.

For details, see Table 14.

Table 9 Data structure description of fields endpoint and source_sharding

Parameter

Type

Description

id

String

Database information ID.

endpoint_name

String

Database scenario type. The value can be:

  • oracle: indicates the on-premises Oracle database.
  • ecs_oracle: indicates the Oracle database built on Huawei Cloud ECSs.
  • cloud_gaussdbv5: indicates the Huawei Cloud distributed GaussDB database.
  • mysql: indicates the MySQL database built on other clouds or on-premises MySQL database.
  • ecs_mysql: indicates the MySQL database built on Huawei Cloud ECSs.
  • cloud_mysql: indicates the Huawei Cloud RDS for MySQL database.
  • redis: On-premises Redis database.
  • ecs_redis: Redis database built on Huawei Cloud ECSs.
  • rediscluster: On-premises cluster Redis database.
  • ecs_rediscluster: Cluster Redis database built on Huawei Cloud ECSs.
  • cloud_gaussdb_redis: Huawei Cloud GeminiDB Redis.

Enumerated values:

  • oracle
  • ecs_oracle
  • cloud_gaussdbv5
  • mysql
  • ecs_mysql
  • cloud_mysql
  • redis
  • ecs_redis
  • rediscluster
  • ecs_rediscluster
  • cloud_gaussdb_redis

ip

String

Database IP address. Constraints:

  • If an on-premises MongoDB database is used, use colons (:) to separate the database IP address and port number, and use commas (,) to separate multiple values. A maximum of three IP addresses or domain names can be entered.
  • If a DDS instance is used, use colons (:) to separate the database IP address and port number, and use commas (,) to separate multiple values.
  • If the database is a cluster Redis database, enter the IP addresses and port numbers of all shards in the source cluster Redis database. Use colons (:) to separate a database IP address and port number. Use commas (,) to separate multiple values. You are advised to enter the IP address of the slave node of a cluster shard. Up to 32 IP addresses or domain names can be entered. Use commas (,) to separate multiple IP addresses or domain names.

Example:

  • MongoDB: 192.168.0.10:8080,192.168.0.11:8080,192.168.0.12:8080
  • DDS: 192.168.205.130:8635,192.168.250.64:8635
  • Cluster Redis: 192.168.0.1:8080,192.168.0.2:8080

db_port

String

Database port.

The value is an integer ranging from 1 to 65535.

db_user

String

Database username.

db_password

String

Database password.

instance_id

String

ID of a Huawei Cloud DB instance.

instance_name

String

Name of a Huawei Cloud DB instance.

db_name

String

Database name. Example:

  • oracle: serviceName.orcl.

source_sharding

Array of objects

Information about the physical source database.

For details, see Table 9.

Table 10 Data structure description of field cloud

Parameter

Type

Description

region

String

Region ID. This parameter is mandatory when DB Instance Type is set to ecs (database built on Huawei Cloud ECSs) or cloud (Huawei cloud database). For details, see Regions and Endpoints. Note: If there are subprojects in a region, the region ID is a combination of the regional project ID and subproject ID, which are combined using an underscore (_).

project_id

String

Project ID of a tenant in a region. For details about how to obtain the project ID, see "Obtaining a Project ID".

az_code

String

Name of the AZ where the database is located.

Table 11 Data structure description of field vpc

Parameter

Type

Description

vpc_id

String

ID of the VPC where a DB instance is located. To obtain the ID, perform the following steps: Method 1: Log in to the VPC console and view the VPC ID on the VPC details page. Method 2: Call the API for querying VPCs. For details, see Querying VPCs.

subnet_id

String

ID of the subnet where a DB instance is located. To obtain the ID, perform the following steps: Method 1: Log in to the VPC console and click the target subnet on the Subnets page to view the network ID on the displayed page. Method 2: Call the API for querying subnets. For details, see Querying Subnets.

security_group_id

String

ID of the security group where a DB instance is located. To obtain the ID, perform the following steps: Method 1: Log in to the VPC console. Choose Access Control > Security Groups in the navigation pane on the left. On the displayed page, click the target security group. You can view the security group ID on the displayed page. Method 2: Call the API for querying security groups. For details, see Querying Security Groups.

Table 12 Data structure description of field config

Parameter

Type

Description

is_target_readonly

Boolean

Whether the destination DB instance is set to read-only. This parameter is available only when job_direction is set to up during MySQL migration and DR. In the DR scenario, this parameter is mandatory and set to true if the current cloud is the standby in single-active DR. If this parameter is not specified, the default value is true.

Default value: true

node_num

Integer

Number of subtasks connected to the source cluster Redis instance for data migration from cluster Redis to GeminiDB Redis. The value ranges from 1 to 16 and cannot be greater than the number of shards in the source cluster Redis instance. Set this parameter based on the scale of the source cluster Redis instance. You are advised to set one subtask to connect to four shards in the source cluster Redis instance.

Minimum value: 1

Maximum value: 16

Default value: 0

Table 13 Data structure description of field ssl

Parameter

Type

Description

ssl_link

Boolean

Whether SSL is enabled. If SSL is enabled, the value of this parameter is true.

ssl_cert_name

String

SSL certificate name.

ssl_cert_key

String

SSL certificate content, which is encrypted using Base64.

ssl_cert_check_sum

String

The checksum value of the SSL certificate, which is used for backend verification. This parameter is mandatory for secure connection to the source database.

ssl_cert_password

String

SSL certificate password. This parameter is mandatory if the certificate file name extension is .p12.

Table 14 Data structure description of field customized_dns

Parameter

Type

Description

is_set_dns

Boolean

Specifies whether to set your own DNS server.

set_dns_action

String

Behavior of setting your own DNS server.

  • add: Add a customized DNS server IP address.
  • keep: Retain the DNS server IP address.
  • update: Update the customized DNS server IP address. (The update takes effect when the DNS server IP address changes.)
  • recover: Restore the default DNS server IP address. (Restoration may cause domain name resolution failures. Exercise caution when performing this operation.)

Enumerated values:

  • add
  • keep
  • update
  • recover

dns_ip

String

DNS server IP address.

Minimum length: 0

Maximum length: 15

Table 15 Data structure description of field alarm_notify

Parameter

Type

Description

alarm_to_user

Boolean

Whether to notify users of alarms.

Default value: false

topic_urn

String

SMN topic URN.

delay_time

Long

Delay threshold, in seconds. Values:

  • Minimum value: 1
  • Maximum value: 3600
  • Default value: 0
NOTE:
  1. A synchronization delay indicates a time difference (in seconds) of synchronization between the source and destination database.
  2. If the delay exceeds a specified value and lasts for 6 minutes, DRS will notify specified recipients. (In the early stages of an incremental migration, there is more delay because more data is waiting to be synchronized. In this situation, no notifications will be sent.)
  3. This option is available only for full+incremental tasks.

rpo_delay

Long

RPO delay threshold, in seconds. Values:

  • Minimum value: 1
  • Maximum value: 3600
  • Default value: 0
NOTE:

If the RPO delay between the service database and the DRS instance exceeds a specified value and lasts for 6 minutes, DRS will notify specified recipients. (In the early stages of an incremental DR, there is more delay because more data is waiting to be synchronized. In this situation, no notifications will be sent.)

rto_delay

Long

RTO delay threshold, in seconds. Values:

  • Minimum value: 1
  • Maximum value: 3600
  • Default value: 0
NOTE:

If the RTO delay between the DRS instance and the DR database exceeds a specified value and lasts for 6 minutes, DRS will notify specified recipients.

Table 16 Data structure description of field speed_limit

Parameter

Type

Description

begin

String

Start time (UTC) of flow control. The start time is an integer in hh:mm format and the minutes part is ignored. hh indicates the hour, for example, 01:00.

end

String

End time (UTC) in the format of hh:mm, for example, 15:59. The value must end with 59.

speed

String

Speed. The value ranges from 1 to 9,999, in MB/s.

Table 17 Data structure description of field user_migration

Parameter

Type

Description

is_migrate_user

Boolean

Whether to migrate users.

is_set_password

Boolean

Whether to reset a unified password. Values:

  • true: Reset a unified password.
  • false: Do not reset a unified password. The following scenarios are supported:
  • Real-time migration: MySQL migration.

password

String

Unified password. This parameter is mandatory when is_set_password is set to true. The password cannot be empty.

user_list

Array of objects

User list in the migration objects. The following scenarios are supported:

  • Real-time migration: MySQL-to-MySQL migration and MongoDB-to-DDS migration.

For details, see Table 18.

role_list

Array of objects

User role in the migration objects. The following scenarios are supported:

  • Real-time migration: MongoDB-to-DDS migration.

For details, see Table 19.

Table 18 Data structure description of field user_list

Parameter

Type

Description

id

String

User ID.

account

String

User.

is_set_password

Boolean

Whether to reset the user password. The following scenarios are supported:

  • Real-time migration: MySQL migration.

password

String

New password. This parameter is mandatory when is_set_password is set to true. The password cannot be empty.

Table 19 Data structure description of field role_list

Parameter

Type

Description

role

String

Role.

Table 20 Data structure description of field policy_config

Parameter

Type

Description

filter_ddl_policy

String

DDL filtering policy. Values:

  • drop_database

Scenarios:

  • Real-time migration: For MySQL migration, this parameter can be set to "", indicating that DROP DATABASE is not filtered.
  • Real-time synchronization: For MySQL synchronization, this parameter can only be set to drop_database.

Enumerated values:

  • drop_database

conflict_policy

String

Incremental conflict policy. The conflict policy refers to the conflict handling policy during incremental synchronization. By default, conflicts in the full synchronization phase are ignored. Values:

  • ignore: Ignore the conflict. The system will ignore the conflicting data and continue the subsequent synchronization process.
  • stop: Report an error. The synchronization task will be stopped and fail. You can view the details in synchronization logs.
  • overwrite: Overwrite the existing data with the synchronized data. Conflicting data will be overwritten.

Scenarios:

  • Real-time migration: Not supported.
  • Real-time synchronization: Supported.

Enumerated values:

  • ignore
  • stop
  • overwrite

index_trans

Boolean

Object synchronization scope: indicates whether to synchronize normal indexes. By default, DRS synchronizes the primary key or unique index. A normal index refers to an index other than the primary key or unique index. Values:

  • true: All indexes will be synchronized.
  • false: Only primary key or unique indexes are synchronized.

Default value: true

ddl_trans

Boolean

Object synchronization scope: indicates whether to synchronize DDLs in the incremental phase. Values:

  • true: DDLs are synchronized in the incremental phase.
  • false: DDLs are not synchronized in the incremental phase.

Default value: true

data_sync_topology_type

String

Data synchronization topology. Data synchronization supports multiple synchronization topologies. You can plan your synchronization instances based on service requirements. Values:

  • one2one: one-to-one.
  • one2many: one-to-many.
  • many2one: many-to-one.

Default value: one2one

Enumerated values:

  • one2one
  • one2many
  • many2one

support_ddl_info

String

DDLs to be synchronized. Values:

  • CREATE_TABLE: Create a table.
  • ADD_COLUMN: Add a column.
  • MODIFY_COLUMN: Modify column attribute.
  • CHANGE_COLUMN: Change column attribute.
  • DROP_INDEX: Delete an index.
  • ADD_INDEX: Add an index.
  • CREATE_INDEX: Create an index.
  • RENAME_INDEX: Rename an index.

Note:

  • In one-to-one and one-to-many scenarios, if the DDL usage of the source and destination databases must be consistent, high-risk DDLs must be synchronized.
  • In one-to-one and one-to-many scenarios, if you do not want a high-risk DDL to be performed in the destination, deselect the high-risk DDL to protect destination data. However, filtering DDL may cause synchronization to fail, for example, column deletion.
  • In many-to-one data synchronization tasks, it is recommended that only the ADD COLUMN operation is synchronized, or tasks may fail or data may be inconsistent due to changes in destination tables. Typical failure scenarios are as follows:
    • Synchronizing the TRUNCATE operation clears all destination data.
    • Synchronizing the CREATE INDEX operation locks the destination table.
    • Synchronizing the RENAME operation causes other task failure because the destination table cannot be found.
    • Synchronizing the MODIFY COLUMN operation causes other task failure due to incompatible data types.

Enumerated values:

  • CREATE_TABLE
  • ADD_COLUMN
  • MODIFY_COLUMN
  • CHANGE_COLUMN
  • DROP_INDEX
  • ADD_INDEX
  • CREATE_INDEX
  • RENAME_INDEX

sync_type_policy

String

Synchronization object type. Values:

  • supportAllType: All types.
  • tableData: Data.
  • tableStructure: Table structure.
  • constraintData: Index.
NOTE:

Except supportAllType, other types can be specified together, for example, tableData,tableStructure.

increment_read_mode

String

Incremental log reading mode for synchronization from Oracle to GaussDB: logminer or xstream.

dml_types

String

DML synchronization type.

Table 21 Data structure description of field db_param

Parameter

Type

Description

common

Array of objects

Common parameter. Only the values of destination database parameters whose comparison results are inconsistent can be changed.

For details, see Table 22.

performance

Array of objects

Performance parameter. If the comparison results are consistent, you can also change the values of destination database parameters.

For details, see Table 22.

Table 22 Data structure description of fields common and performance

Parameter

Type

Description

key

String

Database parameter name.

target_value

String

Parameter value of the destination database.

Table 23 Data structure description of field tuning_params

Parameter

Type

Description

full_sync

Array of objects

Full migration tuning parameters.

For details, see Table 24.

incre_capture

Array ofobjects

Incremental capture tuning parameters.

For details, see Table 24.

incre_apply

Array of objects

Incremental replay tuning parameters.

For details, see Table 24.

incre_relay

Array of objects

Incremental log extraction tuning parameters.

For details, see Table 24.

Table 24 Data structure description of fields full_sync, incre_capture, incre_apply, and incre_relay

Parameter

Type

Description

param_name

String

Parameter name.

param_value

String

Parameter value.

availability

Boolean

Available or not.

Table 25 Data structure description of field period_order

Parameter

Type

Description

period_type

Integer

Subscription period type. Values:

  • 2: indicates that the service is subscribed by month.
  • 3: indicates that the service is subscribed by year.

Default value: 3

Enumerated values:

  • 2
  • 3

period_num

Integer

Number of subscription periods. This parameter depends on the value of period_type. For example:

  • When period_type is set to 2, the value 1 indicates one month.
  • When period_type is set to 3, the value 1 indicates one year.

is_auto_renew

Integer

Whether auto renewal is enabled. Values:

  • 0: indicates that auto renewal is disabled. This is the default value. You need to pay manually.
  • 1: indicates that auto renewal is enabled.

Default value: 0

Enumerated values:

  • 0
  • 1
Table 26 Data structure description of field node_info

Parameter

Type

Description

spec

Object

Information body of DRS instance specifications.

For details, see Table 27.

vpc

Object

Information body of DRS instance VPC. This parameter is mandatory for self-built databases.

For details, see Table 28.

base_info

Object

Basic task info.

For details, see Table 29.

Table 27 Data structure description of field spec

Parameter

Type

Description

node_type

String

Specification code. Values:

  • micro: minimum specifications.
  • small: small specifications.
  • medium: medium specifications.
  • high: large specifications.

Enumerated values:

  • micro
  • small
  • medium
  • high
Table 28 Data structure description of field vpc

Parameter

Type

Description

vpc_id

String

ID of the VPC where the DRS instance is located.

subnet_id

String

ID of the subnet where the DRS instance is located.

custom_node_ip

String

IP address of the DRS instance to be created. Use commas (,) to separate multiple values. Only IPv4 addresses are supported. To obtain the IP address, perform the following steps:

  • Method 1: Log in to the VPC console and click the target subnet on the Subnets page. View the subnet CIDR block and select an IP address that is not in use.
  • Method 2: Call the API for querying private IP addresses. For details, see "Querying Private IP Addresses". Select a private IP address whose device_owner is left blank. Example: 192.168.0.10,192.168.0.11

security_group_id

String

ID of the security group where the DRS instance is located.

Table 29 Data structure description of field base_info

Parameter

Type

Description

instance_type

String

DB instance type. The value can be:

  • single: single instance.
  • ha: primary/standby instance.

Enumerated values:

  • single
  • ha

arch

String

CPU architecture. The value can be:

  • x86
  • arm

Enumerated values:

  • x86
  • arm

availability_zone

String

AZ ID. If the task instance is not a single instance, you need to specify an AZ for each node of the instance and separate the AZs with commas (,). Example:

  • If instance_type is set to single, the value is cn-north-4a.
  • If instance_type is set to ha, the value is cn-north-4a,cn-north-4b.

status

String

Status.

role

String

Primary/Standby role of a task.

Table 30 Data structure description of field logs

Parameter

Type

Description

level

String

Log level.

message

String

Log information.

create_time

String

Log time.

Table 31 Data structure description of field network_results

Parameter

Type

Description

ip

String

IP address for connection testing.

success

Boolean

Whether the connection testing is successful.

result

String

Connection testing result.

status

String

Whether the connection testing is successful. Values:

  • success: The connection testing is successful.
  • failed: The connection testing fails.

Enumerated values:

  • success
  • failed

error_code

String

Error code of the connection testing failure.

error_msg

String

Error message of the connection testing failure.

Table 32 Data structure description of field precheck_result

Parameter

Type

Description

result

Boolean

Whether the pre-check items are passed.

process

String

Pre-check progress, in percentage.

total_passed_rate

String

Percentage of passed pre-checks.

rds_instance_id

String

DB instance ID.

job_direction

String

Migration direction.

precheck_results

Array of objects

Pre-check results.

For details, see Table 33.

Table 33 Data structure description of field precheck_results

Parameter

Type

Description

item

String

Check item.

result

String

Check results. Values:

  • PASSED: The check is passed.
  • ALARM: There are check items to be confirmed.
  • FAILED: The check fails.

Enumerated values:

  • PASSED
  • ALARM
  • FAILED

failed_reason

String

Failure cause.

data

String

Failure data.

raw_error_msg

String

Failure details.

group

String

Check item group.

is_support_skip

Boolean

Whether to skip the check.

is_skipped

Boolean

Skipped.

failed_sub_jobs

Array of objects

Details about a failed subtask.

For details, see Table 34.

Table 34 Data structure description of field failed_sub_jobs

Parameter

Type

Description

id

String

Subtask ID.

name

String

Subtask name.

check_result

String

Subtask check result.

Table 35 Data structure description of field progress_info

Parameter

Type

Description

progress

String

Migration comparison progress in percentage.

incr_trans_delay

String

Incremental migration delay (unit: s).

incr_trans_delay_millis

String

Incremental migration delay (unit: ms).

task_mode

String

Migration type.

transfer_status

String

Migration status.

process_time

String

Migration time.

remaining_time

String

Estimated remaining time.

progress_map

Map<String,ProgressCompleteInfo>

Full migration progress details.

For details, see Table 36.

Table 36 Data structure description of field progress_map

Parameter

Type

Description

completed

String

Progress.

remaining_time

String

Estimated remaining time.

Table 37 Data structure description of field migration_object_progress_info

Parameter

Type

Description

migration_object_overview

Array of objects

Overview details.

For details, see Table 38.

create_time

String

Data generation time.

full_start_time

String

Start time of full migration.

full_complete_time

String

End time of full migration.

incr_start_time

String

Start time of incremental migration.

end_time

String

End time.

Table 38 Data structure description of field migration_object_overview

Parameter

Type

Description

type

String

Type.

src_count

String

Amount of data to be migrated.

dst_count

String

Amount of data migrated.

status

String

Status.

start_time

String

Start time.

end_time

String

End time.

Table 39 Data structure description of field metrics

Parameter

Type

Description

job_id

String

Task ID.

node_id

String

Instance ID.

time_stamp

String

Time when the metric is reported.

cpu_util

String

CPU usage.

mem_util

String

Memory usage.

network_incoming_bytes_rate

String

Network input throughput.

network_outgoing_bytes_rate

String

Network output throughput.

disk_read_bytes_rate

String

Disk read throughput.

disk_write_bytes_rate

String

Disk write throughput.

apply_rows_rate

String

Rows written into destination database per second.

apply_transactions_rate

String

DML TPS.

apply_ddl_rate

String

DDL TPS.

apply_average_execute_time

String

Average transaction execution time.

apply_average_commit_time

String

Average transaction commit time.

apply_current_state

String

Synchronization status.

Table 40 Data structure description of field compare_result

Parameter

Type

Description

objects_compare_overview_info

Object

Information body of object-level comparison overview.

For details, see Table 41.

objects_compare_detail_infos

Array of objects

Information body of object-level comparison details.

For details, see Table 43.

data_compare_task_list

Array of objects

List of data comparison tasks.

For details, see Table 44.

line_compare_overview_infos

Array of objects

Information body of row comparison overview.

For details, see Table 45.

line_compare_detail_infos

Array of objects

Information body of row comparison details.

For details, see Table 46.

content_compare_overview_infos

Array of objects

Information body of value comparison overview.

For details, see Table 47.

content_compare_detail_infos

Array of objects

Information body of value comparison details.

For details, see Table 48.

content_diff_detail_info

Object

Details about inconsistent value comparison data.

For details, see Table 49.

Table 41 Data structure description of field objects_compare_overview_info

Parameter

Type

Description

create_time

String

Time when a comparison task is created.

compare_results

Array of objects

Comparison result.

For details, see Table 42.

start_time

String

Start time of a comparison task.

status

String

Status of a comparison task. Values:

  • RUNNING: The comparison task is in progress.
  • WAITING_FOR_RUNNING: The comparison task is waiting to be started.
  • SUCCESSFUL: The comparison task is complete.
  • FAILED: The comparison task fails.
  • CANCELLED: The comparison task is canceled.

Enumerated values:

  • RUNNING
  • WAITING_FOR_RUNNING
  • SUCCESSFUL
  • FAILED
  • CANCELLED

export_status

String

Status of the exported comparison result.

report_remain_seconds

Long

Remaining validity period of the exported comparison result.

compare_job_id

String

ID of a comparison task.

error_msg

String

Failure cause.

Table 42 Data structure description of field compare_results

Parameter

Type

Description

type

String

Object type. Values:

  • DB: indicates a database.
  • TABLE: indicates a table.
  • VIEW: indicates a view.
  • EVENT: indicates an event.
  • ROUTINE: indicates a stored procedure and function.
  • INDEX: indicates an index.
  • TRIGGER: indicates a trigger.
  • SYNONYM: indicates a synonym.
  • FUNCTION: indicates a function.
  • PROCEDURE: indicates a stored procedure.
  • TYPE: indicates a user-defined type.
  • RULE: indicates a rule.
  • DEFAULT_TYPE: indicates a default value.
  • PLAN_GUIDE: indicates an execution plan.
  • CONSTRAINT: indicates a constraint.
  • FILE_GROUP: indicates a file group.
  • PARTITION_FUNCTION: indicates a partition function.
  • PARTITION_SCHEME: indicates a partition scheme.
  • TABLE_COLLATION: indicates table sorting rule.
  • EXTENSIONS: indicates a plug-in.

Enumerated values:

  • DB
  • TABLE
  • VIEW
  • EVENT
  • ROUTINE
  • INDEX
  • TRIGGER
  • SYNONYM
  • FUNCTION
  • PROCEDURE
  • TYPE
  • RULE
  • DEFAULT_TYPE
  • PLAN_GUIDE
  • CONSTRAINT
  • FILE_GROUP
  • PARTITION_FUNCTION
  • PARTITION_SCHEME
  • TABLE_COLLATION
  • EXTENSIONS

source_count

Long

Number of source objects.

target_count

Long

Number of destination objects.

status

String

Comparison result. Values: CONSISTENT: consistent. INCONSISTENT: inconsistent. COMPARING: The comparison is in progress. WAITING_FOR_COMPARISON: waiting for comparison. FAILED_TO_COMPARE: The comparison fails. TARGET_DB_NOT_EXIST: The destination database does not exist. CAN_NOT_COMPARE: Comparison cannot be performed.

Enumerated values:

  • CONSISTENT
  • INCONSISTENT
  • COMPARING
  • WAITING_FOR_COMPARISON
  • FAILED_TO_COMPARE
  • TARGET_DB_NOT_EXIST
  • CAN_NOT_COMPARE
Table 43 Data structure description of field objects_compare_detail_infos

Parameter

Type

Description

source_db_value

String

Comparison value of the source database.

target_db_value

String

Comparison value of the destination database.

source_db_name

String

Source database name.

target_db_name

String

Destination database name.

error_message

String

Failure cause.

Table 44 Data structure description of field data_compare_task_list

Parameter

Type

Description

id

String

ID of a comparison task.

type

String

Comparison type.

start_time

String

Start time.

end_time

String

End time.

status

String

Status of a comparison task. Values:

  • RUNNING: The comparison task is in progress.
  • WAITING_FOR_RUNNING: The comparison task is waiting to be started.
  • SUCCESSFUL: The comparison task is complete.
  • FAILED: The comparison task fails.
  • CANCELLED: The comparison task is canceled.
  • TIMEOUT_INTERRUPT: The comparison task times out.
  • FULL_DOING: Full verification is in progress.
  • INCRE_DOING: Incremental verification is in progress.

Enumerated values:

  • RUNNING
  • WAITING_FOR_RUNNING
  • SUCCESSFUL
  • FAILED
  • CANCELLED
  • TIMEOUT_INTERRUPT
  • FULL_DOING
  • INCRE_DOING

compute_type

String

Compute resource of a comparison task.

export_status

String

Status of the exported comparison result.

report_remain_seconds

String

Remaining validity period of the exported comparison result.

compare_job_tag

Map<String,String>

Tag of a comparison task.

error_msg

String

Failure cause.

Table 45 Data structure description of field line_compare_overview_infos

Parameter

Type

Description

source_db_name

String

Source database name.

target_db_name

String

Destination database name.

status

String

Row comparison result. Values:

  • CONSISTENT: consistent.
  • INCONSISTENT: inconsistent.
  • COMPARING: The comparison is in progress.
  • WAITING_FOR_COMPARISON: waiting for comparison.
  • FAILED_TO_COMPARE: The comparison fails.
  • TARGET_DB_NOT_EXIST: The destination database does not exist.
  • CAN_NOT_COMPARE: Comparison cannot be performed.

Enumerated values:

  • CONSISTENT
  • INCONSISTENT
  • COMPARING
  • WAITING_FOR_COMPARISON
  • FAILED_TO_COMPARE
  • TARGET_DB_NOT_EXIST
  • CAN_NOT_COMPARE
Table 46 Data structure description of field line_compare_detail_infos

Parameter

Type

Description

source_table_name

String

Table name of the source database.

source_row_num

String

Number of table rows in the source database.

target_table_name

String

Table name of the destination database.

target_row_num

String

Number of table rows in the destination database.

difference_row_num

String

Difference value.

status

String

Comparison result. Values:

  • CONSISTENT: consistent.
  • INCONSISTENT: inconsistent.
  • COMPARING: The comparison is in progress.
  • WAITING_FOR_COMPARISON: waiting for comparison.
  • FAILED_TO_COMPARE: The comparison fails.
  • TARGET_DB_NOT_EXIST: The destination database does not exist.
  • CAN_NOT_COMPARE: Comparison cannot be performed.

Enumerated values:

  • CONSISTENT
  • INCONSISTENT
  • COMPARING
  • WAITING_FOR_COMPARISON
  • FAILED_TO_COMPARE
  • TARGET_DB_NOT_EXIST
  • CAN_NOT_COMPARE

message

String

Message.

Table 47 Data structure description of field content_compare_overview_infos

Parameter

Type

Description

source_db

String

Source database name.

target_db

String

Destination database name.

status

String

Comparison result. Values:

  • CONSISTENT: consistent.
  • INCONSISTENT: inconsistent.
  • COMPARING: The comparison is in progress.
  • WAITING_FOR_COMPARISON: waiting for comparison.
  • FAILED_TO_COMPARE: The comparison fails.
  • TARGET_DB_NOT_EXIST: The destination database does not exist.
  • CAN_NOT_COMPARE: Comparison cannot be performed.

Enumerated values:

  • CONSISTENT
  • INCONSISTENT
  • COMPARING
  • WAITING_FOR_COMPARISON
  • FAILED_TO_COMPARE
  • TARGET_DB_NOT_EXIST
  • CAN_NOT_COMPARE

compare_result

Boolean

Comparison result.

Table 48 Data structure description of field content_compare_detail_infos

Parameter

Type

Description

source_db

String

Source database name.

target_db

String

Destination database name.

source_table_name

String

Table name of the source database.

target_table_name

String

Table name of the destination database.

source_row_num

Long

Number of table rows in the source database.

target_row_num

Long

Number of table rows in the destination database.

difference_row_num

Long

Number of inconsistent rows.

line_compare_result

Boolean

Row comparison result. Values:

  • true: consistent.
  • false: inconsistent.

content_compare_result

Boolean

Value comparison result. Values:

  • true: consistent.
  • false: inconsistent.

message

String

Failure cause.

Table 49 Data structure description of field content_diff_detail_info

Parameter

Type

Description

count

Long

Quantity.

target_meta_is_null

Long

Inconsistency details: The objects were found only in the source database.

source_meta_is_null

Long

Inconsistency details: The objects were found only in the destination database.

source_target_meta_not_null

Long

Inconsistency details: The objects were found in the source and destination databases.

contents_infos

Array of objects

Information list.

For details, see Table 50.

Table 50 Data structure description of field contents_infos

Parameter

Type

Description

source_key_value

Array of strings

Key value of the source database.

target_key_value

Array of strings

Key value of the destination database.

source_select_sql

String

Query the SQL statements of the source database.

target_select_sql

String

Query the SQL statements of the destination database.

Table 51 Data structure description of field support_import_file_resp

Parameter

Type

Description

file_size

String

File import threshold.

previous_select

String

Mode in which objects are selected last time.

Table 52 Data structure description of field connection_management

Parameter

Type

Description

driver_management

Object

Driver management.

For details, see Table 53.

Table 53 Data structure description of field driver_management

Parameter

Type

Description

driver_name

String

Driver name.

Table 54 Data structure description of field public_ip_list

Parameter

Type

Description

id

String

ID of a specified EIP.

public_ip

String

EIP.

type

String

Type of a task with an EIP bound.

  • In a primary/standby task, master indicates the primary task, and slave indicates the standby task.
  • In other cases, the value is fixed to master.

Enumerated values:

  • master
  • slave
Table 55 Data structure description of field children

Parameter

Type

Description

id

String

Subtask ID.

name

String

Subtask name.

Status code: 400

Table 56 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

Minimum length: 12

Maximum length: 12

error_msg

String

Error message.

Minimum length: 1

Maximum length: 512

Example Request

  • Querying the synchronization progress of a task
    https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/jobs/c7debc9c-8e09-4a5d-8dd6-cc44f78jb20r?type=progress
  • Querying the row comparison overview
    https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/jobs/c7debc9c-8e09-4a5d-8dd6-cc44f78jb20r?type=compare&query_type=overview&compare_type=line_compare&compare_task_id=1994b3e6-15ef-471e-8af1-7e2ed3e85b06&offset=0&limit=10
  • Querying task details
    https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/jobs/c7debc9c-8e09-4a5d-8dd6-cc44f78jb20r?type=detail
  • Querying data-level comparison tasks
    https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/jobs/c7debc9c-8e09-4a5d-8dd6-cc44f78jb20r?type=compare&compare_type=data_compare&query_type=list&limit=10&offset=0
  • Querying synchronization logs
    https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/jobs/c7debc9c-8e09-4a5d-8dd6-cc44f78jb20r?type=log&offset=0&limit=10
  • Querying the connection testing result
    https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/jobs/c7debc9c-8e09-4a5d-8dd6-cc44f78jb20r?type=network&query_id=669c9c19-99e3-4628-8c90-397136266701

Example Response

Status code: 200

OK

Querying basic task information (when type is set to detail)

{
  "job" : {
    "id" : "c7debc9c-8e09-4a5d-8dd6-cc44f78jb20r",
    "status" : "CONFIGURATION",
    "create_time" : "2022-11-07T16:15:18Z",
    "base_info" : {
      "name" : "DRS-1234",
      "job_type" : "sync",
      "engine_type" : "oracle-to-gaussdbv5",
      "job_direction" : "up",
      "task_type" : "FULL_INCR_TRANS",
      "net_type" : "eip",
      "charging_mode" : "on_demand",
      "enterprise_project_id" : "0",
      "description" : "",
      "expired_days" : 14,
      "tags" : [ {
        "key" : "test",
        "value" : "test"
      } ]
    },
    "source_endpoint" : [ {
      "db_type" : "oracle",
      "endpoint_type" : "offline",
      "endpoint_role" : "so",
      "endpoint" : {
        "id" : "f59e6118-da89-4fdb-9b98-65f56709928a",
        "endpoint_name" : "oracle",
        "ip" : "10.154.217.239",
        "db_port" : "1521",
        "db_user" : "ORACLE_USER",
        "db_name" : "serviceName.orcl"
      },
      "ssl" : {
        "ssl_link" : false
      }
    } ],
    "target_endpoint" : [ {
      "db_type" : "gaussdbv5",
      "endpoint_type" : "cloud",
      "endpoint_role" : "ta",
      "endpoint" : {
        "id" : "10deb576-8885-473b-a213-4d76e668dc0d",
        "endpoint_name" : "cloud_gaussdbv5",
        "instance_id" : "c2c7579bc09c490b9d8009db715aeb0ain14",
        "db_user" : "root"
      },
      "cloud" : {
        "region" : "cn-north-4",
        "project_id" : "9dc8c0f3f74c4dbb23c29cf0318ee561",
        "az_code" : "cn-north-4a,cn-north-4g,cn-north-4c"
      },
      "vpc" : {
        "vpc_id" : "2cb5d364-ae63-4fbb-85b7-7d59f4a88f8f",
        "subnet_id" : "2cb54324-ae63-4fbb-85b7-7d59f4a88f8f",
        "security_group_id" : "039a3s89-665a-43e2-9b4f-bda7d9ee148d"
      }
    } ],
    "alarm_notify" : {
      "alarm_to_user" : true,
      "topic_urn" : "urn:smn:cn-north-4:f2c2468c3ee7410c862a461ca073d2f2:test",
      "delay_time" : 60
    },
    "speed_limit" : [ {
      "begin" : "16:00",
      "end" : "15:59",
      "speed" : "10"
    } ],
    "policy_config" : {
      "ddl_trans" : false
    },
    "node_info" : {
      "spec" : {
        "node_type" : "medium"
      }
    }
  }
}

Status code: 400

Bad Request

{
  "error_code" : "DRS.10000010",
  "error_msg" : "Job does not exist, please check job ID."
}

Status Code

Status Code

Description

200

OK

400

Bad Request

Error Code

For details, see Error Code.